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**

Filter by
Sorted by
Tagged with
-2 votes
0 answers
18 views

How to add to cart when user is not login

I know there are similar questions available but I am unable to understand in my case how to add to cart if user is not login. I have written only when user is logged in. I have used MVC want to store ...
Jathura's user avatar
0 votes
0 answers
17 views

localstorage cart returning null value

Hey Everyone for some reason my local storage cart is coming up null, and undefined in the console, I don't know what happened but it was working before. when I parse the cart it comes up as null. The ...
EgyptianG's user avatar
0 votes
0 answers
9 views

How can I restore an old shopping cart in the user's session for user editing?

I'm developing an e-commerce application with Prestashop 8.1, and I want to implement a feature where users can retrieve and edit their previous shopping carts. I'd like to load their old cart into ...
Clement Ards's user avatar
-1 votes
0 answers
15 views

how to calculate all addToCart product total price in react and redux [closed]

Hi Everyone i am having an issue with react&redux. Basically i would like to know how to calculate total price in cart when you have both "Normal Price Product" and "Discounted ...
The Jazz song's user avatar
-3 votes
0 answers
19 views

Woocommerce empty cart page "browse store" button link not pointing to the right store url

I'm creating an e-commerce website using wordpress and woocommerce. In my Woocommerce shop cart, when there is no item placed, the page displays the text message "your cart is currently empty...&...
Samuel Chiang's user avatar
1 vote
1 answer
35 views

Set price to zero after specific product is added programmatically in WooCommerce

I added the product to the cart from the product ID I retrieve from Ajax, but for some reason I cannot add the custom price to the added to cart product. I tried adding product id as global variable ...
Tom Hank's user avatar
-2 votes
0 answers
25 views

WooCommerce ajax add and update cart item meta data and set custom price

I have a select field based on which an ajax function runs that is supposed to add or update cart item meta data, specifically add a custom meta field indicating the discount chosen in the select box ...
tsmz's user avatar
  • 1
1 vote
0 answers
21 views

How do I properly re-render an updated shoppingcart/ checkout in next.js?

Im building an ecommerce, and am using Saleor as my headless backend. For my storefront, I initiated a project from a Next.js storefront starter for saleor. Now I have run into an issue, and since Im ...
Jonathan Franzen's user avatar
0 votes
1 answer
25 views

Changing tax rate on certain cart items in Woocommerce

I am inserting a control in the Wocommerce cart which, based on certain properties of the user and the inserted item, modifies the tax rate for that specific item. The code I'm using, inside a plugin, ...
Alberto Bairati's user avatar
2 votes
1 answer
26 views

Remove Totals section from WooCommerce Cart while keeping Subtotal line

I've found some code from here: How to remove order total from cart and checkout page woocommerce that will let me remove the entire 'Cart Totals' block from my cart page: //removal of 'Total' block ...
Tetra84's user avatar
  • 23
0 votes
0 answers
19 views

CSS Issue on Mobile View for Circular Shopping Cart Element

I apologize for reaching out with an issue, but I'm struggling to resolve it on my own. I'm trying to create a circular design element above my shopping cart for the amount of product in the cart by ...
Xplosio's user avatar
  • 13
0 votes
0 answers
14 views

'Add to Cart' not working properly with this template

I would so greatly appreciate some help and understanding from the community. I'm a front end developer and we've signed on a client that is wanting a CBD/Hemp shop. I developed one on Wordpress, but ...
Jon Polk's user avatar
0 votes
0 answers
11 views

Remove add-to-cart for one specific product Woocommerce [duplicate]

I would like to hide/remove add-to-cart button only for one, specific product everywhere it is displayed. This solution doesn't work in my website: Disable add to cart button for some products IDs in ...
Anna Wałęga's user avatar
0 votes
0 answers
22 views

Shopping cart item gets stored in a different page

Hello everyone I have been having trouble getting the shop page to add an item to the shopping cart which is on a different page, the shopping cart works on the same page as the shop, but how do I get ...
EgyptianG's user avatar
2 votes
1 answer
22 views

Woocommerce temporary cart tax not calculating correctly on 1st request

