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**
Questions tagged [cart]
3190 questions
7
votes
1 answer
Magento : Can't add product to cart after order
After placing an order, it is not possible to add a product to cart. Magento keeps telling me : Cannot add the item to shopping cart.
Plus, if I try to reorder , I got an error :
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an…

Alex Beauchemin
- 1,072
- 1
- 17
- 24
7
votes
2 answers
WooCommerce - Ignore unselected variations when adding to cart
Objective: add product to cart despite unselected variations, i.e. remove/disable the mandatory nature of variation fields.
Issue: WooCommerce's absolute requirement for all variations to be selected before adding to cart.
Tried: filtering…

UncaughtTypeError
- 8,226
- 4
- 23
- 38
7
votes
3 answers
In a WordPress template, how can I detect if the current page is the WooCommerce cart or checkout page?
I would like to have a header banner hidden when a user is in the WooCommerce cart or checkout process. Is there a flag or variable that I can check to see if the current page is in either of these WooCommerce sections? I basically want to do…

Tantalus
- 397
- 1
- 3
- 11
7
votes
2 answers
How to remove Shipping section from Woocommerce cart page
I tried to remove that by adding bellow code to my theme functions.php but it doesn't work.
function remove_shipping_calc_on_cart( $show_shipping ) {
if( is_cart() ) {
return false;
}
return $show_shipping;
}
add_filter(…

Viona Beauty
- 73
- 1
- 5
7
votes
3 answers
Change cart totals title text on cart page in Woocommerce
I'm looking to change the text "Cart Totals" in the cart totals div in WooCommerce or remove it totally with an action.
I've added different text above the box in using
add_action( 'woocommerce_before_cart_totals', 'custom_before_cart_totals'…

Donny Dug
- 73
- 1
- 1
- 7
7
votes
2 answers
Add an additional cost to flat rate shipping each 3 items in Woocommerce
I'm running a woocommerce shop and using a Flat Rate shipping $15. I have written a formula to add $1.25 for each additional item.
13.50 + ( 1.25 * [qty])
Sipping "flat rate settings | $1.25 for Additional Each Item:
But I want to add this cost…

Muhammad Irfan
- 85
- 5
7
votes
1 answer
Get the author ID of each product in Woocommerce cart
In woocommerce, I need get the user ID of each product within the cart, The user ID isn't from the customer, but is the user who created and published the product that is currently in the shopping cart (the author post).
I have this code that I got…

Noe_Mares
- 95
- 2
- 9
7
votes
1 answer
Change the cart item quantity for specific products in woocommerce
Can I change WooCommerce quantity in some specific product?
I have tried:
global $woocommerce;
$items = $woocommerce->cart->get_cart();
foreach($items as $item => $values) {
$_product = $values['data']->post;
echo…

lalaland
- 73
- 1
- 2
- 8
7
votes
2 answers
Hide shipping methods for specific shipping class in WooCommerce
Essentially I'm trying to make the flat rate method Id flat_rate:7 disabled when there is cart items that have the shipping class "Roller" (ID 92).
This is the code I tried:
add_filter('woocommerce_package_rates',…

Niklas Buschner
- 354
- 1
- 3
- 19
7
votes
1 answer
Change cart and checkout button links on WooCommerce mini cart widget
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…

Suren Konathala
- 3,497
- 5
- 43
- 73
7
votes
3 answers
Best php shopping cart
Been out of the game (not built a shop in years) and looked at the two old front runners (oscommerce and zcart) and neither seem to have have improved much over the years. What I am looking for is a open source cart which runs on php and connects to…

Roscoeh
- 71
- 1
- 2
7
votes
1 answer
WooCommerce Cart quantity based discount
In WooCommerce, how do I set a cart discount based on the total number of items in the cart?
For example:
1 to 4 items - no discount
5 to 10 items - 5%
11 to 15 items - 10%
16 to 20 items - 15%
21 to 25 items - 20%
26 to 30 items - 25%
I've…

Fiona Tan
- 79
- 2
7
votes
2 answers
Change Cart total price in WooCommerce
I am running into issues with the cart total only displaying 0
Essentially what I am trying to do is only accept a deposit total of a certain amount after all cart items have been added to the carts subtotal.
So for example if the customer adds…

DEVPROCB
- 483
- 2
- 5
- 19
7
votes
1 answer
Conditional add fees to cart
We have a website that sells computer parts, There's a section in this website called "Assemble your PC" that allows users to choose parts( mainboard - cpu - ram ,etc. ) and pay the price and get their assembled product, everything works just fine,…

Amin
- 1,637
- 1
- 22
- 40
7
votes
1 answer
Auto add or remove a freebie product from cart in Woocommerce
I'm operating a WooCommerce shop, where we'd like to give every customer a freebie (e-book) that will show in the basket, after you have added a product to the basket obvious.
Example:
You add "product1" to the basket, and the basket will now show 2…

Kasper
- 105
- 1
- 6