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

All Questions

Tagged with
0
votes
1answer
15 views

How to customize Add to cart functionality based on product categories in Magento 2?

I am using Magento 2.3.0 I have some products in my website which allows custom printing and these products are assigned in category "Printing Products". Now I want to customize add to cart ...
0
votes
0answers
27 views

$_product->isSaleable() shows different value in list page and view page magento 2

Issue: Out of stock set at admin side. On product list page display "Out of stock" while detail page shows "Add to cart" button. I have print the $_product->isSaleable() function on list.phtml as ...
3
votes
3answers
73 views

How and where to change add to cart message in Magento 2?

I am using Magento 2.3.0 Above message displays when we try to add product more than available quantity from the product detail page. I want to change this error message and want to add a new custom ...
0
votes
0answers
14 views

Add Free Product to Cart price threshold doesn't work after discount applied

Were using Magento 1.9 CE We offer free gifts with purchase (GWP) when the GWP conditions are met. Most often the threshold is a certain $ amount. We have an issue that when a discount code is ...
0
votes
0answers
13 views

requested product doesn't exist rest api

I'm creating rest api to add product to cart, it works okay for some users and doesn't for others. what is reason for that? here is the code: $customer = null; $isGuest = true; $quote = ...
0
votes
1answer
59 views

Fatal Error: 'Uncaught Error: Call to a member function setCustomPrice() on boolean magento 2.3

Here i am trying to add product to the cart using customerId and productId without customer logged in, it's working fine but its not adding custom Price to that product,please guide me if you have ...
0
votes
0answers
26 views

How to add product to the cart with customer id and product id magento 2.3?

Actually while adding product to the cart with product id and customer id, i am facing one error "We found an invalid request for adding product to quote." If anyone have any idea please guide me. &...
0
votes
2answers
52 views

send custom product price to checkout on add to cart in magento2

I have a custom price in phtml which is shown in the product page.Now I want to send that price to checkout page on add to cart click in magento2 that custom price is coming in js variable and input ...
0
votes
0answers
41 views

Add to cart button is not working properly in listing page in Magento 2

I am using Magento 2.3.0 In Product detail page when we click on Add to cart button then the text in the button is changing from "Adding" to "Added" and then finally it displays "Add to cart" again. ...
3
votes
2answers
154 views

Allow only one qty of item into cart in Magento 2

I have created a custom controller in my module and calling via ajax to add the item to cart. Below is my controller code. <?php namespace {Vendor}\{Module}\Controller\Product; ...
1
vote
0answers
107 views

Magento2 : Having issue with product add to cart jmeter

I am using Magento2.2.5 and using benchmark_2015.jmx, Facing issue when test for logged in customer and adding product to cart, Cart shows empty. It's default magento benchmark_2015 script, stored in ...
3
votes
0answers
877 views

Your session has expired magento 2.3 [closed]

when i want add to cart product it showing error Your session has expired how i solve this problem.
0
votes
0answers
22 views

How to Hide/Show Product's particular Customizable Options on button click?

I have made a custom button that would be shown on the Product details page instead of the "Add to Cart" button. Now on clicking that button, I want to show some customizable options that are going to ...
0
votes
0answers
48 views

Tier Price is not working in magento 1.9.3

when I put the products price $204.75 and tier price 190.95 and add to cart 25 products. when I show my shipping cart, they still show the actual prize not tier price but why? enter image description ...
0
votes
0answers
41 views

Magento 2.2 - Update product custom option label after Add to cart process

I want to update product custom option value after Add to cart process in the cart, checkout, email and etc. Does have any idea about this?
0
votes
0answers
44 views

Disable add to cart button if quantity more than one in magento 1.9

I want to disable add to cart button if quantity more than one in magento 1.9
0
votes
0answers
170 views

Magento 2.2.3 CE unable to add/remove item from wishlist?

We are getting facing an error message when we add (or) remove item from wishlist in magento 2.2.3 CE can you please advise? ? we didn't write any custom code from custom module. Fatal error: ...
1
vote
1answer
29 views

Add to cart not working in custom template magento2

I am getting add to cart url by product object like below. Block file. use Magento\Catalog\Api\ProductRepositoryInterface; use \Magento\Checkout\Helper\Cart as CartHelper; class CustomAdd ...
1
vote
0answers
28 views

Magento 2 How to hide price of product and add to cart button and Show a custom Link if not logged in [duplicate]

How to Hide the Price of the product and also add to cart button if the user is not logged in and want to give a link in place of Add to cart button to Login.
0
votes
0answers
87 views

Magento2 How to resolve the error “we can't add product to shoppingcart right now ”?

When I am trying to add any product to cart in product view page it showing error "we can't add product to shoppingcart right now".The product having quantity also still it's showing like this.please ...
0
votes
1answer
73 views

Show Pop Up when click on Add to cart checkbox for related products Magento 2.1.7?

