
Originally Posted by
abcisme
Man, I hope so. I just don't understand why it's showing some products listed in English and some in French. It makes no sense. There must be some way to compile the product list in only one language, using a "WHERE language_id = 1" condition in that query somewhere.. I just have NO CLUE what the syntax would be or how to go about implementing it. I'm kind of glad to know it isn't just me having the problem though.
I found someone who could help me sort out this issue. Here is the fix to make it show only the default language, which in my case was language ID 1. If your language ID is something else, change language_id=1 to language_id=YOUR_ID
in admin/edit_orders.php
REPLACE:
Code:
$result = $db -> Execute("SELECT products_name, p.products_id, categories_name, ptc.categories_id FROM " . TABLE_PRODUCTS . " p LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON pd.products_id=p.products_id LEFT JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc ON ptc.products_id=p.products_id LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " cd ON cd.categories_id=ptc.categories_id ORDER BY categories_name");
WITH:
Code:
$result = $db -> Execute("SELECT products_name, p.products_id, categories_name, ptc.categories_id FROM zen_products p LEFT JOIN zen_products_description pd ON pd.products_id=p.products_id LEFT JOIN zen_products_to_categories ptc ON ptc.products_id=p.products_id LEFT JOIN zen_categories_description cd ON cd.categories_id=ptc.categories_id WHERE pd.language_id=1 ORDER BY categories_name");
THEN REPLACE:
Code:
$result = $db -> Execute("SELECT * FROM " . TABLE_PRODUCTS_ATTRIBUTES . " pa LEFT JOIN " . TABLE_PRODUCTS_OPTIONS . " po ON po.products_options_id=pa.options_id LEFT JOIN " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov ON pov.products_options_values_id=pa.options_values_id WHERE products_id='$add_product_products_id'");
WITH:
Code:
$result = $db -> Execute("SELECT * FROM " . TABLE_PRODUCTS_ATTRIBUTES . " pa LEFT JOIN " . TABLE_PRODUCTS_OPTIONS . " po ON po.products_options_id=pa.options_id LEFT JOIN " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov ON pov.products_options_values_id=pa.options_values_id WHERE products_id='$add_product_products_id' AND pov.language_id=1 AND po.language_id=1");
Bookmarks