checkout

Add fee for Cash on delivery payment method (cod) in Woocommerce

亡梦爱人 提交于 2019-12-05 16:01:00
In WooCommerce I need to apply a custom handling fee for a specific payment gateway. I have this piece of code from here: How to Add Handling Fee to WooCommerce Checkout . This is my code: add_action( 'woocommerce_cart_calculate_fees','endo_handling_fee' ); function endo_handling_fee() { global $woocommerce; if ( is_admin() && ! defined( 'DOING_AJAX' ) ) return; $fee = 5.00; $woocommerce->cart->add_fee( 'Handling', $fee, true, 'standard' ); } This function add a fee to all transactions Is it possible to tweak this function and make it apply for Cash on Delivery payments only ? The other

Stripe Checkout Price error - Invalid Integer

独自空忆成欢 提交于 2019-12-05 15:08:07
问题 I have a stripe account and am using the test API keys. I have created a Plan with following info - { "amount": 995, "created": 1418800758, "currency": "usd", "id": "c06e1791-1c6a-45fe-9c26-8f0c07dda967", "interval": "month", "interval_count": 1, "livemode": false, "metadata": {}, "name": "Pro2", "object": "plan", "statement_description": null, "statement_descriptor": null, "trial_period_days": null } I'm using checkout.js in my project. Once all the data is filled and we click on pay for the

Easy start with BlueSnap hosted payment fields;

廉价感情. 提交于 2019-12-05 10:39:04
Hi – I'm looking for a simple script I can Copy&Paste into my website so I can start selling with BlueSnap's HPF fields. The form should include the most basic elements needed to get the token back and charge the shopper, I'm not looking for any design, just functionality. I have the basics - but I need to see how this would look like if it was done: <form id="checkoutForm"> <div> <label>Full Name:</label> <input type="text" id="fullName"> </div> <div> <label>Card Number:</label> <input type="text" id="cardNumber" data-bluesnap="ccn"> </div> <div> <label>Security Code:</label> <input type=

Add custom header for Checkout pages in Magento (1.8.x)

混江龙づ霸主 提交于 2019-12-05 08:02:37
问题 I am trying to add a customised header to my Checkout pages, I have figured out removing the header from the page is basically adding a node in the /layout/checkout.xml file, could anyone explain how to basically a new altered header that only applies to all the Checkout pages. Current default/layout/checkout.xml <default> <remove name="footer"> <!-- removes the footer from checkout --> ... // all other xml data.. </default> pseudocode for my theme if (a CHECKOUT PAGE) { use 'custom checkout

Hide prices and disable checkout for guests [closed]

假如想象 提交于 2019-12-05 01:36:37
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . Is there any extension that allows to hide product prices and disable checkout for not logged in users? 回答1: Instructions on how to modify yourself: http://www.magentocommerce.com/boards/viewthread/22673/ Look for the instructions posted by szotyi about halfway down the post. He does a nice job of walking you

Anybody ever used PayPal Website Payments Standard with SESSION variables?

跟風遠走 提交于 2019-12-04 21:25:47
Note: Our site is built in PHP and uses MySQL databases. I already manage another site with shopping cart in its entirety using Authorize.net so please dont respond with suggestions to use another provider. A new product/service we are releasing is classified as "High Risk" to the merchant providers and they want to charge us out the a**. In response, I figured setting up a Website Payments Standard account on Paypal.com was the best alternative for the following reasons: 1) no monthly charges, only pay for what is used 2) trust brand and people are comfortable with Paypal The rates are quite

Pre-fill Woocommerce checkout fields with Url variable before session created

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 21:16:11
I have wordpress site running woocommerce with a few products. I want to send my customer a url to their product which includes their name and email so i can pre-fill name and email on woocommerce checkout page. the link will take customer to the product item page, where they can view product details and click "add to cart". Link example: http://example.com/product/myitem/tu_em=name@example.com&tu_name=theFirstName I tried to use Pre-fill Woocommerce checkout fields with Url variables saved in session answer code but you need to already have a woocommerce session created, which doesnt happen

How to remove specific country in WooCommerce

强颜欢笑 提交于 2019-12-04 21:06:09
Can someone tell how can I remove the specific country from woocommerce. There is option in woocommerce that said selling locations with All countries and specific. However I want to sell to all countries except the 1 country that is US for example! then how can I remove US from the countries list. As if I use "specific countries" option then I will have to add all the countries except the US which is longer process. Is there any code you can help me with that I can put into functions of theme so that US country will not appear in the list of countries during checkout? Try this following

Transferring order values from php shopping cart to MySQL

雨燕双飞 提交于 2019-12-04 20:48:01
I am trying to setup a “checkout/order” page within a site in which logged in users earn points/credits. Once they earn a certain amount of these points they can then go to a shopping cart and pay with these points only. (No money changes hands, so no paypal/checkout/shipping/taxes etc are involved). I have done a 'shopping cart' page and 'view cart' page (view cart code is on this page ), which works fine thanks to Steve and KMK ;). I have two tables on my MySQL database, 'orders' (which has order id, users id, total & time stamp) and 'order_contents' (order contents id, order id, product id,

WooCommerce: Disabling checkout fields with a filter hook

会有一股神秘感。 提交于 2019-12-04 20:41:42
I have try to disable the "required" property of several checkout fields at the same time using woocommerce_checkout_fields filter hook, with no success. Plugins are not working properly either. This is my code: // Hook in add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' ); // Our hooked in function - $fields is passed via the filter! function custom_override_checkout_fields( $fields ) { $fields['billing']['billing_address_1']['required'] = false; $fields['billing']['billing_address_2']['required'] = false; $fields['billing']['billing_postcode']['required'] = false