Questions tagged [cart]

A web cart or online shopping cart is a web app used to shop online. **For questions related to CART -- Classification and Regression Trees -- use the tag [cart-analysis], or consider whether the topic is more appropriate for Cross Validated or Data Science Stack Exchange**

3190 questions
5
votes
2 answers

Clear Woocommerce Cart on Page Load Even for logged in users

I want to clear the cart page on page load if this page is not a cart or a checkout page Even for logged in users and admins, any page then it clears. This code was working but its not anymore /**  * Clears WC Cart on Page Load  * (Only when not on…
Maged Mohamed
  • 511
  • 5
  • 27
5
votes
3 answers

Set a minimum order amount in WooCommerce

I want to have a minimum order amount in my WooCommerce store. The following code is perfectly showing a notice if the amount isn't reached but the checkout is still possible. How to disable checkout-button when the minimum amount isn't…
Krystian
  • 887
  • 5
  • 21
  • 52
5
votes
4 answers

Remove shipping estimate message on cart table in Woocommerce 3.5

In the latest release of WooCommerce, there is a message being displayed in the cart stating the shipping cost is only an estimate. This doesn't make any sense when someone is using flat rate shipping and does not calculate shipping at all. Note, I…
Christian Rea
  • 53
  • 1
  • 1
  • 4
5
votes
2 answers

Change shipping class based on cart items shipping class count in Woocommerce

I'm having trouble with the default WooCommerce shipping class settings. We have a small webshop with 2 shipping costs. One for products that fit in the mailbox, and other that don't. We would like to make a setting that if there are 2 products with…
Bas
  • 81
  • 3
5
votes
1 answer

Dynamic shipping fee based on custom radio buttons in Woocommerce

In Woocommerce, I have added two custom radio buttons on the checkout page and on click, I called an ajax function to add a delivery fee. Here is my code: $(document).on('change','#shipping_method_0_local_pickup5',function(e) { …
Aakanksh Patel
  • 603
  • 1
  • 8
  • 21
5
votes
3 answers

Remove Woocommerce cart quantity selector from cart page

I am trying to remove Woocommerce cart quantity selector from the cart page. I am using the quantity input field on my shop archive pages and it has applied it to the cart page. How can I remove it and not allow the user to change it? I have tried…
user4752139
5
votes
1 answer

R: rpart tree grows using two explanatory variables, but not after removing less important variable

Data: I'm using the "attrition" dataset from the rsample package. Question: Using the attrition dataset and rpart library, I can grow a tree using the formula "Attrition ~ OverTime + JobRole", where OverTime is chosen as the first split. But when I…
sdevine188
  • 338
  • 3
  • 8
5
votes
2 answers

Hide "remove item" from cart for a specific product in WooCommerce

I'm using woocommerce for my website, I want to hide "remove this item/product" for one particular item, can you please tell me how can I do so. I would greatly appreciate any help towards this.
Shahala Anjum
  • 69
  • 1
  • 9
5
votes
1 answer

Get the Cart shipping label and cost in Woocommerce

I need to display the shipping cost in other side of cart page. I tried: cart->get_cart_shipping_total(); echo $current_shipping_cost; ?> But print value nad don't title of shipping cost, because i use as title:…
delfinoweb
  • 103
  • 1
  • 3
  • 9
5
votes
2 answers

Add the product ID after the cart item name in Woocommerce cart page

I'm looking to hook into the 'woocommerce_cart_item_name' filter in woocommerce and would like to display the product ID after the name. I'm working with this so far... add_filter( 'woocommerce_cart_item_name', 'justatest' ); function justatest(…
brunam
  • 825
  • 2
  • 14
  • 26
5
votes
2 answers

Add custom fields as cart item meta and order item meta in WooCommerce

This is a plugin on how to add add cart item meta & order item meta for my WooCommerce order. Initially my code below worked well for input type=text. It returns the label for value and the inputed value. On conversion to type=checkbox the code…
omukiguy
  • 1,401
  • 3
  • 17
  • 36
5
votes
1 answer

Remove attribute values from product variation title and show them on separate rows

I have a checkout page where I want to: Remove selected product attribute values from product variation title item. Remove the quantity from item title too. Display the different product attribute value such as size, color and the quantity on…
Jens
  • 135
  • 1
  • 3
  • 9
5
votes
2 answers

Conditionally Hide WooCommerce Shipping methods based on shipping class

Using WooCommerce v3.2.4 on This site (here) (WP v4.9) and 11 products with the shipping class of Overweight/Oversize that have a flat rate applied to them: $20 to Canada and $25 to the US. All other products have flat rate shipping of $10 (Canada)…
The Hatchery
  • 63
  • 1
  • 6
5
votes
2 answers

Remove the stock quantity from WooCommerce cart error messages

Iin WooCommerce, I've set woocommerce->settings->products->inventory->stock display format to "Never show quantity remaining in stock". However if a customer ads a product to the cart, continues to cart or checkout page and enter a value higher than…
axelra82
  • 517
  • 8
  • 23
5
votes
2 answers

Changing WooCommerce cart price after applied coupon code

I have created a product on WooCommerce, and added two options on product detail page using the hook woocommerce_before_add_to_cart_button. Now when customers add product to cart from product detail page they have two options their. They can choose…
Archana
  • 337
  • 2
  • 4
  • 12