Forums / All Other Contributions/Addons / Best sellers "page"

Best sellers "page"

Views: 20,057

Results 81 to 93 of 93
30 Aug 2009, 5:12 PM
#81
doinfinity avatar

doinfinity

New Zenner

Join Date:
May 2009
Posts:
2
Plugin Contributions:
0

Best sellers "page"

yellow1912:

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.

1 Sep 2009, 11:12 PM
#82
jolasjolas avatar

jolasjolas

New Zenner

Join Date:
Sep 2009
Posts:
2
Plugin Contributions:
0

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

4 Nov 2009, 1:15 AM
#83
gothstone avatar

gothstone

Zen Follower

Join Date:
Jun 2005
Posts:
330
Plugin Contributions:
0

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

6 Nov 2009, 2:16 AM
#84
gothstone avatar

gothstone

Zen Follower

Join Date:
Jun 2005
Posts:
330
Plugin Contributions:
0

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

<?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

12 May 2010, 8:58 PM
#85
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,567
Plugin Contributions:
58

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:

SELECT  DISTINCT (p2c.products_id), SUM( op.products_quantity )  AS products_ordered, pd.products_name, p.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 ( 8, 6, 10, 11, 12, 4, 7, 9, 13, 5  ) 
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?
13 May 2010, 1:45 AM
#86
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,567
Plugin Contributions:
58

Re: Best sellers "page"

numinix:

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:

SELECT DISTINCT (p2c.products_id), SUM( op.products_quantity ) AS products_ordered, pd.products_name, p.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 ( 8, 6, 10, 11, 12, 4, 7, 9, 13, 5 )
GROUP BY p2c.products_id
ORDER BY products_ordered DESC , products_name ASC;

If anyone was wondering how to do this, the following query worked:

```php
SELECT  DISTINCT (p2c.products_id), SUM( op.products_quantity )  AS products_ordered, pd.products_name, p.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 ( 8, 6, 10, 11, 12, 4, 7, 9, 13, 5  ) 
GROUP  BY p2c.products_id, p2c.categories_id
ORDER  BY products_ordered DESC , products_name ASC;
```  
13 May 2010, 2:44 AM
#87
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

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!]
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!

13 May 2010, 5:50 AM
#88
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,567
Plugin Contributions:
58

Re: Best sellers "page"

Ajeh:

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.

18 Jul 2011, 8:29 PM
#89
www_heymama_ie avatar

www_heymama_ie

New Zenner

Join Date:
Apr 2011
Posts:
4
Plugin Contributions:
0

Re: Best sellers "page"

yellow1912:

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?

25 Jul 2011, 11:55 AM
#90
www_heymama_ie avatar

www_heymama_ie

New Zenner

Join Date:
Apr 2011
Posts:
4
Plugin Contributions:
0

Re: Best sellers "page"

Anyone? :(

28 Mar 2012, 6:10 PM
#92
raj3396 avatar

raj3396

New Zenner

Join Date:
May 2011
Location:
DELHI,INDIA
Posts:
43
Plugin Contributions:
0

Re: Best sellers "page"

hi my site is on zen cart version 1.39h i have installed the bestsellers page.but it is not showing any product it just shows TEXT_NO_PRODUCTS the link is http://www.mol wa.com/index.php?main_page=best_sellers can any one help..thanks in advance.

13 Aug 2013, 5:29 PM
#93
waterbender avatar

waterbender

New Zenner

Join Date:
May 2010
Posts:
84
Plugin Contributions:
0

Re: Best sellers "page"

Hi, is this module on the plugin page still compatible with the latest zen cart v1.5.1?