Questions tagged [addtocart]

Questions related to the functionality of adding product to shopping cart in Magento.

Filter by
Sorted by
Tagged with
0 votes
1 answer
50 views

Magento 2.4.6 How to remove or hide My Cart?

I am using Magento 2.4.6, and using the multi-site function, One of the sites, I like to display as a catalog, does not need a shopping cart (My Cart). I know that hiding prices can hide the add to ...
Angelo's user avatar
  • 77
0 votes
1 answer
54 views

Installed magento 2.4.6-p1 & added a few products then tried to add a product to cart and got the below error. Any help will be much appreciated

Installed magento 2.4.6-p1 added a few products and tried to add product to cart and got the below error. Any help will be much appreciated. [2023-08-07T02:38:55.058044+00:00] main.DEBUG: URI '/...
Alaldin's user avatar
0 votes
0 answers
25 views

Magento 2.4.6: How to add virtual product to cart when adding simple product to cart using graphql mutation?

I'm trying to add virtual product to cart when we add simple product to cart using Graphql mutation. How I can pass the virtual product data with the simple product data? Can someone help me on this? ...
Arun's user avatar
  • 1
0 votes
2 answers
54 views

Add to cart button, Not working on 2.4.2

After update magento (from 2.3.4 > 2.4.2) and migrated on a new hosting, Add to cart button stop working. After i select a product and then "Add to cart" button, website is reloading on ...
Hector Solutions's user avatar
0 votes
1 answer
96 views

Magento 2.4.4 add to cart very slow (php 8.1)

Adding a product to the cart takes just over a minute even though I have a very decent server. On closer inspection, the customer/section/load/ request is taking over a minute to load. Debugging it ...
Michael Mussulis's user avatar
0 votes
0 answers
19 views

Binding a custom catalog-add-to-cart.js to a custom add to cart button?

Magento 2.4.6 I added another add to cart button to the product page in addtocart.phtml: <button type="submit" title="<?php /* @escapeNotVerified */ echo $...
user4095519's user avatar
0 votes
1 answer
85 views

Magento 2.4 - Move product-add-form to customer div class

is there any way to move the "product-add-form" to a new customer class? i have added in the catalog_product_view.xml <move element="product.add.form" destination="product....
AlexLgs's user avatar
0 votes
1 answer
92 views

Trying to listen to the add to cart event

This is my first time playing around with Magento. I'm building a module and I want to listen when a product is added to the cart so, I've tried to use the ...
kevkevdev's user avatar
0 votes
0 answers
13 views

Is it possible to use Magento only for cart, purchase and order management and not for storing product catalog?

We are exploring the possibility of a solution where we would not store any products in Magento, but instead, all products would be stored in a third-party application and exposed through an API. ...
Dipu R's user avatar
  • 101
0 votes
1 answer
59 views

Cart automatically empty after 2 hour

I add the product in cart at 10:00 am then when i refresh the page at 12:00 pm i see cart is empty automatically . I check the admin settings there are we set the time [ 31536000 ] in Persistence ...
Mohit Thakur's user avatar
0 votes
1 answer
18 views

remove add to cart button

