Skip to main content

Questions tagged [cart]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
33 views

Displaying coupon error messages on front end commerce 4

I have read in the Commerce documentation that natively, commerce doesn't display any errors when a false coupon is being entered. Did I understand the docs correctly or is there any why to achieve ...
LessMore Creative Studio's user avatar
1 vote
2 answers
90 views

Update Craft Commerce cart with ajax

Have been trying to get cart updates via ajax. I've looked at this answer: 'https://craftcms.stackexchange.com/questions/17347/update-commerce-cart-using-ajax' My cart seem to update ok but I can't ...
DieselHashtag's user avatar
1 vote
1 answer
108 views

How to persist modified order of cart line items?

I wrote a function to sort / re-order the line items in a cart. function sortCart(Order $order) { $lineItems = $order->getLineItems(); $lineItemsOrdered = array(); // [...] $order-...
kindoflike's user avatar
0 votes
0 answers
115 views

How to modify a custom field on cart, when the cart is created

I want to set a custom field on shopping cart when I first retrieve it. https://craftcms.com/docs/commerce/4.x/extend/events.html#modifycartinfo sounds appropriate so I tried doing this: Event::on( ...
kindoflike's user avatar
1 vote
1 answer
467 views

How to make a curl request with a session to an action url?

I am building a onepagecheckout for craft commerce 3. I created a custom controller to submit cart and payment info in one form submit. I'll call the default updateCart action with a curl request and ...
Maarten Heideman's user avatar
0 votes
0 answers
45 views

Why does a cart get added with no Order Number?

Sometimes, the cart gets added without the id as below. Any ideas, please? (Craft Commerce version is 2.2.19)
Priya's user avatar
  • 1
1 vote
1 answer
225 views

Empty cart should remove coupon discounts in commerce

Is there anyway to remove all the discounts if cart becomes empty?
Bhashkar Yadav's user avatar
1 vote
1 answer
217 views

Craft Commerce "state" dropdown field fails to populate with states for new customer addresses

I'm having an issue with addresses on Craft Commerce 3 (specifically the State field). When a new customer adds an address, the State field defaults to a text field (not the expected Select field). If ...
Chris H.'s user avatar
1 vote
1 answer
156 views

Commerce 2 Sales Not Present In Cart lineItems

I have an issue where sales and sale pricing seem not to be present in the cart. This is on an ecommerce flow where this was previously all working but I had moved onto other dev work on this site for ...
Mike's user avatar
  • 719