App reviews, troubleshooting, and recommendations
Hello, I would like help with a script.
What I want to achieve is that if a user chooses the "TEST" payment method , the shipping becomes free or is set to 0.
I was working on something like this but I have an error when accessing payment_gateways:
payment_method_name = "TEST"
if Input.cart.payment_gateways.any? { |gateway| gateway.name == payment_method_name }
Input.shipping_rates.each do |shipping_rate|
shipping_rate.apply_discount(shipping_rate.price, message: "Free Shipping with Credit Card Installments")
end
endOutput.shipping_rates = Input.shipping_rates
I understand that since it is a shipping script I cannot access the payment_gateway, right? How could I achieve my goal, I appreciate your help.
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024