Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • What issue you are facing into above code? Commented Jul 30, 2024 at 10:56
  • @DhirenVasoya I don't want throw an exception with the message. I just wish the product quantity doesn't increase. Commented Jul 30, 2024 at 13:26
  • Then you can always 1 qty pass here, so it always added product with that qty only. Commented Jul 30, 2024 at 13:37
  • What do you mean? If I remove the exception and add $requestInfo['qty'] = 1;, it doesn't work. Commented Jul 30, 2024 at 13:53