I want to add my code in reorder action using my custom module.

I want to do this because I am using this event checkout_cart_product_add_after to set custom option and price but when I reorder that order that time price and custom option is not set as last order.

Is that correct way to set that option and price ?

  • So to be clear, you want to change the product prices when the reorder action refills the quote with the old items? – Sander Mangel Oct 29 '15 at 9:48
  • yes i want to set product price and custom option with old items... – Newbie Oct 29 '15 at 9:54
  • have you used magento default custom option or create new field or attribute? – Abdul Oct 29 '15 at 10:17
  • @Abdul i m using magento default custom option – Newbie Oct 30 '15 at 11:21

From what I can remember to reorder Magento actually merges the quote. So using sales_quote_merge_before would be an event you could watch.

Another option would be to use the sales_quote_collect_totals_before event. It's triggered before calculating totals like subtotal and grand total.

However, for both options you don't know if it is a normal order or a reorder so you might want to store in a session or something a reorder has been triggered



in checkout_cart_product_add_after event

action = Mage::app()->getFrontController()->getAction();
    if ($action->getFullActionName() == 'sales_order_reorder')
        $buyInfo = $obs->getQuoteItem()->getBuyRequest();
        if ($option= $buyInfo->getCustomOption())
            //get my custom option using that i can get price and set a price


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.