Forums / Addon Language Packs / Duplicate Product Descriptions when adding new language

Duplicate Product Descriptions when adding new language

Locked

Started by jamina1 on 23 Apr 2008, 8:30 PM · Views: 4,055

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
23 Apr 2008, 8:30 PM
#1
jamina1 avatar

jamina1

New Zenner

Join Date:
Jul 2007
Posts:
10
Plugin Contributions:
0

Duplicate Product Descriptions when adding new language

Hiya!
We're hoping to translate our website into Chinese and Spanish soon. We have 2 web servers, one where we test and one where we actually do business. I installed a chinese language pack on the testing server, but since I didn't have myphpadmin access to that database, I didn't notice the duplications on the products_description table.

Since we only have 3 or 4 people in our company that speak chinese, mainly salespeople, we weren't planning on translating all our product descriptions. Seeing that we're planning on adding several more languages, and that will just make the admin editing screen longer and longer, is there any way to turn this OFF when I add a new language pack so that the products aren't duplicated?

13 May 2008, 2:50 AM
#2
prd avatar

prd

New Zenner

Join Date:
Apr 2008
Posts:
5
Plugin Contributions:
0

Re: Duplicate Product Descriptions when adding new language

I am curious about this also. On my site, I have noticed that the 'new products' box almost always shows the same product twice, once in each of the installed languages. I'd really rather that visitors who select language "A" only be shown links and product info in that language...

21 May 2008, 10:37 PM
#3
realforever avatar

realforever

New Zenner

Join Date:
Jul 2006
Posts:
58
Plugin Contributions:
0

Re: Duplicate Product Descriptions when adding new language

I've tried the Chinese language pack (TW) and it did the same thing on my site: two product description -- one for English and one for Chinese even user just picked one language. Bugs from the language pack?

:frusty:

21 Jul 2009, 1:11 PM
#4
frumfell avatar

frumfell

New Zenner

Join Date:
Jul 2009
Posts:
7
Plugin Contributions:
0

Re: Duplicate Product Descriptions when adding new language

the same is when you add product filter addon, it see all attributes doubled, as in database, maybe there is way to let him see only attributes or descriptions of customer language?

31 Jul 2009, 2:20 AM
#5
andy_lau avatar

andy_lau

New Zenner

Join Date:
May 2006
Posts:
18
Plugin Contributions:
0

Re: Duplicate Product Descriptions when adding new language

in the file, for example: includes\modules\sideboxes\whats_new.php

original

$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 " . $display_limit;bằng đoạn code

replacement:

if ($_SESSION['language'] == "english"){

$random_whats_new_sidebox_product_query= "select distinct 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 inner join " . TABLE_LANGUAGES . " l on pd.language_id = l.languages_id)
where p.products_id = pd.products_id and l.name = 'English'
and p.products_status = 1 " . $display_limit;
}
else if ($_SESSION['language'] == "YOUR_LANGUAGE")
{

$random_whats_new_sidebox_product_query = "select distinct 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 inner join " . TABLE_LANGUAGES . " l on pd.language_id = l.languages_id)
where p.products_id = pd.products_id and l.name = 'YOUR_LANGUAGE'
and p.products_status = 1 " . $display_limit;
}
31 Jul 2009, 5:46 PM
#6
ajeh avatar

ajeh

Oba-san

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

Re: Duplicate Product Descriptions when adding new language

You may wish to review all of the Known Bug Fixes for v1.3.8 ...
http://www.zen-cart.com/forum/showthread.php?p=610860#post610860

And, for security issues on any of the v1.3.x Zen Cart series:
http://www.zen-cart.com/forum/showthread.php?t=131115

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!]
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!

3 Mar 2010, 6:56 PM
#7
adg avatar

adg

New Zenner

Join Date:
Jan 2010
Posts:
10
Plugin Contributions:
0

Re: Duplicate Product Descriptions when adding new language

Is there any reason why not to replace the code in this way? Saves on having an if - else if block...

$random_whats_new_sidebox_product_query = 
"select distinct 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 inner join " . 
	TABLE_LANGUAGES . " l on pd.language_id = l.languages_id)
where p.products_id = pd.products_id 
and l.name = '" . $_SESSION['language'] . "'
and p.products_status = 1 " . $display_limit;