-
Products listing
Hi, I am relatively new to Zen Cart. I understand the override system but am unsure which page a file I wish to modify relates to - I want to make changes to the way the products show up on the category page. I THINK the file may be product_listing.php. Can anyone tell me what the file I require is and which page it refers to so I can create the appropriate jscript*.php file in the appropriate folder.
I want the page to be able to load specific js scripts which I have been unable to do at this stage.
If it helps, the address bar in IE has this as part of the address:
index.php?main_page=index&cPath=44_48.
Hope someone can help.
-
Re: Products listing
The /includes/modules/YOUR_TEMPLATE/product_listing.php affects the display of the product listing (i.e. one of the main_page=index) pages. If you have javascript that should be run for a particular category, you could create a file named /includes/modules/pages/index/jscript_customized.php. At the beginning of the file (per your example), you could have:
Code:
if ($_GET['cPath'] == '44_48') {
<include your category-specific jscript here>
}
-
Re: Products listing
Thanks for that. It isn't working properly yet but you have pointed me in the right direction. Thanks again.
-
Re: Products listing
Happy to help; here's the link to the WIKI on JavaScript Overrides.