-
Re: Best sellers "page"
I'm sorry, I think I made a booboo in my posts LOL, the line I added apparently was
and p.products_ordered > 0
And because I have stock/quantity disabled, I didn't add it in the second section, I think the products quantity was already there maybe? If you add the above line to both sections, as highlighted it should work for you
Code:
if (BEST_SELLERS_SHOW_OUT_OF_STOCK == 'true') {
$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 " . TABLE_PRODUCTS . " p
LEFT JOIN " . TABLE_MANUFACTURERS . " m ON (p.manufacturers_id = m.manufacturers_id), " . 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 = :languageID " .
"order by p.products_ordered desc ". $order_by;
} else {
$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 " . TABLE_PRODUCTS . " p
LEFT JOIN " . TABLE_MANUFACTURERS . " m ON (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd
WHERE p.products_status = 1
and p.products_ordered > 0
AND p.products_quantity > 0
AND p.products_id = pd.products_id
AND pd.language_id = :languageID " .
"order by p.products_ordered desc ". $order_by;
}
A tiny bit of knowledge mixed with blonde can be dangerous it seems LOL
Can one of the mods maybe go back and edit my previous post on this or delete it?
:blush:
-
Re: Best sellers "page"
-
Re: Best sellers "page"
-
Re: Best sellers "page"
Has anyone figured out a way to show a specific number of best sellers? I would only like to show 10 on the page at all times.
-
Re: Best sellers "page"
The best sellers page uses the same display as the categories, and in my store at least lol it displays the same amount of products as my categories, so I *think* it depends on how many you have set in admin for categories to show.....but I could be wrong :)
-
Re: Best sellers "page"
There isn't anywhere in admin to set the number of best sellers showing on this mod. It will be some type of code modification. There was some discussion on it earlier in this thread but nothing in any of those threads did the trick for me.
I would like for this page to only show the top 8 sellers. Currently it shows every product in my store which makes the page useless.
-
1 Attachment(s)
Re: Best sellers "page"
I updated the module to add these features:
1. Only list products that have been sold (thanks to christon26)
2. Include sold out products switch now moved to admin
3. Allow setting the maximum number of best sellers listed. Please note that this number can NOT be less that the number of products listed per page, so say if you have 20 products listed per page then the minimum number can only be 20 (this is due to the fact that this module use the product listing template)
Enjoy
-
Re: Best sellers "page"
Too cool I get a lil mention (blushes from someone who generally has no idea what she's doing), thanx! LOL
If anyone is interested, I decided that I didn't want my freebies listed in the bestsellers as they were 'bought' so many times they all went to the top LOL so I added the following in under my previously posted addition in both relevant sections:
Code:
if (BEST_SELLERS_SHOW_OUT_OF_STOCK == 'true') {
$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 " . TABLE_PRODUCTS . " p
LEFT JOIN " . TABLE_MANUFACTURERS . " m ON (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd
WHERE p.products_status = 1
and p.products_ordered > 0
and p.products_price > 0
AND p.products_id = pd.products_id
AND pd.language_id = :languageID " .
"order by p.products_ordered desc ". $order_by;
} else {
$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 " . TABLE_PRODUCTS . " p
LEFT JOIN " . TABLE_MANUFACTURERS . " m ON (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd
WHERE p.products_status = 1
AND p.products_quantity > 0
and p.products_ordered > 0
and p.products_price > 0
-
Re: Best sellers "page"
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/
-
Re: Best sellers "page"
Thanks...very useful update to your excellent script
:clap: