Questions tagged [cart]

Question related to the shopping cart: adding/removing products, shoping cart price rules, the appearance of the shopping cart page.

686 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
9
votes
1answer
101 views

Persistence Lifetime not working in Magento 2

I have configured Persistence Lifetime on Magento 2 but it's not working as expected. I have configured 60 seconds cookie lifetime but it's not affecting the same. I have checked with default Magento ...
8
votes
1answer
591 views

Please specify the product's required option(s) Custom Option type file

I got only one custom option, which is file type, I tried to add product to cart programmatically like this: $logoSku = 'lg-brnd01'; $productLogo = Mage::getModel('catalog/product')->...
6
votes
2answers
1k views

Magento 2 No such entity with cartid = help!

I'm experiencing this error on my site quite often: Exception #0 (Magento\Framework\Exception\NoSuchEntityException): No such entity with cartId = It's not using multiple stores, so the entity_ids ...
5
votes
0answers
27 views

Load default address when logged in on magento2

I want to load magento2.1 default address on my cart page address box when i'm logged in. mean that, when i'm in one step checkout page and logged in, in my address part, see default address instead ...
5
votes
3answers
5k views

How to get item id from quote item collection in Magento 2?

I am trying to get all item ids currently added in cart. Here is what I have done so far. public function __construct( \Magento\Checkout\Model\Cart $cart ) { $this->_cart = $cart; } ...
5
votes
1answer
2k views

Magento2 - Default shipping

In my webshop I have two shipping methods, free shipping (for orders above 200 euro) and flat rate shipping (5 euro). I do not have other shipping methods for other countries or something. I want to ...
4
votes
1answer
3k views

Magento 2 check which catalog rule is applied to cart product

I have created 3 catalog rules for category. Shoes Category: 5% Off , Catalog Rule Name: Shoes Offer Toys Category: 10% Off, Catalog Rule Name: Toys Offer Fashion Accessories: 8% Off, Catalog ...
4
votes
0answers
472 views

Multi-shipping depending on specific product attribute

