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

Duplicate Product Descriptions when adding new language

Locked
Results 1 to 7 of 7
This thread is locked. New replies are disabled.
23 Apr 2008, 20:30
#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, 02:50
#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, 22:37
#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, 13:11
#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, 02:20
#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;
}
03 Mar 2010, 18:56
#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;