I need to develop a custom step between the Magento product detail page and the shopping cart. If the user clicks on 'Add to cart' the user should be redirected to a new custom form page to enter his/her birthday first. After submitting the birthday data the product should be added to the shopping cart as normal. The birthday data fields should be saved in the quote- and if the user goes to checkout also in the order-model.

I'm new to Magento development so it would be great if somebody could give me some rough hints or guideline where to start and how to plug in.

Thanks a lot in advance!

1 Answer 1


First way:

  1. You'll have to override app/code/core/Mage/Catalog/Block/Product/List.php block and create a new function which will load your custom form which use to insert birth day etc.
  2. Then in the template file app/design/frontend/base/default/template/catalog/product/list.phtml around line 61 and line 103 invoke your custom function instead of getAddToCartUrl($_product) function in the onclick event of Add to Cart button
  3. Make sure to invoke getAddToCartUrl($_product) function inside your custom function after submitting your custom form.

Second way:

  1. Write an event/observer to inject your custom form when user click the Add to Cart button. You can try with this event 'checkout_cart_save_before'.

Note: I didn't test this event. If it didn't work refer here for achieve the relevant one http://www.nicksays.co.uk/magento-events-cheat-sheet-1-7/

  • Thanks for your help. The second option sounds great. I think I will try this one first.
    – Freddy
    Dec 30, 2013 at 12:54
  • Hello freddy i want same fuctionality if you have any successful solution kindly share your code or any other option?
    – Vishal
    Feb 4, 2014 at 10:50

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.