Our setup:

  • Magento Community Edition 1.8.1
  • Checkout uses a customised version of Onestepcheckout.com's 1 page checkout extension.
  • Promotional Gift - extension by Magestore

I'm having a weird issue with a coupon code we have setup using Magestore's Promotional Gifts > Shopping Cart Rules.

The rule automatically adds two products to any basket where the customer's basket subtotal is equal to or more than £40, once the visitor has applied the voucher code we have set for this offer.

When I test applying the voucher code, it works as expected. The two products are automatically added to the cart with a value of free. However when I proceed to the checkout; our site asks visitors to either checkout as a guest or login to their customer account, if I chose to login to my existing customer account, when the page reloads to display the checkout forms, the voucher code had been removed and the free items are no longer in the basket summary.

NOTE: If I click edit on the checkout page's basket summary, it takes me back to the cart page, and if I apply the voucher code again (while now logged in) it keeps the free items in the basket when I proceed through to the checkout.

But obviously this is not ideal, it would be best if it did not remove it when customers log in to their account.

Also, if I checkout as a guest, the free items/voucher code show as expected in the checkout page.

So I was wondering where the fault might lie here? Is it a known Magento bug or the customisation work we've done to the onestepcheckout extension or is this something controlled by Magestore's extension?

1 Answer 1


This is reproducible with Magento CE 1.9 / EE 1.14, the default checkout and regular coupon codes, so it is not related to the checkout or free gift extensions.

The problem lies in the way, Magento handles the guest cart when logging in. It is merged into the customers cart. This means, all products of the guest cart are added to the customers cart. The coupon stays as it was in the customers cart (i.e. no coupon in an empty cart)

You should be able to fix this with an observer for sales_quote_merge_after

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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