So I have a WordPress site which has two payment gateways available, COD and online payment option. I am using the default Woocommerce checkout form and functions. Whenever I am switching from COD to another payment gateway on the checkout page, the product quantity increases by one. I have tried a few things but I am not sure what is causing the issue. Can someone help me with this? Also this just happens the first time. If I switch after the first time, it works fine.
Here is a link of the product with which it happens (along with others)
https://elitehubs.com/razer-barracuda-x-7-1-wireless-gaming-headset-mercury/
Related
I have two different payment gateway (stripe and bank transfer) in Woocommerce checkout page. But "Bank transfer" (bacs) is always auto selected by default.
Here is screenshot of the payment gateways on my checkout page:
I would like to change that and auto select stripe payment gateway intead.
How can I do it?. Any help is appreciated.
Updated
You can try to add the following code, to change the default payment gateway on checkout page. You will have to define the default desired payment gateway ID, in this code:
add_action( 'template_redirect', 'define_default_payment_gateway' );
function define_default_payment_gateway(){
if( is_checkout() && ! is_wc_endpoint_url() ) {
// HERE define the default payment gateway ID
$default_payment_id = 'stripe';
WC()->session->set( 'chosen_payment_method', $default_payment_id );
}
}
Code goes in function.php file of your active child theme (or active theme). Tested and works.
You will always get Stripe as default now:
To get the needed payment gateway ID for Stripe , go in Woocommerce > Settings > Checkout and find it in the "Gateway ID" column as in this screenshot:
You can just rearrange the payment gateway according to your need (in your case Credit Card (Stripe) followed by Direct Bank Transfer) so that the top one would always be selected per new session.
WooCommerce will automatically save the currently selected payment method (ex. Direct Bank Transfer) into the current session and when you reload the page, that payment method will be selected and not the default one. You can test it in a private window browser.
Update:
This answer is simply an explanation to how WooCommerce handle default gateway. If by any change it doesn't work. There might be some code (Like the code by LoicTheAztec) from your theme or from your plugins that is overwritting this functionality. If you want to force it to default to a particular gateway, you can follow LoicTheAztec answer.
Had the same issue. Rearranging the methods didn't work, this was the solution:
(Arrange the methods as you would like them to be shown)
Turn off all payment methods except the one you want to be selected by default and save changes.
Turn on the second method and save changes.
Repeat for all the remaining methods, enabling them one by one and saving in between.
Yes, the radio button will default to the highest active gateway.
I wish to use paypal to create a shop to an existing site, however I have reached a problem.
Paypal has a facility to 'add to cart' however when clicked on, it goes to their servers.The check out has no customisability what so ever, so looks completely out of sync with my site.
Is it possible to create a shopping cart on PayPal showing the list of items on MY site (so I can customise the look and feel of the shopping cart) and then only when the payment needs to be made, the user is sent to the PayPal Site.
Thanks
NOTE: I'm using pure HTML,CSS & PHP. I am not using a CMS such as WordPress.
Also when I mean I want to customise the look and feel of the shopping cart, I don't mean just the button, but the way the items is shown up along with details such as Qty.
If you're working with basic PHP code that you built on your own (no framework like WP) then you'll need to build your own shopping cart.
If you were to use WP, though, you could use WooCommerce which is a great shopping cart system and would probably save you lots of time.
I implemented magento as an internal webshop of an organization. The shipping, billing and payment informations are same for all orders (and they will be automatically filled in by LDAP). Thus, I want to skip the first 4 checkout steps and to land on order "review".
I've already looked at the classes:
Controller/Checkout/controllers/OnepageController.php
Model/Checkout/Model/Type/Onepage.php
But I couldn't find, which Method is triggered by the button proceed the checkout.
How can I realize it?
Since what you're trying to accomplish is not the default magento checkout workflow, you could try creating your own custom checkout programmatically, this way you will have total control and bypass the complicity of the onepage checkout.
See Programmatically create order in Magento
I have a problem with my Mulitple Shipping Checkout in Magento 1.6.1. When a customer proceeds through the checkout and they come to the Shipping.phtml page where they chose a shipping option and cost they can continue to the billing stage of the checkout without chosing a shipping method. I would like to make this a required field in the checkout. However another problem is that even if the customer choses a Shipping Method it is not added to the grand total at the end of the checkout. Does anyone have any ideas about why this is happening and how to fix it?
The shipping method is a required field and its cost will be added to the totals and the end of the checkout in a default Magento installation. I guess you have one or more custom edits within your templates or have some extension installed, that produces that behavior. Switch back to default template and temporary disable non-core extensions to see if it works as expected. Afterwards re-enable deactivated extensions one-by-one.
a bit of a funny one for you this afternoon.
This is in Magento 1.5.1.0...
Essentially, my website sells products that are free (£0.00) however the customer has to pay for delivery. The problem that I’m having, is that at checkout, the Payment Methods simply doesn’t load whenever the basket sub total is 0. Even when the Grand Total with Shipping is an amount.
I’m running One Step Checkout, however it doesn’t work on the default One Page Checkout either.
I’ve tried everything, and I’m certain that it’s not got anything to do with the Payment Gateways that I’m using.
I tried the same thing on another site of mine, that’s running 1.4 and it works fine on there?
You can see a screenshot of the page with the problem here...
Any help would be really appreciated.
Check that you have: "Zero Subtotal Checkout" enabled under: System -> Configuration -> Payment Methods.
Subtotal is pre shipping, tax and discounts, this payment option exists specifically for your circumstance.