Zen Cart Logo
Forums / Bug Reports / [Done 1.3.8] New Products box and multilanguage issue

[Done 1.3.8] New Products box and multilanguage issue

Locked

Views: 2,504

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
29 May 2008, 5:43 PM
#1
syr2000 avatar

syr2000

New Zenner

Join Date:
May 2008
Posts:
7
Plugin Contributions:
0

[Done 1.3.8] New Products box and multilanguage issue

Hello,

I'm setting up a zen-cart store and I have one little problem:

the box that shows randomly new products doesn't seem to look at the language.
I mean that it shows any new product in any language, no matter what language are you using.

My store is both in english and spanish and, of course, I want the box to show descriptions in the language beeing used..

I have a template installed (I don't think this is the cause) and the multilanguage EZ page mod.

Thanks in advance

29 May 2008, 5:51 PM
#2
syr2000 avatar

syr2000

New Zenner

Join Date:
May 2008
Posts:
7
Plugin Contributions:
0

Re: [Done 1.3.8] New Products box and multilanguage issue

Ok, I've just found that the following condition has to be added to the query at "whats_new.php"

and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'

3 Aug 2008, 1:57 PM
#3
jwmartinez avatar

jwmartinez

New Zenner

Join Date:
Aug 2008
Location:
Puerto Rico
Posts:
1
Plugin Contributions:
0

Re: [Done 1.3.8] New Products box and multilanguage issue

Thanks for the solution, I was having the exact same problem.

3 Aug 2008, 4:21 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: [Done 1.3.8] New Products box and multilanguage issue

Thanks for the update ... :smile:

Moving over to Bug Fixes ...

7 Feb 2009, 3:48 AM
#5
deejson avatar

deejson

New Zenner

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

Re: [Done 1.3.8] New Products box and multilanguage issue

This problem exists in the default template, and yet I see the line you refer to in the file "new_products.php" located at includes/modules/

i see clearly the line you refer to:
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'

however I still have the problem of duplicate products in the "New Products" when using the default (or any other) template.

I have not been able to locate any file named "whats_new.php"

30 Mar 2009, 4:01 AM
#6
studiotucker avatar

studiotucker

New Zenner

Join Date:
Sep 2008
Posts:
47
Plugin Contributions:
0

Re: [Done 1.3.8] New Products box and multilanguage issue

Thanks SYR2000 for the fix....any other newbies like myself who might run into this problem, here's clearer directions.

The whats_new.php file is in the includes>modules>sideboxes folder

I added the lines as suggested by SYR2000 as shown below...

// 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;

Like magic! No more duplicates! Hope it helps someone.....