ZenCart Template Override System
Before you start styling and customizing the ZenCart templates is to understand the template override system described here.
Most of the templates to be overridden will be in catalog/includes/templates
There you see a folder called "classic". Anywhere you see the folder "classic" it indicates that there are templates that can be overridden. Let's say that we want to create a new template called "better". First we clone the "classic" template and call that the better template. To clone the "classic" template, you duplicate the classic folder whereever it is found. And then rename that newly cloned folder as "better".
As of version 1.3.7, here are all the location where you will find a "classic" folder...
includes/templates
includes/modules
includes/modules/sideboxes
includes/languages
includes/languages/english
includes/languages/english/extra_definitions
includes/languages/english/html_includes
includes/languages/english/modules/order_total
includes/languages/english/modules/payment
includes/languages/english/modules/shipping
Now you have cloned all the "classic" folders giving them the name "better".
Next we will change this line
$template_name = 'My Better Template';
in the template_info.php file of the "includes/templates/better" folder to give it a template name. In this case, we have changed it to "My Better Template".
Now you can switch between the default classic green ZenCart templates and your newly customizing better templates in the administrative panel under "Tools -> Template Selection".
In order for your "better" template to look like the "classic" template, you also have to set the layout box settings (Admin -> Tools -> Layout Box Controller) exactly as they had been set in the "classic" template.
Now to customize the "better" template, make changes to the files in the "better" folder. The typical templates I normally override are ...
catalog/includes/templates/better/template_info.php
catalog/includes/templates/better/common/html_header.php
catalog/includes/templates/better/common/tpl_footer.php
catalog/includes/templates/better/common/tpl_header.php
catalog/includes/templates/better/common/tpl_main_page.php
catalog/includes/templates/better/common/tpl_tabular_display.php
catalog/includes/templates/better/css/stylesheet.css
catalog/includes/templates/better/css/stylesheet_css_buttons.css
catalog/includes/templates/better/images/header_bg.jpg
catalog/includes/templates/better/images/logo.gif
catalog/includes/templates/better/images/scr_template_default.jpg
catalog/includes/templates/better/images/tile_back.gif
catalog/includes/templates/better/images/icons/success.gif
catalog/includes/templates/better/jscript/on_load/on_load_init.js
catalog/includes/templates/better/popup_shipping_estimator/tpl_main_page.php
catalog/includes/templates/better/sideboxes/tpl_shopping_cart.php
catalog/includes/templates/better/templates/tpl_account_default.php
catalog/includes/templates/better/templates/tpl_account_edit_default.php
catalog/includes/templates/better/templates/tpl_account_password_default.php
catalog/includes/templates/better/templates/tpl_address_book_default.php
catalog/includes/templates/better/templates/tpl_address_book_process_default.php
catalog/includes/templates/better/templates/tpl_checkout_confimration_default.php
catalog/includes/templates/better/templates/tpl_checkout_payment_address_default.php
catalog/includes/templates/better/templates/tpl_checkout_payment_default.php
catalog/includes/templates/better/templates/tpl_checkout_shipping_address_default.php
catalog/includes/templates/better/templates/tpl_checkout_shipping_default.php
catalog/includes/templates/better/templates/tpl_checkout_success_default.php
catalog/includes/templates/better/templates/tpl_create_account_default.php
catalog/includes/templates/better/templates/tpl_create_account_success_default.php
catalog/includes/templates/better/templates/tpl_down_for_maintenance_default.php
catalog/includes/templates/better/templates/tpl_index_default.php
catalog/includes/templates/better/templates/tpl_index_product_list.php
catalog/includes/templates/better/templates/tpl_login_default.php
catalog/includes/templates/better/templates/tpl_modules_checkout_new_address.php
catalog/includes/templates/better/templates/tpl_modules_create_account.php
catalog/includes/templates/better/templates/tpl_module_main_product_image.php
catalog/includes/templates/better/templates/tpl_modules_product_listing.php
catalog/includes/templates/better/templates/tpl_modules_shipping_estimator.php
catalog/includes/templates/better/templates/tpl_page_default.php
catalog/includes/templates/better/templates/tpl_page_not_found_default.php
catalog/includes/templates/better/templates/tpl_password_forgotten_default.php
catalog/includes/templates/better/templates/tpl_product_info_display.php
catalog/includes/templates/better/templates/tpl_shopping_cart_default.php
catalog/includes/templates/better/templates/tpl_time_out_default.php
catalog/includes/modules/better/product_listing.php
catalog/includes/languages/better/english.php
catalog/includes/languages/english/better/checkout_payment_address.php
catalog/includes/languages/english/better/checkout_shipping_address.php
catalog/includes/languages/english/better/checkout_success.php
catalog/includes/languages/english/better/create_account.php
catalog/includes/languages/english/better/create_account_success.php
catalog/includes/languages/english/better/down_for_maintenance.php
catalog/includes/languages/english/better/email_extras.php
catalog/includes/languages/english/better/index.php
catalog/includes/languages/english/better/login.php
catalog/includes/languages/english/better/shopping_cart.php
catalog/includes/languages/english/better/time_out.php
catalog/nddbc.html
Next Lesson:
| |
About the Suggestive Sell Feature |
|
|