checkout

Change Woocommerce product quantity in checkout table

好久不见. 提交于 2020-01-13 18:36:26
问题 I would like to change the way Woocommerce is displaying the product quantity in the order review table. I would like the quantity to be underneath the product name instead of after it. I found this post which helped, but the code only changes the quantity layout for variable products. How can I change it for EVERY product, even simple ones? 回答1: This can be done in multiple ways: 1) Overriding template checkout/review-order.php via your child theme. 2) Customizing the product item name: add

Add a custom field to checkout and to my_account user details on registration

女生的网名这么多〃 提交于 2020-01-12 08:36:11
问题 I have a woocommerce site I am building and I want to add the user's birthdate to the usermeta in the database as well as display it in the wp-admin under their profile. I have limited experience with messing with PHP. I have pulled from the Woocommerce docs here to display it on checkout, which it is doing correctly. The Woocommerce docs show you how to add it to the order info but not to the user account itself. It is correctly being added to the order but not the account. Here is what I

Add a custom field to checkout and to my_account user details on registration

こ雲淡風輕ζ 提交于 2020-01-12 08:36:06
问题 I have a woocommerce site I am building and I want to add the user's birthdate to the usermeta in the database as well as display it in the wp-admin under their profile. I have limited experience with messing with PHP. I have pulled from the Woocommerce docs here to display it on checkout, which it is doing correctly. The Woocommerce docs show you how to add it to the order info but not to the user account itself. It is correctly being added to the order but not the account. Here is what I

How to change the phone field in checkout page as mandatory

落花浮王杯 提交于 2020-01-06 05:00:24
问题 I have checkout page in woocommerce at the following link: https://combosports.com/checkout/ Now the problem is I want the phone field to be marked as required as other fields. How can I make this phone field mandatory. I have tried through the theme options but it does not work through it. I also want the optional text removed from the field and add asterisk mark on it. Please tell me how can I do that. Thank you in advance. This is the pic of phone field I have marked as required in theme

add step to OPC without overriding: update section

我怕爱的太早我们不能终老 提交于 2020-01-06 03:06:37
问题 so this is a follow up question of this one. I am adding a step before the shipping-methods by observer. I have a problem for getting the html used to update the step's tab content. Despite my best efforts it still loads the html of the shipping-method step instead of the html I want. This is the code of the observer: public function gotoViesStep($observer) { $response = $observer->getEvent()->getControllerAction()->getResponse(); $body = $response->getBody(); $result = Mage::helper('core')-

Traditional (standard) checkout (step by step page)

♀尐吖头ヾ 提交于 2020-01-04 13:58:09
问题 Here is my query in magento. I don't want to use onepage checkout & I want traditional checkout flow in magento. i.e. new page for new step. For that i have changed below setting: Admin > System > Configuration > Checkout Enable Onepage Checkout => No & Admin > System > Configuration > Shipping Settings Allow Shipping to Multiple Addresses => No But in front side checkout button is not visible in cart page. Please guide me. Screenshot for cart 回答1: Unfortunately it seems that there is really

Make checkout addresses fields not required in WooCommerce

佐手、 提交于 2020-01-03 06:01:29
问题 In Woocommerce I am trying to make checkout adresses fields not required with the code below… But I've got this error "Please enter an address to continue", when submitting checkout form. My code to set adresses checkout fields not required: add_filter( 'woocommerce_billing_fields', 'wc_npr_filter_phone', 10, 1 ); function wc_npr_filter_phone( $address_fields ) { $address_fields['billing_phone']['required'] = true; $address_fields['billing_country']['required'] = false; $address_fields[

Processing Paypal onAuthorize callback in Angular 4

泄露秘密 提交于 2020-01-03 04:45:05
问题 I can successfully load checkout.js in Angular 4 app, render the Paypal button, the new window appears, I confirm the payment, the payment is processed but I do not know how to setup onAuthorize callback to process the response in Angular 4 (like to show the success and store a payment record to MongoDb). Here is my code. I can see the first console.log containing the payment response but I cannot access the component's scope, so nothing after this first console.log is executed. I get no

Sorting priority for specific Woocommerce checkout fields depending on country

核能气质少年 提交于 2020-01-03 03:38:09
问题 In Woocommerce, I need to set the default ordering priority (sorting) of three fields on the checkout page: The first change depends on the choice of the 'IT' country code: postcode - 'priority' => 91, The other two are free of conditions, I just need to set the default priority: billing_email - 'priority' => 30, billing_phone - 'priority' => 40, By editing the file directly, class-wc-countries.php core file as shown below, I get what I need. But clearly at each update of the plugin I lose

WooCommerce: Dynamic Custom Checkout Fields in admin

流过昼夜 提交于 2020-01-02 12:26:49
问题 I am having issues adding custom checkout fields to the order admin (and maybe emails, i'm not there yet). Coding issues aside, I mostly followed https://www.kathyisawesome.com/woocommerce-customize-checkout-fields/ - here's my code so far: http://pastebin.com/y8LDcDxS I have it adding 'x' amount of $fields['extra_fields'] based on product quantity, assuming one product in the cart. I'm struggling with kia_display_order_data_in_admin() - I keep getting bit by get_country() whatever I do. I've