Questions tagged [addtocart]

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

Filter by
Sorted by
Tagged with
3
votes
1answer
1k views

How to change “add to cart” text on category view?

Where can I change the text below? Where is the file and where do i need to copy it in my custom theme? Thanks alot! :)
3
votes
2answers
1k views

How to create “buy now” button which should redirects to onepage checkout

I am new to magento, using Magento 1.9. with custom theme. I succesfully created buy now button on addtocart.phtml by the following codes: <button type="button" title="Buy Now" class="button btn-...
3
votes
2answers
2k views

Is there an event for apply coupon action in cart

I want to add a product to cart automatically when a coupon is applied. When the coupon is applied the product should be added to cart showing its price and a discount of the price of the product ...
3
votes
1answer
1k views

Magento 2 . How to hide 'Add to cart' button while not logged in

This is how I tried but its not working Bodak/DisableAddToCart/etc/adminhtml/system.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
3
votes
2answers
76 views

Require js didn't load my Js in custom module

I'm working on a custom module for GTM. The last part I facing issue is with require js. I want to trigger a custom JS on "add to cart" click. I made a requirejs-config.js file in Vendorname/...
3
votes
1answer
2k views

Change product price before add to cart

I have custom price field for specific product where user can input their desire product price, and i try to add the product to the cart programmatically, the problem is i need to change the product ...
3
votes
1answer
393 views

Move up Validation in Configurable Product Page

Is it possible to move up label, below the fields? And where I can find it? I tried in validation.js, but didn't have much luck.
3
votes
2answers
673 views

Magento Change Product image while adding product to cart

I want to change product image after a user added a product in to cart, Because user can change image text and font style. So, I have loaded Quote item using event sales_quote_add_item and I am able ...
3
votes
1answer
1k views

Adding bundle product to basket - prices are zero

I know this problem is common, but the answers on the internet has not helped me, so I turn to you. I'm adding simple products to my basket and that works fine, but I also want to be able to add ...
3
votes
1answer
483 views

Forcing a certain custom option value when customer adding product to cart

I have a specific product that customers have made preorders for. Those who have preordered the product get it at a lower price. They can also order more products at the regular price. The pre-...
3
votes
1answer
326 views

Change the load order from addtocart block with the addto block

I getting crazy with the template system from Magento. I tried to change the load-order of my "Add to Cart" and "Add To" block for customize article. So that the "Add To" block gets loaded before ...
3
votes
1answer
827 views

What is the a good phone order extension? [closed]

We used to be on Volusion and their phone order page was quite nice. If someone called in to place an order we could add products to a cart from the admin side, edit prices for the customer and enter ...
3
votes
2answers
844 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; ...
3
votes
1answer
95 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 ...
3
votes
2answers
2k views

Add to Cart Not Working - Magento 2

Magento 2.1.2 PHP Version: 5.6.17 MySQL Version: 5.6.33 The store is completely set up, designed and in production mode. Braintree payment method is set up. Categories and products are created. ...
3
votes
1answer
5k views

Display Out of Stock product and disable Add to Cart button

I have a store where product quantity are set to 0. I have enabled back orders if qty is 0 for a product, however I would like to disable Add to cart in case product is out of stock. This means Add to ...
3
votes
0answers
2k 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.
3
votes
2answers
205 views

Magento 2. how to hide 'Add to cart button' using Plugins

How to Hide 'Add to cart' button using Plugins.I'm stuck in to hide add to cart button.
3
votes
2answers
95 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 ...
3
votes
1answer
184 views

How to display swatch on cart page for added products in cart

How to display swatch on cart page for added products in cart. Right now it shows as Text, like Color Blue, but it should show like swatch icon.
3
votes
1answer
2k 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 ...
3
votes
2answers
3k views

Add to cart button not working on product pages [closed]

Recently I started to make some changes on my Magento website, and now the add to cart button isn't working on the product view page. I have tried things such as changing the code in view.phtml and ...
3
votes
2answers
1k views

Add to Cart button in Magento 2.1

