Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [addtocart]

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

0
votes
0answers
53 views

Configurable Product Add to Cart Issue

I have a configurable product with 4 associated product with it. When I go to configurable product and select a configurable option A and Add product to cart, product added in cart successfully. But ...
0
votes
0answers
128 views

Magento 2 Add to cart API with custom price

I am using following API for Add product to cart. http://{{magento2}}/rest/V1/carts/mine/items But i want to add custom price to cart. Anyone have idea about that ? $quote = $this->...
1
vote
1answer
51 views

Frontend suddenly showing code

We now have 'code' on our frontend. See image. Please advise
0
votes
1answer
96 views

Add to cart glide image animation | Fly to cart image animation. PHP/jQuery/JavaScript validation on successfully adding product to cart

I am trying to make a simple glide animation when adding product to the cart to indicate and "highlight" that the product was added. I managed to create a simple (not the best) glide animation for ...
1
vote
0answers
146 views

Magento 2 Ajax add to cart related products

So I've found the location to turn on ajax add to cart in the product page. I've also found where the; $showCart: true Lives to enable the related products to have an add to cart button on them. ...
1
vote
1answer
31 views

How to add multiple subproducts to the Magento 1.x cart at the same time?

I know there are already a lot of answers for how to add multiple products at once. I don't think this is a duplicate because here we are talking about subproducts not products. Currently on my ...
0
votes
1answer
70 views

Magento 2.2.5 How to add additional products to cart from new checkout step?

I'm a newbie in the Magento! I created the new checkout step "Additional Products" with 2 buttons - "next/skip" and "add to cart". I want to add required products to the cart, but I don't know what I ...
0
votes
0answers
21 views

How to update a url's param in Magento 2

if a customer tries to add to cart any product then he redirects to login/signup page. He login then -> redirect to after adding its product into cart to checkout. I have used Loginpost after plugin ...
0
votes
1answer
25 views

How can I change add to cart button on category page to saw view more and route to product page?

Instead of adding an item to the cart from the category page I would like to instead have it simply route to the product page.
0
votes
1answer
92 views

How to add buy now button on product page to checkout page with the quantities

I´m not a programmer but I'm running my shop with Magento, I tried to use the suggestion below to create a 'Buy Now' button and works fine. But add only 1 unit of the product. How can I do to add ...
1
vote
0answers
30 views

Home Page getting error when try add product in cart Magento 2

I have created my custom theme in magento and designed default.xml as per my requirement, everything is working fine but getting error when trying add product in cart from home page, also minicart ...
0
votes
1answer
173 views

Magento 2 : How to get selected simple product Id on checkout_card_add_after observer?

I want to get selected associated product id after an checkout_cart_add_after triggered. If any helps would be appreciable.
0
votes
1answer
159 views

How to get selected simple product Id on checkout_card_add_after observer in magento2?

I want to get selected associated product information from configurable product after an checkout_cart_add_after triggered. I'll look after it in mean time,if any helps would be appreciable.
1
vote
2answers
274 views

Changing 'Add To Cart' button text and relink in Magento 2.2.6

Change "Add To Cart" button text to "Find Out More" and relink in Magento 2.2.6 Hello everyone! Does anyone know how to change 'Add To Cart' button text and relink the button? I followed these 2 ...
0
votes
0answers
67 views

How to override Add to cart functionality in Magento 2.2

How to override Add to cart functionality in Magento 2.2 using custom extension?
0
votes
0answers
93 views

Magento : Please specify the product(s) quantity

I have one simple product in that related products tab i have added 8 products. i can see that products in bottom of this product detail page with checkbox like select all product to add to card. ...
0
votes
0answers
20 views

Magento1 In minicart twice product issue

I have used in magento1.9.3 if any product addtocart after mini cart twice product added but if go to cart page there only one product display so i am not figure out where is issue so if anyone facing ...
0
votes
0answers
22 views

