Questions tagged [addtocart]

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

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

Magento2 - Add to Cart not working on Catalog page

I cannot add products to shopping cart after clicking on Add to Cart button. Go to http://marsh.wsisites.net/products/lcd-character-displays.html Click on View detail and check.
0
votes
2answers
42 views

Magento2 - disable add to cart on product page

Im running Magento2.3.4 and would like to disable the add to cart bottom on some product pages because they are to complicated to ship. Have created an Yes/No attribute "afhentes" and I would like to ...
0
votes
1answer
18 views

How move add to cart button below product images in product page magento2.2.4

Try every possibility. it's not working. <move element="product.info.addtocart" destination="product.info.media" after="product.media" <move element="product.info.addtocart" destination="...
0
votes
0answers
21 views

Magento 2 custom modal Close button redirect to footer

I have a custom modal in Magento 2 , using knokoutjs. This modal has a Continue Shopping button : 'buttons': [ { text: 'Continue Shopping', click: function () { ...
0
votes
1answer
44 views

How to redirect to cart after adding product to cart programmatically

I want to redirect to cart page after adding the product into cart, I know there is a provision in config but I have a custom product type and that config is not working for that product. That ...
0
votes
0answers
12 views

How to reset quantity in input field when adding products from grouped products page?

I have my Magento 2.3.2 site configured so that adding products to the cart keeps the customer on the page (doesn't redirect to cart). When a customer adds any product to the cart from a grouped ...
0
votes
0answers
26 views

How to solve Add to cart not working in Magento 2?

Our "add to cart" button are not working... When we click on the button, the page refresh then nothing. Any ideas? https://stage.shopunder.com
0
votes
0answers
40 views

window.checkout is undefined

When I do an add to cart, nothing happens. I have this error in the console: TypeError: window.checkout is undefined For: images.js & minicart.js Thank you for your help.
1
vote
2answers
47 views

Magento2.3 - How to add the double Quantity when I click add to cart on the product page?

I want to add the double quantity when I click add to cart button using event in Magento2.3.2 which function I can override for this. Thanks in advance.
0
votes
0answers
42 views

Magento 2: Rest API “Checkout Cart Product Add After” event is not working

I have faced issue in checkout_cart_product_add_after event using add to cart rest API. Same add to cart event is working in website. But it is not working in Add to cart rest API. Add to cart API ...
0
votes
1answer
30 views

Is there any way in magento 2 to prevent user to add more than 1 product in cart

I want to set a limit of 1 product in the cart. Magento 2 C.E provides an option to set a limit of qty of a single product in the cart but that option allows two individual products in the cart. I ...
0
votes
0answers
18 views

Magento 2 custom add to cart button on product page

I want to create a new Add to Cart button which takes the value based on the result of a calulator I've add the calculator to catalog_product_view.xml <block class="Magento\Framework\View\Element\...
1
vote
1answer
48 views

Magento 2 : which event should I use when want to add free item in cart?

when purchase a Product X, want to add product Y automatically to code. It saves in cart but 'save' function is goes into loop because it also has event as 'checkout_cart_save_after'. events.xml <...
0
votes
0answers
21 views

Magento 2: Move Stock info above Add to cart

I know this questions has been posted other times, but in my case didn't solve the issue. I need to move the Stock info before the add to cart button (in the product page of course). I put this code ...
2
votes
1answer
38 views

Magento 1.9 :- How to add Area value dynamically

I want to add custom text area value when product added to cart
0
votes
1answer
24 views

Remove Item from Minicart throws Invalid Form Key error in Magento 1.9

I had installed a fresh setup of Magento ver 1.9.3.9 and when I add the product to cart and click on Remove Item from Minicart it gives me exception error and page goes to There has been an error ...
1
vote
1answer
20 views

Update Product Qty while product is being added to cart

I want to update qty to 2 when product is added to Cart. Basically I want that when a user ads a product to cart(qty is not visible for user), it is set to qty by default. I have created an observer ...
2
votes
1answer
40 views

How to move “addtocart” button to the left side in category view?

I'm pretty new to Magento2 and I'm trying to move elements inside category view. I would move my add to cart button to the right of the screen in category view, and my quantity box too. I've created ...
1
vote
0answers
25 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 ...
1
vote
1answer
76 views

Magento 2 : How to check product is in stock by color and size?

I want product can be pre order if not in stock. suppose, Product X has 3 sizes S,M and L. and colors Red, Blue and Black. At Product Details Page, If I select size L and Color black which is not in ...
0
votes
0answers
33 views

How can I move quantity box after product title in magento 2.3?

I want to move quantity box after product title without moving add to cart button on product detailed page. I have tried to move quantity box using jQuery but after that always single quantity (...
0
votes
1answer
29 views

Magento 2 add to cart button text when added

I want to change the add to cart button text, when a product is successfully added to the cart. I want to add soms custom html (a icon) to the button. I tried to change the following, but that does ...
0
votes
0answers
28 views

Not Allowing Group products to be added to shopping cart when one or more sub products is out of stock

We just upgraded from Magento 2.2.7 to 2.3, is 2.2.7 customers where not able to add group products to the shopping cart when one of the sub products was out of stock (the add to cart button was not ...
0
votes
0answers
6 views

How to add delivery charges depending upon the quantity of product is in cart?

If 1.5 kg product is in cart add 2rs as delivery charge. If 1 kg product add 4rs as delivery charge. At present I have to change the delivery charges depending upon the quantity of the product, how ...
0
votes
1answer
26 views

How to send 'alert' from controller in json?

I am currently trying to stop redirecting to product view page if someone forgets to select configure option and click on 'add to cart', instead of that it will just send popup message or alert. Here ...
2
votes
0answers
40 views

Configurable product will not redirect to product view page after click on add to cart

if a customer forgets to choose the product option of the configurable product on the product listing page and click "add to cart" it is redirecting you to the product view page with the message: "You ...
1
vote
1answer
58 views

Call to a member function getPriceType() on null magento graphql - addtocart

I have a simple product with custom options while adding to cart i getting error add a simple product to cart mutation { addSimpleProductsToCart( input: { cart_id: "...
0
votes
2answers
69 views

Invalid Form Key. Please refresh the page. magento 2.3.X

When I clicked on add to cart or add product in wishlist then showing error as below: How can I fix this issue ? Where is the form key to change or what can I do ?
0
votes
1answer
26 views

Add to cart button does not appear

I am working in version 1.9.2.4. I have a problem with the add to cart button when I am not logged. It does not appear in the category grid search but in the list view it does. That happened with ...
0
votes
0answers
19 views

Magento2: how to add a href (anchor) in succes or error message page while after add to cart product

Add Anchor link to Success or Error Message. if I am not wrong module-checkout/Controller/Cart/Add.php responsible file to my requirement. followed many links like below but unable to find a solution ...
2
votes
1answer
35 views

Magento Add to cart button not showing for not logged visitors

Hello I'm new with the magento. I'm working with the 1.9.2.4 version and when I'm not logged the button add to cart doesn't appear. I tried to look in app/design/frontend/your-theme-package/theme-...
1
vote
1answer
27 views

Magento 2 Add to Cart Submit Button Value

I have added custom add to cart submit button on product detail page. On submit, i am getting other form fields values but not getting submit button name and value. So how can i get the name or ...
1
vote
0answers
15 views

How to Redirect to Product View Page if No option Options are Selected In magento 2

i am making a guestwishlist i want to know how i can make a condtion if no product options are selected if must have to redirect me to product view page on add to cart option magento.. i did this so ...
1
vote
1answer
51 views

Magento2: How to remove items from cart before adding new Item?

I want to clear the cart before adding a new item to the cart. I am trying to do using the event "checkout_cart_product_add_before" and by this code in the observer. $allItems = $this->...
1
vote
0answers
12 views

Magento 2 Cart empty using Memcache

I am using Magento2.2.2 with memcache. Facing some issue with memcache with-out memcache adding cart is working fine and cart page showing added items. If enable memcache and configured env.php ...
1
vote
0answers
68 views

Magento2 - can't add product in cart

I am not able to add product to cart. tried these solutions but not working. https://stackoverflow.com/questions/41463643/magento-2-products-not-being-added-to-cart add to cart not working localhost ...
0
votes
0answers
24 views

Add to Cart with Quantity

I am trying to add the quantity from an input field when you click the "Add to cart" button. I have created a custom module to house this. I currently have: <div class="add-to-cart-btn"> &...
0
votes
0answers
20 views

Magento 2 Addtocart Group product programatically

I am facing the problem with the Addtocart group product. Can anyone suggest me the code? I have tried as a simple product but it's not working as well try with below code but that did not work out ...
0
votes
2answers
55 views

Magento 2 Add to cart out of stock item issue

I have a product with 0 quantity and Out of Stock Product, and it is showing on front-end. Customer is able to do add that product to cart. I run all commands like: php bin/magento indexer:reindex ...
0
votes
0answers
17 views

Magento 2: Cart is allowing update more than available qty

I am having very odd issue. I am using Magento 2.3.2. I have migrated data from magento 1.9.3. While I am adding product to cart, It works perfect, however whenever I try to update qty from cart it ...
0
votes
1answer
23 views

Magento 2 Load checkout-cart_configure for different Product page Layout

My website has 5 types of layout of page,in which 4 types layout of Configure Product and 1 type is Simple Product Page. I am loading these layout by observer by checking the current category/product ...
0
votes
1answer
48 views

How do we Place order from storefront on behalf of another customer in Magento 2.3?

The salesperson (sales rep) talk to customers take an order at offline mode, will Place orders on behalf of them on Storefront, So Salesperson logged in to My Magento account (Storefront), he can ...
1
vote
1answer
59 views

Magento2.3.3 add to cart button doesn't redirect to cart after adding in cart

I'm facing a weird issue after upgrading from magento 2.2.3 to 2.3.3. When adding to cart from product page, I've enabled setting After Adding a Product Redirect to Shopping Cart to Yes. After the ...
1
vote
0answers
15 views

Magento 2 Update Cart button is not display after customize Product page

I have so much customization in product page of my website.everything is working fine on product page while when we go to cart page and click to edit any page it redirect to ` websiteurl/checkout/...
0
votes
2answers
30 views

Magento 2 how to show another text if price is > 2000?

I want to show custom text instead of the price if the product price is > 20000. if price > 20000 then I want to show "contact for price" instead of price. Also, I need to hide the add to cart ...
0
votes
0answers
35 views

Magento 2 - JS Duplicated Add To Cart button

Because of reasons I'm having to duplicate some content on the productpage via JS. The duplication works fine, but the Add To Cart buttons don't fire anymore. Does anyone have any idea how to get the ...
0
votes
2answers
51 views

Add each product items separately to a shopping cart

I want to make adding to the shopping cart as a separate item on every action of clicking to a button Add to Cart. If the customer clicks Add to Cart a couple of times he/she should see different ...
0
votes
1answer
39 views

Magento 1.9 does available stock/qty change when product is added to cart?

I have a store where I selle unique products, so every product has a quantity of 1. When the order is placed, the quantity is decreased to 0 and the product changes to out of stock and it's no longer ...
0
votes
0answers
37 views

Property “RemoveTag” does not have accessor method “getRemoveTag” in class “Magento\GiftMessage\Api\Data\MessageInterface”

I am working on an extension attribute in cart page. I need to add a text box (remove_tag) along with the other text boxes for gift messages. On clicking on update button i am getting the following ...
0
votes
0answers
25 views

How to redirect the Magento 2 controller into post page

When I click on add to cart button from my custom page. If products are avaiable it goes to the Cart page and if not they are redirected to the Post page, but it redirects to the Index page. Can ...

1 2 3 4 5 20