skip select payment method?


  • Default avatar
    mary922    
     11 years ago
    0

    Joomla! 2.5.7
    Virtuemart 2.0.20b

    Ok, when a gift certificate is used and there is a zero balance, is there a way to skip selecting a payment? I'm not sure that asking people to enter credit card info for a zero balance is smart or ethical...

    I've checked the box that says if I only have one payment method active to auto choose it, but it doesn't... Is there a way to just checkout.. skipping the payment steps?

    Ok, I found a payment method called aow coupon and set one up, but I can't see it as a choice in the cart. ok.. no, not for use in the front end, lol...

    so I'm back to, how can I skip seleting a payemtn method and just approving the "purchase".

    ok, further along... here I am
    After using a gift certificate for a specific product, the cart total is zero. It still asks for a credit card.

  • Your avatar
    seyi    
     11 years ago
    0

    Hello,

    The payment plugin does not actually create a payment method in the front end. It is strictly used for automatic coupons, if you use that feature.

    This is really a virtuemart plugin. Here is a patch I wrote that works for it:
    https://awodev.com/forum/awocoupon/help-section/coupon-code-exceeds-amount-wont-allow-payment-method-or-ship#comment-4081
  • Default avatar
    mary922    
     11 years ago
    0

    I found this post... http://forum.virtuemart.net/index.php?topic=105264.msg365709#msg365709 that explains how to set up a 2nd payment module, and says to enable automatic payment selection. I set the authorize.net payment module to min value .02 and I set the 'VM - Payment, Standard'
    to .000001. Both are published.

    I'm wondering if this is because the products aren't free, just the end total is free, and vm is not checking the total, but the fact that an item in the cart has a price. Is there something broke here, or is there somewhere I can edit the cirteria?
    .

    (sorry, edited while you were answering... if that code you offered was supposed ot be in a future version and I have .20,,, did they not already add it?)
  • Your avatar
    seyi    
     11 years ago
    0

    Hmm, so did that work?

    Virtuemart just does not have a solution for 0 total. If you created a product that cost 0 and you had 0 shipping and tried to checkout, you would run into the same problem.

    And yes, I did submit the patch, but its up to them if they decide to use it or not. Not much I can do if they do not.
  • Default avatar
    mary922    
     11 years ago
    0

    ok, I wasn't sure, cuz it was an older version you were discussing.. and I was hoping there was a "no core hack" method to fix this. The article I posted was the "vm solution" to zero cost items, but apparently not if the items are couponed or discounted to free.. only if the items themselves are free... which really seems like a bad plan since they have coupons built in to vm and it's conceivable that someone might want to sell a free product without adding to their liability by taking a credit card info they don't need from someone for a free product... ("good news - here's a coupon to use at this store to get your item for free, bad news - you have to give them your credit card info to get it free...")

    Ok, on the virtuemart forum, they've fixed this issue in the latest version.. does this tool work with 2.0.21? Or should I just go with your hack? I've spent 6 months building this site, and it's just going live.. I'd rather not have this 'afterthought feature" the client wants skrew up the whole site, lol...
  • Your avatar
    seyi    
     11 years ago
    0

    That is great to hear it has been fixed on the latest. I will point users to that now. Yes, you are fine to upgrade, AwoCoupon works with 2.0.22.
  • Default avatar
    mary922    
     11 years ago
    0

    awesome! now to check with the other 4 components that I've got working with virtuemart, lol... joomdle's gonna be the kicker... thank you very much for your response.
  • Default avatar
    andrea2    
     11 years ago
    0

    Hello Seyi,
    with VM 2.0.22b and Joomla 2.5.13 I have the same problem of payments, when I use a coupon or gift card and the total amount is zero.

    The payment method I use is PayPal and with zero amount virtuemart sends an informational message indicating that "This amount is not valid for payment with Paypal.". I tried to set 2 methods of payment:
    1) Paypal, with a minimum amount of € 1
    2) ZERO, with a maximum amount of € 1

    In this way Virtuemart use PayPal only if the order exceeds € 1 and zero only when the order is less than 1 €, but chooses based on the amount before applying the coupon.

    When the order is more than 1 € and I put a coupon code, or a gitf card, even if the total becomes 0 (zero) there is only Paypal, but the payment does not continue ..

    Did I forget something?

    Thanks
  • Your avatar
    seyi    
     11 years ago
    0

    Hello,

    Seems like the payment methods are not taking into account coupon codes. You can change it by altering the plugin:
    in www/plugins/vmpayment/standard/standard.php, around line 213 is this:
    <?php
            $amount 
    $cart_prices['salesPrice'];
    ?>


    change it to this
    <?php
            $amount 
    $cart_prices['salesPrice']+$cart_prices['salesPriceCoupon'];
    ?>


    Now the standard payment you setup should appear when maximum is below 1.
  • Default avatar
    andrea2    
     11 years ago
    0

    Yes, the situation improves, but some strange things happen ..

    1. If I do not have shipping costs and the amount is zero after applying the coupon there are both methods of payment, Paypal and ZERO (should not .. it does not work the automatic selection). If I choose ZERO okay. If I choose PayPal erroneously receive the message "This amount is not valid for payment with Paypal" but records the order in "pending" status and remains in the cart.

    2. If I have a shipping cost and the amount is zero after applying coupon (subtracts the cost of shipping) there is only Paypal, and I can not pay....

    I hope I explained, I'm trying what will the customers.

    Do you have another suggestion?

    Thank you very much Seyi ..
  • Your avatar
    seyi    
     11 years ago
    0

    Ok, I think you want to look at the bill total?


    You can change it by altering the plugin:
    in www/plugins/vmpayment/standard/standard.php, around line 213 is this:

    <?php
            $amount 
    $cart_prices['salesPrice'];
    ?>

    change it to this

    <?php
            $amount 
    $cart_prices['billTotal'];
    ?>

  • Default avatar
    andrea2    
     11 years ago
    0

    Seyi, I am very grateful for fix, but I'm worried because I still find problems .. and we are talking about payments.

    I tried the last correction but there are two problems.

    The biggest is that in the cart remains the last payment method selected. I tried these steps:
    1. I put a product in your shopping cart with total cost of 20 €
    2. I put a coupon from 20 €, and the total goes to zero
    3. I choose the payment method ZERO
    4. Then insert a new product from 30 €, the total becomes 30 € .. but the payment method is ZERO.
    5. If I pay .. the order takes into account the payment ZERO.
    After step 4 appears in the cart "change payment method" and can only be selected PayPal (because ZERO has a maximum of 1 €) but customer should remember to change it manually.

    The second problem is that Paypal is always available as a method of payment, even if the total is zero. I tried to make the same change in paypal.php .. but it seems that does not know billTotal because then no longer provides the PayPal payment method even for high amounts higher.

    Sorry .. but you know these problems were not there with previous versions? or any use coupons bringing the total to zero? The only would avoid that the total goes to zero .....
  • Your avatar
    seyi    
     11 years ago
    0

    Ok, it seems there are instances where billTotal does not exist, in these cases it is taking the amount as 0. This is why it is still in the cart after you add items to the cart. So take 3:

    in www/plugins/vmpayment/standard/standard.php, around line 213 is this:
    <?php
            $amount 
    $cart_prices['salesPrice'];
    ?>

    change it to this

    <?php
            $amount 
    $cart_prices['salesPrice']+$cart_prices['salesPriceCoupon']+$cart_prices['salesPriceShipment']+$cart_prices['salesPricePayment']; # seyi_code
    ?>


    This builds what should be in the billTotal variable, instead of relying that it is there.
  • Default avatar
    andrea2    
     11 years ago
    0

    Perfect! It works, I modified paypal.php and standard.php.
    Thank you very much Seyi!
  • Default avatar
    dimitrios    
     10 years ago
    0

    I had the same issue, Joomla 2.5.17 VM 2.0.26d. Once again, thank you VM (NOT!) . :( Here's what I did.



    • I went into language overrides and looked for COM_VIRTUEMART_CART_CHANGE_PAYMENT and blanked it out. This got rid of the "Select payment" link--client uses PayPal exclusively.

    • Went into PayPal and set .01 as minimum payment.

    • I set up a new payment method >> Payment Methods >> New >> VMPayment - AwoCoupon.


    That's it.

    That "Select Payment" won't go away once there's a 2nd payment method introduced--regardless of the type of method. Anyway, that's how I solved yet another weirdo VM issue.
  • Default avatar
    axiom    
     10 years ago
    0

    Joomla! 2.5.16
    Virtuemart 2.0.22c

    Hi I've followed the steps in this post and modifed my payment plugins in standard.php, authorizenet.php and paypal.php to properly calculate the order value minus AWO deductions and am able to get things working except for one very notable exception. On our site we use three different shipment methods. When a user uses their gift code to pay for an order everything works fine if the balance of their gift certificate can cover the cost of their purchase plus the most expensive shipping option. If the cost of their purchase plus the most expensive shipping option is less than the balance on their gift certificate then the standard payment option is disabled and the use of one of the other payment options is required. This happens even if the user has selected a less expensive payment option that can be covered by their gift certificate. How can I fix this so that the payment options are displayed based off of the currently selected shipping option instead of the most expensive one?
  • Your avatar
    seyi    
     10 years ago
    0

    Hello,

    As of the very next version, 2.0.24, Virtuemart has better support for 0 order totals. It is basically doing what we do in this post, in that the correct amount of the cart total with discounts is calculated as the total used in the payment method. So you would simply set all your current payment methods to only show if the minimum amount in the cart is 0.01. And then create a new payment method, Free order, and set it to only show if the maximum order total is 0.01. And in this new payment method, set the order status of the new payment method to confirmed. I am mentioning it for others who might read this post. The code I gave below, is incomplete.

    This is how Virtuemart calculates the amount for payment methods in 2.0.24
    <?php
            
    if(empty($cart_prices['salesPrice'])) $cart_prices['salesPrice'] = 0.0;
            
    $cartPrice = !empty($cart_prices['withTax'])? $cart_prices['withTax']:$cart_prices['salesPrice'];
            if(empty(
    $cart_prices['salesPriceShipment'])) $cart_prices['salesPriceShipment'] = 0.0;
            if(empty(
    $cart_prices['salesPriceCoupon'])) $cart_prices['salesPriceCoupon'] = 0.0;
            
    $amount$cartPrice $cart_prices['salesPriceShipment'] + $cart_prices['salesPriceCoupon'] ;
            if (
    $amount <= 0$amount=0;
    ?>


    I would suggest you update it.

    I really do not follow the problem you are having, but I am hoping making the changes will fix the problem.