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.
cart
3,224
questions
-2
votes
0
answers
19
views
Customize WooCommerce Storefront mini-cart header text based on cart items
I try to customize WooCommerce Storefront mini-cart header, so there are:
when there are no products in cart, it gives result A text;
when there are 1 product in cart, it gives result B text,
when ...
0
votes
0
answers
31
views
How to override a specific condition inside filter "woocommerce_add_to_cart_validation"
I am using WooCommerce subscription and Mollie Payments for WooCommerce plugin.
It supports multiple subscription product to be purchased on a single checkout process, however when user tries to do a ...
0
votes
0
answers
23
views
It inserts some times 1 or 2 or 3 or 4 rows every time. how to fix [closed]
Hello i use this code to add a product in the shopping cart
and it inserts it sometimes 1 time, sometimes 2 or 3 or 4 times.
I want only 1 time to insert it how to fix this?
$sqlin="INSERT INTO ...
-1
votes
0
answers
19
views
Auto-applied coupon on Mix Match Products on minimum quantity
How do we properly code the below?
I am looking to have auto-applied coupon in cart for mix-match products and minimum quantity should be 5 but can't figure it out. I already created a coupon based on ...
0
votes
0
answers
7
views
Text to the right of 'Add to Cart' button
Wordpress/Woocommerce. Website add to cart button text
How would I remove or change the text to the right of the add to cart button. Can't seem to find it anywhere. Checked plugins, php files, etc. ...
1
vote
1
answer
29
views
Force State/County field to be required in WooCommerce Shipping Calculator
I am trying to make sure that the Shipping State field is selected in the shipping calculator.
Using the solution here works great for the City and Postcode fields like this:
jQuery('#...
0
votes
0
answers
25
views
Add a product to the cart via api for non signed up user in WordPress
I'm facing a hard problem in adding a product to the cart via api for non signed up user in WordPress. I started to think it is not possible to achieve it. It works properly for users which are signed ...
1
vote
0
answers
53
views
Shipping cost based on shipping zone and on items quantity steps in WooCommerce
i have a PHP code that counts shipping cost in woocommerce based on quantity steps in addition to another cost based on shipping zone, the sum of two costs give the total shipping cost. what i need ...
0
votes
2
answers
70
views
Showing custom empty cart page . WooCommerce and Divi Theme
I’m working on an e-commerce site based on WooCommerce and the Divi theme. Specifically, when the cart is empty, I get a blank page (though the header and footer are present). I’d like to know if ...
0
votes
1
answer
44
views
Add specific product to cart together with the main product in WooCommerce
I try do something similar to 'product addons', but manually. I would have few simple products, that have to be as companions. Their ids will be the same. I want to make them as checkboxes, with ...
-1
votes
1
answer
42
views
I want to add my custom add to cart button [closed]
I'm using motta theme for WooCommerce, and i don't like their add to cart button, it's too big, i want it to be so simple like a plus button, can you guys help me?
I tried to add many suggested codes ...
0
votes
1
answer
23
views
How to add and remove sessions from jinja template? or eventually how to make a cart functionality?
Is there any way to manage (add and remove) sessions from Jinja template without interacting with any kind of API or page reload?
Im making a cart function for a store website, and I wanted to store ...
0
votes
0
answers
57
views
how to display woocommerce cart items in form and mail using contact form 7?
I have this code to create a custom tag for display woocommerce cart items in cf7 form and send cart items in email notifications. But in Email I can't figure out how show cart items like they are ...
0
votes
0
answers
29
views
Modify cart total and then order total when an order is placed in WooCommerce [duplicate]
I'm using this code to modify my total on the checkout page
However, if I place an order, the modified total is not reflected in the order itself, and still has the unmodified checkout total.
Can ...
0
votes
1
answer
43
views
Remove Item from cart in ASP.NET in stepForm
this is my method for add and remove Items from session :
public async Task<IActionResult> AddToCart(int chefFoodId, bool stayInCartPage = false)
{
var item = await _orderService....
0
votes
0
answers
16
views
Product page quantity for variable product
In WordPress, I just want to add variable product types to the cart because I'm adding quantities
to the variable products. It works for simple products, but for variable products, it's functioning ...
0
votes
0
answers
26
views
Get From Session in .NET
This is my methods for get session and save in. I set session method in correct way and write service in IOC:
service.AddHttpContextAccessor();
public List<CartItemViewModel> GetFromSession()
...
0
votes
0
answers
22
views
having trouble changing product quantity in cart table. plain JS
New to programming. I dynamically add products to cart table. I include product image, name, price and I have quantity span buttons. I can see that when quantity buttons are clicked correct item - id ...
0
votes
0
answers
29
views
Display text and variables above WooCommerce cart block, and in cart items components
I am trying to display "Hello World $some_php_variable_related_to_cart" above the WooCommerce cart block (in a proper way, using WordPress and WooCommerce API), and to update $...
1
vote
0
answers
40
views
Add a custom notice in to WooCommerce mini cart widget
I would like it to display a message on top of a minimum order amount. Have just found code that puts a message in the cart page but would like it to show up in the side cart that opens when you click ...
1
vote
1
answer
96
views
Use WC Kalkulator product field values to update WooCommerce cart item product properties
In WooCommerce, I use the WC Kalkulator plugin for a simple product (ID 4692). The problem is, this simple product has only static weight and dimensions values that get pulled into each cart item ...
1
vote
1
answer
41
views
Change WooCommerce product single add to cart button text only if the product is in cart
In WooCommerce, I would like to update the 'add to cart' text when the corresponding product is removed from the cart.
I have the following code which changes the text when the product is added to the ...
0
votes
1
answer
52
views
How do I connect the Home, Shopping cart, and add to cart with each other?
I've been trying to direct the add to cart button on the home page of the website(for online shopping) to the addtocart file and the shopping cart. I just can't seem to find what's wrong. Here are the ...
1
vote
1
answer
88
views
Auto Update WooCommerce Cart on cart item quantity change
I want to enable an AJAX auto update when user changes the quantity (first hiding "Update cart" button) in WooCommerce cart page.
I followed the steps from this tutorial.
So basically I use ...
1
vote
1
answer
124
views
Cypress testing issue: Cart modal not visible
I'm forwarding the code containing the exemplary working steps, finishing with clicking the Add to Basket button.
Steps after that should consider that a cart modal appears, and Cypress should click ...
0
votes
0
answers
24
views
Adding cart item key in WooCommerce Cart HTML table doesn't show up
My WooCommerce Woo Cart Table element does not show cart_item_key value on each row, which I need to AJAX update my cart.
I tried creating a custom cart.php in a child theme, but that file is not ...
0
votes
0
answers
16
views
Applied condition not removing in Laravel darryldecode cart
I'm using Laravel 8 and using Darryldecode Package
Reference : https://packagist.org/packages/darryldecode/cart
to apply discount i'm using this method
$couponExists=Coupon::where('code',$...
0
votes
0
answers
26
views
Clearing the browser history and django session
I have an application in django, in it you can add a tourist tour to your cart, the basket is stored in the session. The tour has a model, and the models field is available.It is responsible for the ...
0
votes
0
answers
23
views
why recognize my models in an other app in django how can i call models in other app
from product.models import Product
CART_SESSION_ID = 'cart'
class Cart:
def __init__(self, request):
self.session = request.session
cart = self.session.get(CART_SESSION_ID)
...
0
votes
0
answers
85
views
Modify cart item subtotal format in the WooCommerce cart block
In the cart shortcode, I use the woocommerce_cart_item_subtotal hook to display the item subtotal using wc_format_sale_price(), because I'm showing a deal.
Here is the code:
$subtotal = \...