I’m using Laravel to consume the Bigcommerce V3 API. I have ben able to succesfully create a new cart. But when trying to add an item to it, I keep getting a 422: Missing required fields error. I’m making my request trough Guzzle like this: The product I’m trying to add has no options or modifiers, so I don’t understand
Tag: cart
Remove all taxes in WooCommerce for a min cart total and specific countries
we need to charge 0 VAT for UK orders that are greater than 150 euro including shipping and payment gateway fees but excluding the 20% normal VAT. So if a British residential address orders something at 130 and shipping and payment gateway fees are 9 then we charge VAT so the customer pays 139+9+20% VAT, but, if the order is
Check if customer has purchased something and add product to cart in WooCommerce
The code below auto add a product to cart in WooCommerce: The answer Checking if customer has already bought something in WooCommerce allows to check if user has already make a purchase or not with a custom conditional function has_bought(). So what I would like is to check if the customer has ordered before and: If it’s their first order,
Empty cart button on woocommerce cart page does not work properly
I’m using this code to creare a button on my woocommerce cart page (near the update cart button): The problem is that it works only by clicking two times. I think that the problem could be that I’m using this link to add a product to the cart: Any idea how to solve this? Answer The problem lies in the
How to update cart item quantitty with ajax in laravel?
I want to increment/decrement cart quantity by clicking the button. See this image preview image This cart row is shown by forcach loop. First row is working perfectly. The problem is, when I click on the seceond/last row, I get only first row value. I don’t know how to solve that. Here is view code Here is ajax code Here
Hide specific variation attributes displayed in WooCommerce cart items
I want to hide specific variations from the cart page in Woocommerce, I was able to hide all the variation names but I want to keep 3 that need to be shown. The following code shows all the variations …
WooCommerce: change cart button text in loop to icon
I want to change the cart button text on archive pages to an icon. I found a snippet which does that. But that also changes the link of the cart button: Is there a way to change only the text of the button? I know, that I could change the template file /loop/add-to-cart.php. But I need a solution based on
WooCommerce: Check if cart item is free and add class to table row
I want to add an extra class to the cart table row if the product is free (price of 0). I do have a way to add an extra class: The problem is, that I cannot access $cart_item in the function. I made a var_dump for $values and found the product ID in it. Is there any way to get
Make order notes field required for variations with specific product attribute term in WooCommerce
I have few variable products with variation that have pa_size and pa_color attributes (taxonomy). I have 4 sizes (“s”, “m”, “l” and “special”) and 4 colors. My problem is, for the “special” size: Customer must fill order notes in checkout page, but since it is not a required field, they easily miss it. I found some code for product categories
Hide coupon discount raw if no coupon has been applied on WooCommerce cart page
I add coupons and discounts total savings to my cart page. My code works fine but I have an additional question. This is the code I am currently using: add_action( ‘…