Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Best Sellers Count

    So yeah sue me if I SHOULD know this.. I don't and need some help.. Where oh WHERE do I turn off the best seller counts??
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  2. #2
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: Best Sellers Count

    ******* deleted, misread the request ********
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  3. #3
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: Best Sellers Count

    Quote Originally Posted by lhungil View Post
    ******* deleted, misread the request ********
    no worries.. Turns out I mis-wrote what I was looking for.. I need to ADD counts to my best Sellers..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  4. #4
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: Best Sellers Count

    Open "/includes/classes/order.php" and take a look at line #748. Appears you may be able to comment this out (will also have to do for "Edit Orders") to stop Zen Cart from updating the products_ordered field. However this will break the "admin" statistics for products purchased.

    You could also open "/includes/templates/your_template_name/sideboxes/tpl_best_sellers.php" and remove where it adds the count (do not see this displayed in my stock ZC install).
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  5. #5
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: Best Sellers Count

    Quote Originally Posted by DivaVocals View Post
    no worries.. Turns out I mis-wrote what I was looking for.. I need to ADD counts to my best Sellers..
    And of course see this after I posted how to ADD the counts... Subsequently deleted my answer... And added how to stop them from incrementing!

    Good thing Firefox still had my old response in the cache!

    Quote Originally Posted by DivaVocals View Post
    So yeah sue me if I SHOULD know this.. I don't and need some help.. Where oh WHERE do I turn off the best seller counts??
    "Oh WHERE oh WHERE can it be?
    Not in any settings that I can see,
    But perhaps we can code something."

    Could not resist ;)

    In "/includes/modules/sideboxes/best_sellers.php" add the following (around line 68):
    Code:
    $bestsellers_list[$rows]['name']  = $best_sellers->fields['products_name'];
    $bestsellers_list[$rows]['count'] = $best_sellers->fields['products_ordered'];
    $best_sellers->MoveNext();
    In your template's copy of "/includes/templates/your_template_name/sideboxes/tpl_best_sellers.php" change the following (around line 15):
    Code:
    for ($i=1; $i<=sizeof($bestsellers_list); $i++) {
      $content .= '<li><a href="' . zen_href_link(zen_get_info_page($bestsellers_list[$i]['id']), 'products_id=' . $bestsellers_list[$i]['id']) . '">' . zen_trunc_string($bestsellers_list[$i]['name'], BEST_SELLERS_TRUNCATE, BEST_SELLERS_TRUNCATE_MORE) . '(' . zen_output_string((string)$bestsellers_list[$i]['count']) . ')</a></li>' . "\n";
    }
    I've not tested the changes, but should hopefully point you in the right direction. Feel free to make changes and provide updated code with a better working example :)
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  6. #6
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: Best Sellers Count

    **deleted**

    Looks like today is the "crossed posts" day!!!
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

 

 

Similar Threads

  1. Best Sellers
    By purecp in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 8 Sep 2010, 02:11 AM
  2. Best sellers
    By george_grat in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 9 Dec 2009, 10:03 PM
  3. Best Sellers
    By Renz in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 4 Jun 2009, 07:57 AM
  4. Best Sellers
    By PeteAUK in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 13 Jun 2007, 01:16 PM
  5. Best Sellers
    By jovemac in forum General Questions
    Replies: 1
    Last Post: 23 Jul 2006, 11:34 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR