2

I am trying to add a bundled item into the cart without having to specify any of the options. All the options have been set to "not required" and I want the base item added to the cart (at it's fixed price).

I've attempted to use this method noted in this thread (http://www.magentocommerce.com/boards/viewthread/17289) but the given solution forces the code to "pick up" the first option. So when you add the product into the cart, the overall price is base item + first configured product.

I want to add the base item only without any configured products. Could someone suggest a viable solution for this?

2

You can create a dummy sku simple product, and call it something like "Just base package" and have it selected by default as first option, and set to required and not change qtys. Programatically you can add this as the first option to all bundles using something like Magmi Importer.

This way you are working completely with magento default functionality and nothing will break in the future.

| improve this answer | |
0

After understanding the problem, this is no answer, but I let it here, maybe some one needs it later on.

What is the problem?

What happens if you just add the product to the cart?

$cart = Mage::getModel('checkout/cart');
$cart->init();
$cart->addProduct($my_product, array('qty' => $qty_value));
$cart->save();
| improve this answer | |
  • The price changes when it gets added to cart. For example, if the base product cost 800, and the very first option and product within that option costs 100 dollars. Then when I add the base product (by itself, with no options), then the cart would display $900, which is incorrect as I want it to display $800. The code/solution provided in the thread linked in OP, enforces the first product in the first option to be selected as well – SNpn Jan 15 '14 at 22:14
  • 1
    Did you try this inside the browser? Is it possible to add a bundled product without any optional option? – Fabian Blechschmidt Jan 15 '14 at 22:39
  • I have tried this on a browser. The default Magento behaviour is that it requires at least one optional product to be selected, however I don't want that to be the case - the client has over 500 bundled products and it wouldn't be wise to go through them manually and change them. They want the base product of the bundled item to be able to be added to the cart. – SNpn Jan 15 '14 at 22:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.