kfc_zjian Posted August 30, 2013 Share Posted August 30, 2013 could not apply multiple voucher, for example if this customer receive a free gift. then you they are not able to apply second voucher, whatever the voucher functions. Link to comment Share on other sites More sharing options...
kfc_zjian Posted August 30, 2013 Author Share Posted August 30, 2013 anyone could test it? Link to comment Share on other sites More sharing options...
vekia Posted August 30, 2013 Share Posted August 30, 2013 i tested it and you've got right, it looks like issue with "Gift" voucher, moreover i can't remove gif voucher from cart. You've got the same problem? Link to comment Share on other sites More sharing options...
kfc_zjian Posted August 31, 2013 Author Share Posted August 31, 2013 That is the one, but gift voucher will be removed once specific item been deleted.. The second problem is we can apply second coupon like free shipping if gift coupon is already on the shopping cart. It worked on previous version. I'm not sure it's because my updating.. Anyone got solution? Link to comment Share on other sites More sharing options...
kfc_zjian Posted September 4, 2013 Author Share Posted September 4, 2013 anyone getting same issue? Link to comment Share on other sites More sharing options...
kfc_zjian Posted September 9, 2013 Author Share Posted September 9, 2013 anyone getting same issue? s Link to comment Share on other sites More sharing options...
Logical IT Posted September 20, 2013 Share Posted September 20, 2013 (edited) There is a bug (PrestaShop 1.5.5.0) in classes/Cart.php in function addCartRule line: 761 To fix: remove code: if (Db::getInstance()->getValue('SELECT id_cart_rule FROM '._DB_PREFIX_.'cart_cart_rule WHERE id_cart = '.(int)$this->id)) return false; and replace with: $result = Db::getInstance()->getRow('SELECT id_cart_rule FROM '._DB_PREFIX_.'cart_cart_rule WHERE id_cart = '.(int)$this->id . ' AND id_cart_rule = '.(int)$id_cart_rule); if ($result && Db::getInstance()->NumRows()) return false; Edited October 3, 2013 by Logical IT (see edit history) Link to comment Share on other sites More sharing options...
sooroos Posted September 26, 2013 Share Posted September 26, 2013 (edited) hi does this function work in ps 1.5.4.1? Can i replace this with the function from ps 1.5.5.0? the function looks like: public function addCartRule($id_cart_rule) { // You can't add a cart rule that does not exist $cartRule = new CartRule($id_cart_rule, Context::getContext()->language->id); if (!Validate::isLoadedObject($cartRule)) return false; // Add the cart rule to the cart if (!Db::getInstance()->insert('cart_cart_rule', array( 'id_cart_rule' => (int)$id_cart_rule, 'id_cart' => (int)$this->id ))) return false; Cache::clean('Cart::getCartRules'.$this->id.'-'.CartRule::FILTER_ACTION_ALL); Cache::clean('Cart::getCartRules'.$this->id.'-'.CartRule::FILTER_ACTION_SHIPPING); Cache::clean('Cart::getCartRules'.$this->id.'-'.CartRule::FILTER_ACTION_REDUCTION); Cache::clean('Cart::getCartRules'.$this->id.'-'.CartRule::FILTER_ACTION_GIFT); if ((int)$cartRule->gift_product) $this->updateQty(1, $cartRule->gift_product, $cartRule->gift_product_attribute, false, 'up', 0, null, false); return true; } Edited September 26, 2013 by sooroos (see edit history) Link to comment Share on other sites More sharing options...
kfc_zjian Posted September 27, 2013 Author Share Posted September 27, 2013 looks like solved, but need extra time to verify. thanks Link to comment Share on other sites More sharing options...
OmarRu Posted October 1, 2013 Share Posted October 1, 2013 You are the best!!! Thaks! Link to comment Share on other sites More sharing options...
Recommended Posts