문제

I use checkout_cart_product_add_after event to check whether the particular product is available for the zipcode (which is already stored in customer session).

I show a notice message if it's not available using

$checkoutSession->addNotice("Sorry this product cannot be shipped to the specified PINCODE: ".$customerPincode);

I show success message when it is available

$checkoutSession->addSuccess("This product is available for the specified PINCODE: ".$customerPincode);

but my problem is this:

enter image description here

my custom message should come next to default success message. How can I do this?

도움이 되었습니까?

해결책

Looking at the class Mage_Core_Model_Session_Abstract that is the actual class providing this functionality to all of the other 'sessions' you can see in the addMessage method for example it only accepts a single argument called $message.

This argument is pushed into a Varien Object which acts as a simple array (with some added functions). This means that whoever pushes their message first will be displayed first.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top