How to remove "add to cart" button if the product have attribute "haveAttribute" turn on in the mini cart from code below: <?php $wishlistHelper = $this->helper('Magento\...
Bayzel's user avatar
  • 167
0 votes
6 answers
109 views

Dropdown Set tax on product page

I'm working on a dropdown where user can select tax. So I edited addtocart.phtml to put my custom code: I've added an ajax call but I'm stuck how set product tax from 10% to 22% Can anyone help me? ...
Petacchi's user avatar
0 votes
0 answers
82 views

Magento2: How to set custom cart item row total

I would like to set cart item rows total without modifying the item price before or after add to cart event. Any suggestion would really appreciated. Thank You
Suresh Chikani's user avatar
0 votes
1 answer
58 views

Magento shopping - existing cart items removed when new product added

Hopefully someone can help as we can't find anyone else having the same issue that we are. We have just gone live with our new Magento 2 website. We noticed that if we add an item to the cart and ...
ciaran's user avatar
  • 1
0 votes
0 answers
21 views

How to add custom price type value of a product to cart?

I'm trying to create a custom price type in Magento. And for that I've created a custom attribute to a product. And I've added this price type to Magento\Catalog\Pricing\Price\Pool like below in my ...
Amit Biswas's user avatar
0 votes
1 answer
416 views

Get cart items in Magento 2.4 blocks

I'm trying to get access to all items in the shopping cart in a block, but I can't seem to get them. If I try the code below to construct and $items = $this->_cart->getQuote()->...
Teun K's user avatar
  • 23
0 votes
1 answer
59 views

magento 2: debug to addtocart simple product for one qty in stock

I am trying to figure out the flow add to cart item. Note: before add to cart my cart is empty I have a simple product and it has one qty and product inStock is yes, it does not go prepare function in ...
Niraj Patel's user avatar
0 votes
0 answers
25 views

Add to Cart button not available on translated storefronts

We have a strange issue. On our Magento 2 we are using a translation service called translations.com and on the non-english language storefronts the "add to cart" button is not available to ...
meggen's user avatar
  • 1
0 votes
0 answers
39 views

Magento2 - Product in cart with final price

At the moment when I add the product to the cart Magento takes the tier price of the product if it feels it is different from NULL. Otherwise it takes its normal price. So I would like to do is create ...
Gabriel91's user avatar
  • 487
1 vote
1 answer
36 views

Magento 2 change the addtocart button text on detail page based on the product increment

I am doing customisation on PDP page as per my client requirement, For my requirement i am using the grouped product, also added a option to increase/decrease each product quantity count, when ...
senthil's user avatar
  • 1,707
0 votes
1 answer
149 views

How to add custom fee to cart summary on click

I want to add a custom fee to the cart summary when the checkbox is check and remove when unchecked and also adjusting the order total with each checkbox change. How can I achieve this?
devskull's user avatar
0 votes
1 answer
267 views

Order summary showing Zero subtotal checkout page

Order summary are showing zero subtotal on both cart page and checkout page. I have checked error log but i can't fin anything related to my issue. you can also view what i meant here https://vimeo....
Adex's user avatar
  • 15
0 votes
0 answers
77 views

Magento 2 : Why the cart is empty after adding a product

Sometimes I get the empty cart page when I add a product to cart. I have tried to change the cookie settings in Admin, but it doesn't work anyway. It doesn't work even with Magento default cookie ...
Andrian Țîlica's user avatar
0 votes
0 answers
150 views

Product view - Varnish - add to cart link gives error 404

Recently I have started getting an error 404 for add to cart link: /checkout/cart/add/uenc/...../product/1432/ when clicked in product view page. In category view all is fine. It seems like it is ...
Twisted_Jar's user avatar
0 votes
0 answers
41 views

New product not showing up as cart item in customer's cart

We are using Magento Commerce, on 2.4.3-p2. We recently added a new product to our catalog, with settings that seem to match all of our other products. However, when a customer goes to add the new ...
Jacob Brown's user avatar
0 votes
1 answer
80 views

Cant add product to cart after upgrade to magento 2.4.0

I have upgraded my site to magento 2.4.0. After the upgrade, i am not able to add products to cart. Can anyone please help , what is the issue? Reference link, http://discountedsunglasses.magento2e....
Nicola Smith's user avatar
1 vote
1 answer
50 views

How to add available when customer add to cart more available qty

How can I add the quantity not available error message to the quantity that can be added to the cart instead? Result I expect "The requested qty is non available, there are XXX qty available&...
yavonz15's user avatar
  • 417
2 votes
0 answers
96 views

Category Permission Validation with REST API on Magento 2.4.4-p1 (EE)

We are facing an issue with the "Category Permission" feature. Category Permission validation is not working with REST API. Below are the details: We are facing this issue at the Adobe ...
Akhilesh Chourey's user avatar
1 vote
2 answers
295 views

How to change the Product NAME and SKU permanently in quote_item table when it is added to cart?

How to do this? I am using checkout_cart_product_add_after event. EDIT: After I did it like this <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
Mohmad Ashik M A's user avatar
0 votes
0 answers
16 views

How to add product to customer`s cart by admin restApi

I know only admin token, customer Id, and product Id. How can I add this product to customer`s cart using RestApi?
Daniel 's user avatar
0 votes
0 answers
57 views

add product to cart using ajax?

I have a bunch of product ids and an add to cart button. How when I click add to cart button, other list products are added to cart. I use javascript(ajax)t to handle the above requests. Hope the good ...
HuanTH's user avatar
  • 125
0 votes
1 answer
168 views

Check minicart successfully added product

I have 1 more javascript file, now I want after adding a product to the cart successfully, I want to write an event. Now I want to know how to check when add to cart is successful to execute the next ...
HuanTH's user avatar
  • 125
0 votes
1 answer
41 views

How to Display Product qty in Popup

I want to display Magento product qty in the popup. when the customer clicks on add to cart button the popup shows the product available in stock and if the product is not available popup displays the ...
Nabeel shahbaz's user avatar
1 vote
1 answer
70 views

How to add custom attribute in PDP and save that in database?

How to add a custom attribute in Product Detail page and save it's value in quote table after the add to cart is clicked?
Mohmad Ashik M A's user avatar
1 vote
1 answer
542 views

How to push add to cart event in datalayer on magento widget

I'm using magento2.4.2 and added catalog widget in homepage.Need to add datalayer to addtocart event in MagentoCatalogWidgets. Note:Add to cart event for listing and detail pages are working perfectly
Jothi Subramanian's user avatar
0 votes
1 answer
300 views

Magento 2 show/hide add to cart button based on section data

I need to show/hide the add-to-cart button based on some custom values. These values are stored in a product attribute. The values are updated at the time of order creation. I am using sections.xml ...
Jancy Abraham's user avatar
0 votes
1 answer
186 views

Magento 2 selected quantity to different line of item

I am working with the Magento configurable product, in my requirement I've config & simple product, while customer added a 5 quantity of the config product with one custom option, then the 5 ...
senthil's user avatar
  • 1,707
0 votes
1 answer
195 views

Whenever a product is added to cart an additional qty of same product should be added to cart using prefrence not plugin? [duplicate]

Should be achieved by preference not using the plugin and observer. can anyone provide code for this ?
Mark's user avatar
  • 43
0 votes
2 answers
18 views

Can not add2cart grouped product when 1 input field is diabled

I need to disable the input field when customergroup = 0 or 1 and quantity is < 0 but when I add the argument 'disabled' to the input, the add2cart button does not put the other available items in ...
Rene Donkers's user avatar
0 votes
2 answers
1k views

magento 2.4 add to cart multiple simple products with options

I'm trying to add to cart multiple simple products with different custom options at once. So far, I've overridden the checkout/add controller and replaced the line $this->cart->addProduct($...
Lou Nik's user avatar
  • 351
0 votes
1 answer
42 views

Add custom option Programmatically in cart its not increasing quantity in cart

I am adding custom option programatically in below observer. <event name="checkout_cart_product_add_after"> <observer name="mymodule_checkout_cart_product_add_after" ...
Ansar Husain's user avatar
  • 3,359
1 vote
1 answer
407 views

Incorrect items' quantity and total sum in cart when adding more than 1 item

I've just noticed a very strange issue-if I try to add more than one item to cart, then total quantity is always -1 to real quantity and Total sum consist of doubled prices of every added item apart ...
slavikusq75's user avatar
0 votes
1 answer
203 views

Add To Cart Problem with Grouped Products

Most of my products are Grouped. The problem I have is that on the Category Pages when the Add To Cart button is clicked, it goes through to the Product page and immediately has the warning message at ...
SilkSpin's user avatar
  • 182
0 votes
1 answer
33 views

how to get the name of the category that the user used to add the product to the cart. Magento 1.9

I need to get at cart what category the product came from. The problem is that the product is added to several different categories, and I need the category in which the user accessed to add the ...
lucas's user avatar
  • 307
1 vote
0 answers
226 views

GraphQL Magento 2.4.4 How to add "Additional Options" add to cart

We need to add additional data in cart items like code, label, value, etc. from graphql add to cart. We have reviewed the Magento docs block "CustomizableFieldOption" but not work with my ...
Prince Kumar's user avatar
4 votes
0 answers
529 views

How to add "Additional Options" to product while add to cart using GraphQL

I am using magento's default add to cart graphql to add product in cart. mutation { addSimpleProductsToCart(input: {cart_id: "aIvRj9FfJvQr3qcAECmFfZlVbxcwQ1G6", cart_items: ...
Juber Sherasiya's user avatar
0 votes
1 answer
287 views

Missing field 'uid' while computing key fields when used react mutation graphq

Help me! Not add product with mitation, always show this error. thank you
Yelmy pech's user avatar
1 vote
2 answers
27 views

ADD TO CART BUTTON DOESN'T APPEAR

In both catalog and product page the "add to cart" button doesn't load. I get an infinite loader instead of the "add to cart" button. Does anyone know what this could be?? I have ...
Patrick Barbosa's user avatar
1 vote
1 answer
25 views

Magento 2 add buy now button on product page & mini cart

I am using Magento 2.4. I am trying to add a "buy now" button on the product & cart page, but unfortunately, when I click on the button it adds the product into the cart. Instead of this,...
Hamendra Sunthwal's user avatar
0 votes
1 answer
46 views

add "add to cart" button in popup containing attribute information

in catalog page, there is a tool tip next to each product,once we click on it a popup, that contain attribute detail and add to cart button, should appear. my question is how to add 'add to cart' ...
sara ben's user avatar

1
2 3 4 5
22