Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 11
Enable Quantity in Bundled Product with Checkbox
 
ameagher
Jr. Member
 
Total Posts:  25
Joined:  2008-10-28
 

Hi,

I’m trying to enable the quantity field for a bundled product with checkboxes.

I don’t understand why this is not enabled by default like the dropdown and option buttons?

I suspect the reason this has not been coded is that there are multiple selection options with the checkbox field, which makes tracking the quantities more difficult.

Anyway, still need to figure a way of doing this.

I’ve posted the correct checkbox code from /www/mywebsite.com/app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle/option

<?php $_option $this->getOption() ?>
<?php $_selections 
$_option->getSelections() ?>
<dt><label><?php echo $this->htmlEscape($_option->getTitle()) ?><?php if ($_option->getRequired()) echo '<span class="required">&nbsp;*</span>' ?></label></dt>
<
dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>>
<?php if (count($_selections) == && $_option->getRequired()): ?>
    <?php 
echo $this->getSelectionQtyTitlePrice($_selections[0]?>
    
<input type="hidden" name="bundle_option[<?php echo $_option->getId() ?>]" value="<?php echo $_selections[0]->getSelectionId() ?>" />
<?php else:?>
    
<ul class="options-list">
        
<?php foreach($_selections as $_selection): ?>
        
<li><input onclick="bundle.changeSelection(this)" class="checkbox bundle-option-<?php echo $_option->getId() ?> <?php echo $_option->getRequired() ? 'validate-one-required-by-name' : '' ?>" id="bundle-option-<?php echo $_option->getId() ?>-<?php echo $_selection->getSelectionId() ?>" type="checkbox" name="bundle_option[<?php echo $_option->getId() ?>][]"<?php echo ($_selection->getIsDefault() && $_selection->isSaleable())?' checked="checked" ':'' ?><?php echo !$_selection->isSaleable()?' disabled="disabled" ':'' ?> value="<?php echo $_selection->getSelectionId() ?>" />
            <
span class="label"><label for="bundle-option-<?php echo $_option->getId() ?>-<?php echo $_selection->getSelectionId() ?>"><?php echo $this->getSelectionQtyTitlePrice($_selection?></label></span>
            
<?php if($_option->getRequired()): ?>
                <?php 
echo $this->setValidationContainer('bundle-option-'.$_option->getId().'-'.$_selection->getSelectionId(), 'bundle-option-'.$_option->getId().'-container'?>
            <?php 
endif; ?>
        
</li>
    
<?php endforeach;?>
    
</ul>
    <
span id="bundle-option-<?php echo $_option->getId() ?>-container"></span>
<?php endif; ?>
</dd>

If someone has already done this or can explain what needs to be changed I would be very happy smile

Thanks,
Anthony

 
Magento Community Magento Community
Magento Community
Magento Community
 
Michae1
Enthusiast
 
Total Posts:  826
Joined:  2007-08-31
 

The main point was if I remember correctly that a plenty of input fields for quantities look a bit messy and a customer might be confused what should he put there.
If you can provide a screenshot or nice HTML of how you think it should look like we might consider adding this in future releases.

Thank you.

 
Magento Community Magento Community
Magento Community
Magento Community
 
nixsys
Jr. Member
 
Total Posts:  2
Joined:  2009-03-23
 

I also need this feature. Basically when you select the check box then you are allowed to change the qty of that line.

Please let me know if any one has done it.

Thank you

 
Magento Community Magento Community
Magento Community
Magento Community
 
chrisandy
Sr. Member
 
Total Posts:  92
Joined:  2007-10-17
 

Same thing needed here - can’t understand why it’s included for the other options but not for each check box - in fact there should be another option along with the drop downs and radio buttons to have a ‘user quantity’ option would be the way to go - surely it makes sense? I suppose doing this makes it a fine line between a bundled and a grouped product but you can’t create a grouped product that contains more than one group can you?

 
Magento Community Magento Community
Magento Community
Magento Community
 
G470
Jr. Member
 
Total Posts:  13
Joined:  2008-11-19
Köln
 

Anyone got a solution for this? I like to change the quantity on the checkbox option. When the customer adds a option he should be able to change the quantity of the this option.

 
Magento Community Magento Community
Magento Community
Magento Community
 
lemax
Guru
 
Total Posts:  318
Joined:  2008-04-03
Nantes, France
 

Hi,
Did you find a solution for this ?
Thanks
Max

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

If anyone is still interested in this topic. I went ahead an implemented the logic and the blank template for this issue. I won’t be putting it into an extension, however, if you would like a copy of the source files, you may reply or PM me.

Works great!

Image Attachments
Picture 1.pngPicture 2.png
 
Magento Community Magento Community
Magento Community
Magento Community
 
menschenchild
Jr. Member
 
Total Posts:  2
Joined:  2009-12-04
 

Hey smile

thats exactly what I’m looking for. Would you be so kind to send me the source code with a short advise how to integrate.

Thank you in advance

menschenchild

 
Magento Community Magento Community
Magento Community
Magento Community
 
mgrandio
Jr. Member
 
Total Posts:  20
Joined:  2009-05-12
 

Would you please send me your code, i need to do something very similar in what you are doing

Thanks

Manuel

 
Magento Community Magento Community
Magento Community
Magento Community
 
iboxsecuritydotnet
Jr. Member
 
Total Posts:  18
Joined:  2009-01-03
 

Any chance of seeing this code for the checkboxes?

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

There has been some general interest in doing this, so I have wrapped the code in a module and shared it via [EDIT (updated on 2010-10-28)] Google Docs https://docs.google.com/leaf?id=0B3vwOF6cNaa6YTlhZGI1NDYtODg1ZC00Zjc3LWEwYzYtNDczZDYxYTdiNzI1&hl;=en&authkey;=CJihvukO [/EDIT] grin

== INSTALL NOTES ==
The extension is constructed under the assumption that your are using the the “Default” > “Blank” theme. So if you are using a different theme, you will need to copy the skin/template files to the proper theme location. Also the CSS included is just a snippet from the blank theme’s styles.css file. The layouts DO NOT include the extra.css file, so you will either need to copy the contents of that file to a CSS file that is included or add it to a layout file. The CSS is unverified in IE and may need some adjustments to work completely with any other theme.

 
Magento Community Magento Community
Magento Community
Magento Community
 
iboxsecuritydotnet
Jr. Member
 
Total Posts:  18
Joined:  2009-01-03
 

Just adding to my system now - the checkboxes are set as disabled? Any reason for this? Does it have any admin interface at all? Great job on the code!

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

It uses the normal admin interface for adding “Bundle” products. Simply log into your admin panle (Ex: <http://url.toyourstore.com/admin>), and go to Catalog > Manage Products.

From their you can Add or Edit an existing Bundle. Once you have the product open, click the “Bundle Items” tab under Product Information; this is where you can add/edit bundle groups. For this extension, only bundle groups with Input Type = “Checkbox” have been modified. They show the User Defined Qty column now, which allows you to select whether or not a Qty box will be displayed next to the listed bundle item. That Qty box allows customers to override the Default Qty setting for the bundle item. As a functional implementation, the Qty input box will be disabled in the frontend until the user checks the box.

 
Magento Community Magento Community
Magento Community
Magento Community
 
iboxsecuritydotnet
Jr. Member
 
Total Posts:  18
Joined:  2009-01-03
 

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

 
Magento Community Magento Community
Magento Community
Magento Community
 
timjukes
Jr. Member
 
Total Posts:  8
Joined:  2009-12-10
 

This sounds great - I’m having some trouble getting this through Rapidshare - any chance someone could upload it here or PM me please? Wondering if this will work with adding a bundled item via the querystring including the quantities?

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

It has become clear that RapidShare is less reliable that it’s service should be. Thankfully Google Docs is now open to any uploads, so I have added a share at [EDIT (updated 2010-10-28)] https://docs.google.com/leaf?id=0B3vwOF6cNaa6YTlhZGI1NDYtODg1ZC00Zjc3LWEwYzYtNDczZDYxYTdiNzI1&hl;=en&authkey;=CJihvukO

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 11