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
1answer
12 views

Magento 2 : how to perform operation after product price update from backend

I have added the product into the cart and want to perform the operation after the same product's price change from the backend.
1
vote
1answer
30 views

How to Get Weight Attribute in Totals Cart REST API Magento 2.X

How Can i Get Weight Attribute in Cart REST API. End Point: /rest/V1/carts/mine/ Response Default: { "id": 8, "created_at": "2019-09-16 13:51:25", "updated_at": "2019-09-18 12:07:31", "...
0
votes
0answers
9 views

Magento2 - Force load Product page after 'Add To Cart' is selected on Catalog page

In Magento-2.3.2, How can we always make the Product page load after 'Add To Cart' is selected on Catalog page? Thanks!
0
votes
1answer
35 views

Uncaught Error: Function name must be a string magento 2

Fatal error: Uncaught Error: Function name must be a string in /Applications/MAMP/htdocs/magentoshop/app/code/Magestore/couponoverride/Model/CouponManagement.php:74 Stack trace: #0 [internal ...
3
votes
2answers
61 views

Magento 2.3.2: Active payment method on specific category for the products in cart

I want to show payment methods for particular category products added in cart. e.g I have paypal and COD payment methods, so when X category Item in cart then Paypal will show and other will hide,...
0
votes
2answers
32 views

Magento 2: Add loading effect on remove product from the mini cart

I want to add loading effect before ajax call of remove product from the mini cart. Right now when I remove the product from the cart, It takes 4-5 seconds to delete but user cannot identify whether ...
0
votes
0answers
16 views

Magento 2: Get discount price after rule applied

Magento 2 get the discount price after rule applied. i.e I have different rules applied on cart. how can I find which rule give how much discount on subtotal. Currently, I can find the discount amount ...
0
votes
0answers
33 views

Magento 2.3.X - Override /checkout/cart to show my custom module

I am trying to create a module that replaces the default /checkout/cart page. I have created app/code/NewShop/Cart module and it just displays a text now. app/code/NewShop/Cart/etc/frontend/routes....
0
votes
2answers
39 views

Create order of 'Bundle Product' programmatically with options selection: Magento 2

I am new to Magento tried several solutions but I could not create orders with 'Bundle Product' by specifying selection options. Even though if it is an API solution, it may be helpful for me, I will ...
3
votes
0answers
34 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 ...
10
votes
6answers
250 views

Magento 2: Changing Price of Product in Controller doesn't work at the moment!

I tried to change the Price of my Products like this: Controller.php: [EDIT] <?php namespace MassiveArt\ShoppingCart\Controller\Index; use Magento\Catalog\Model\ProductFactory; use ...
0
votes
1answer
21 views

Getting a list of basket items in Magento 2.3

I am trying to get a list of products in the basket. I have the following in my class public function __construct(\Magento\Quote\Api\Data\CartInterface $cartInterface) { $this->...
0
votes
0answers
9 views

Plugin or method to add multiple, dynamic products under one group

We're looking to add a new 'product' to our Magento site - the ability to be able to order a recipe. A 'recipe' is really just a collection of other products that we sell, grouped under a common ...
0
votes
0answers
89 views

Magento 2.3.2 Failed to load the “Magento_GiftMessage/js/view/gift-message” component

On cart page I am receiving this error in console: Failed to load the "Magento_GiftMessage/js/view/gift-message" component *Applied coupon code "test123" not showing in cart page summary. ...
0
votes
0answers
12 views

FPT doesn't calculate total in checkout correctly

I have encountered a problem considering FPT in Magento 2. When I add a product to my cart (we have a minimum quantity of 25) the FPT gets calculated correctly. For instance: when a product is $5 and ...
4
votes
1answer
39 views

Magento 2: After adding products to cart programmatically, cart is not refreshing until reloading page

Hello Magento 2 Friends. I have an ajax call to an controller, which adds some new products to the cart programmatically. This works fine, but the problem is that the cart and the mini cart are only ...
3
votes
1answer
29 views

Magento 2: Add multiple products to cart programmatically does not work if cart is empty!

I have the same problem as mentioned in this Question: Magento 2: Add multiple products to cart programmatically But it was never answered. This is my Controller.php: <?php namespace MassiveArt\...
0
votes
0answers
16 views

Display a message regarding cart discount in header of all the pages in Magento 2

I am showing one message regarding cart discount in the header of all the pages, but on some pages, the discount is not showing as if the cart is empty. How to fix this issue.
3
votes
1answer
51 views

Magento 2 add custom button next to cart button

I want to add a button next to the cart showed in the screenshot. Any ideas how to achieve this? (EDIT) Only need to know what to write in the layout.xml This is the current XML code <?xml ...
3
votes
1answer
43 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 ...
0
votes
2answers
33 views

Failed To Load Component, Checkout Page (Console Error)

I upgraded Magento from 2.2.1 to 2.3.2, after that when i add any product to cart, on cart page i got these console errors: and when i proceed to Checkout i get more error like these, also i can't ...
0
votes
0answers
23 views

magento2.3 : does not show checkout button when a cart have disable product

magento2.3 does not show the checkout button when a cart has disabled the product. Recently I noticed the checkout button not showing on the cart after debugging found that cart has one ...
0
votes
1answer
14 views

Magento2: How do i generate Remove from cart Url for a product?

I want to cart item remove in minicart using custom URL. Below code in magento1 I want to magento2 code /** * Get item delete url * * @return string */ public function getDeleteUrl() { ...
0
votes
0answers
33 views

How can I programmatically add a cart?

I need a solution to create a cart programmatically in my template.phtml or in my Block.php file. I want a new cart with products in it. I get the products dynamically from the REST-API.
0
votes
2answers
35 views

Remove Cart Items Automatically Magento 2

I'm having a trouble with my Magento 2 store. I need to clear all items of users carts programmatically. If user don't purchase his cart, it'll be cleaned. Do you have any idea of how can i do that? ...
1
vote
2answers
35 views

Magento 2.3 How to get Quote Data on product detail page

i want to get this quote data on product page but that not return any data ... only return below array instead of all quote data On other page it working fine issue only on product page. array(4) { ...
0
votes
1answer
17 views

How do I obtain the value of an order (cart) without taxes, shipping order and voucher discounts?

I am trying to develop a module that calculates the value of a parameter and shows it in a page. (I am 95% sure that I need the value that is shown by default in cart subtotal at the cart checkout) ...
2
votes
1answer
56 views

Magneto 2 : How to change shopping bag icon [closed]

I want to change the shopping cart icon. I want to add a new image, how to do that. I am using Magento 2.3 https://prnt.sc/osf50f
4
votes
2answers
196 views

Magento 2.3 : Load new custom items into Shopping Cart when an button is clicked

I am making my own module and now I added a button into it. If this button is clicked I want to get products with an AJAX request from a REST API (I already get my products, this is no problem). ...
0
votes
0answers
16 views

Magento 2: Display percentual discount without tax in cart, on order confirmation, invoice etc

For a B2B shop I need to display the discount amount (from a percentage discount) without tax in Magento CE 2.3.2. Example: subtotal is 1000 excl. tax discount is 5%, so -50 tax is 10%, so 95 = (1000-...
3
votes
1answer
43 views

Magento 2.3: I am trying to add text into the small cart, but it's not working

I want to add text into the cart showed in the picture, but unfortunately my code does not work. This is my file structure: Code in ButtonGet.php: <?php namespace MassiveArt\ShoppingCart\Block; ...
0
votes
1answer
17 views

Checkout process rest api

/rest/V1/carts/:cartid/payment-information code is not working. The request does not match any route. Please suggest something.
0
votes
0answers
30 views

Magento 2 : Change product price while moving to cart event and observer

I have created a custom module but moving to cart I want to add a custom price which event i can use to change the price how to change product price while moving to cart event and ...
0
votes
2answers
120 views

Magento 2 Unable to set custom Price in cart item by API

I'm trying to add an item by API.every thing are working except item price It's Magento Bug that not take price from API https://devdocs.magento.com/redoc/2.3/admin-rest-api.html#operation/...
4
votes
6answers
107 views

Magento 2.3: How can I get the customer ID with PHP?

I am trying to get the items of the cart as well as the customer ID in my Module. But the problem is that I don't know how to get the customer ID properly. In the Moment I have this Code and it works:...
0
votes
1answer
33 views

Magento 2 cart keeps loading

I have a weird bug. Every time I add a product to my cart it shows as if it were loading. However, it adds the product to the cart, if I switch to another page or reload the loading disappears and ...
4
votes
2answers
80 views

How can I add a custom button by using a custom module in Magento 2.3?

I wanted to add my own button in the Shopping Cart as I tried to show you in the screenshot. But I didn't find a tutorial that worked for me. Do you have any idea how I can do this? (I want to make ...
-2
votes
1answer
31 views

how to show shipping method selection for each item in cart

Can anyone give the solution for the below. I am using magento 2 CE. I want to show all shipping methods for each item in the cart on the shopping cart page and the customer can select the shipping ...
0
votes
0answers
14 views

Quote Items are showing only if flush cache - Magento 2

I am trying to get cart quote items by the following code: File: app/code/Essence/Fcf/view/frontend/templates/packages.phtml I called this file in my cms page by following code: {{block class="...
1
vote
0answers
33 views

Redirect to cart page after place order success (Magento CE 2.3.1)

I am facing this issue too on Magento CE 2.3.1. I have put the log everywhere since the issue happened. I can see if using a payment method (currently using Cybersource SecureAcceptance) which will ...
1
vote
1answer
40 views

Unable to get cart item in custom phtml - Magento 2

I am trying to get cart items info in my module's phtml file: /app/code/Essence/Fcf/view/frontend/templates/packages.phtml Here is my working url: http://essence.onlineprojectprogress.com/packages ...
0
votes
1answer
17 views

Custom product attribute doesn't display on cart and confirm mail

I need some help because I don't know how to fix this problem. On my product, I have 3 attributes (classe, dimension, color) and I choose with a select the value. But when I go to the cart page, the ...
0
votes
0answers
24 views

Display Total Discount Amount / Total Savings @ Cart & Checkout

I am trying to add magento 2.3 , If anyone have any idea please guide me. like this http://prntscr.com/ocrcn6 http://prntscr.com/od23n7
1
vote
0answers
18 views

Shipping Method is hide if Estimate Shipping and Tax values are empty

Problem : Shipping methods are display already in cart page. But I did not want that. What I want : I want that when cart page is load, any shipping method must not be load. after the page load i ...
0
votes
0answers
16 views

Products not added to quote for certain customers

I'm adding products to quotes with an ajax call to this function public function addProductAction(){ $id = (int)$this->getRequest()->getParam('id'); $result = Array(); ...
0
votes
1answer
19 views

Dynamic Content based on items in Basket

Is there a way to dynamically display content on a page, based on whether there is something in your basket. i.e Page would display certain block of text IF there is something in the customers basket ...
0
votes
0answers
19 views

Some item options or their combination are not currently available in Magento 2.3

In a store the products are importing via a connector with clients ERP. Variations (size attribute only) and products that are out of stock are not visible in the store. When we try to add a product ...
0
votes
1answer
23 views

Magento 2 complicated shopping cart rule

I can't figure out how I can create a complicated cart discount rule I need and if it can be done. Conditions for customers should be: One specific brand called "Xbrand" If customer add 2 products ...
0
votes
0answers
22 views

Magento 1 get quote id of current user

I've gone through a number of questions on here relating to retrieving the current quote for the current browsing user, but each one yields the same result: Mage::getSingleton('checkout/cart')->...
2
votes
0answers
51 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 ...