checkout

How to checkout and reset using smartgit?

蓝咒 提交于 2019-12-20 04:52:18
问题 Need help in understanding the below 1). How do i check out to a particular commit and again revert back to the recent commit ? Tried branch->checkout->same branch and check out to the previous commit, but when i did this the commits made after the one i checked out now got lost ! Its not in the list to checkout to recent commit ! 2). How do i reset my head to a particular commit ? 回答1: (1) Usually, branch refs won't be changed by a Check Out , so you may use Check Out again to switch back to

Required custom WooCommerce checkout fields don't validate entered value

北城以北 提交于 2019-12-20 04:26:13
问题 I'm adding WooCommerce custom checkout fields in a Storefront child theme functions.php file. They have a "required" attribute. The aim is to have these fields appear at the top of the page, before the billing fields. when clicking the submit button to proceed to payment, I'm getting the required custom field validation error ('please fill in your name') and can't continue with payment, even though filling the field with valid data. Any clue how to fix this or where to start debugging ? here

Displaying product thumbnail and attribute in Woocommerce cart and checkout

百般思念 提交于 2019-12-19 10:43:19
问题 I am isplaying product attributes in my Woocommerce checkout table, see my previous question: Show Woocommerce taxonomy in emails I also want to show the product image, so my ideal would be: Product image on the left and beside it product name, in the next row product quantity and after that the attribute. If I use this function add_filter( 'woocommerce_cart_item_name', add_thumbnail_to_cart_items, 10, 3 ); function add_thumbnail_to_cart_items( $product_name, $cart_item, $cart_item_key ){ if

Add a custom checkbox in WooCommerce checkout which value shows in admin edit order

拜拜、爱过 提交于 2019-12-19 04:55:36
问题 I try to add an <input type="checkbox"> which value also shows at the woocommerce backend, so I can see at the end if the costumer ticked the box or not. The checkbox should be below the Payment Methods. Is it possible to add a custom checkbox in WooCommerce checkout which value shows in admin edit order? 回答1: You can do it in 3 steps: Adding the custom checkbox field below the Payment Methods Saving the custom checkbox field when it's checked in the order meta Displaying the custom checkbox

Adding a notice on Cart and checkout page based on item custom field highest value

三世轮回 提交于 2019-12-19 04:16:05
问题 I have a a custom field value for each product. This custom field is inserted with the code below : <?php // Insert a Custom Admin Field add_action( 'woocommerce_product_options_general_product_data', 'woo_add_custom_general_fields' ); function woo_add_custom_general_fields() { echo '<div class="options_group">'; woocommerce_wp_text_input( array( 'id' => 'days_manufacture', 'label' => __( 'Days for Manufacture', 'woocommerce' ), 'placeholder' => '', 'description' => __( 'Insert here',

WooCommerce conditional custom checkout fields

允我心安 提交于 2019-12-18 09:37:12
问题 In WooCommerce, I'm currently trying to add a conditional custom field in the Checkout that shows a checkbox which if is checked displays an input field to insert an italian fiscal code (Codice Fiscale). Thanks to various guides and plugin codes I was able to show it in the checkout but i'm doing something wrong with the code and having several issues: By default i would like it to be NON required field, only if its checked it must become required. If i try to proceed to cart inserting a

WooCommerce login redirect based on cart

邮差的信 提交于 2019-12-18 09:14:19
问题 I want to apply following 2 case : If User not logged in and cart is empty: Then redirect user to login and then my account If User not logged in and cart has product: Then redirect user to login and after login redirect to checkout My Code : function wpse_Nologin_redirect() { if ( ! is_user_logged_in() && (is_checkout()) ) { // feel free to customize the following line to suit your needs $MyLoginURL = "http://example.in/my-account/"; wp_redirect($MyLoginURL); exit; } } add_action('template

Change cart and checkout button links on WooCommerce mini cart widget

旧巷老猫 提交于 2019-12-18 08:54:36
问题 On Woocommerce, how can we change the URLs on "View cart" and "Checkout" links on the drop down menu that show up on hover over the shopping cart icon on the the home page? I have the "cart" and "checkout" pages setup but they are not linked to these. I can view these pages directly with urls. http://mysite/cart and http://mysite/checkout 回答1: It seems that there is a problem somewhere with your theme (or in a plugin), as the minicart button links always point to the right cart and checkout

WooCommerce - Skip cart page redirecting to checkout page

浪尽此生 提交于 2019-12-18 07:07:10
问题 Our website is kohsamuitour.net. I have added custom code to skip the cart page on checkout, which works for all sales. This code: function wc_empty_cart_redirect_url() { return 'https://www.kohsamuitour.net/all-tours/'; } add_filter( 'woocommerce_return_to_shop_redirect', 'wc_empty_cart_redirect_url' ); Now that does the job, but we also have a possibility to check booking availability. That can be found on the pages of private charters, i.e. this one: https://www.kohsamuitour.net/tours/kia

woocommerce change price in checkout and cart page

一世执手 提交于 2019-12-18 06:57:47
问题 With woocommerce, in my website I'd like to add in the cart page a select input where the user can select a value between two options, and depending on this value I will change the price. so far, I could get the total and change it using this : function action_woocommerce_before_cart_totals( ) { global $woocommerce; $woocommerce->cart->total = $woocommerce->cart->total*0.25; var_dump( $woocommerce->cart->total);}; The issue is that when I go to checkout page it doesn't take the total