0
votes

I have a shopping cart setup on my website using woocommerce and all is set up perfectly What i want to achive there is to create a custom radio buttons to select the option for delivery/pickup. If a user will select pickup option then no shipping will be charged or if user will select the delivery option the $12.00 flat rate/order will be charged along with the timings which will save as a meta key and value later on creating order. Following is an image to elaborate this perfectly enter image description here

TO achieve this i had already created a custom plugin also where i stuck to add shipping amount. The question is asked here: Can't update the shipping amount while checkout in woocommerce(wordpress)

but i didn't get any response. Any help will be really appritiated.

1
"but I didn't get any response" That other question is only 7 HOURS old! There's no need for 2 questions asking the same thing, when you could have edited your previous question to make it better.helgatheviking
the previous question is my effort to solve a problem and this question is the problem for which the soulution could be different than mine, thats why i asked it tooHarish Kumar
But ultimately you are trying to achieve a specific goal and the questions are related. I don't mean to be a jerk, but have you run a google search? I see several plugins that appear to do what you are asking. (such as order delivery date Where do they fall short for you?helgatheviking
Yes for the date is available but not for different time in the same day. Actually i was stuck in a problem where i need to update shipping cost on checked of radio button. If you see my previous question then you will understand. I have there shipping value updating but as a fake through javascript but its not updating on checkoutHarish Kumar

1 Answers

0
votes

correct answer is posted here Can't update the shipping amount while checkout in woocommerce(wordpress)

using following hook

function woo_add_cart_fee() {
 WC()->cart->add_fee('Shipping ', WC()->session->get('ship_val'));
}
add_action('woocommerce_cart_calculate_fees', 'woo_add_cart_fee');

and the date can be inserted by adding a custom field on the cart page using add_meta_box()