Questions tagged [addtocart]

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

2
votes
2answers
2k views

Adding a Product to the Cart via Querystring using SKU

I know that we can adding a product to cart via querystring. but how do we add sku to cart via querystring in url without including product id like this : domain/checkout/cart/add?sku=ABC or domain/...
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 ...
0
votes
1answer
441 views

Adding Product To Cart Leads To Infinite Loop

I have an observer set up to listen for 'checkout_cart_product_update_after', 'checkout_cart_product_add_after', 'sales_quote_remove_item', and 'checkout_cart_update_items_after'. The goal for my ...
1
vote
3answers
2k views

Add product and coupon to cart together

What I would like to do is add a product and a coupon to the cart at the same time from a product page. The reasoning behind this is we are creating a landing page for a specific coupon and want to ...
1
vote
1answer
756 views

Add configurable option to cart

I am able to add the simple associated product of a configurable product using the code below. <?php $purchasableProductId = $product->getId(); ...
0
votes
2answers
2k views

Configurable Product Pages have multiple add to cart buttons [closed]

My magento configurable products have two add to cart buttons, is there a way to delete one without interfering with my simple products add to cart button? <?php $_product = $this->getProduct()...
4
votes
1answer
902 views

Magento Add Configurable Product to shopping cart

how can i add Configurable Product to shopping cart in magento ? i try this code to add simple product to shopping cart but it`s not work for configurable product $result = $proxy->...
1
vote
2answers
2k views

Add to Cart via AJAX - should I add a configurable product with options or a simple product?

I have been trying to work out the correct way to add a configurable product to the cart via a custom end point. $cart->addProduct($product, $params); I want to know if it is okay for $product to be ...
2
votes
2answers
11k 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 ...
0
votes
3answers
883 views

How to add a simple product with more than 1 option to Cart?

I am trying to add a product from a custom page to the cart. I have the Configurable and also simple and I have the values of the options and also the IDs of the options. I tried to use: /path/to/...
2
votes
1answer
402 views

How to share data between Observers?

My fellow devs! I am attempting to change the standard "add to cart" functionality to include AJAX. I've taken on board advice that overloading addAction method in the Checkout/CartController.php ...
2
votes
1answer
3k views

Adding multiple products to cart failing

Assuming I want to create a link for the customer to click on that automatically adds some items to cart and redirects them to the cart. I created a controller that adds two items to cart, problem is,...
0
votes
1answer
695 views

Redirect 'add to cart' button to the account login screen when customer is not loged in

Is there a simple/easy way to redirect the 'add to cart' button/action to the account login screen/page when a customer is not loged in. This to prevent not registered or not loged in customers to ...
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
3answers
5k views

add to cart button on featured products is not working [closed]

please visit this link : on home page, "add to cart button" on featured products is not working.
1
vote
2answers
3k views

How can I get the cart item id after adding product to cart

I created a basic ajax addToCart function in the CartController and it works great. I just want the cart item id in this function. I run: $cart->addProduct($product, $params); $cart->save(); $...
0
votes
1answer
506 views

Magento Bundle with only one product available is impossible to buy

Magento 1.9.0.1 with RWD template I have a Bundle product, Fruit Box. I have three "real" product: watermelon, type1 melon and type2 melon. In a Fruit Box i can add 2 single product, a watermelon ...
0
votes
1answer
479 views

Adding products to cart after creating new customer

I have a controller that calls a helper. The idea is that the controller passes an array of data that the helper will use to create a new customer and then add items to the cart. This is the ...
2
votes
1answer
2k views

Add to cart configurable products using magento soap api V1

Trying to add configurable product in magento cart using magento soap api V1 but not able to add the products. can anyone please let me know the way how to do it. Any help would be appreciated.
2
votes
1answer
190 views

Meesed up “Add to cart” button in product pages

Alright my store is behaving weird. some of the product pages are working fine but in some pages the "add to cart" button changes its position itself. I am attaching a thumbnail for the better ...
0
votes
1answer
686 views

Enforce product quantity based on attribute?

I want to make sure a customer cannot set a Quantity other than "1" for some special products. These products all have a special attribute set. I tried to observe sales_quote_item_qty_set_after and ...
1
vote
1answer
3k views

Bypass Magento's form key usage to allow simple product to be added to cart

Magento CE 1.9.0.1 Just upgraded from CE 1.7 and our links that we previously used to add products to cart no longer work. Examples: http://www.website.com/checkout/cart/add?product=215&qty=1 ...
0
votes
1answer
1k views

Add product and/or coupon to cart via link (query string) is not working

As described on Magento's website: http://www.magentocommerce.com/wiki/4_-_themes_and_template_customization/catalog/adding_a_product_to_the_cart_via_querystring Background: Performed an upgrade from ...
0
votes
3answers
4k views

Redirect to Category Page after “Add to Cart”

Magento uses the default process when product is “Add to Cart” from product detail page: product is added to cart and redirect to the cart page or user can stay on product page. We need user to be ...
0
votes
1answer
214 views

Custom redirect Add to Cart Magento

I have a custom page where the customer will be redirected when he/she orders more than the remaining inventory of the product. Here's my scenario : Product 1 remaining inventory is 5 and the ...
0
votes
1answer
511 views

Add to cart by URL and Error Handling on 1.9

So I have managed to get rudimentary add to cart links working from external sources. Using the following sources: Official & out of date Wiki This StackOverflow post Here is the working code ...
0
votes
1answer
25 views

Stop an out-of-stock product returning to the product page when you add it to your cart

At the moment, if I add an item to my product which is out-of-stock, it goes to the product page with an "out of stock" message. However, what I want is for it to still go to the cart page, but have ...
0
votes
1answer
149 views

How do I save dynamic price from frontend for the same product to have 2 products in cart

I'm using Observer.php public function updateProductPrice(Varien_Event_Observer $observer){ $quote = Mage::getModel('checkout/cart')->getQuote(); $allItems = $quote ->getAllItems(); ...
6
votes
1answer
1k views

Get add to cart URL and image without loading product object

Kind of a spinoff of this question. I'm trying to extend Mage_Catalog_Block_Product_Widget_Link to make a widget template that displays the product image and an add to cart button along with the ...
2
votes
1answer
6k views

Add to cart button wont work

I found this code through Google to add a Button to my shopping cart page under where I have some products begin displayed. However when I click on the button, it redirects me to the shopping cart but ...
4
votes
4answers
20k views

Add to cart for out of stock products

I'm trying to get the Add to cart button to appear on products that are Out of stock. I've already set the System->Configuration->Catalog->Inventory->Backorders=Allow Qty Below 0 My store previously ...
0
votes
3answers
981 views

Product prices should visible after entering username and password as like admin panel

If we visit magento site, Products "prices" or "add to cart button"[optional either one] should not visible on entire site[on product list page, product view page, featured products , everywhere.] ...
3
votes
1answer
4k views

Add/Update customers cart from admin

Is it possible to add/update a customers cart from admin? $productId = 700; $storeId = Mage::app()->getStore()->getId(); $product = Mage::getModel('catalog/product') ...
1
vote
1answer
7k views

Replace “Add to Cart” button with an “Enquire” button linking to the “Contact Us” page

In both product listings (e.g. the category page) and the product view page, I need to replace the button "Add to Cart" with an "enquire" button which links to the "Contact Us" page. Please help me ...
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
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 ...
0
votes
1answer
949 views

Can't update quantity to cart

I put the form for the checkbox how many items the user want to buy: <?php $haveProds = $this->getHaveProducts();?> <?php if($_product->isAvailable() && $haveProds) ...
0
votes
2answers
3k views

Magento add-to-cart buttons on homepage don't update cart

Problem relates to Internet Explorer 11 and Google Chrome (but sometimes it works in Google chrome and sometimes not). The add-to-cart buttons on the product list on the homepage of Magento 1.8 does ...
0
votes
1answer
2k views

Pass custom attribute from product listing to cart page

I need to get a custom attribute from the product list page to the cart page. I need to know how to send the attribute from the product page and then how to get that attribute for that product on the ...
1
vote
1answer
1k views

Multistore Add to Cart 302 redirect loop

This is an urgent need to fix issue: a two language magento store, english store: add to cart creates a loop with a 302 error. Only happens in english language. website: http://negreshop.com what ...
0
votes
2answers
462 views

$item->isNominal() will check if an item is Nominal, how do we check if it is not

If this function $item->isNominal() will check if an item is Nominal (recurring) when adding it to the quote(cart), how do we do the opposite and check if an item is Non Recurring (or Normal)?
5
votes
2answers
15k views

Check Some Condition Before Product added to cart

I want to add product to cart. So when i click on the add to cart button i will be checking some condition like some variable is set or not. If it is set, product will be added to cart. If not set, ...
1
vote
2answers
675 views

Mini cart, price is showing only for one product

I added new functionality to add multiple products in cat, but when I add more products and go in mini cart on header, only first added product have price and other are with price 0.00. In the ...
4
votes
2answers
2k views

Add to cart redirect

How can redirect to a CMS page when the "add to cart button" (on a product view page) is clicked? I have already disabled the redirect to the cart page after the "add to cart" button is clicked. Now ...
1
vote
1answer
1k views

How to get required options in magento to add a product in cart

I am trying to add a product to cart in Magento using Magento SOAP v1 API ,but am getting Please specify the product required option(s). error message. The call happens like: $productArray[] ...