سؤال

While trying to answer this question I ran into a strange behavior.

The checkout_cart_add_product_complete event is working nice while adding a product to cart from a catalog. However if I try to move product to cart from a wishlist the event doesn't fire.

The reason for it Mage_Wishlist_IndexController::cartAction() is adding product to cart through Mage_Checkout_Model_Cart::addProduct() method and not through cart controller (where checkout_cart_add_product_complete is firing).

So the question is if it was made intentionally or is it a bug?

هل كانت مفيدة؟

المحلول

Judging from this comment in CartController.php:

/**
 * @todo remove wishlist observer processAddToCart
 */

This it definitely a legacy bug.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top