// Fix fields date_add and date_upd in favoriteProduct module
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12476 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
857a8db6d3
commit
fbd35b5f2f
1 file changed
+4
-1
@@ -49,6 +49,8 @@ class FavoriteProduct extends ObjectModel
|
|||||||
'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true),
|
'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true),
|
||||||
'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true),
|
'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true),
|
||||||
'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true),
|
'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true),
|
||||||
|
'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
|
||||||
|
'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -66,7 +68,8 @@ class FavoriteProduct extends ObjectModel
|
|||||||
LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_product` = p.`id_product` AND i.`cover` = 1)
|
LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_product` = p.`id_product` AND i.`cover` = 1)
|
||||||
LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = '.(int)($id_lang).')
|
LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = '.(int)($id_lang).')
|
||||||
WHERE p.`active` = 1
|
WHERE p.`active` = 1
|
||||||
'.$shop->addSqlRestriction(false, 'fp'));
|
'.$shop->addSqlRestriction(false, 'fp')
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getFavoriteProduct($id_customer, $id_product, Shop $shop = null)
|
public static function getFavoriteProduct($id_customer, $id_product, Shop $shop = null)
|
||||||
|
|||||||
Reference in new issue
Block a user