I tried with button add to cart and it not working, app/code/Moo/Custom/view/product.phtml <?php $product = $this->getData('product'); $postDataHelper = $this->helper('Magento\Framework\...
3
votes
1answer
876 views

How to share cart for guest users between multi stores with different domain

I am able to share my cart for logged in customers while switching between two stores with different domain URLs. However, I could not implement the same for guest users. I know the cart details are ...
3
votes
0answers
235 views

Magento 2 - Add To Cart Button Direct To Product Details With Non Required Options

I am on Magento 2.1.1 and I am trying to change the Add to Cart button behaviour in Grid / List Views. At the moment, the add to cart button only directs the customer to the product detail page if ...
3
votes
2answers
2k views

How to override cart\addcontroller in magento 2?

I want this function in \code \StwBuyXGetY \BuyXGetY \Controller\Checkout\Cart\Add.php(this is written in magento 1.9, I want to convert it into magento 2). But I cant add any new function in add ...
3
votes
1answer
216 views

SOAP API to build cart for frontend - should I be worried? session collision or cart loss?

My developer has written PHP code on his CMS that connects via SOAP on behalf of the user browsing the site, to manage the cart from their CMS. I'm worried about the interaction of SOAP session (...
3
votes
0answers
1k views

Wishlist - Add all to cart goes to 404 page instead [closed]

When I click "Add All to Cart" on the wishlist page, I get a 404 error and the address in the bar is http://www.blahblahblah.com/wishlist/index/allcart/. The items are not added to cart. A slightly ...
2
votes
5answers
2k views

Add to cart button brings you to an empty cart for certain products need help troubleshooting!

So not one person in all of this section can help troubleshoot session issues? NOTE I've completely updated my question as this was never resolved: EDIT: I just noticed that while I set 777 on var/...
2
votes
3answers
3k views

How to override addtocart.phtml for all type of product in magento 2

I have done this but my code is not working for all types of product. layout file <?xml version="1.0"?> <page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
2
votes
2answers
12k views

I want to use ADD TO CART via URL in Magento 1.8 but don't know which files to change

I have seen some suggested changes to make to call the FORM KEY to allow the ADD TO CART FROM URL to work. <?php $formKey = Mage::getSingleton('core/session')->getFormKey();?> <form ...
2
votes
1answer
3k views

Magento 1.9 How to add buy now button in product page?

I am using magento 1.9, I want to add BUY NOW button on product details page, Buy now button redirect to checkout page. I tried many solution already solved in this forum, But all the solutions are ...
2
votes
2answers
2k views

How to get Product Submit Url on Category page?

On product page the product form has given action = <?php echo $this->getSubmitUrl($_product) ?>. I want to get this submit url on category page for each product but on category page it ...
2
votes
2answers
2k views

Making non-customisable bundles in Magento 2

I am trying to remove the options from bundles (in Magento 2), so that Bundle Items can be added straight to the Cart without users being able to customise these options. I thought the easiest way to ...
2
votes
2answers
6k views

How to create and add 'buy now' button along with add to cart button on each product?

I am new to Magento, using Magento 1.9. with a custom theme. I successfully created buy now button on addtocart.phtml by the following codes <button type="button" title="Buy Now" class="button btn-...
2
votes
2answers
3k views

Add product to cart from email link

I am running a promotion and would like to make it very easy for customers to add three items to their shopping carts. The research I have done around URL querystrings no longer seems to work on ...
2
votes
2answers
87 views

Magento:2.3.2: Add to cart is not working after element moved

I tried to move an element to above add-to-cart block at category page. Please check the following attachments. I need as the following: For product availability, I am using an extension. The name ...
2
votes
5answers
5k views

Error when adding to cart 'No such entity with id = 0'

When I add a product to my cart I get the following error: No such entity with id = 0 This happens with every product in the store, can anyone help point me in the right direction?
2
votes
2answers
4k views

Magento2 catch ajax complete, add to cart

I'm building an custom mini-cart. I want it to update itself when an article is added to the cart. I'm trying to do this by jQuery with catching the ajax complete, but can't get it to work. Can anyone ...
2
votes
1answer
2k views

Magento 2 Some item options or their combination are not currently available

We have installed Magento ver. 2.1.6. using composer with sample data. We have call event checkout_cart_product_add_after for adding addition information with item. The event observer code is given ...
2
votes
1answer
1k views

Magento2 - Ajax Add to Cart - Out of stock situation - Stop redirect and show message dynamically

I have implemented Ajax to my "Add to Cart" button so that customers can add products to their cart without reloading the page. Here is bare minimum of code which I used in order to achieve ...
2
votes
3answers
7k views

“Add to Cart” button on CMS Page - non product page

So, I am seeking a way to give my customers the ability to add a product to the Magento shopping cart directly from a standard non-product page (i.e. CMS). I am using Community Edition 1.9 and from ...
2
votes
1answer
9k views

Magento 1.9 cart not updating

I have been trying add products to cart via ajax call by following the procedure given in http://excellencemagentoblog.com/magento-add-product-to-cart-ajax and I have successfully added products to ...
2
votes
1answer
247 views

Magento 2: Add multiple products to cart programmatically does not work if cart is empty!

I have the same problem as mentioned in this Question: Magento 2: Add multiple products to cart programmatically But it was never answered. This is my Controller.php: <?php namespace MassiveArt\...
2
votes
2answers
929 views

Cart & Checkout blank Magento 2.3 after trying to add product to cart

In Magento 2.3 I am attempting to add an item to cart, however the cart shows empty and if I 'proceed to checkout' the checkout page is blank with just the loading gif icon. If I go to 'checkout/cart'...
2
votes
2answers
328 views

Remove block from layout depends on condition

I want to remove block product.info.addtocart from layout depends on some conditions
2
votes
3answers
5k views

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

When I add a product to the cart, it shows the error "Invalid address id". How can I solve this issue?
2
votes
2answers
3k views

Add to cart configurable product programatically magento2

I tried with add to cart configurable product but getting error when run the custom code using observer but same code when run from controller than it's working fine. you can see below code for bundle ...
2
votes
1answer
2k views

Magento 2 - Quantity Field on Related Products Listing

I'm trying to add a quantity field to the related products section on my product page. I'm overriding module-catalog/view/frontend/templates/product/list/items.phtml in my theme. So far, here is my '...
2
votes
1answer
4k views

Magento2 Add to Cart from homepage not working

I've set up a Magento v2.0.6 installation Running Luma theme. I've created a own template based on the Luma with some minor changes (removing links, adding custom CSS etc.) at least nothing big. I'm ...

1 2 3 4 5 20