Questions tagged [cart]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
14 views

Need to add the cart quanity and sub quantity on the shoping cart page [closed]

<?php /** * Class RefundableAmount * * @package Emc\Packaging\Model\Total\Quote */ class RefundableAmount extends \Magento\Quote\Model\Quote\Address\Total\AbstractTotal { /** * @var ...
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\...
0
votes
1answer
10 views

Paypal Payments Pro - Transfer Shopping Cart Line Items?

I am using Paypal Payments Pro in Magento 2.3.1. I have Paypal Express checkout enabled as an alternate checkout option. First of all, let me clarify that both payment options are working just fine - ...
0
votes
0answers
9 views

magento 2.3.3 share cart accoss multiple websites

I've set up a Magento site with 5 websites each website has one store and each store has one store view. I am using subdomains for websites example: dev.test.com for default and foo.dev.test.com for ...
1
vote
1answer
1k views

Prevent abandoned cart and guest cart merge

I have made Observer on event "sales_quote_merge_before" to remove abandoned cart items when customer logs in (from Go to Checkout). After login Minicart shows only guest cart items (no items from ...
0
votes
0answers
79 views

redirection from payment gateway to website make empty cart

We are using Paytm extension in our client's website https://www.safaribags.com which builds on Magento 2.1 When customers click on "Pay with Paytm" button, the customer redirects to the Paytm Pay ...
1
vote
2answers
24 views

How can i translate custom elements in .phtml file according to store view

I have added a tag in form.phtml file which shows on view Cart Page. <h1>Custom Cart Information</h1> which effects as Hence my store is multi-lingual when i change store view to ...
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 ...
0
votes
4answers
1k views

How to change the total title on cart page in Magento 2?

I tried: In vendor folder <item name="grand-total" xsi:type="array"> <item name="component" xsi:type="string">Magento_Tax/js/view/checkout/cart/totals/grand-total</item> ...
2
votes
1answer
2k views

Magento 2 adding multiple items to cart at one time

I am trying to add multiple products to Cart at one time, But i am facing issue while second product adding to cart as per attached screen shot. The second product showing in cart items but price is ...
0
votes
0answers
14 views

Empty the Cart items but keep the quote and quote items

I have added a button on cart page. Clicking on the button the cart items should get deleted but the quote should not be erased.
4
votes
2answers
1k views

RWD mini-cart: How to reload cart page if product removed via mini cart?

I am having UI issues with the mini-cart and the RWD theme. Test 1: Add Item to cart, then click on Mini-Cart in top right corner and select "View Shopping Cart". Once on the shopping cart, use the ...
1
vote
2answers
380 views

Magento 2.3 extreamly slow with over 100 cart lines

I am working in a Magento 2.3 installation with avarage cart size of 100-150 lines. Getting the visible cart items from Quote is slower over time ( as products count rises ) I've search thought ...
2
votes
3answers
4k views

Magento2: Update minicart view using ajax

Is there any way to update the minicart view? Now I'm using require([ 'Magento_Customer/js/customer-data' ], function (customerData) { alert("hola"); ...
1
vote
0answers
24 views

Excess qty adding into cart when adding product in cart with custom option programmatically

I am using this the following code to add a product in cart with custom option value. But all the time cart qty taking the value of "Maximum Qty Allowed in Shopping Cart" and then adding 1. For ...
2
votes
1answer
388 views

Magento 2 REST API: Empty cart or delete multiple items from the cart

I am working on a headless magento solution, but I am facing a bit of a problem. As the official magento 2 docs suggest, cart items can be deleted using these: DELETE /V1/guest-carts/:cartId/...
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": "...
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; } ...
0
votes
1answer
2k views

Get Configurable Parent from simple product in quote when simple product has multiple parents

So I have a client that has about 14 Configurable products that are basically the same thing (logo item). Then they have created a simple product for each base color(Blue, Pink, Black)[3 total simple ...
0
votes
3answers
701 views

Magento 2 - Change maximum order amount

I tried to check out the items in the cart that have more than 100.000.000 amount total. And when I opened the View and Edit Cart, the checkout and multishipping checkout button disappeared because ...
0
votes
1answer
1k views

How to check if the current shopping cart has met the conditions of a specific Shopping Cart Price Rule

I have a specific shopping cart rule that checks weather 3 items or greater of products from certain categories have been added to the cart, and then gives a discount on a specific Item ( I will call ...
0
votes
3answers
47 views

Magento 2 create a button in customer account page

I want to create a button in customer account page. My aim is add a button to remove all active carts. To do this what shall I do? do I need to override any files? Please let me know if there is ...
0
votes
3answers
625 views

Check out page redirects to shopping cart again and again

After adding items to cart when customer going to checkout, at first step of billing info, when we click continue, customer is redirected back to shopping cart and not on next step. Please help to ...
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 ...
0
votes
0answers
23 views

Always show shipping cost in cart total summary on cart page

On cart page, How can I always show shipping cost in total summary, without filling up shipping estimation form first? Because we just have one shipping methods : flat rate shipping. Thank you!
1
vote
3answers
1k views

Magento 2 : Move Cart Summary

I am working on checkout/cart page and my task is to move cart summary. I am creating a file in my theme folder app/design/magestore/sample/magento_checkout/layout/checkout_cart_index.xml and my code ...
1
vote
1answer
36 views

How can I add a Static Block between Discount and CrossSell

i want to add a block between Apply Discount form and crossell Block on Cart page in magento 2 I have tried this Code but its not working <referenceContainer name="checkout.cart.items"> ...
1
vote
1answer
65 views

plus, minus in cart page

I have the following design below, in which it has plus and minus on the cart page and mini cart page. I have achieved it in minicart but couldn't achieve it on the cart page. can someone help to ...
0
votes
2answers
2k views

Edit View Cart Page

I'm trying to edit the View Cart Page, my theme has ab image block on the page that I'm trying to edit but I can't figure out which file I need to edit. more information when something is added to ...
1
vote
3answers
1k views

Disable “Proceed to Checkout” button on cart page magento 2

In my custom module I have to check some conditions and have to disable "Proceed to Checkout" button from the Cart page. I know it's coming from magento\vendor\magento\module-checkout\view\frontend\...
1
vote
2answers
3k views

Magento 2 How to remove shipping rate estimation in shopping cart?

Sometimes the estimation of shipping showed Shipping (undefined - undefined) so I want to remove this row of thing. How can I remove it? Thanks.
0
votes
1answer
35 views

Update Banner Text dynamically in Magento 2

I have a FreeShipping banner in every pate after Top of the Page after mega menu. FreeShipping banner text will change based on customer cart specific items amount and customer group. For this, I have ...
3
votes
1answer
756 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 ...
0
votes
1answer
657 views

How to add product into shopping cart by single click using custom module in magento 2?

My template file code is $listBlock = $this->_listBlock; $addToCartUrl = $listBlock->getAddToCartUrl($_product); ?> <form data-role="tocart-form" action="<?php echo $...
0
votes
2answers
928 views

“Shipping address is not set” error when saving cart

I have a simple code, where i add a simple product to the cart $cart = $obj->get('\Magento\Checkout\Model\Cart'); $cart->addProduct(5, 3); $cart->save(); but the last row, returns this ...
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()-&...
0
votes
2answers
2k views

How to get updated cart subtotal in checkout_cart_product_add_after event observer in Magento 2?

I want to add a free product to cart with another product. For that I wrote checkout_cart_product_add_after event observer. My problem is, I don't get the updated cart subtotal(after adding first ...
0
votes
1answer
1k views

Trigger modal after placing a product in minicart on Magento 2

I need to show a modal after a product is placed inside cart. This is what i have so far. This is my default.xml <body> <referenceContainer name="content"> <block ...
1
vote
2answers
33 views

Magento 2:- Updating table value

I want to update the value of amount column in custom database table where customer_id with value of $total. $total = $array['amount'] - $arr['base_grand_total']; $sortedData = $prepaidModel->...
0
votes
2answers
485 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.
4
votes
2answers
258 views

Magento 2 Product quantity showing empty on Update Product details page

Step to reproduce Add product to cart Go to cart page Click on Edit item parameter. Qty box value empty. Any help would be appreciated!Thanks.
1
vote
1answer
103 views

Magento 2: How to add Additional Options in cart on “sales_quote_remove_item” event observer

I want to add additional options to the next product on the sales_quote_remove_item event while removing the first product from a cart. First Product, I have already added the first product to cart ...
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). ...
1
vote
1answer
627 views

How to get product image by label in cart

I have Magento 1.9.2 that comes with swatches feature. I have product with following swatches: Color, Size I created configurable product using configurable options and added assiciated products. ...
0
votes
0answers
27 views

Magento 2 : Prevent Redirect to Cart Page when Place Order Error

As I know on Magento 2 when there is problem after click "Place Order" button on the checkout page, it will redirect to cart page. How I change this and create global validation to show the error on ...
1
vote
2answers
74 views

Magento2 Cart and Checkout page is not working

I am using Magento 2.3.1. When entering the cart and checkout page, the errors appear in the console log. I am trying with an upgrade and a clear cache. but it's not working. Try with some solution. ...
0
votes
1answer
3k views

Programmatically adding configurable products to the cart with SCP

I am using the SCP extension so that prices are taken from the simple product and not the configurable. I am using url approach to add product in the cart checkout/cart/add?product=10940&qty=1&...
0
votes
1answer
3k views

Magento 2 : How to Get Selected Bundle Option Product Details in Cart Page

I need to get details of selected product of a bundled product. I tried following code in cart page. But it's not working. $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $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 ...
0
votes
2answers
1k views

Cart page sub total label

Using Magento 1.9.2.2 I want to change Sub Total Label(Just label) everywhere... I found that it's coming from app/design/frontend/base/default/template/tax/checkout/subtotal.phtml From this ...