Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [cart]

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

1
vote
1answer
10 views

Add existing custom option to cart item if the option was not included initially

I can update existing cart values: $item = $quote->getItemById($itemId); $item->getOptionByCode('option_code')->setValue($value); $item->saveItemOptions(); But this only works if the ...
0
votes
1answer
17 views

Get bundle product items in cart of Magento2

I need to get bundle products from cart, and than I need to get the selected items of every bundle product. ?
0
votes
0answers
12 views

Add Free Product to Cart price threshold doesn't work after discount applied

Were using Magento 1.9 CE We offer free gifts with purchase (GWP) when the GWP conditions are met. Most often the threshold is a certain $ amount. We have an issue that when a discount code is ...
0
votes
0answers
16 views

How to change cart height and width and checkout image which is load dynamically

how to change the height and width of cart and checkout page images which is load dynamically height and width. we are using Knockout JS in Magento2.3
1
vote
0answers
19 views

How to debug checkout_cart_product_add_after event on exit

I am trying to exit point on observer for checkout_cart_product_add_after event. But it always refresh after item added to cart. Any way to print data when debug this event and not refresh the page. ...
1
vote
3answers
64 views

how to add negative qty product into cart in magento. 2

How to add a out of stock (less than 0 ) product in shopping cart in magento 2 In my backorders setting i have custom option as Allow pre-order when i select a custom option and saved a ...
0
votes
0answers
14 views

how to i set cart subtotal price through program in magento 2 observer

i created observer <event name="sales_quote_add_item"> <observer name="webkul_mpquote_sales_quote_add_item" instance="Webkul\Mpquotesystem\Observer\SalesQuoteAddItem" /> </...
0
votes
0answers
20 views

How to create cart by customer magento2

I need to create empty cart if the customer doesn't have an existing cart. The code below works fine if the cart exists, and if it does not exist, it displays an error No such entity with customerId ...
0
votes
0answers
7 views

Upsell Products of child simple product not showing after adding configurable product to cart

This is what I tried. Select a product such as it has multiple size and colors eg. ABC hoodie, M , Red . Upsell products are added to this particular simple product. Now when I add the same product ...
0
votes
1answer
14 views

Add Continue Shopping button in checkout page Magento 2.3.1

Can anyone help me on how to add the "Continue Shopping" button? please see attached screenshot. https://imghostr.com/ySnHx3Cb
4
votes
2answers
37 views

Fatal error on cart REST API calls: Cannot instantiate interface Magento\Framework\MessageQueue\ConfigInterface

I'm having issues on the cart page and checkout of my Magento 2.3.1 CE store. Most of the site is working totally fine but on the cart and checkout pages the shipping estimate and payment methods ...
2
votes
0answers
16 views

How to display Vat Tax & Product Price separately on cart page in Magento 2

I'm using VAT tax as including in product prices, But on cart page in Subtotal section i want to show original product price + Vat tax as separately. I'm trying but i could not fix this issue. in ...
1
vote
0answers
5 views

How to save Custom Order attribute when inputting via cart?