I have been struggling hard from a few days to find out a way for multi shipping of products depending on product type (type is not magento's type where as it is custom attribute i.e type can be ...
4
votes
2answers
52 views

broken minicart - urgent

I have attempted to edit the minicart on our webstore, however this resulted in an error occurring which seems to be quite common but no one seems to have an easy fix. The minicart now outputs a JS ...
4
votes
1answer
740 views

Magento 2 order redirected to cart -> getLastSuccessQuoteId() returns false

I'm trying to place order in magento 2.1.7 but every-time I click the "place order" button, I get redirected to the cart page. With debugging I found out, that in the class /vendor/magento/module-...
4
votes
3answers
221 views

Disallow adding products if sku or shipping type exists in cart

As the title says. I need to be able to disable adding to cart if a product sku or shipping type already exists in the cart. Any way this can be done? Created checkout_stop.xml in app/etc/modules ...
3
votes
0answers
40 views

Magento 2: Set custom discount price to existing cart/quote in controller

I would like to set a custom discount price to an existing cart/quote in my controller and found some other people that had this question but none of them got answered: I want to add discount to ...
3
votes
0answers
90 views

Duplicate Product in Cart Magento 2

I have an issue in Magento 2.1.6. When I add the same product in cart it's adding as a new line not update Qty of product. The same issue in the mini cart also. Actual Result: Add as a separate ...
3
votes
0answers
39 views

Cache issue in magento 1

Hello I have used ves and varnish full page cache extensions for better speed performance but it is creating some issues now like my cart page is not showing all newly added product or showing old/...
3
votes
0answers
33 views

Magento 1.9 - How to get JSON config by a bundle item id in cart?

When I have a bundle product in the cart, I can edit it by clicking the edit button . At this point, a page with the product to edit will be loaded. Also, a function named "getJSONConfig()" will be ...
3
votes
0answers
228 views

How to add a additional field in Summary Section magento 2.3

My Actual Screen look like I Expexted Result look like How to Display Total Savings like above mentioned screenshot. I need to print Sum of total added product savings amount in summary section
3
votes
0answers
66 views

How to Remove a Block From layout Programatically in magento 2

i am trying to remove a Crossell from cart page in my phtml file how i can do this when i researched i found crosssell products are viewed in checkout_cart_index.xml file as <...
3
votes
0answers
38 views

Cart page shipping method loading issue. Magento2

I have set 'Minimum Order Amount' to 25 for Free Shipping & other shipping method is 'Flat rate'. My issue is when I redirect back from paypal to cart page after canceling the payment from paypal ...
3
votes
1answer
45 views

Grouped Product - force same quantity for all products

I am using Magento 2.3. I have defined 4 different simple products with a price of 3.99 each. I want to create a grouped product to allow the user to purchase 1 of each product, with a total price of ...
3
votes
0answers
49 views

Magento 1.9.4.0 Checkout and cart page broken

I have upgraded my website from 1.9.1.1 to 1.9.4.0. I am facing the issue of cart and checkout page get broken when the customer is logged in. If we disable the compilation or disable system log, both ...
3
votes
0answers
40 views

Adding a configurable item to cart via ajax

I've inherited a project which lists configurable products in the catalog view, as well as listing the simple products attached to that configurable product. For example; Configurable Product: ...
3
votes
0answers
443 views

Magento 2 : keep disable product in cart

I want to keep disabled product in cart. Let's say I have added one product to the cart. After that I have disabled that product from Magento admin. Now when I visit cart page, there is message that ...
3
votes
0answers
53 views

Magento 2 Cart Price Rule -“Category does not contain” not working

i have created cart price rule to give 10 percent off ,but have excluded few category as shown in screenshot , but does not works properly and 10 pc discount is applied for product category excluded ...
3
votes
1answer
278 views

Magento2.1 Configurable attributes in cart

I want to add configurable products attributes to cart page too. Example: T-Shirt color:red size:m already added to cart by price 100$, Now I want to change attributes on cart and use color:green ...
3
votes
1answer
161 views

How to display swatch on cart page for added products in cart

How to display swatch on cart page for added products in cart. Right now it shows as Text, like Color Blue, but it should show like swatch icon.
3
votes
1answer
755 views

How to show all cart items in phtml file Magento 2?

What is the best way to show all the items/products that are in checkout/cart in a PHTML page? I have added a custom phtml page that shows some products, and also have a phtml page that want to ...
3
votes
0answers
140 views

How can i hide flat rate shipping method when free shipping is available in magento 2.1.5?

I have set free shipping when amount is greater than 300rs, but when amount is greater than rs 300 two methods are still showing. How can I hide the Flat rate when cart amount is greater than Rs 300.?...
3
votes
0answers
121 views

Check if Magento cart is empty using Javascript?

So I need to check if the cart on my magento site is empty or not. I can do this using php like this: <?php $count = $this->helper('checkout/cart')->getSummaryCount(); if($count==0){ ...
3
votes
2answers
479 views

Override minicar sidebar price renderer

How can I override a sidebar.phtml from: module-weee/view/frontend/templates/checkout/cart/item/price/sidebar.phtml I have tried in the following ways: <referenceBlock name="checkout.cart.item....
3
votes
1answer
3k views

How To Increase frontend session timeout to 10 day In Magento

I am trying to increase session time out limit to 10 days in magento for non logged in customer but it is expiring before may be witthin 1 days. I went to System->Configuration->Web->Session ...
3
votes
0answers
1k views

Magento 2 : How to Update Price After Changing Qty On Cart

How to update price after qty changed by dropdown in magento 2. I changed qty input type to dropdown like below code in default.phtml: <td class="col qty" data-th="<?php echo $block->...
3
votes
0answers
804 views

Add to cart is not working in fresh Magento

I've installed Magento 2 fresh on localhost. trying add to cart items but it is not working when clicking on add to cart button. It shows You have no items in your shopping cart. Click here to ...
3
votes
2answers
1k views

Add to Cart button in Magento 2.1

I tried with button add to cart and it not working, app/code/Moo/Custom/view/product.phtml <?php $product = $this->getData('product'); $postDataHelper = $this->helper('Magento\Framework\...
3
votes
1answer
1k views

Add product to guest cart with custom option and its price in Magento 2 api

I need to add product in cart using magento 2 api. I am using below api "rest/V1/guest-carts/{cart_id}/items I am passing parameters like below, { "cartItem": { "sku": "...
3
votes
1answer
783 views

Magento 2.1.1 Add to Cart message stuck

I have just completed a new installation and have noticed that the "Add to Cart" message is appearing on every page. Any ideas as to why this is happening?
3
votes
1answer
273 views

How to change the Persistent Cart time for Guest Users?

Magento 2 cleans up the guest cart data under 24 mins if left idle, is there any setting which can help to persist cart data for a guest user for around 90 days?
3
votes
0answers
603 views

How to get images of products in cart using rest API

Doing a request to "V1/guest-carts/666ef786077b70c95016727cfaf21830/items" will give: [ { "item_id": 129, "sku": "24-UG05", "qty": 1, "name": "Go-Get'r Pushup Grips", "price": ...
3
votes
2answers
2k views

How to override cart\addcontroller in magento 2?

I want this function in \code \StwBuyXGetY \BuyXGetY \Controller\Checkout\Cart\Add.php(this is written in magento 1.9, I want to convert it into magento 2). But I cant add any new function in add ...
3
votes
1answer
1k views

How to reload the quote or cart in Magento 2

I am working on ajax cart. When i update the cart qty, I am trying to reload the quote but its not loading properly $this->cart->getQuote()->getShippingAddress()->collectShippingRates()-&...
3
votes
1answer
657 views

How can I move my cart from my header into the right of my navigation?

I would like to know how to move my cart icon into my navigation instead of the header. How can I do this?
3
votes
3answers
763 views

problem adding items to cart from outside magento

I'm having this problem and getting pretty annoyed by it. here's the situation. I was running a website on the codeigniter framework, and our customer wanted to add a shop to sell a couple of ...
3
votes
0answers
578 views

How to display shipping estimate and auto add this to grand total on cart page?

I am currently working on a magento website and trying to get the estimated shipping charge auto added to the grand total on the cart page. By doing this on the cart page I am trying to remove one of ...
3
votes
1answer
2k views

Modifying the redirect after editing a product in the cart

I have a problem modifying a redirect in magento CE 1.9.2. Let's say a customer has a configurable product in the cart, and would like to edit that product (ie. changing color or size or something). ...
3
votes
1answer
200 views

Multistore feature troubleshooting

I'm asking you your help because I created two stores in the same Magento installation : store.example.com : for customers (default store) b2b.example.com : for retailers The installation was done ...
2
votes
0answers
17 views

How to get the shipping rates via AJAX?

When I update the product qty in the cart page I want to have the shipping rates estimated again via AJAX, how could I call this JS method in order to do that?
2
votes
1answer
45 views

Set custom discount price to existing cart/quote in controller

I know I asked the question once before, but i got no answer, so I try it again and hope for an answer this time. I also saw some other guys that tried to get an answer for this question, but none of ...
2
votes
1answer
62 views

Magento 2 I want to set a custom price of a product programmatically but only for this one session

I have a little problem because I first add some products into the cart -> this is working. But I also need to change the price of this products I add. The problem about that is, that I only want to ...
2
votes
0answers
59 views

Add product with customized option in the cart through API

I'm having a problem adding a product with custom options in the Magento cart 2.3.1. After defining a custom option as multiple selection, I tried to add the product to the cart with the following ...
2
votes
0answers
38 views

Magento2.3 How to remove estimation call on state change action in Cart page?

I need to remove estimation call on state change action in the cart page. When user change region estimation call execute when to add zip code than estimation call execute again, so shipping ...
2
votes
1answer
117 views

cart/checkout blank in Magento 2.2.8

Issue After upgrading to Magento 2.2.8. Cart and checkout page showing blank after adding Product to cart Server Error AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to a ...