// id_shop on cart product (for links) + change Shop::sqlAsso() + share_order

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7687 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-07-22 08:57:51 +00:00
parent 9619b93c73
commit e62be3d793
41 changed files with 263 additions and 191 deletions
+3 -3
View File
@@ -188,7 +188,7 @@ class ManufacturerCore extends ObjectModel
if (!$id_lang)
$id_lang = (int)Configuration::get('PS_LANG_DEFAULT');
if (!$id_group_shop)
$id_group_shop = Configuration::get('PS_GROUP_SHOP_DEFAULT');
$id_group_shop = Shop::getGroupFromShop(Configuration::get('PS_SHOP_DEFAULT'));
$sql = 'SELECT m.*, ml.`description`';
$sql.= 'FROM `'._DB_PREFIX_.'manufacturer_group_shop` mgs
LEFT JOIN `'._DB_PREFIX_.'manufacturer` m ON (m.id_manufacturer = mgs.id_manufacturer)
@@ -293,7 +293,7 @@ class ManufacturerCore extends ObjectModel
$sql = '
SELECT p.`id_product`
FROM `'._DB_PREFIX_.'product` p
'.$context->shop->sqlAsso('product', 'p', true).'
'.$context->shop->sqlAsso('product', 'p').'
WHERE p.id_manufacturer = '.(int)($id_manufacturer)
.($active ? ' AND p.`active` = 1' : '').'
AND p.`id_product` IN (
@@ -309,7 +309,7 @@ class ManufacturerCore extends ObjectModel
$sql = 'SELECT p.*, pa.`id_product_attribute`, pl.`description`, pl.`description_short`, pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, pl.`name`, i.`id_image`, il.`legend`, m.`name` AS manufacturer_name, tl.`name` AS tax_name, t.`rate`, DATEDIFF(p.`date_add`, DATE_SUB(NOW(), INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' DAY)) > 0 AS new,
(p.`price` * ((100 + (t.`rate`))/100)) AS orderprice
FROM `'._DB_PREFIX_.'product` p
'.$context->shop->sqlAsso('product', 'p', true).'
'.$context->shop->sqlAsso('product', 'p').'
LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa ON (p.`id_product` = pa.`id_product` AND default_on = 1)
LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (p.`id_product` = pl.`id_product` AND pl.`id_lang` = '.(int)$id_lang.$context->shop->sqlLang('pl').')
LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_product` = p.`id_product` AND i.`cover` = 1)