Page 1 of 4 123 ... LastLast
Results 1 to 10 of 34
  1. #1
    Join Date
    Nov 2006
    Posts
    58
    Plugin Contributions
    0

    Default Excluding a product or category from best selling list

    Can that be done?

    I am having som free products in my store, and off course - those are the most downloaded products. So I would like to exclude these from the list of most selling items. Is that possible.

    Also - how do I make the newest item show up first in the list when choosing a single manufacturer?

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,682
    Plugin Contributions
    6

    Default Re: Excluding a product or category from best selling list

    If the products are marked as Product is Free YES

    Then you could customize the sidebox to not include products where product_is_free = 1
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  3. #3
    Join Date
    Nov 2006
    Posts
    58
    Plugin Contributions
    0

    Default Re: Excluding a product or category from best selling list

    Quote Originally Posted by Ajeh View Post
    If the products are marked as Product is Free YES

    Then you could customize the sidebox to not include products where product_is_free = 1
    Ok - and where do I do this? Sory about my stupiduty

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,682
    Plugin Contributions
    6

    Default Re: Excluding a product or category from best selling list

    If I was me ... but I'm not ... I'd peek in the directories:
    /includes/modules/sideboxes
    /includes/templates/template_default/sideboxes

    Copy the bestsellers to my own templates and override directories:
    /includes/modules/sideboxes/your_template_dir
    /includes/templates/your_template_dir/sideboxes

    And then alter the SELECT statements to work the way I need them too ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  5. #5
    Join Date
    Nov 2006
    Posts
    58
    Plugin Contributions
    0

    Default Re: Excluding a product or category from best selling list

    Sorry - but I'm way more stupid than that.

    I have downloded the two files but what do I do next.

    Feel free to talk to me as if I was a child....

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,682
    Plugin Contributions
    6

    Default Re: Excluding a product or category from best selling list

    After you copy the file:
    /includes/modules/sideboxes/best_sellers.php

    to your templates and overrides directory:
    /includes/modules/sideboxes/your_template_dir/best_sellers.php

    Change the 2 select statements to include:
    PHP Code:
          $best_sellers_query "select distinct p.products_id, pd.products_name, p.products_ordered
                                 from " 
    TABLE_PRODUCTS " p, " TABLE_PRODUCTS_DESCRIPTION " pd, "
                                        
    TABLE_PRODUCTS_TO_CATEGORIES " p2c, " TABLE_CATEGORIES " c
                                 where p.products_status = '1'
                                 and p.products_ordered > 0
                                 and p.products_id = pd.products_id
                                 and pd.language_id = '" 
    . (int)$_SESSION['languages_id'] . "'
                                 and p.products_id = p2c.products_id
                                 and p2c.categories_id = c.categories_id
                                 and '" 
    . (int)$current_category_id "' in (c.categories_id, c.parent_id)
                                 and p.product_is_free != 1
                                 order by p.products_ordered desc, pd.products_name
                                 limit " 
    MAX_DISPLAY_BESTSELLERS
    PHP Code:
          $best_sellers_query "select distinct p.products_id, pd.products_name, p.products_ordered
                                 from " 
    TABLE_PRODUCTS " p, " TABLE_PRODUCTS_DESCRIPTION " pd
                                 where p.products_status = '1'
                                 and p.products_ordered > 0
                                 and p.products_id = pd.products_id
                                 and pd.language_id = '" 
    . (int)$_SESSION['languages_id'] . "'
                                 and p.product_is_free != 1
                                 order by p.products_ordered desc, pd.products_name
                                 limit " 
    MAX_DISPLAY_BESTSELLERS
    NOTE: this assumes that your Free Products are Marked:
    Product is Free: YES
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  7. #7
    Join Date
    Apr 2007
    Posts
    4
    Plugin Contributions
    0

    Default Re: Excluding a product or category from best selling list

    Is it possible to do this if the product is not free??????? PLease help - this is exactly what I need and I havent a clue how.

  8. #8
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,682
    Plugin Contributions
    6

    Default Re: Excluding a product or category from best selling list

    Could you expand on what it is you want to exclude if you are not trying to exclude the Free Product?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  9. #9
    Join Date
    Apr 2007
    Posts
    4
    Plugin Contributions
    0

    Default Re: Excluding a product or category from best selling list

    Hi, its a collection of sticker-type decals that we are helping distribute for a local charity. Because they're just $1 people tend to order several of them at once, which means that these items (they're in a category of their own) would dominate the bestseller list or take it up alltogether, and since its not a product of our own my boss wants me to find a way to prevent them showing up there.

  10. #10
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,682
    Plugin Contributions
    6

    Default Re: Excluding a product or category from best selling list

    Are they all in the same category?

    If so, you could set the best sellers to not select products where the master_categories_id is that category ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

 

 
Page 1 of 4 123 ... LastLast

Similar Threads

  1. Product List Validation Errors
    By rispku in forum Bug Reports
    Replies: 2
    Last Post: 8 Aug 2006, 01:21 PM

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
  •