Difference between revisions of "How to Use a Template"
PeterRobert (talk | contribs) |
PeterRobert (talk | contribs) |
||
| Line 29: | Line 29: | ||
Edit this new '''product_listing.php''' | Edit this new '''product_listing.php''' | ||
| + | |||
| + | On a clean 1.0.7.14 install, on the shop side, go to Categories → Fruit → Apples & Pears''' to see this: | ||
| + | |||
Upload the new '''/templates/override/includes/components/''' to your server. | Upload the new '''/templates/override/includes/components/''' to your server. | ||
Revision as of 05:54, 5 February 2021
<historylink type="back">🠈 Back</historylink> 🠉 FAQS TIPS & TRICKS
In a new installation the override template is selected.
The override template is stored in the templates folder/directory of your shop in the override folder/directory.
Additional templates can be installed or created in the templates folder/directory.
These can then be selected in Configuration → My Store → Template Selection
The files in the override template (or other template installed or created and then selected) will override the files in the shop and files in the default template.
Files in the override template will never be overwritten by updates so any changes will persist.
Example
Make some changes to product_listing.php which displays products in the shop.
This file is located in the default template in /templates/default/includes/components/
The changed file needs to be saved using the same folder structure in the override template so will be saved in /templates/override/includes/components/
So, create the folder components in /templates/override/includes/ - this can be done in your website backup folder on your local computer.
Now, open /templates/default/includes/components/product_listing.php and save a copy in the new /templates/override/includes/components/
Edit this new product_listing.php
On a clean 1.0.7.14 install, on the shop side, go to Categories → Fruit → Apples & Pears to see this:
Upload the new /templates/override/includes/components/ to your server.
Phoenix Cart User Guide, like CE Phoenix Cart, is free to use but is maintained by unpaid volunteers.
All other content is the reserved Intellectual Property and Copyright of phoenixcart.org