I want to add new product offer when cart subtotal >= 1000

This offer valid only for every month between day 1 to 7 (1-m-yyyy to 7-m-yyyy).

Therefore i used below event -

<event name="checkout_cart_save_after">
        <observer name="after_upfate_to_cart" instance="myvendor\mymodule\Observer\Updatetocart" />

this event checkout_cart_save_after only working when user doing any changes on cart(add,update,delete).

issue -> user can buy product offer using below activity -

user added offer on offer dates but buy when expired offer date without changes on cart.

stop this activity i did below two event -

<event name="controller_action_predispatch_onestepcheckout_index_index">
        <observer name="mymodule_before_checkout_page" instance="myvendor\mymodule\Observer\BeforeQuoteLoad" />
    <event name="controller_action_predispatch_checkout_cart_index">
        <observer name="mymodule_before_cart_page" instance="myvendor\mymodule\Observer\BeforeQuoteLoad" />

Anyone have best idea of this activity??

Thanks in advance.

  • anyone need more explanation ?? Feb 19 '19 at 5:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.