Forums / General Questions / Products listing

Products listing

Views: 669

Results 1 to 4 of 4
29 Feb 2012, 10:09 PM
#1
eleejay avatar

eleejay

New Zenner

Join Date:
Feb 2012
Posts:
2
Plugin Contributions:
0

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.

29 Feb 2012, 11:19 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,110
Plugin Contributions:
56

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:

if ($_GET['cPath'] == '44_48') {
  <include your category-specific jscript here>
}
1 Mar 2012, 2:18 AM
#3
eleejay avatar

eleejay

New Zenner

Join Date:
Feb 2012
Posts:
2
Plugin Contributions:
0

Re: Products listing

Thanks for that. It isn't working properly yet but you have pointed me in the right direction. Thanks again.

1 Mar 2012, 6:18 PM
#4
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,110
Plugin Contributions:
56

Re: Products listing

Happy to help; here's the link to the WIKI on JavaScript Overrides.