I have an item in my cart which is set at zero price. When I add this to cart and checkout, I am still sent to Worldpay to process the payment for £0.00. Is there any way to modify the code so that the "thanks" page is shown immediately if the total amount of the cart is zero?
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
E-Commerce Modules /
Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.
Moderators: martimiz, Nicolaas, Sean, Ed, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba
Still being sent to payment provider if cart value is zero (Free product)
what module / version are you using to do this?
Silverstripe 2.4.7
Ecommerce 0.7.0
Payment 0.3.0
This may not be the latest version, but the module has been quite customised for this site and is working otherwise, so I would be nervous of making any updates.
You might have to code a fix of your own. Have a look at OrderForm.php, and perhaps introduce a check that the order total is above 0.
I'm not sure of the exact behaviour in later versions of the code, but I can understand if someone wanted to place an order that does total $0. Eg: some kind of 'free' promotion.