Questions tagged [cart]
The cart tag has no summary.
10 questions
1 vote
1 answer
97 views
How to add a 'Share Cart' button to send email to customer with cart link
I'm looking for the best way to add a 'Send Cart Link' button to the Order entry view in Commerce 4/Craft 4. Currently the 'Share Cart' link is behind the cog in the top right of the order view. This ...
1 vote
1 answer
114 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 ...
1 vote
2 answers
284 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 ...
1 vote
1 answer
153 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-...
0 votes
0 answers
174 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( ...
1 vote
1 answer
705 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 ...
0 votes
0 answers
57 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)
1 vote
1 answer
257 views
Empty cart should remove coupon discounts in commerce
Is there anyway to remove all the discounts if cart becomes empty?
1 vote
1 answer
261 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 ...
1 vote
1 answer
168 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 ...