Hi,
I want to show random products from different categories at my home page. Can someone tell me the code which I put to show these products?
I use a customized theme which doesn't have this option
Hi,
I want to show random products from different categories at my home page. Can someone tell me the code which I put to show these products?
I use a customized theme which doesn't have this option
Can anyone please respond here.
Thanks,
The core code allows you to show random products from all categories on the home page. Without custom coding the only way I can see to show random products from specific categories on the home page is to make products from those categories 'Featured Products' and use the Show Featured Products on Main Page feature.
If you want to do the former then use the Show New Products on Main Page feature and set
New Product Listing - Limited to ... [value] 0
Simon
While the previous post could have had a little more information about how to find that setting, this is a good opportunity to learn to use the developers tool kit found in the admin under Tools. From there you can search the configuration settings as well as the files on the server.
In the second box down, enter: New Product Listing
Then search. You should be presented with all configuration options that include that statement. Then from there you can choose to modify the setting and the system will take you to the configuration section that has the value to modify.
Regarding the code to display random product, as suggested by simon1066, the code is present in the default template files and can be "borrowed" to put into your own template files if it is absent from them. How to find it?
Again, you can use the developers tool kit. This time though, once you have enabled one of the other options to show random product, you can more easily find the code responsible. When viewing the store page that shows the random product, right click on your page and view the source. Locate the randomly shown product. Look up a little in the page source to find a section like: <!-- bof... then search in developers tool kit for that applicable statement. When found you should be able to then open the file and continue digging for the desired code.
Doing this will help you be able to make other changes to your site and become more familiar with how it is implemented in ZC.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Bookmarks