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?
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:
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?
Re: Duplicate products new
Quote:
Originally Posted by
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/showpo...59&postcount=9
Regards :D