Forums / Basic Configuration / Duplicate products new

Duplicate products new

Locked

Views: 3,955

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
30 Dec 2008, 3:10 PM
#1
cppc avatar

cppc

New Zenner

Join Date:
Dec 2008
Posts:
3
Plugin Contributions:
0

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 :clap:

30 Dec 2008, 5:37 PM
#2
cppc avatar

cppc

New Zenner

Join Date:
Dec 2008
Posts:
3
Plugin Contributions:
0

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?

30 Dec 2008, 5:48 PM
#3
cppc avatar

cppc

New Zenner

Join Date:
Dec 2008
Posts:
3
Plugin Contributions:
0

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. :wacko:

7 Feb 2009, 3:36 AM
#4
deejson avatar

deejson

New Zenner

Join Date:
Feb 2009
Posts:
2
Plugin Contributions:
0

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?

29 Apr 2009, 5:44 PM
#5
immago avatar

immago

New Zenner

Join Date:
Apr 2009
Location:
Katowice, Poland
Posts:
9
Plugin Contributions:
0

Re: Duplicate products new

deejson:

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/showpost.php?p=722359&postcount=9

Regards :D