SRUTHI R BABU Posted January 31, 2024 Share Posted January 31, 2024 (edited) Can anyone explain how does the product quantity change when an order is successful ? I have this particular requirement of changing quantity of all combinations when an order is placed for a single combination of a product. The functionality is set and working perfectly for all cases except when using paypal from ps_checkout module. So if anyone can help out on how to implement my functionality in this case, would be helpful. I couldn't exactly pinpoint where exactly the product quantity is getting updated in the paypal scenario. Edited February 5, 2024 by SRUTHI R BABU (see edit history) Link to comment Share on other sites More sharing options...
Prestashop Addict Posted January 31, 2024 Share Posted January 31, 2024 Hi, how your PS if configuring for stock managment? 1 Link to comment Share on other sites More sharing options...
SRUTHI R BABU Posted January 31, 2024 Author Share Posted January 31, 2024 I am sorry but I didn't quiet get that @Prestashop Addict Link to comment Share on other sites More sharing options...
SRUTHI R BABU Posted January 31, 2024 Author Share Posted January 31, 2024 here's a screenshot of what I have done to give you more idea about the task. as you can see here there are three combination of the product but it's considered as the same product ie. if someone purchases the pack of 10 here then the quantity will update for all the three combinations here and change to 2592. Hope this clarifies the issue I am trying sort out Link to comment Share on other sites More sharing options...
Prestashop Addict Posted January 31, 2024 Share Posted January 31, 2024 If it's the same product you should not have combinations, beacause for stock managment each combination has its own stock 😞 1 Link to comment Share on other sites More sharing options...
SRUTHI R BABU Posted February 1, 2024 Author Share Posted February 1, 2024 (edited) Oh if you mean updating the stock available table it's working fine. The problem is the stock is updated as needed for this set except when the paypal from ps_checkout module is used. we need to manipulate the code there alone @Prestashop Addict Hope it's clear now. Edited February 1, 2024 by SRUTHI R BABU (see edit history) Link to comment Share on other sites More sharing options...
Prestashop Addict Posted February 1, 2024 Share Posted February 1, 2024 You mean, when an order use Paypal payment method in ps_checkout the stock is not decremented? 1 Link to comment Share on other sites More sharing options...
SRUTHI R BABU Posted February 5, 2024 Author Share Posted February 5, 2024 (edited) On 2/1/2024 at 2:16 PM, Prestashop Addict said: You mean, when an order use Paypal payment method in ps_checkout the stock is not decremented? Yeah something like that @Prestashop Addict. I have fixed the issue. The problem was I had written a custom code for the said functionality in hookActionValidateOrder on another module ( used for the mentioned quantity customisation ) and this hook was not executing properly when using Paypal via ps_checkout module. On further analysis it seemed like there is some sort of server issue ( discussion with team suggested this ) because when I tried to debug the same from PaymentModule class the action seemed to be working perfectly working. So I did the obvious instead of the hookActionValidateOrder I changed the function name in module and called it in paymentmodule class override and it now works perfectly. Thanks for all the responses. Hope this helps someone too Edited February 5, 2024 by SRUTHI R BABU (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now