Magento 2.1.7 out of stock for related product issuse

When we add to cart the product out of stock of a related product, an error message is showing on a related product detail page, but I need to show error in detail page when user click add to cart.
0
votes
1answer
653 views

Magento 2 : Add to cart product with custom option programmatically

I want to add to cart product with custom options. I added simple product, but can't able to add with custom options. How to do it ? Please help me. Thanks.
0
votes
0answers
232 views

Magento 2.2.5: Disable Add to Cart button

I'm looking for solution to disable all add to cart button in every page in frontend without using phtml file or css. I've found some solution but for disable price,but not add to cart button, i hope ...
0
votes
0answers
104 views

How to add product to cart with custom options in Magento 2?

I am using Magento 2.2.3 I want to add a particular product with particular option into cart when I click on "Test" button.I want to add below product to cart refer above screenshot When I click ...
2
votes
0answers
25 views

create order on admin panel

How i can create one order from simple product if i just have simple product Sku ? or may by should i asked solution for save quote item on Frontend and create order on admin panel . i guess i ...
2
votes
1answer
142 views

Magento 2: Proper way to utilize “ajax:addToCart” event

I found the following codes in /vendor/magento/module-catalog/view/frontend/web/js/catalog-add-to-cart.js at around line 100, when I was trying to find ways to add some custom JS handling after ...
4
votes
0answers
100 views

Removeing exist item during update items from cart : magento 2

I am doing some customization work on cart page. I want to add product multiple times with same configuration during update items. Add to cart is working good but existing items get removed during ...
0
votes
1answer
58 views

Magento 2 how to add products into cart without loading page

Magento 2 how to add products into the cart without loading page and I need to check every time quantity in DB and after adding the product into cart the product quantity must be reduced and check it
8
votes
0answers
265 views

Magento 2: Observer add product to cart?

I've read some other post about adding products to cart, but nothing seems to fit. I've an observer for checkout_cart_update_items_before that adds another product in same qty if specific product is ...
1
vote
0answers
25 views

Magento2: Product not added in cart by admin panel

When I add the new product in the cart by admin panel for the customer, Product is not adding. Magento 2.0
0
votes
1answer
98 views

How to hide “add to cart” button but show configurable options - Magento 2

I need to hide the add to cart button so currently, I have a plugin aroundIsSalable which sets the return to false if you are logged out. The issue with this is that it also hides the options for a ...
1
vote
0answers
222 views

How to add AJAX for the 'Add to Cart' button in wishlist page and in sidebar wishlist product in produst list page in Magento 2.2.3?

How to add AJAX for the 'Add to Cart' button in wishlist page and in sidebar wishlist product in product list page in Magento 2.2.3? Please help.
2
votes
1answer
85 views

Add configure product in Cart using Magento 2 API facing an issue

Here's the url http://<magento host>/rest/default/V1/carts/mine/items Method POST Headers Authentication :: Bearer <customer token> Content-Type :: application/json Body json data ...
0
votes
2answers
345 views

Magento 2 Mini Cart values with Full Page Cache

Running Magento 2.1.10 CE, with multiple stores. We have all the cache enabled, with Full Page Cache running with Varnish. Having an issue with the minicart values since enabling cache Steps: 1- ...
2
votes
2answers
97 views

Limit order total for customer in magento2?

Can we restrict customer for add to cart once his quote total crosses specific count? For example i need to restrict customer add to cart action, once the subtotal in quote crosses 500. I have ...
1
vote
0answers
182 views

Wish-list add to card getting “Please specify product's required option(s) for”

In wishlist items add to card click to getting error "Please specify product's required option(s) for" Can you please let me how to custom option auto default select when add to card before I have ...
3
votes
2answers
76 views

custom option when product add to cart in magento 2.2.5

<?php namespace Ecomsolver\Measurement\Observer; use Magento\Framework\Event\ObserverInterface; use Magento\Framework\App\RequestInterface; class SetAdditionalOptions implements ...
1
vote
0answers
202 views

