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
35 views

XHR Request recognized as a redirect

Our store is experiencing issues with adding products to the cart. We use the QuickCartPro extension, and this always worked, but we migrated to a different server, and it broke down. We can't add ...
Wouter Pleijsier's user avatar
1 vote
1 answer
49 views

Need Advice to fix this issue

[![I want to add "ADD TO CART" button to my all the product can any one suggest me I would like to put a "ADD TO CART" button to every product I have. Could someone please advise ...
Easy Shelf's user avatar
0 votes
0 answers
24 views

How to enable Ajax add to cart on product listing and product details in magento2?

I have added qty increment and qty decrement button at product listing and product detail page how do i add quantity to cart on + click and remove from cart on - click using ajax add to cart
Magento2-learner's user avatar
0 votes
0 answers
20 views

Magento 2.4: Pass jQuery value into checkout_cart_product_add_after observer

I have done some custom price calculation on product page using jQuery and I want to add the calculated price to the product during addtocart event. Any help would be appreciated.
mechanic's user avatar
  • 440
0 votes
1 answer
87 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
  • 89
0 votes
1 answer
113 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
55 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
104 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
214 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
30 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
155 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
190 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
14 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
90 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
25 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
  • 187
1 vote
6 answers
127 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
100 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
159 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
1 answer
709 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
85 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
2 votes
1 answer
41 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,729
0 votes
1 answer
192 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
398 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
  • 25
1 vote
1 answer
83 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
57 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
3 votes
0 answers
120 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
2 votes
2 answers
381 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
1 vote
0 answers
21 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
63 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
  • 135
0 votes
1 answer
264 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
  • 135
0 votes
1 answer
83 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
92 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
698 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
354 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
236 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,729
0 votes
1 answer
216 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
  • 53
0 votes
2 answers
19 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
  • 433
0 votes
1 answer
45 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,409
1 vote
1 answer
471 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
234 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
  • 192
0 votes
1 answer
35 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
  • 309
1 vote
0 answers
258 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
629 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
327 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
0 votes
1 answer
29 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
59 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
0 votes
1 answer
1k views

Understanding data bind at minicart in magento 2

I am using magento 2 in mini cart, I am trying to get the event during which product is being added and removed, a specific item not by cart shown is the item that exists in mini cart, I want that ...
Mohd Farhan Bin Ramli's user avatar
0 votes
1 answer
147 views

Magento 2 product page show backorder insteed of add to cart

Hope there is one that can help me out with this problem. I made it years back for M1 but can remember how and now I need it for my M2 website. On the productpage I want to show backorder insteed of ...
Kasper Elund's user avatar

1
2 3 4 5
22