Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 40
  1. #11
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Hide What's New and Best Sellers Sideboxes

    I don't know where your code is but this:
    mysite.com/mytemplate/includes/modules/sideboxes/mytemplate/

    is not a valid path ...

    you see the:
    /your_secret_admin
    /download
    /images
    /includes

    Now go to:
    /includes/modules/sideboxes

    copy the file:
    /includes/modules/sideboxes/whats_new.php

    to your templates and overrides directory for modules in:
    /includes/modules/sideboxes/your_template_dir/whats_new.php

    and then add the customizations ...

    follow the same method for the best_sellers.php ...
    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!

  2. #12
    Join Date
    Dec 2009
    Posts
    244
    Plugin Contributions
    0

    Default Re: Hide What's New and Best Sellers Sideboxes

    Quote Originally Posted by Ajeh View Post
    I don't know where your code is but this:
    mysite.com/mytemplate/includes/modules/sideboxes/mytemplate/

    is not a valid path ...

    you see the:
    /your_secret_admin
    /download
    /images
    /includes

    Now go to:
    /includes/modules/sideboxes

    copy the file:
    /includes/modules/sideboxes/whats_new.php

    to your templates and overrides directory for modules in:
    /includes/modules/sideboxes/your_template_dir/whats_new.php

    and then add the customizations ...

    follow the same method for the best_sellers.php ...

    I do have the "What's New" and "Best Sellers" sideboxes in my template override folder located here:

    mysite.com/includes/modules/sideboxes/mytemplate/

    The alterations to "Best Sellers" works fine, but the "What's New" is no good...

  3. #13
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Hide What's New and Best Sellers Sideboxes

    Do you see errors or do you just see the What's New on the Home Page?
    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!

  4. #14
    Join Date
    Dec 2009
    Posts
    244
    Plugin Contributions
    0

    Default Re: Hide What's New and Best Sellers Sideboxes

    Quote Originally Posted by Ajeh View Post
    Do you see errors or do you just see the What's New on the Home Page?
    Just the what's new on the home page

  5. #15
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Hide What's New and Best Sellers Sideboxes

    And your file:
    /includes/modules/sideboxes/your_template_dir/whats_new.php

    looks like:
    Code:
    <?php
    /**
     * whats_new sidebox - displays a random "new" product
     *
     * @package templateSystem
     * @copyright Copyright 2003-2010 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: whats_new.php 15880 2010-04-11 16:24:30Z wilt $
     */
    
    
    // bof: turn off whats_new on home page
    if ($this_is_home_page) {
        $show_whats_new= false;
    } else {
        $show_whats_new= true;
    }
    // eof: turn off whats_new on home page
    
    // display limits
    // $display_limit = zen_get_products_new_timelimit();
      $display_limit = zen_get_new_date_range();
      $random_whats_new_sidebox_product_query = "select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, pd.products_name,
                                                  p.master_categories_id
                               from (" . TABLE_PRODUCTS . " p
                               left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id )
                               where p.products_id = pd.products_id
                               and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
                               and p.products_status = 1 " . $display_limit;
    
    //  $random_whats_new_sidebox_product = zen_random_select($random_whats_new_sidebox_product_query);
      $random_whats_new_sidebox_product = $db->ExecuteRandomMulti($random_whats_new_sidebox_product_query, MAX_RANDOM_SELECT_NEW);
    
      if ($show_whats_new && $random_whats_new_sidebox_product->RecordCount() > 0 ) {
        require($template->get_template_dir('tpl_whats_new.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_whats_new.php');
        $title =  BOX_HEADING_WHATS_NEW;
        $title_link = FILENAME_PRODUCTS_NEW;
        require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
      }
    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!

  6. #16
    Join Date
    Dec 2009
    Posts
    244
    Plugin Contributions
    0

    Default Re: Hide What's New and Best Sellers Sideboxes

    Quote Originally Posted by Ajeh View Post
    And your file:
    /includes/modules/sideboxes/your_template_dir/whats_new.php

    looks like:
    Code:
    <?php
    /**
     * whats_new sidebox - displays a random "new" product
     *
     * @package templateSystem
     * @copyright Copyright 2003-2010 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: whats_new.php 15880 2010-04-11 16:24:30Z wilt $
     */
    
    
    // bof: turn off whats_new on home page
    if ($this_is_home_page) {
        $show_whats_new= false;
    } else {
        $show_whats_new= true;
    }
    // eof: turn off whats_new on home page
    
    // display limits
    // $display_limit = zen_get_products_new_timelimit();
      $display_limit = zen_get_new_date_range();
      $random_whats_new_sidebox_product_query = "select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, pd.products_name,
                                                  p.master_categories_id
                               from (" . TABLE_PRODUCTS . " p
                               left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id )
                               where p.products_id = pd.products_id
                               and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
                               and p.products_status = 1 " . $display_limit;
    
    //  $random_whats_new_sidebox_product = zen_random_select($random_whats_new_sidebox_product_query);
      $random_whats_new_sidebox_product = $db->ExecuteRandomMulti($random_whats_new_sidebox_product_query, MAX_RANDOM_SELECT_NEW);
    
      if ($show_whats_new && $random_whats_new_sidebox_product->RecordCount() > 0 ) {
        require($template->get_template_dir('tpl_whats_new.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_whats_new.php');
        $title =  BOX_HEADING_WHATS_NEW;
        $title_link = FILENAME_PRODUCTS_NEW;
        require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
      }
    All the same execpt for the bold section: I have this because I am excluding what's new from the Product ID pages as well.

    // $random_whats_new_sidebox_product = zen_random_select($random_whats_new_sidebox_product_query);
    $random_whats_new_sidebox_product = $db->ExecuteRandomMulti($random_whats_new_sidebox_product_query, MAX_RANDOM_SELECT_NEW);

    if ($show_whats_new && $random_whats_new_sidebox_product->RecordCount() > 0 ) {
    }

    if (!isset($_GET['products_id']) && $random_whats_new_sidebox_product->RecordCount() > 0 ) {
    require($template->get_template_dir('tpl_whats_new.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_whats_new.php');
    $title = BOX_HEADING_WHATS_NEW;
    $title_link = FILENAME_PRODUCTS_NEW;
    require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
    }

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

    Default Re: Hide What's New and Best Sellers Sideboxes

    This code does nothing ...
    Code:
    if ($show_whats_new && $random_whats_new_sidebox_product->RecordCount() > 0 ) {
    }
    You are trying to do more than first explained ...

    First, remove this code:
    Code:
    // bof: turn off whats_new on home page
    if ($this_is_home_page) {
        $show_whats_new= false;
    } else {
        $show_whats_new= true;
    }
    // eof: turn off whats_new on home page
    Then, change your code in bold to:
    Code:
    if (!this_is_home_page && !isset($_GET['products_id']) && $random_whats_new_sidebox_product->RecordCount() > 0 ) {
    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. #18
    Join Date
    Dec 2009
    Posts
    244
    Plugin Contributions
    0

    Default Re: Hide What's New and Best Sellers Sideboxes

    Perfect that worked! I figured that code did nothing, but I couldn't figure out how to properly set up the code to exclude home page and product ID but what you recommended worked perfect. Thanks.

    I want to add Promotional Boxes on the right side of the home page, so should I use banner boxes, or just code in GIF images?

  9. #19
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Hide What's New and Best Sellers Sideboxes

    Depends on what all you want to do ...

    You could add conditions to the Banner sidebox to limit its use to the Home page in a similar manner ...
    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!

  10. #20
    Join Date
    Dec 2009
    Posts
    244
    Plugin Contributions
    0

    Default Re: Hide What's New and Best Sellers Sideboxes

    Quote Originally Posted by Ajeh View Post
    Depends on what all you want to do ...

    You could add conditions to the Banner sidebox to limit its use to the Home page in a similar manner ...
    Could you mind providing me the code to do so? I am wanting to have about 3-4 promo boxes. Just things that say free shipping on orders, or to highlight a new product, etc.

 

 
Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. v153 Intelligent All, Featured, Best Sellers, New, and Specials Links
    By mikeel100 in forum General Questions
    Replies: 1
    Last Post: 24 Nov 2015, 08:46 PM
  2. Can I choose what goes inside Best Sellers
    By dermit in forum General Questions
    Replies: 1
    Last Post: 16 Nov 2010, 07:40 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. Replies: 0
    Last Post: 1 Sep 2009, 11:26 PM
  5. Replace New Products Box w/ Best Sellers
    By mxer269 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 11 Mar 2009, 04:36 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