I am creating an extension for adding a free product Y to cart when adding product X. I don't want to add product Y to cart if the user trying to add product Y itself. Can anyone suggest a solution for me??? (I tried to stop the product from adding to cart, but it is not working). Thanks

  • What if you make product Y "not visible individually"? If it's only added automatically, you don't need the product page, do you? – Fabian Schmengler Sep 21 '16 at 8:20
  • You are right @fschmengler. But product Y is selected by the user in admin side. – Keerthana Sep 28 '16 at 6:21
  • I'm not sure if I understand. If you edit the question and explain the process in detail, it could be reopened. – Fabian Schmengler Sep 28 '16 at 6:32

Browse other questions tagged or ask your own question.