You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My cartridge shop offers a discount code on some products. When applied, this discount appears taken correctly in the cart total in shop.cart view, but the PaypalSubmissionForm does not pass the discount along to the PayPal submit URL. Looking at the code, I see that it is adding a field for each line item including the amount, but does not do anything to handle discount codes that I can see.
I will be happy to work on this myself and submit a PR at some point, but I thought I'd bring it up here in case anyone has a better idea how to do this that I do. For the moment, I'm pretty stumped tbh. Thanks!
The text was updated successfully, but these errors were encountered:
Replying to myself here, I was able to get this working for my current purposes by calling the calculate_discount() method on the current session cart, and passing that via the PaypalSubmissionForm as PalPay variable discount_amount_cart.
No PR yet, as my present implementation is still pretty ugly, and it would be better (and possible) to send discrete discount amounts per item, as the form in master currently does with item prices.
My cartridge shop offers a discount code on some products. When applied, this discount appears taken correctly in the cart total in shop.cart view, but the PaypalSubmissionForm does not pass the discount along to the PayPal submit URL. Looking at the code, I see that it is adding a field for each line item including the amount, but does not do anything to handle discount codes that I can see.
I will be happy to work on this myself and submit a PR at some point, but I thought I'd bring it up here in case anyone has a better idea how to do this that I do. For the moment, I'm pretty stumped tbh. Thanks!
The text was updated successfully, but these errors were encountered: