[-] MO : loyalty : #PSCFV-3764 : display points of default attribute
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17038 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -2638,6 +2638,22 @@ class ProductCore extends ObjectModel
|
||||
return (isset($row['id_product_attribute']) && $row['id_product_attribute']) ? (int)$row['id_product_attribute'] : 0;
|
||||
}
|
||||
|
||||
public function getDefaultIdProductAttribute()
|
||||
{
|
||||
if (!Combination::isFeatureActive())
|
||||
return 0;
|
||||
|
||||
$row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
|
||||
SELECT pa.`id_product_attribute`
|
||||
FROM `'._DB_PREFIX_.'product_attribute` pa
|
||||
'.Shop::addSqlAssociation('product_attribute', 'pa').'
|
||||
WHERE pa.`id_product` = '.(int)$this->id.'
|
||||
AND pa.`default_on` = 1'
|
||||
);
|
||||
|
||||
return (isset($row['id_product_attribute']) && $row['id_product_attribute']) ? (int)$row['id_product_attribute'] : 0;
|
||||
}
|
||||
|
||||
public function getPriceWithoutReduct($notax = false, $id_product_attribute = false)
|
||||
{
|
||||
return Product::getPriceStatic((int)$this->id, !$notax, $id_product_attribute, 6, null, false, false);
|
||||
|
||||
Reference in New Issue
Block a user