Gift Certificate to cover shipping in Virtuemart, but it still redirects to PayPal for Shipping
- Hi, I've set up a gift certificate in Virtuemart to cover the cost of a sweatshirt plus shipping. It seems to work -- the total amount is zeroed out, but when the user clicks "Confirm Purchase," they're redirected to PayPal for a $6 charge (the fixed cost of shipping that we'd previously set up). If the total amount is zero, there shouldn't be any payment.Suggestions? Thanks in advance.
- Hello,For Virtuemart you have to create a payment method that handles 0 value.So you have your regular payment methods, and another one called, for example, Free order, where you set as standard payment method. For this payment method set maximum amount to 0.01. For all other payment methods set minimum amount to 0.01. That way, only the free payment method shows when order total is 0.For the amount you see within paypal, here is the fix:
- Thanks for the info. I think I set it up correctly, but the payment methods do not switch from PayPal to No Payment when the total equals zero. In fact, from tinkering with those min/max values, I can get it to switch based on the total before the coupon -- in other words, if the total is 29.00 before the coupon, I have to set PayPal to minimum 29.01 and Free to 29. Is there some other setting I'm missing?
- In awocoupon > installation check, do you have vmpsplugin update installed?
- I didn't have one of two "file update" plugins installed (www/administrator/components/com_virtuemart/plugins/vmpsplugin.php). I installed it, but sadly no change in the checkout.
- Not sure. Maybe try clearing your browser cache. You can also try this:https://awodev.com/forum/awocoupon/help-section/issues-with-virtuemart-payment-methods-and-100-coupons
- I've tried many things, and still can't reliably get this working. Clearing cache did nothing helpful, and neither did the hack suggested in the link above.Here's where I'm at: I made a copy of the live site and turned on VM debugging. You can see on steps #3 and #8 that it is evaluating the No Payment option, but at that time, it doesn't think the total is less than .01 (apparently). You can also see that in step #9, it finds the default payment (PayPal, ID1), and in step #11, it evaluates that one as false... but apparently still uses it.So I'm baffled that the No Payment option fails the tests -- I think if that one was valid, we might be good.Appreciate any additional help, and thanks in advance.
Message
1 vmdebug FOUND automatic SELECTED shipment !! Var1:
42 vmdebug FOUND automatic SELECTED shipment !! Var1:
43 vmdebug paymentmethod No Payment = FALSE for cart amount. NOT within Range of the condition from 0 to 0.01
4 vmdebug FOUND automatic SELECTED payment !! Var1:
15 vmdebug Doing base64_decode ڪ�r�������m� 0�vo�
6 vmdebug vmTime: Time consumed for shipment/payment plugins: 0.00774812698364258
7 vmdebug FOUND automatic SELECTED shipment !! Var1:
48 vmdebug paymentmethod No Payment = FALSE for cart amount. NOT within Range of the condition from 0 to 0.01
9 vmdebug FOUND automatic SELECTED payment !! Var1:
110 vmdebug vmTime: Time consumed for shipment/payment plugins: 0.00104999542236328
11 vmdebug paymentmethod PayPal = FALSE for cart amount. NOT within Range of the condition from 0.01 to 0
12 vmdebug End used Ram 30M
13 vmdebug Peak memory peak 30M
14 vmdebug vmTime: "VirtuemartControllerCart" Finished task : 0.253396987915039
- Possible to get access to the dev site to debug?
- Yes. How to send the credentials?
- Oh yeah... the envelope right next to your username. :) Just sent you the info.
- Ok, I see why now it was working on my dev site and not yours. On my site, I had a payment cost. Seems virtuemart calculates the coupon when getting the cart amount earlier in the process if there is a payment cost, causing it to work. So to fix, I simply went to admin > virtuemart > paypal > configuration, and set Fee per transaction to 0.001:
It does not charge, but triggers coupon discount before calculating min amount.Also in my debugging, I noticed you are using Virtuemart 3880, but your plugins are 3860. So I updated your virtuemart plugins to 3880. I don't think it will have an affect in this situation, but thought I mention it anyway. - You are a wizard! Don't know how you figured that out, but I'm so grateful!
- Unrelated to this issue, which is now resolved, but just reporting: I had an associate uploading a few hundred coupons via the importer. It all worked once we figured out a problem with the time. This from my associate:
"Got it. There is something wrong with how the import process handles the time portion of any of the date fields. In order to get a successful import of 12:00AM, I have to enter 10:00AM. It must be a bug in their code and I’m sure it means that certain times can’t be uploaded because 23:59 is uploaded correctly as 11:59 PM so there are probably 10 hours worth of time that can not be set as the expiration time, created time, or modified time."
We're good, the coupons we need are imported, but I thought I'd share. Again, thanks!