I have created a custom order field using the below code: <?php require_once('app/Mage.php'); Mage::app()->setCurrentStore(Mage::getModel('core/store')- >load(Mage_Core_Model_App::...
0
votes
0answers
26 views

Magento 2 - Add new quote item when quantity changed to > 1

I wanted to add new quote item (new row on cart page) when the product quantity is more than 1. I already tried accepted answer provided here. Whenever I tried to add existing cart item from 'product-...
2
votes
3answers
38 views

Magento 2 How to Check the Current Product is come from the cart

Magento 2 current product how to check it is come from the cart edit in observer. Please refer the cart edit url: http://127.0.0.1/mage231/checkout/cart/configure/id/26/product_id/1/ Thanks in ...
3
votes
3answers
96 views

Magento 2 - Cart empty after successful payment

I have a custom payment method, after successful payment; payment page return to a controller where it updates order status and truncate current cart items like this: $this->quote->load($orders-...
4
votes
1answer
133 views

Magento 2 products in cart from other session

Strange behavior in Magento 2.2.8! When I leave the page for a few minutes and then do a refresh, products from other user sessions are in my cart! 20 minutes refreshing and there are 17 products in ...
0
votes
1answer
21 views

Remove Certain Shipping method on estimate and checkout

I want to remove Some of shipping method on both estimate and checkout page. If parameter in quote remove_all to 1 then remove all method which are available and set only one which i have created. if ...
0
votes
0answers
22 views

Edit cart summary

I am trying to edit the cart summary on Magento 2 to be similar to below I can see what templates I need to edit, though the problem is in editing shipping.phtml and totals.phtml I am presented with ...
0
votes
0answers
24 views

Guest Cart vs User Cart Overwrite

We are currently having issues with the Guest Cart merging with the User Cart. Magento 2 Currently if the user shops as a guest and goes to the checkout and logs in; the items they recently added as ...
1
vote
0answers
34 views

Magento 2 : Two same products in cart but one must be FREE

I need to implement a functionality that do this : After an api call, I get some SKU of product. This product needs to be added to the cart, but as a free product. By doing this, this could cause a ...
0
votes
0answers
49 views

How to merge guest cart into customer cart manually using REST API

I need to create a REST API which merges guest cart into customer cart. The body of this API request is, Body { "customer_id": "15", "guest_cart_id":"4563535gggy9mcw857yn9cwu578o3u" } The ...
1
vote
1answer
31 views

Magento 2: How to set item Row total?

I want to set a custom row total. I am using 'checkout_cart_product_add_after' event. And want to update Row total. I going to add an extra amount in an item row total. like, $item->setRowTotal($...
0
votes
0answers
14 views

Magento2: Cardinality violation: 1241 Operand should contain 1 column(s)

When i delete the item from cart then got the SQLError below: SQLSTATE[21000]: Cardinality violation: 1241 Operand should contain 1 column(s), query was: SELECT `catalog_category_entity`.* FROM `...
2
votes
0answers
28 views

Breakdown discount at checkout cart and order summary

I have 2 applied discount, but at checkout cart and order summary it only shows one discount name with the total of the discount How can I breakdown the discount, so it will show each discount name ...
2
votes
0answers
25 views

How to show only first 3 products in whislist

I am showing wishlist in my cart page. But I want to show only first 3 wishlist product in my cart page in Magento 2
0
votes
0answers
23 views

Controller empties cart every first session but works perfectly every time after

I'm creating a custom module for Magento 1.9 to email cart items. Every time the controller is called (from any URL) it empties the cart, but every ensuing call works perfectly (maintain same session, ...
1
vote
1answer
52 views

Disable / Remove link to Product Items in Cart

By default, when you go to the Cart, You see all the products you purchased on the left hand column and also all the products are linked to their individual product page. I'd like to remove that ...
1
vote
1answer
24 views

How to show the exact output as per image on the cart page

Products and Subtotal is showing with inclusive tax but tax amount is getting ZERO How to show the exact output as per image on the cart magento 2
1
vote
0answers
24 views

Magento 2 Remove cart content when user log-out | Empty cart when logged back in

Correct me if I'm wrong, but completely removing the cart content on customer log-out is not native to Magento 2 is it? I read about the "Persistent cart" but it seems to work only for removing the ...
0
votes
1answer
24 views

Magento2:Get Cart item last added product after adding product to cart

I am using Magento2 I need get Cart item last added product after adding product to cart.If anyone idea reply me,How to achieve this my requirement.
0
votes
0answers
23 views

Updating Basket quantity using ENTER clears the basket entirely

Trying to update the quantity in the cart with the ENTER key, the entire cart is deleted. Viewing the form code I realized that in addition to the "update cart" button there are also the "Continue ...
0
votes
0answers
24 views

Magento 2.2 - Custom options are not saved programmatically on cart update

Initially, while adding an item to cart the custom options and other details are saved successfully to cart. When reupdating the cart with updated custom options are not saved in cart programmatically....
1
vote
0answers
29 views

Check stock at cart validation

I need to call a webservice to ckeck the stock of products in my cart. I added this observer: MyModule/etc/events.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/...
0
votes
1answer
34 views

Default Condition In Promotions->Shopping Cart Price Rules

Our store is planning to support shipping in multiple countries. Previously the promotional rules did not have any shipping country attribute as part of the conditions as it was not required. Now we ...
0
votes
1answer
103 views

Magento 2.3.1 - Update Cart Quantity Empties Cart when pressing ENTER

I have just updated to Magento 2.3.1 and noticed that whenever a customer goes to his cart and changes the quantity of an item and press ENTER, then the whole cart gets empty instead to updating the ...
0
votes
1answer
18 views

Magento 1.9 edit CartController redirect when on mobile

I want to edit the Magento 1.9.4 CartController.php file, to change the redirect when a user is on a mobile device (max screen width 750px). I set the default Magento add to cart redirect method to ...
0
votes
1answer
36 views

External file cart empties when using browser back button

I have the following code in an external file(same domain) to get the current cart details, and I'm getting all details without any issues. The problem is, when I go to the checkout page using 'Go ...
2
votes
1answer
27 views

Create coupon that sets the shipping rate to a specific amount

I need to create a coupon that sets the shipping rate of an item to a specific amount. For instance, if the customer purchases any item and uses this specific coupon code (cart rule), their shipping ...
1
vote
0answers
68 views

Magento 2 how to get current cart details and customer cart details?

In Magento 2 how to get current cart details without customer login and get cart details with customer login like minicart ? I checked with this \Magento\Checkout\Model\Cart & \Magento\Checkout\...
0
votes
0answers
58 views

How to assign a guest cart to a customer with rest API

How to assign a guest cart to a customer with rest API. I've try PUT /carts/{cartId} when I’m log as a customer to assign a guest cart to the customer https://devdocs.magento.com/redoc/2.3/customer-...
0
votes
0answers
69 views

Magento 2.3: get cart items inside the cron file

I want to get current quote data for cronjob in cron/run.php But my code it's not working. Magento2 version is CE 2.2.6. Here is my code <?php namespace ABC\Abandon\Cron; use \Psr\Log\...
2
votes
1answer
109 views

When to use PUT /carts/{cartId}

When should I use the PUT /carts/{cartId} when I’m log as a customer to assign a guest cart to the customer https://devdocs.magento.com/redoc/2.3/customer-rest-api.html#operation/...
0
votes
1answer
29 views

How to hide country and state & state from cart page?

As I am new in Magento and I stuck with a problem for 4 days. I want to hide the country selection dropdown and state from cart page as My requirements to provide shipping only single country. How ...
0
votes
0answers
24 views

Magento 2: access quote via javascript

I have a piece of javascript that acts upon the reloadPrice function. It inserts a block of html into the dom to add a corresponding sample product (cloth sample for sofas). This works fine so far. ...
0
votes
1answer
163 views

Cartid is a required field error in custom payment

I am using ccavenue payment module in my site. For guest users payment is working fine, it's redirected to the payment page. But for logged in users I am getting this error while placing the order. I ...
0
votes
0answers
20 views

Add a product to the cart via query string without form_key parameter in magento2

I need to help for add form key to cart url. can you anyone help. $urlValue=""; $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $urlValue = $product->...
0
votes
0answers
34 views

How to add cart as a step in checkout in Magento 2?

Could you please help me add cart page as step 1 in checkout page in magento 2.
0
votes
0answers
12 views

Should categories or attributes be used to drive cart rules

Forgive the potentially dumb question but I'm new to magento and I have some fairly complex cart rules needed. I'm not sure if categories or product attributes (or something else I'm unfamiliar with) ...
0
votes
0answers
19 views

Magento 2 how to move the cart action links?

Magento 2 how to move the cart action button continue shopping,update cart,empty cart actions after the checkout button.? Here is my deafult checkout actions: http://prntscr.com/n42nkk i want move ...