checkout

PayPal Payment - Do a payment in one step

廉价感情. 提交于 2019-12-24 10:07:19
问题 I have a form where people can order one single item for a fixed amount of money. Here are the steps: customer fills out the form customer hits submit and proceeds to the review page where he can check his inputs in the review form should be a button to pay with paypal (button with own design and text) customer hits this button, proceeds to paypal, makes his payment after he paid successfully or not he should be redirected to the form on my site where he can see the result of his payment

Add dropdown to products and display the value on Woocommerce cart

只愿长相守 提交于 2019-12-24 08:19:51
问题 I'm having trouble adding a custom dropdown to the cart meta and displaying it in the cart. The code below works for a number field that is also on the single product page, but not for the dropdown for some reason. Does anyone know why? The code is as follows: // Dropdowns-in-ends starts here add_action( 'woocommerce_before_add_to_cart_button', 'func_dropdown_in_ends'); function func_dropdown_in_ends() { printf( '<div class="class_dropdown_ends"><label for="id_dropdown_one_end">I andre enden

add step to OPC without overriding

ε祈祈猫儿з 提交于 2019-12-24 03:12:25
问题 after reading this tweet from Ivan Chepurnyi and having to add a step to the OnePage Checkout (aka OPC) for a client's site, I thaught it was the perfect occasion to learn something new. I am a big fan of events/observers and try to use them as much as possible, but precisely for the OPC so far I found that it was not very elegant to use them. I mean, there are no useful events (as far as I know) that can be used. For example, from the top of my head I think of 2 things that I have to change

Disable “Place order” button for specific shipping zone in WooCommerce

落花浮王杯 提交于 2019-12-24 02:56:18
问题 I am trying to deactivate the "Place order" button if a specific shipping class is selected. Name of the shipping class is "Zone 6". Based on "Remove Woocommerce "place order" button for a specific shipping class" answer thread, I have make some changes to handle shipping zones instead: add_filter('woocommerce_order_button_html', 'remove_order_button_html' ); function remove_order_button_html( $button ) { // HERE define your targeted shipping zone $targeted_shipping_zone = "Zone 6"; $found =

Choosing a date and time after choosing the WooCommerce delivery method

天涯浪子 提交于 2019-12-24 01:17:27
问题 I need to make a selection of the time and date of delivery of the products, after choosing the method of delivery and place these fields in woocommerce_after_shipping_rate . As I see it. The customer chooses the delivery method, for example, "Courier". After that, two checkboxes appear: ASAP Delivery Date. If the customer chooses "Delivery Date", a new field appears with the date and time of delivery. That's about how here Based on "Enable Datepicker in a WooCommerce Checkout custom text

WooCommerce checkout message based on specific product category

浪尽此生 提交于 2019-12-23 17:29:42
问题 Wordpress store is using WooCommerce, and I have a small purchase note that I need to appear on WooCommerce Checkout , but only when a certain product is being purchased. I have added a custom message that now appears below the Place Order button. However its showing up no matter what is in the cart. This is the code I currently have in place: add_action( 'woocommerce_after_checkout_form', 'allclean_add_checkout_content', 12 ); function allclean_add_checkout_content() { echo '<div class=

Show or hide html element on chosen shipping method change in Woocommerce

浪尽此生 提交于 2019-12-23 13:06:40
问题 I'm trying to show/hide some elements from my checkout page, based on the chosen shipping method. The page elements I'm trying to show/hide come from another plugin, so I tried to change the display properties for them. I've looked to many thread like: Show or hide checkout fields based on shipping method in Woocommerce 3 But it's for checkout fields, and I'm not sure how to do it for page elements. Then based on this answer thread Here's my code so far: add_action( 'wp_footer',

Display custom fields values in WooCommerce order and email notification

丶灬走出姿态 提交于 2019-12-23 12:39:21
问题 Based on "Choosing a date and time after choosing the WooCommerce delivery method" answer code, that displays custom Pickup fields and delivery dates, the following code displays the delivery data of those fields on the order edit pages. Here is my code: // View fields in Edit Order Page add_action( 'woocommerce_admin_order_data_after_billing_address', 'my_custom_fields_order_meta', 10, 1 ); function my_custom_fields_order_meta($order){ $delivery_option = $order->get_meta('_delivery_option');

Woocommerce checkout page: remove view cart button & other messages

扶醉桌前 提交于 2019-12-23 10:08:30
问题 First, I'm a bit of a noob. I'm not a web developer/programmer. But I'm also not an idiot and have played with functions.php (just a little bit). here is the page: https://tefl-online-course.com/checkout-lp/?add-to-cart=228 When users click on a link on my Landing Page it adds the product to the cart automatically and takes them to the checkout page. Now, I would like to do the following. Remove/hide the "View Cart" button. This is the most important...I don't want people leaving this

GetExpressCheckoutDetails returns session expired (10411 error) in asp.net (only on some computers)

风格不统一 提交于 2019-12-23 09:25:49
问题 I got Paypal integrated in my asp.net web site, Its works perfectly on some computers, while others it doesnt. EDIT: found the problem but looking for a solution The problem is as fallowing: Things seem to work fine I can pay with paypal and then when it calls GetExpressCheckoutDetails it returns 10411 error ' this express checkout session has expired' I call GetExpressCheckoutDetails with the fallowing code: public bool GetDetails(string token, ref NVPCodec decoder, ref string retMsg) { if