I am making a custom quick order form plugin for a customer that has difficulty filling in the complex Woocommerce "New Order" form (with all of its Update and Calculate buttons that need to ...
David Williams's user avatar
1 vote
1 answer
53 views

WooCommerce Checkout - Validate User Role and Cart Contents

I'm facing a challenge with WooCommerce's checkout process. I use the "B2B for WooCommerce" plugin to differentiate between regular products and B2B product. Here's the scenario: 1 - A ...
helio's user avatar
  • 13
1 vote
1 answer
31 views

WooCommerce cart: Get the cart item Key ID of a specific removed item

In WooCommerce, I have a custom cart.php template, where I need to check if a product (item) removed is particularly one of a kind and then based further coding on that information. Is there a way to ...
Greg Bialowas's user avatar
-2 votes
0 answers
15 views

How to change an element variable text in WooCommerce add to cart button?

I wonder how to find the element and change this variable text notification (Following image), so that others won't be able to find about my products stock. My website is based on WordPress and I got ...
azam's user avatar
  • 1
-1 votes
0 answers
28 views

Add to Cart Icon on Hover for Mobile

Can someone please help me with the following problem. I am using a theme (Flatsome) purchased from Themeforest.net The "Add to Cart" icons are set to display on "hover" for ...
Majesti's user avatar
1 vote
1 answer
63 views

Display a custom text based on product category in WooCommerce cart, thankyou and emails

As the title suggests, I would like to show a custom text in WooCommerce cart, based on the product category added by the customer Here is the code: // Add a function to show custom text on the cart ...
Marco's user avatar
  • 13
0 votes
0 answers
13 views

How do I add here handleDecrease,handleIncrease and handleDelete to change the product.quantity amount

import RemoveIcon from '@mui/icons-material/Remove'; import AddIcon from '@mui/icons-material/Add'; import { useSelector } from "react-redux"; import styled from "styled-components"...
Wladyka's user avatar
0 votes
0 answers
65 views

Get Total Subtotal for products in 1 specific category in WooCommerce

I'm trying to use this code to get the subtotal for a specific category shoes and replace the default subtotal as i don't want to include subtotals from products in other categories. function ...
Sam's user avatar
  • 1
0 votes
0 answers
44 views

Set Cart Total for a defined product Category in WooCommerce

I need to get the total cart price by product category, minus any products which aren't in the specific category on the cart page so just the subtotal for a specific category. add_filter( '...
Sam's user avatar
  • 1
0 votes
1 answer
72 views

WooCommerce after cart validation apply a voucher code as coupon discount

I'm building some functionality in WooCommerce that allows users to input an externally generated voucher code when adding a product to the cart. This voucher code is then checked to see if it's been ...
Paddy Winsley's user avatar
0 votes
0 answers
28 views

I have an error when adding extra fees (add_fee) in the cart of Wordpress with Woocommerce?

What I'm wanting to do is the following: I have two types of subscriptions on the site for customers, that if they buy them they can have discounts on products. These subscriptions cost ARS$5,000 and ...
Diego's user avatar
  • 1
1 vote
1 answer
73 views

How to change the text from buttons in woocommerce mini cart

I'm trying to change the 'View cart' and "Checkout" buttons text in WooCommerce mini cart and make it "request quote" and maybe remove the 'view cart' button. I tried a lot of ...
Youssef Ketata's user avatar
-1 votes
1 answer
85 views

How to remove WooCommerce persistent cart data from database?

From answers found in stack overflow, I noticed that WooCommerce cart data stored in wp_woocommerce_sessions database table, but after deleting data from this table and also deleting related cookies ...
Олег О's user avatar
0 votes
0 answers
7 views

can I update a cart item's price using REST API in woocommerse? Not in the user's session, but using a cart's or cart item's id?

I need to update a product's price at the time the customer adds the item to cart. For some reason my webhook calls me 5 times when I add one item... My plan was to call my own server with the webhook ...
wellumies's user avatar
2 votes
3 answers
73 views

WooCommerce programmatically added fee don't persists

I am adding a custom fee to the cart by hooking into the woocommerce_cart_calculate_fees action like so: if (isset($_GET['discount'])) { add_action('woocommerce_cart_calculate_fees', '...
franka's user avatar
  • 35
-2 votes
0 answers
8 views

How to disable add to cart button if product weight is 0

How to disable add to cart button if product weight is 0 ? this a huge issue for our wbsite , the customers keep adding 0 wighted product and we keep refund orders :-( Please any help , i can pay for ...
r3booobr's user avatar
2 votes
1 answer
61 views

WooCommerce: Increase cart item quantity if the product already exist in cart

I want to increase the quantity of a product on the cart page of WooCommerce if the product already exists on the cart. I tried this piece of code if ( 'same_product_added_to_cart' === $...
Shahadat Hossain's user avatar
2 votes
1 answer
67 views

Show cart item discount amount When a coupon is applied in WooCommerce

I would like to show the amount of discount that's applied to each cart item in WooCommerce. I looked at the WooCommerce class/function pages and can't seem to find a matching one. The only thing they ...
Mairyu's user avatar
  • 809
0 votes
0 answers
29 views

Issues with Cart feature in React JS

I've managed to get my Cart feature to show up at the bottom of my Foodinfo page, but when I click on the Cart itself it's just a blank page. How can I pass the props to the cart while not having the ...
Metalmilitian85's user avatar
1 vote
1 answer
37 views

How to get product variation attribute slugs from Woocommerce cart items

I need to check the cart to see if a specific product attribute has been added on any product. (This is within a customized shipping function hooked to woocommerce_package_rates. ) I have the ...
AJD's user avatar
  • 371
1 vote
1 answer
28 views

Angular16/C# WebAPI/MySQL "Add To Cart" issue

I created an Angular 16 front-end with C# WebAPI backend which pulls from a MySQL database. I recently added a Cart function to add items from the menu (which pulls from MySQL) into your cart. I am ...
Mike C's user avatar
  • 13
1 vote
1 answer
32 views

Add text suffix to item quantity in WooCommerce checkout page

I've found below on Stackoverflow, which adds suffix text to the Basket page, but what do I need to include so adds suffix text on Checkout page too? add_action( '...
RyN's user avatar
  • 13
2 votes
1 answer
39 views

Replace Add to Cart button on WooCommerce single product page if cart is not empty

I have the following PHP code in my Code Snippets App (plugin): add_action( 'woocommerce_product_meta_end', 'message_when_other_product_already_in_cart', 10 ); function ...
Petermgr's user avatar
0 votes
0 answers
14 views

Cart Implementation using cookies

I'm trying to implement a cart system by storing item ids in cookies and using them to generate items in the cart page but I'm having some difficulties and I need your help. I need help implementing ...
Darkcreed's user avatar
2 votes
1 answer
31 views

Add product quantity, name and checkout link to WooCommerce Added To Cart Message

I am not sure how to exactly do this, and yes - I have been searching all over SO and the internet. I did find various solutions, but none of them allowed my limited experience to fix this problem on ...
Learning WooStoreFront's user avatar
1 vote
1 answer
86 views

Remove conditionally "Proceed to checkout" button in WooCommerce cat page

I want to remove a button in cart display, when the rule is not respect. I made a custom Php for check if the rule is on, and display butoon "proceed to checkout" when it's good and hide it ...
Romain Youaabed's user avatar
0 votes
1 answer
25 views

CartService and Authentication

I noticed that if you go to an online store, it allows you to view products and add them to the cart without authorization. I suppose I can achieve this, for example, by adding anyRequest().permitAll()...
ok buddy's user avatar
-2 votes
1 answer
55 views

Does WooCommerce provide any default rest APIs for manage Cart?

I am using Headless WordPress for the back end and React JS for the front end, so please suggest the best way to manage & implement woo commerce cart in react js.
Gaurang Sondagar's user avatar
0 votes
0 answers
23 views

RpartScore partial dependence plots pdp prob instead

I am trying to built partial dependence plots for my rpartscore model, but I am encountering some difficulties, with variable names, and with the probability function.. after splitting data in ...
Sofia's user avatar
  • 75
1 vote
1 answer
28 views

Hide specific shipping methods based on cart subtotal in WooCommerce

I am trying to only show 1 shipping method when the cart subtotal is more than £50. The website already has a lot of plugins, so I don't want to add anymore. Any help is greatly welcomed. Sophie First ...
Sophie Nicole Casey's user avatar
0 votes
1 answer
41 views

CartFlows: Force add to cart redirection to cart page in WooCommerce

In my WooCommerce website, I have installed WooCommerce Checkout & Funnel Builder by CartFlows plugin to make my WooCommerce checkout page more neath, but for some reason if I click add to cart in ...
jethro's user avatar
  • 13
0 votes
0 answers
12 views

Is there a way of using Rest API from WooCommerce to retrieve, set up, store, and display cart information in React?

I have read that there is no current way to do this as of 2021, and couldn't find any solutions online so far. So I am hoping someone can help me figure this out, if it is at all possible. I have ...
birky's user avatar
  • 1
1 vote
1 answer
59 views

Deleting multiple items by index in Flutter Hive

i'm building a cart with flutter hive. i want to select multiple items and delete then from cart using index! as there could be 2 items with the same title but different sizes or quantities. Hive ...
Mahmoud Alawady's user avatar
1 vote
1 answer
38 views

Woocommerce: Add a free product when specific products are added to the cart

I would like to add a free product to the cart when a user add toa cart a product variation (defined from an array of variation IDs). And when the customer removes the variation product from the cart, ...
Eliana Alvarado's user avatar
0 votes
0 answers
76 views

Auto refresh items in side cart of shopify prestige theme

I'm currently working on a Shopify store using the newest Prestige theme, and I've customized the cart functionality using the custom.js file. For now, I am encountering an issue where the cart does ...
Hasan Mougharbel's user avatar
0 votes
0 answers
34 views

Refresh items in cart with every add to cart click

I have been working on the following code, in order to make the cart update with the new items added.. The cart items is not updating automatically( items not showing up) unless I manually refresh the ...
Hasan Mougharbel's user avatar

1
2 3 4 5
64