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

Best sellers "page"

Views: 20,057

Results 1 to 20 of 93
20 Sep 2007, 3:35 AM
#1
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Best sellers "page"

We already have 2 "best sellers" mods:

  1. Display the best sellers items on the side box.
  2. Display them on the main page

None of those suit my need, so I modify it a bit a make a best sellers page that can be accessed at ?main_page=best_sellers. This one also shares the same layout with product_listing.

Let me know if you want it, otherwise I don't have to waste my time and post some thing no one needs.

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

20 Sep 2007, 10:27 AM
#2
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
733
Plugin Contributions:
0

Re: Best sellers "page"

Hello there,

I think this is a great idea for a mod. I would find use for it. I am using a couple of your mods at the minute, so I will send you some readies when I can as I have found them beneficial.

Regards,

Heathenmagic:smile:

20 Sep 2007, 10:40 AM
#3
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
733
Plugin Contributions:
0

Re: Best sellers "page"

Hello there,

I think this is a great idea for a mod. I would find use for it. I am using a couple of your mods at the minute, so I will send you some readies when I can as I have found them beneficial.

Regards,

Heathenmagic:smile:

20 Sep 2007, 12:58 PM
#4
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Best sellers "page"

This mod will create a best-sellers page that can be accessed at ?main_page=best_sellers
Unlike the "best sellers reloaded" mod, this one does not have its own template, it uses the product_listing template (the template used for listing category products)
The reason for that:

  1. It keeps the mod extremely light weight.
  2. Keep the listing consistent with the product_listing.

You can download it at the download section (waiting for approval) or at my svn server:
https://svn.rubikintegration.com/zencart_mods/best_sellers_mod/

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

21 Sep 2007, 7:09 AM
#5
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Best sellers "page"

Cool. This will allow removal of the Best Sellers sidebox and instead put up a link to the new Best Sellers page in both the Information sidebox and the header drop down menu. Let us know when it gets posted to ZC downloads area. Can't wait to try out.

Woody

21 Sep 2007, 7:26 AM
#6
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Best sellers "page"

You can download it at the download section (waiting for approval) or at my svn server:
**https://svn.rubikintegration.com/zen...t\_sellers\_mod/**

Might want to add following to best_sellers.php

define('TABLE_HEADING_IMAGE', 'Image');
define('TABLE_HEADING_PRICE', 'Price');

Apart from that..
Downloaded, tested, works fine.. thank you.
:thumbsup:

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

21 Sep 2007, 11:22 AM
#7
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Best sellers "page"

Ah, actually it's because I use a custom template which does not use those fields.^^

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

26 Sep 2007, 4:13 AM
#9
jessiebags avatar

jessiebags

New Zenner

Join Date:
May 2007
Location:
Tulsa, OK
Posts:
15
Plugin Contributions:
0

Re: Best sellers "page"

great mod! works great, thank you! :)

-Much Love, Jessica :)
-My Blog - MYSPACE - [email protected]
-Make a small loan, Make a big difference - Kiva.org

27 Sep 2007, 12:20 PM
#10
bigjoed avatar

bigjoed

Zen Follower

Join Date:
Apr 2006
Location:
Fort Bragg, North Carolina
Posts:
152
Plugin Contributions:
0

Re: Best sellers "page"

I think that this is an excellent mod. Can you tell me how to get the "Best Sellers" to show on the breadcrumbs and the title of the page?

Thanks

30 Sep 2007, 7:57 PM
#11
mrforce avatar

mrforce

New Zenner

Join Date:
Aug 2006
Location:
Big D
Posts:
36
Plugin Contributions:
0

Re: Best sellers "page"

bigjoed,

For breadcrumbs - add this to the top of: includes/modules/pages/best_sellers/header_php.php

$breadcrumb->add(TABLE_HEADING_BEST_SELLERS);

Hope this helps,

Craig

29 Nov 2007, 2:28 PM
#12
dvdtitan avatar

dvdtitan

New Zenner

Join Date:
Apr 2007
Posts:
87
Plugin Contributions:
0

Re: Best sellers "page"

I want to place the link to this bestsellers mod in the "our products" sidebox along with the "new products", "featured products" and "all product" links.

