Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2008
    Posts
    3
    Plugin Contributions
    0

    email error Duplicate products new

    Hello all from Spain,

    This is my first post but im using zencart since a few years.
    All the problems that i got in the this time i solved them reading the forum, but now i donīt know why zencart duplicate new products in sidebox new. I try to explain it, if i have got 2 languages zencart, new products sidebox shows in spanish frontend, the english and spanish new product.

    Can you help me?

    Sorry about my english
    Regards and good luck with Zencart 2.0

  2. #2
    Join Date
    Dec 2008
    Posts
    3
    Plugin Contributions
    0

    Default Re: Duplicate products new

    i think that the problem is in zj black2 template,

    file /includes/modules/zj_black_2/column_three.php

    <?php
    /**
    * whats_new sidebox - displays a random "new" product
    *
    * @package templateSystem
    * @copyright Copyright 2003-2007 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 6475 2007-06-08 21:10:33Z ajeh $
    */
    $show_new_tabs= true;
    if (isset($_GET['products_id'])) {
    $show_new_tabs= false;
    } else {
    $show_new_tabs= true;
    }
    if ($show_new_tabs == true) {
    if (isset($current_category_id) && ($current_category_id > 0)) {
    $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 ), " .
    TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " .
    TABLE_CATEGORIES . " c
    where p.products_id = pd.products_id
    and p.products_status = 1
    and p.products_id = p2c.products_id
    and p2c.categories_id = c.categories_id
    and '" . (int)$current_category_id . "' in (c.categories_id, c.parent_id)
    order by products_date_added DESC limit ".MAX_RANDOM_SELECT_NEW."";
    } else {
    $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 p.products_status = 1 order by products_date_added DESC limit ".MAX_RANDOM_SELECT_NEW."";
    }
    // $random_whats_new_sidebox_product = zen_random_select($random_whats_new_sidebox_product_query);
    $random_whats_new_sidebox_product = $db->Execute($random_whats_new_sidebox_product_query);

    if ($random_whats_new_sidebox_product->RecordCount() > 0 ) { ?>
    <li><a href="#fragment-4"><span>Novedades</span></a></li>
    <?php } } ?>
    </ul>
    <div id="fragment-1"><?php require(DIR_WS_MODULES . 'sideboxes/best_sellers_tabs.php');?></div>

    <div id="fragment-2"><?php require(DIR_WS_MODULES . 'sideboxes/featured_tabs.php');?></div>
    <div id="fragment-3"><?php require(DIR_WS_MODULES . 'sideboxes/specials_tabs.php');?></div>
    <div id="fragment-4"><?php require(DIR_WS_MODULES . 'sideboxes/whats_new_tabs.php');?></div>
    </div>

    Can you help me?

  3. #3
    Join Date
    Dec 2008
    Posts
    3
    Plugin Contributions
    0

    Default Re: Duplicate products new

    That template cause that error. I solve it. You can see it...

    <?php
    /**
    * whats_new sidebox - displays a random "new" product
    *
    * @package templateSystem
    * @copyright Copyright 2003-2007 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 6475 2007-06-08 21:10:33Z ajeh $
    */
    $show_new_tabs= true;
    if (isset($_GET['products_id'])) {
    $show_new_tabs= false;
    } else {
    $show_new_tabs= true;
    }
    if ($show_new_tabs == true) {
    if (isset($current_category_id) && ($current_category_id > 0)) {
    $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 ), " .
    TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " .
    TABLE_CATEGORIES . " c
    where p.products_id = pd.products_id
    and p.products_status = 1
    and p.products_id = p2c.products_id
    and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
    and p2c.categories_id = c.categories_id
    and '" . (int)$current_category_id . "' in (c.categories_id, c.parent_id)
    order by products_date_added DESC limit ".MAX_RANDOM_SELECT_NEW."";
    } else {
    $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 order by products_date_added DESC limit ".MAX_RANDOM_SELECT_NEW."";
    }
    // $random_whats_new_sidebox_product = zen_random_select($random_whats_new_sidebox_product_query);
    $random_whats_new_sidebox_product = $db->Execute($random_whats_new_sidebox_product_query);

    if ($random_whats_new_sidebox_product->RecordCount() > 0 ) { ?>
    <li><a href="#fragment-4"><span>Novedades</span></a></li>
    <?php } } ?>
    </ul>
    <div id="fragment-1"><?php require(DIR_WS_MODULES . 'sideboxes/best_sellers_tabs.php');?></div>

    <div id="fragment-2"><?php require(DIR_WS_MODULES . 'sideboxes/featured_tabs.php');?></div>
    <div id="fragment-3"><?php require(DIR_WS_MODULES . 'sideboxes/specials_tabs.php');?></div>
    <div id="fragment-4"><?php require(DIR_WS_MODULES . 'sideboxes/whats_new_tabs.php');?></div>
    </div>

    Thank you. And happy new year all.

  4. #4
    Join Date
    Feb 2009
    Posts
    2
    Plugin Contributions
    0

    Default Re: Duplicate products new

    I'm having the same problem with a free template from TemplateMonster.com called "Theme 12541"

    I can't figure where to change the php to fix this (and know nothing about PHP to begin with)

    I do understand the overrides system, so I removed all the overrides located in includes/modules/12541/

    this did not fix the problem. In fact the problem also exists with the Classic Contemporary Green default template.

    Has anyone figured out how to solve this issue of items duplicating in the New Products sidebox when multiple languages are installed?

  5. #5
    Join Date
    Apr 2009
    Location
    Katowice, Poland
    Posts
    9
    Plugin Contributions
    0

    Default Re: Duplicate products new

    Quote Originally Posted by deejson View Post
    I'm having the same problem with a free template from TemplateMonster.com called "Theme 12541"

    Has anyone figured out how to solve this issue of items duplicating in the New Products sidebox when multiple languages are installed?
    I think I've worked it over:
    http://www.zen-cart.com/forum/showpo...59&postcount=9

    Regards

 

 

Similar Threads

  1. v151 Duplicate products appear in New Products sidebox
    By tenashi in forum General Questions
    Replies: 3
    Last Post: 29 Mar 2013, 03:23 AM
  2. v139g how to remove duplicate products from new products listed in main page
    By amruta2104 in forum General Questions
    Replies: 1
    Last Post: 7 Aug 2012, 03:16 PM
  3. Duplicate products or open a new site?
    By dmagic in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 19 Aug 2011, 12:36 PM
  4. Duplicate images in new products sidebox
    By petek in forum Basic Configuration
    Replies: 2
    Last Post: 28 Jun 2009, 01:32 PM
  5. [Duplicate] Disabled New Products (1.3.8a)
    By Alex Clarke in forum Bug Reports
    Replies: 2
    Last Post: 8 Oct 2008, 04:21 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