How to show Pop Up when clicking on Add to cart checkbox for related products Magento 2.1.7? The pop-up message should be (The product has been added to cart)
0
votes
0answers
91 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. ...
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
2answers
339 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- ...
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 ...
0
votes
1answer
90 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
86 views

Unabel to change currency when items in cart page in magento 2.2.0

I want to change currency after adding product to cart . but still loading in any infinite loop and showing error of max_nesting_level cross to 10000. Currency switcher is working without adding to ...
0
votes
0answers
372 views

We can't add this item to your shopping cart right now in magento2

When click add to cart button in product details page I'm getting this error "We can't add this item to your shopping cart right now." Can you please anyone help me.
0
votes
1answer
21 views

Product AddToCart Product list page magento 1.9.1

I am using JavaScript function to add product to cart, below is my JavaScript code : <script> function myFunction() { jQuery.ajax({url: '<?php echo $this->helper("checkout/...
0
votes
3answers
24 views

add product into cart

I created an "add to cart button" for a product at below location. app/design/frontend/rwd/default/template/catalog/product/view.phtml Now I want while clicking on the button, the product, should ...
0
votes
1answer
178 views

Can't add product to cart

Generic error when adding product to cart: "We can't add this item to your shopping cart right now." Exception log gives this error: [2018-02-16 15:40:31] main.CRITICAL: exception 'Exception' with ...
1
vote
1answer
422 views

Product Add to cart before I want to set Product custom option values in Magento2.2

I want to add product to cart with some product already create custom option values put. So what happen current magento create new product in cart while same product different custom options or values....
0
votes
4answers
3k views

Magento 2 : Add Block After Add To Cart Button

I have to add block and call custom phtml file after "Add to Cart" button on product details page. I have added below code in catalog_product_view.xml file in extension. It is working but displaying ...
2
votes
0answers
1k views

Magento 2 add to cart button not showing for any product

On my magento website, add to cart button is not showing on any product page. I have checked inventory, visibility settings everything is correct still its not showing. can anyone please help ...
1
vote
0answers
31 views

Problem when adding products to the cart. Magento 2

When I am in a product and I add to the shopping cart 4 units of it (the quantity is just an example) it is added with the amount of "1" and if I add 4 more units, "2" is added instead of 8 !!! Can ...
0
votes
0answers
67 views

Add multiple products id from attribute value

Following is the code to get product ID from attribute value in Magento 2.2. for ($i = 0; $i < sizeof($post['prod_attr']); $i++) { $attribute = $this->eavConfig->getAttribute('...
0
votes
1answer
318 views

Add item(s) to cart programmatically with different line

I tried to add a product to cart programmatically, but it should be in different line with other product in the cart. I already tried the code below but it only adds a product to cart and adds the ...
4
votes
1answer
969 views

Add multiple products to cart using Magento2 REST API using custom method

Add multiple products to cart using Magento2 REST API using custom method Their is no default magento api this is single product add to cart json code in rest api body section. { "cartItem": { ...
0
votes
1answer
1k views

How to the Magento 2 Success Message in Open Popup Box

User Product Add to the cart after Success Message is Open to the Popup Box
0
votes
3answers
3k views

Magento 2 : “Invalid address id” when adding product to cart

When add a product to the cart, Then an error shows as "Invalid address id". How to solve this issue
0
votes
1answer
459 views

Add to cart bundle product programatically magento 2

I tried with add to cart bundle product but getting error when run the custom code. you can see below code for bundle product. $objectManager = \Magento\Framework\App\ObjectManager::getInstance()...
2
votes
1answer
9k views

Magento 2 programatically add product to cart? [duplicate]

We have a requirement that we wants to add product to cart programmatically in magento2.
1
vote
1answer
603 views

Programmatically adding product to cart returns empty cart

I'm trying to add a product to cart programmatically in magento 1.9.3.3. The code adds database entries (created rows in sales_flat_quote_item and sales_flat_quote tables). But the cart shows as empty....
0
votes
1answer
566 views

Add a product to cart in checkout cart page?

Would it be possible to add a button in checkout cart page to add a product to cart? That product would always have the same SKU and would be dynamically created. By dynamically I mean that the price ...
0
votes
1answer
446 views

Disable price & Add to cart button for particular category

I want to disable the price and add to cart button for particular product or a category. Instead I need to place a button that takes me to a web form page. Is there any extension that provides this ...
0
votes
2answers
567 views

Add to cart button added the same product issue

I have created a custom phtml for my homepage. Here i check for all products in a specific category. All the products and the information looks fine, but i have a problem with adding the product to ...
0
votes
1answer
333 views

Add every product as a new item into cart instead of updating cart quantity

How can i add every product as a new item into cart instead of updating cart quantity? ie. Suppose a product is already added in cart. If i add that product again to cart it should add new product ...
1
vote
0answers
237 views

Magento 2 : Error 'The Option Type to Get Group Instance is Incorrect'

I have created a custom input type for customizable options. Despite it rendering a fairly complex UI element for the user to interact with, all it actually submits when you click "add to cart" is a ...