Can anyone advise how i do this please.

6 Dec 2007, 5:24 PM
#13
nullmind avatar

nullmind

Zen Follower

Join Date:
Jul 2007
Posts:
129
Plugin Contributions:
0

Re: Best sellers "page"

I have installed it and workes great, except .. well check it out

http://rcnut.com/best_sellers

on the top of the items list it shows

TABLE_HEADING_IMAGE TABLE_HEADING_MODEL Item Name TABLE_HEADING_MANUFACTURER TABLE_HEADING_PRICE Stock.

instead of

Product Image Model- Item Name Manufacturer Price Stock.

Any ideas ? :/

6 Dec 2007, 5:26 PM
#14
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Best sellers "page"

The definitions for those are missing, you can edit your language file to fix it.

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

6 Dec 2007, 5:38 PM
#15
nullmind avatar

nullmind

Zen Follower

Join Date:
Jul 2007
Posts:
129
Plugin Contributions:
0

Re: Best sellers "page"

Thanks, I added those to best_sellers.php and that fixed it

but I still having a small problem, chek the page, the defenitions and descriptions below dont line up, I have an extra one "Model" that does not show, and that trows the rest off

6 Dec 2007, 5:45 PM
#16
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Best sellers "page"

Open includes/modules/pages/best_sellers/header_php.php, replace the content by:```php

<?php /** * Best Sellers Alpha 1 */ if (BEST_SELLERS_SHOW_OUT_OF_STOCK == 'true') { $listing_sql = "select distinct p.products_quantity, p.products_id, p.products_image, p.products_model, 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'] . "' order by p.products_ordered desc, pd.products_name"; } else { $listing_sql = "select distinct p.products_quantity, p.products_id, p.products_image, p.products_model, 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.products_quantity > 0 order by p.products_ordered desc, pd.products_name"; } $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; } ?>

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

6 Dec 2007, 5:51 PM
#17
nullmind avatar

nullmind

Zen Follower

Join Date:
Jul 2007
Posts:
129
Plugin Contributions:
0

Re: Best sellers "page"

whoohoo :)

Thank you, that fixed it. looks GREAT

16 Jan 2008, 9:42 AM
#18
craftzombie avatar

craftzombie

Zen Follower

Join Date:
Jul 2006
Posts:
494
Plugin Contributions:
0

Re: Best sellers "page"

Thank you for the wonderful mod!

I was wondering if there would be any way to limit the results to a certain number of products. For example, my best sellers page lists a total of 1288 products, 15 per page. Instead of having so many products listed on that page, could I make it so that the results only give the top 50 best sellers?

16 Jan 2008, 2:23 PM
#19
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Best sellers "page"

You can edit includes/modules/pages/best_sellers/header_php.php and put LIMIT into the sql query.

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

19 Jan 2008, 9:58 AM
#20
craftzombie avatar

craftzombie

Zen Follower

Join Date:
Jul 2006
Posts:
494
Plugin Contributions:
0

Re: Best sellers "page"

yellow1912:

You can edit includes/modules/pages/best_sellers/header_php.php and put LIMIT into the sql query.

Thank you for your reply. I did figure that much, but my problem is that I do not know this programming language. Rather than come here immediately for answers, I tried to solve this on my own by entering LIMIT into the dev tool kit for ideas on how it is used. I saw several examples in other Zen files, although when I tried editing the header.php file on my own, I received errors every time. I even Googled *SQL limit query * and saw similar examples, but of course they don't work when I try them. If anyone knows how to set a limit of 50 results for the following, your help would be greatly appreciated.

if (BEST_SELLERS_SHOW_OUT_OF_STOCK == 'true') {

$listing_sql = "select distinct p.products_quantity, p.products_id, p.products_image, p.products_model, 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'] . "'
                      order by p.products_ordered desc, pd.products_name";
                      
} else {
                      
$listing_sql = "select distinct p.products_quantity, p.products_id, p.products_image, p.products_model, 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.products_quantity > 0
                      and p.master_categories_id != 123
                      and p.products_id != 1992
                      order by p.products_ordered desc, pd.products_name";
                      
}
$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;
  }
?>