Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2015
    Posts
    64
    Plugin Contributions
    0

    Default Random products from different categories

    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

  2. #2
    Join Date
    Feb 2015
    Posts
    64
    Plugin Contributions
    0

    Default Re: Random products from different categories

    Can anyone please respond here.

    Thanks,

  3. #3
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,238
    Plugin Contributions
    1

    Default Re: Random products from different categories

    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

  4. #4
    Join Date
    Feb 2015
    Posts
    64
    Plugin Contributions
    0

    Default Re: Random products from different categories

    Quote Originally Posted by simon1066 View Post

    New Product Listing - Limited to ... [value] 0
    Thanks for the response, where is this located? I coulnd't find in configuration.
    Secondly can please some one write me the code to show random products on home page?

  5. #5
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Random products from different categories

    Quote Originally Posted by RiazShahid View Post
    Thanks for the response, where is this located? I coulnd't find in configuration.
    Secondly can please some one write me the code to show random products on home page?
    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...

 

 

Similar Threads

  1. Viewing Similar Products From Different Categories
    By jmicah in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 5 May 2010, 07:53 PM
  2. Displaying New products from different Categories
    By tiltem in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 5 Mar 2010, 08:20 PM
  3. discount on products from different categories?
    By somasema in forum Setting Up Specials and SaleMaker
    Replies: 2
    Last Post: 22 Feb 2009, 08:04 PM
  4. Random products from category & subcategory
    By christoph_lutz in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 7 Feb 2008, 01:16 PM
  5. Removing random products from subcategories
    By hadeeya in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 28 May 2006, 01:37 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR