Try the Demo

Magento Forum

   
Enable Quantity in Bundled Product with Checkbox
 
dalberts69
Jr. Member
 
Avatar
Total Posts:  16
Joined:  2008-12-03
 

Stupid cache. That fixed it. Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Fred Boyle
Jr. Member
 
Total Posts:  1
Joined:  2010-09-02
 

Having issues with this module. Everything functions as expected except on the front end.
Checking a checkbox does not enable the text field to type in the quantity. Following Javascript error occurs:

ReferenceError: Can’t find variable: bundle

Unable to resolve why this isn’t functioning. Any help would be appreciated.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kabel
Member
 
Avatar
Total Posts:  67
Joined:  2008-04-07
UNL, Lincoln, NE
 

@Fred Boyle:

To ensure everything is working correctly, everything must be installed in the proper location (as outlined throughout this thread). If the front-end is not working properly, it is most likely due to an issue you have with a custom theme/design.

The template file that is responsible for defining the “bundle” variable is located at app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle.phtml (for Magento v1.4). That file is NOT a part of this module, so unless you have a custom template that is messing something up, it should work properly.

Please ensure the theme templates are installed in the proper location. If you are unable to resolve the issue that way, I would encourage you to remove all of file from this module and clear the cache to ensure everything is working properly without this module.

 
Magento Community Magento Community
Magento Community
Magento Community
 
chadjmorgan
Sr. Member
 
Avatar
Total Posts:  252
Joined:  2010-06-04
Michigan
 

thanks for the extension!  does anyone know if it is possible to somehow (programmatically or through javascript or something) make the checkboxes inherit the same quantity as is entered for the other product?

for example,

I have shirts that have checkboxes for embroidery and lettering.  Say the customer orders three shirts with embroidery.  I think they will not realize they need to enter 3 for the quantity of the embroidery also.  Can anyone think of an idea to make this work?  I was thinking if somehow the text boxes would be linked and automatically update to equal each other.  Or better yet, it be done behind the scenes so quantity boxes are not needed.  Thanks for any ideas / help!

 Signature 

Check out my extensions!

[Custom Stock Status And More!] [Pre-Select Colors Plus Swatches]

View All CJM Extensions

 
Magento Community Magento Community
Magento Community
Magento Community
 
kabel
Member
 
Avatar
Total Posts:  67
Joined:  2008-04-07
UNL, Lincoln, NE
 

@chadjmorgan:

I’m confused by your example. It sounds like you are talking about a “simple” product (shirt) with some “custom options” for selecting what kind of extras that customer wants. Shirt customization are probably not best represented using bundled products. Bundles are used to sell multiple simple/virtual products as one item. That is probably not what you are trying to explain. If you had a working example somewhere that would really help.

At any rate, the Qty’s for “bundle” products work as such. There is always at Qty box displayed for the entire bundle product (the base/parent product). For example, if the bundle product is a box of chocolates, that Qty box represents how many boxes the customer wants. The bundle option(s) for this product might be used to specify what type of chocolate the customer wants in their box. Using the checkbox option with User Defined Qty, it allows the customer to specify exactly how much of each chocolate they want in EACH box. Each of the chocolate choices are actually individual products in Magento.

Example Illustrated:

My Box of Chocolates
‘’Selections:’’
1 x Milk Bar
2 x Dark Bar
4 x White Bar

Now if I set the Qty to 2 x My Box of Chocolates, the order will be placed with:
2 x Milk Bar
4 x Dark Bar
8 x White Bar

There should be no Qty “syncing” needed. However, there is currently not way to set up dependency chains/rules based on option selections. For example, I cannot tell Magento if the customer picks 2 x Milk Bar they must also choose 2 x White Bar.

I hope this helps!

 
Magento Community Magento Community
Magento Community
Magento Community
 
chadjmorgan
Sr. Member
 
Avatar
Total Posts:  252
Joined:  2010-06-04
Michigan
 

thanks for your reply kable!  I will send you a link to my example.  It is a bit confusing!  I forgot to tell you I am bundling a configurable product (the tshirt) and two simple products with custom options (embroidery and lettering).  Your example is exactly what I need to do, however it does not work that way for some reason.  Im sending you a PM with my link

kabel - 10 September 2010 09:07 AM

@chadjmorgan:

I’m confused by your example. It sounds like you are talking about a “simple” product (shirt) with some “custom options” for selecting what kind of extras that customer wants. Shirt customization are probably not best represented using bundled products. Bundles are used to sell multiple simple/virtual products as one item. That is probably not what you are trying to explain. If you had a working example somewhere that would really help.

At any rate, the Qty’s for “bundle” products work as such. There is always at Qty box displayed for the entire bundle product (the base/parent product). For example, if the bundle product is a box of chocolates, that Qty box represents how many boxes the customer wants. The bundle option(s) for this product might be used to specify what type of chocolate the customer wants in their box. Using the checkbox option with User Defined Qty, it allows the customer to specify exactly how much of each chocolate they want in EACH box. Each of the chocolate choices are actually individual products in Magento.

Example Illustrated:

My Box of Chocolates
‘’Selections:’’
1 x Milk Bar
2 x Dark Bar
4 x White Bar

Now if I set the Qty to 2 x My Box of Chocolates, the order will be placed with:
2 x Milk Bar
4 x Dark Bar
8 x White Bar

There should be no Qty “syncing” needed. However, there is currently not way to set up dependency chains/rules based on option selections. For example, I cannot tell Magento if the customer picks 2 x Milk Bar they must also choose 2 x White Bar.

I hope this helps!

 Signature 

Check out my extensions!

[Custom Stock Status And More!] [Pre-Select Colors Plus Swatches]

View All CJM Extensions

 
Magento Community Magento Community
Magento Community
Magento Community
 
haveluggage
Jr. Member
 
Total Posts:  1
Joined:  2010-09-12
 

Im getting an error too!!!

with an Undefined index:  bundle_option in Sales/Quote.php

 
Magento Community Magento Community
Magento Community
Magento Community
 
kabel
Member
 
Avatar
Total Posts:  67
Joined:  2008-04-07
UNL, Lincoln, NE
 

@haveluggage:

Sorry to hear that your install is generating the notice you mentioned.

Without more information about what is causing this problem, I cannot really provide you a possible solution. I will mention that Sales/Quote.php is NOT rewritten by this module, so any errors generated by that file are probably due to some other module you have installed OR an issue with the Magento Cache.

As recommended by Magento, I would clear the entire cache storage (var/cache/*) to ensure your install is pulling the most up to date configuration and code base. If you are still having this issue, try removing all of the files from my extension and confirming that everything still works. If not, you should be able to do some other debugging to figure out what files are causing the issue.

 
Magento Community Magento Community
Magento Community
Magento Community
 
frankjos
Jr. Member
 
Total Posts:  7
Joined:  2010-05-20
 

Does anyone know how to change the default value for “User Defined Quantity” from “Yes” to “No”?

 
Magento Community Magento Community
Magento Community
Magento Community
 
kabel
Member
 
Avatar
Total Posts:  67
Joined:  2008-04-07
UNL, Lincoln, NE
 

@vkjosh:

The “Yes” value is selected by default because browsers will selection the first option of a dropdown if no option is explicitly selected. You can try to edit this default behavior with JS. The file I’d recommend editing to accomplish that is selection.phtml (from the adminhtml theme). Look for the addRow JS function. It may be able to help you choose “No” by default if data.selection_can_change_qty is undefined.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Philster53142
Member
 
Total Posts:  67
Joined:  2009-10-03
 

Now if only we can get rid of the check-box altogether and just have the quantity field by itself. That would be cool.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kabel
Member
 
Avatar
Total Posts:  67
Joined:  2008-04-07
UNL, Lincoln, NE
 

@Philster53142: And just assume that if the Qty field is blank (or invalid), don’t add it to the cart? I bet that could be accomplished (using my code as a launching point).

 
Magento Community Magento Community
Magento Community
Magento Community
 
Philster53142
Member
 
Total Posts:  67
Joined:  2009-10-03
 

Does anyone know how to get rid of the QTY field at the bottom for bundle products only?

For example,

Bath Towels (Beige) qty 2
Hand Towels (White) qty 4
Wash Cloths (Burgundy) qty 6

Wouldn’t it seem silly then to ask how many of those quantities they want? like this…

QTY ___ [Add to Cart]

That just seems odd that you can’t deactivate the main quantity field. I know that Group Products don’t have a final or total quantity… but I need to use Bundle Products for custom options.

So how to deactivate or hide the final or total quantity for Bundles?

Any help is greatly appreciated.

oh… and here is all that exists in “addtocart.phtml” however I’m no programmer and don’t know how to make it look for a “bundle” and if bundle don’t show quantity field.

<?php $_product = $this->getProduct() ?>

<?php if($_product->isSaleable()): ?>
<fieldset class="add-to-cart">
<legend><?php echo $this->__('Add Items to Cart') ?></legend>
<?php if(!$_product->isGrouped()): ?>
<label for="qty"><?php echo $this->__('QTY') ?>:</label>
<input type="text" class="input-text qty” name="qty" id="qty" maxlength="12" value="<?php echo $this->getMinimalQty($_product) ?>” />
<?php endif; ?>
<button class="button" onclick="productAddToCartForm.submit()"><span><?php echo $this->__('Add to Shopping Bag') ?></span></button>
</fieldset>
<?php endif; ?>

 
Magento Community Magento Community
Magento Community
Magento Community
 
kabel
Member
 
Avatar
Total Posts:  67
Joined:  2008-04-07
UNL, Lincoln, NE
 

@Philster53142: If you don’t want it there for any bundle items, just take it out of the addtocart template (/app/design/frontend/base/default/template/catalog/product/view/addtocart.phtml) by putting in some kind of IF ($product->getType == ‘bundle’) ...

However, the overall QTY ___ [Add to Cart] is intended to multiply all of the selections by the final Qty. This is especially handy if your base item (the actual bundle item) has a base price or in some other cases.

 
Magento Community Magento Community
Magento Community
Magento Community
 
nihifire
Jr. Member
 
Total Posts:  9
Joined:  2008-12-17
 

Hi!

In reference of Post: #26 the single price in checkout is calculated wrong and I`d like to know how to correct this, because paypal use this single price to calculate the total price and the transmission is faulty.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top