Page 9 of 10 FirstFirst ... 78910 LastLast
Results 81 to 90 of 93
  1. #81
    Join Date
    May 2009
    Posts
    2
    Plugin Contributions
    0

    Default Re: Best sellers "page"

    Quote Originally Posted by yellow1912 View Post
    I updated this module once again. Now it will correctly show the number of pages of best sellers (for example, if you set max to 10, and you have 10 products per page then it wont display all the 1.2.3.4.5.... page)

    http://public.rubikintegration.com/
    Hello yellow1912,

    Can you please upload the mod file again? I cannot find any place to download it.

    Thank you in advance.

  2. #82
    Join Date
    Sep 2009
    Posts
    2
    Plugin Contributions
    0

    Default Re: Best sellers "page"

    Hello,

    I wonder if someone out there knows how to modify the sidebox best sellers.

    In best sellers sidebox I want only the top 5 to be shown.

    I have search the admin area but cant find any settings to modify this.

    Help needed, thanks in advance

    //Jolas jolas

  3. #83
    Join Date
    Jun 2005
    Posts
    355
    Plugin Contributions
    0

    Default Re: Best sellers "page"

    I have best sellers installed and working, but I would like to change it to be a "hot items". In theory I should be able to modify the SQL statement in header_php.php to limit the query the number of sales in the last 30 days. Unfortunately I have no idea how to do that. Anyone know how?
    2 + 2 = 5 for extremely large values of 2

    Pez Collectors Store •••••••• My Plugins List

  4. #84
    Join Date
    Jun 2005
    Posts
    355
    Plugin Contributions
    0

    Default Re: Best sellers "page"

    I found a way to limit it to the last 30 days. The code works, but I would greatly appreciate someone looking at it and maybe cleaning it up or optimizing it a bit. Here is the resulting header_php.php
    Code:
    <?php
    /**
     * Best Seller Page
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * $Id: header_php.php 165 2008-03-21 04:21:50Z yellow1912 $
     */ 
    require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
    $breadcrumb->add(NAVBAR_TITLE);
    $disp_order_default = PRODUCT_ALL_LIST_SORT_DEFAULT;
    require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_LISTING_DISPLAY_ORDER));
    
    $listing_sql = "SELECT p.products_type, p.products_id, pd.products_name, p.products_image, 
    p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name, 
    p.products_model, p.products_quantity, p.products_weight, p.product_is_call, 
    p.product_is_always_free_shipping, p.products_qty_box_status, p.master_categories_id FROM orders o, orders_products op, products p, products_description pd, manufacturers m
    WHERE o.orders_id = op.orders_id
    AND op.products_id = p.products_id
    AND p.products_id = pd.products_id
    AND p.manufacturers_id = m.manufacturers_id
    AND p.products_status = 1
    AND TO_DAYS(date_purchased) >= (TO_DAYS(NOW())-60) GROUP BY op.products_id ORDER BY SUM(op.products_quantity) desc";
    
    $listing_sql = $db->bindVars($listing_sql, ':languageID', $_SESSION['languages_id'], 'integer');
    
    //check to see if we are in normal mode ... not showcase, not maintenance, etc
    $show_submit = zen_run_normal();
    $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
    'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
    'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
    'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
    'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
    'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
    'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE);
    
    /*                         ,
    'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);
    */
    asort($define_list);
    reset($define_list);
    $column_list = array();
    foreach ($define_list as $key => $value)
    {
    	if ($value > 0) $column_list[] = $key;
    }
    ?>
    2 + 2 = 5 for extremely large values of 2

    Pez Collectors Store •••••••• My Plugins List

  5. #85
    Join Date
    Apr 2007
    Location
    Vancouver, Canada
    Posts
    1,554
    Plugin Contributions
    70

    Default Re: Best sellers "page"

    I'm working on a simple module that loads the best sellers from a given category from the previous x months. Here is the SQL query:

    PHP Code:
    SELECT  DISTINCT (p2c.products_id), SUMop.products_quantity )  AS products_orderedpd.products_namep.products_image
    FROM products_to_categories  p2c
    LEFT  JOIN orders_products op ON 
    op.products_id p2c.products_id 
    LEFT  JOIN orders o ON o.orders_id =  op.orders_id 
    LEFT  JOIN products_description  pd ON pd.products_id p2c.products_id 
    LEFT  JOIN products p ON p.products_id =  p2c.products_id 
    WHERE p.products_status =1
    AND pd.language_id =   '1'
    AND (o.date_purchased >=  '2010-03-12'
    AND o.date_purchased <=  '2010-05-13')
    AND 
    p2c.categories_id
    IN 
    86101112479135  
    GROUP  BY p2c.products_id
    ORDER  BY products_ordered DESC 
    products_name ASC
    The issue I am having is that if a product is linked, it doubles up the products_ordered. Any fresh eyes see the mistake?

  6. #86
    Join Date
    Apr 2007
    Location
    Vancouver, Canada
    Posts
    1,554
    Plugin Contributions
    70

    Default Re: Best sellers "page"

    Quote Originally Posted by numinix View Post
    I'm working on a simple module that loads the best sellers from a given category from the previous x months. Here is the SQL query:

    PHP Code:
    SELECT  DISTINCT (p2c.products_id), SUMop.products_quantity )  AS products_orderedpd.products_namep.products_image
    FROM products_to_categories  p2c
    LEFT  JOIN orders_products op ON 
    op.products_id p2c.products_id 
    LEFT  JOIN orders o ON o.orders_id =  op.orders_id 
    LEFT  JOIN products_description  pd ON pd.products_id p2c.products_id 
    LEFT  JOIN products p ON p.products_id =  p2c.products_id 
    WHERE p.products_status =1
    AND pd.language_id =   '1'
    AND (o.date_purchased >=  '2010-03-12'
    AND o.date_purchased <=  '2010-05-13')
    AND 
    p2c.categories_id
    IN 
    86101112479135  
    GROUP  BY p2c.products_id
    ORDER  BY products_ordered DESC 
    products_name ASC
    The issue I am having is that if a product is linked, it doubles up the products_ordered. Any fresh eyes see the mistake?
    If anyone was wondering how to do this, the following query worked:

    PHP Code:
    SELECT  DISTINCT (p2c.products_id), SUMop.products_quantity )  AS products_orderedpd.products_namep.products_image
    FROM products_to_categories  p2c
    LEFT  JOIN orders_products op ON 
    op.products_id p2c.products_id 
    LEFT  JOIN orders o ON o.orders_id =  op.orders_id 
    LEFT  JOIN products_description  pd ON pd.products_id p2c.products_id 
    LEFT  JOIN products p ON p.products_id =  p2c.products_id 
    WHERE p.products_status =1
    AND pd.language_id =   '1'
    AND (o.date_purchased >=  '2010-03-12'
    AND o.date_purchased <=  '2010-05-13')
    AND 
    p2c.categories_id
    IN 
    86101112479135  
    GROUP  BY p2c.products_idp2c.categories_id
    ORDER  BY products_ordered DESC 
    products_name ASC

  7. #87
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Best sellers "page"

    You are hard coding the categories_id rather than pulling dynamically pulling from a Top Level category to grab all of its kids and get them that way?

    Or you don't care about being dynamic and just want the few listed categories_id used?
    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.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  8. #88
    Join Date
    Apr 2007
    Location
    Vancouver, Canada
    Posts
    1,554
    Plugin Contributions
    70

    Default Re: Best sellers "page"

    Quote Originally Posted by Ajeh View Post
    You are hard coding the categories_id rather than pulling dynamically pulling from a Top Level category to grab all of its kids and get them that way?

    Or you don't care about being dynamic and just want the few listed categories_id used?
    That list is created dynamically in PHP. I was just showing the raw SQL query so it would be easier to read and test using PHPMYADMIN.

  9. #89
    Join Date
    Apr 2011
    Posts
    4
    Plugin Contributions
    0

    Default Re: Best sellers "page"

    Quote Originally Posted by yellow1912 View Post
    I updated this module once again. Now it will correctly show the number of pages of best sellers (for example, if you set max to 10, and you have 10 products per page then it wont display all the 1.2.3.4.5.... page)

    http://public.rubikintegration.com/
    Does anyone have a link to the zip file in which the page num issue was fixed?

  10. #90
    Join Date
    Apr 2011
    Posts
    4
    Plugin Contributions
    0

    Default Re: Best sellers "page"

    Anyone?

 

 
Page 9 of 10 FirstFirst ... 78910 LastLast

Similar Threads

  1. v139h restoring "Products Ordered" list anr therefore best sellers box
    By freedude in forum General Questions
    Replies: 1
    Last Post: 17 Jun 2012, 06:00 PM
  2. Why "Best Sellers" linked to "Specials" (sales module?)?
    By Cluelessjt in forum Basic Configuration
    Replies: 1
    Last Post: 29 Aug 2010, 02:54 AM
  3. Display "Best Sellers" like "What's New" or "Specials" lists.
    By jsmooth in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 22 Jun 2010, 12:06 AM
  4. "Best sellers" scrolling sidebox thumbnail problem
    By chris32882 in forum Addon Sideboxes
    Replies: 29
    Last Post: 15 Feb 2009, 12:56 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