Magento 2 : Add “Guest” Product to Cart Programmatically

How to add a product to cart, like a guest customer, without the need to have a registered product? I created a module that have some informations about products that will be added to the shopping ...
0
votes
0answers
24 views

Product price not displaying when I add to cart

I have one Magento 1.9 i am facing issue add to cart product when i add to cart any product not display product price in the cart and checkout page My website: http://click4fabric.com/ my ...
3
votes
2answers
815 views

Magento 2.2.5 change 'Add To Cart' button to 'View Product' at category page

Is it possible to change the 'Add To Cart' button to 'View Product' at the category pages? I have for almost every product some attributes, so it's weird for my visitors to click on "Add To Cart" but ...
3
votes
1answer
52 views

Change add to cart button based on customer group

Can anyone explain me how and where I can customize the add to cart button functionality based on the current customer group? I’d like to show a popup or redirect to a CMS page but only for a specific ...
2
votes
0answers
78 views

Why the total product price in the shopping cart does not include the different product options selected?

Here is the issue that happened since my Magento installation has been restored. The shopping cart should normally include all the product options selected but since the restoration, only the product ...
0
votes
0answers
340 views

You need to choose options for your item while adding product to cart

Trying to add configurable product to cart with custom qty with below code but getting You need to choose options for your item error. foreach($optionQty as $key => $qty) { $storeId = ...
1
vote
1answer
139 views

How to display Name, Thumbnail Image, Price, Add-to-cart Button On CMS PAGE?

I need to display all my products like, Sku Name Price Thumbnail Add-to-cart(Button) How can i get all above details on CMS Page? Note : Add-To-Cart Error
1
vote
2answers
109 views

Remove “Add to Cart” Button when Product Price is $0.00

I have looked through many similar questions, but many seem either far more convoluted than is necessary, or just doesn't make sense for my needs. As the title states, I would like to remove the ...
2
votes
0answers
16 views

Magento 2.2.4 - unable to print messages. - New Theme

I have a Module which processes a Post action, and then redirects. for example i am trying to overwrite - Magento\Checkout\Controller\Cart\Add I have used my construct function and my method as ...
0
votes
1answer
72 views

Magento 2 cookies not saved correctly and deleted sometimes

I have strange behaviour in Magento 2.2.4 and also 2.2.5. If I add a product to cart it is saved correctly and minicart shows 1 product. Then I add another product and first added product is lost in ...
0
votes
1answer
92 views

Magento : Convert Ajax Request To Normal Page Call

I am trying to change the ajax call on click of add to cart button to a normal page call. This is the code for the button <button type="button" title="<?php echo $buttonTitle ?>" id="...
0
votes
0answers
97 views

after magento upgrade 1.7.0.2 to 1.9.3.9 add to cart after blank screen open

URL like generate https://domain.com/stage/checkout/cart/add/uenc/ how to solve it this issue Thank you in advance!
0
votes
0answers
211 views

Add to cart with ajax not working in homepage

I installed Magento 2.2.5, and set Luma theme as default. In my homepage add to cart is not working with ajax, while on the other pages works just fine. Any idea?
0
votes
0answers
13 views

Making addToCart and cart page execute synchronously in magento 1.9

I am a complete newbie in magento, javascript and php So I am using magento 1 and my checkout page takes around 1 sec and cart page takes around 1.5 sec to load I want to decrease the time these two ...
1
vote
1answer
56 views

where is cart success.phtml called?

Where is the file: CartSuccess.phtml being called from when the users clicks on the "Add to cart" button on a simple product from within a category page? I want to change the way that the Cart ...
0
votes
1answer
114 views

Add custom option to configurable product M2

I wrote a plugin to add custom option while adding the product to cart public function beforeAddProduct($subject, $productInfo, $requestInfo = null) { $additionalOptions['...