Skip to main content

Questions tagged [addtocart]

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

Filter by
Sorted by
Tagged with
-1 votes
0 answers
21 views

minicart is not display the dropdialogue in magento 2.4.7 version

before upgrading, mini cart was showing the added products and displaying "there is no items in your shopping cart" when there was no product in add to cart.. but after upgraded, it shows ...
Bhim Lamichhane's user avatar
0 votes
0 answers
23 views

Magento 2 How to move custom product options under the custom container on Product page

I am customizing the Magento2 Blank theme, by using a custom child theme. I want the custom options,product prices add to cart section to appear in my custom container. I have created the file: app/...
Keval Chauhan's user avatar
1 vote
0 answers
29 views

when i want to update the quantity in the cart page in magento 2 its not updated Magento ver. 2.4.3-p1

I have used this code to print the data in the cart parameter echo "<pre>"; $cartData = $this->getRequest()->getParam('cart'); print_r($cartData); the ...
Mateen Ahmed's user avatar
0 votes
0 answers
32 views

Show Related products in the popup modal

I am using this code to show the modal when product add to cart define([ 'jquery', 'mage/translate', 'underscore', 'Magento_Catalog/js/product/view/product-ids-resolver', '...
Rana Zain's user avatar
  • 678
0 votes
1 answer
25 views

Magento 2 - Change value Quote item when I add to cart via Reorder button

I am trying to change a custom value each time I add to the cart via the “reorder” button. Right now I am trying to do this in the file “Magento\Sales\Model\Reorder\Reorder.php” but without success. ...
Jackom's user avatar
  • 493
0 votes
0 answers
17 views

Magento 2 : No Such Entity with Cartid when Adding Item to Cart after Upgrade

We have an issue on Magento 2.4.5 where customers get an error saying "No such entity with cartid = xxxx" when they try to add an item to their cart. Most of the time, this happens after we ...
Peter Wood's user avatar
0 votes
1 answer
22 views

pre order on the category page

How to change the label of add to cart to pre order on all magento 2.4.5 based on the below conditions: if(qty<0 , product is salable and getBackorders()/true ) to show pre order else add to cart. ...
L.A's user avatar
  • 1
0 votes
0 answers
18 views

Magento 2 Add to cart button hide when click

I want the button to be removed after clicking on add to cart and show positive negative instead And when we click on the negative and the number becomes zero or click on delete , the button will be ...
Mojtaba Ansari's user avatar
1 vote
0 answers
84 views

Add to cart event not passing values to google analytics dashboard

As We are using Magento PWA Venia setup, we integrated google analytics code to our website manually. After adding the below code , Once we click on ADD TO CART, add_to_cart event is firing in Google ...
Baby in Magento's user avatar
0 votes
0 answers
13 views

Update Custom Attribute like Price with the subtotal in the minicart

I have created an attribute for the Product like some extra fees. I got the attribute on the mini cart, saved it in the quote also updated their price according to the product quantity. I want to ...
Rana Zain's user avatar
  • 678
0 votes
0 answers
15 views

Magento 2 - Get qty from ajax response add to cart post parameters

When click in add to cart button in view page product, with ajax response get in checkout/cart/add the qty added, i need this qty value for datalayer push in phtml, i tried getAddToCartPostParams ...
Diego Castro's user avatar
0 votes
1 answer
62 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
26 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
105 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
151 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
2 answers
193 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
381 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
1 answer
208 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
327 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
1 answer
136 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
26 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
131 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
1 answer
292 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
1k 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
112 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
46 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
254 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
546 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
86 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
72 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
125 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
445 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
22 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
65 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 ...
Jtidd's user avatar
  • 135
0 votes
1 answer
305 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 ...
Jtidd's user avatar
  • 135
0 votes
1 answer
97 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
104 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
780 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
452 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
266 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
220 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
  • 63
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
2k 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
  • 455
0 votes
1 answer
47 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,439
1 vote
1 answer
566 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
264 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
  • 302
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
266 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

1
2 3 4 5
23