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

Enable Quantity in Bundled Product with Checkbox
 
kabel
Member
 
Avatar
Total Posts:  68
Joined:  2008-04-07
UNL, Lincoln, NE
 

@balexandre: Thanks for using my Bundle Module. Normally, there would certainly be a code update out for 1.5.0.1. However, looking at the extremely long list of outstanding, verified bugs that were again introduced in the 1.5 branch I am delaying my upgrades once again. v1.4.1.1 remain to be the most “stable” release in my opinion.

It is unfortunate that the Magento Team focuses so much on putting out “seemingly” unnecessary new features and service (it’s what happens when the VC’s demand return-on-investment). These new features take away from the core platform and usually result in MAJOR regressions once released. Suffice it to say, they are keeping me in business by continually adding complexity to the code base.

Ranting aside, I did get a copy of Tuxi’s proposed Type.php file for the 1.5 branch. I have skimmed through it, and while there may be a few things I’d adjust for coding standards/readability/optimization, it appears that it should bring expected functionality to the module. However, because Tuxi has adapted the PHP class name for his/her own module setup, it probably can’t just be dropped over my current distribution. If you are comfortable with your coding skills, you may review the file for yourself at https://docs.google.com/leaf?id=0B3vwOF6cNaa6OGI5Y2Q2YjQtMmQ4MS00Yzc0LWJkNDQtZTkwMzU0OTNiZjUw&hl;=en

Now to the real issue, looking at your report and the debugging steps you took, it would appear that you don’t quite have things installed correctly. That fatal error will only occur if the overridden Type.php is not being used. Please check your install locations and that the following is true when you run Magento:

Mage::getModel('bundle/product_type') instanceof Kabel_BundlePlus_Model_Bundle_Product_Type
 
Magento Community Magento Community
Magento Community
Magento Community
 
balexandre
Member
 
Avatar
Total Posts:  60
Joined:  2009-04-13
København, Danmark
 

Ahhh

That was a good trick smile

Found the bugger and fixed really quick (for the xml in the modules part, ehehe)

I was able to set everything up correctly and works super fine smile

and I will attempt to do the same in the 1.5.0.1 installation with this file, I will share my accomplishes.

Thank you once again.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Greg Demetrick
Member
 
Avatar
Total Posts:  64
Joined:  2009-03-31
Burlington, VT
 

Just wanted to say Thank You for this modification and let everyone know out there that this does work with EE 1.9.1. I was wondering if you had intended on wrapping this up as a normal module modification? Looking at the structure I tend to forget things like the Adminhtml changes that need ot happen especially when I upgrade. If this was all in one self contained module I have a feeling it would be easier to install and easier to maintain. Just a thought.

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

Hi Greg. I completely agree with you that the installation is a little cumbersome. For all intents and purposes, it is a self-contained module, however it does require some manual interaction to overcome some limitation of installing unobtrusive modules.

If you are referring to the Magento Connect module distribution channels, I choose not to distribute through there. Magento Connect is simply a wrapper around a PEAR/Pyrus server AND requires administrators to give the web application FULL write access to itself. I do not agree with this kind of deployment, so I don’t use it. Because I’m familiar with the code-base, I choose security over simplicity. smile

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

Hi - having some problems trying to work out how to get the right quantity when the customer edits their product from the cart.

I can get the default value set in the admin section with the following code placed in the foreach loop:

$_defaultQty $_selection->getSelectionQty()*1;

but this does not inherit the options the customer has chosen. I\’m a bit lost as to what else to try - any suggestions much appreciated!

ps - on a very limited test, the new version of type.php in an earlier post appears to be working well with v1.5.

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

Well folks, the time of putting off the upgrade to the 1.5 branch is over. There will be a new release of my module posted tomorrow that will bring all functionality to 1.5 and fix certain issues with using the new “edit from cart” feature.

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

[LAST UPDATED AT: 02/06/2013]

== Release Details ==
This release of the module KAbel_BundlePlus (0.2.1) brings the “user-defined” qty feature to checkbox bundle option selections for the 1.7 Magento branch. It is now supported to be installed through Magento Connect.

Version 0.2.2 brings support for admin created orders to use the composite product configuration to specify the option qty.
Version 0.2.3 fixes a couple of bugs when rendering selections on the frontend for certain configurations.

== Install Notes ==
The 0.2.1 version introduced support to be installed via Magento Connect. However, it can also be installed though normal file system access.
Previous versions can (and should) be safely removed, as usual, files have been reorganized.

If installing a previous version, follow the instructions listed at http://www.magentocommerce.com/boards/viewreply/204062/.

== Downloads ==
Available through the Magento Connect site at http://www.magentocommerce.com/magento-connect/catalog/product/view/id/13934/

Please note that this new version is NOT backwards compatible with previous versions, however, you may download an older version to make things work with the 1.4 or 1.5 branch. All previous download links still point to the old 1.4 version.

1.7 Branch Version - Update 2 (0.2.3): https://docs.google.com/file/d/0B3vwOF6cNaa6c0h6alpaN21KTjQ/edit?usp=sharing
1.7 Branch Version - Update 1 (0.2.2): https://docs.google.com/open?id=0B3vwOF6cNaa6RkVGVjh6S1Z5Q00
1.7 Branch Version (0.2.1): https://docs.google.com/open?id=0B3vwOF6cNaa6eU82ZG11c0c4aGc
1.5 Branch Version (0.2.0): https://docs.google.com/leaf?id=0B3vwOF6cNaa6ZTk2ZDM0MzktOTg3NC00YjA3LTlhMzItYzE5NzFjNzM2OTQ5&hl;=en
1.4 Branch Version (0.1.0): https://docs.google.com/leaf?id=0B3vwOF6cNaa6OGI5Y2Q2YjQtMmQ4MS00Yzc0LWJkNDQtZTkwMzU0OTNiZjUw&hl;=en

 
Magento Community Magento Community
Magento Community
Magento Community
 
chrisharper
Jr. Member
 
Total Posts:  5
Joined:  2011-04-30
 

What is \’mucip more information about this problem, I really cannot provide you a possible solution. By this module, the Sales/Quote., so this is not written in the php file that is created by another module installed or due to errors, probably a Magento cache issue.

 
Magento Community Magento Community
Magento Community
Magento Community
 
fantomas82
Jr. Member
 
Total Posts:  3
Joined:  2011-01-20
test
 

Hi kabel, nice module.

Do you have plans on bringing support for admin composite bundle product creation?

-fantomas

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

fantomas82: “composite bundle” products?  Do you mean bundle products with “configurable” product options. If so, then no, it is beyond the scope of this module to provide support for a new product type as the storage system for such a product would require significant code changes.

[EDIT]: Ah, I should have looked before posting. You must mean the new functionality in the Admin Panel to Create orders with composite (configurable, grouped, and bundled) products. New answer, yes. It can be assumed that this is a logic feature that is yet to be covered by this module. I’m not quite sure what priority it will be for me (or others), but I will certainly add it to my list of things to look into.

 
Magento Community Magento Community
Magento Community
Magento Community
 
fantomas82
Jr. Member
 
Total Posts:  3
Joined:  2011-01-20
test
 

Hi again,

i did some research and coding in this issue myself, because i need this functionality asap.

I thought that i could share what i have done to save your or maybe someone else’s time.

Note that this code is not tested thoroughly nor is the feature complete.

The files that need to be manipulated and overrided:
/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Checkbox.php and
/app/design/adminhtml/default/default/template/bundle/product/composite/fieldset/options/type/checkbox.phtml

In Checkbox.php add this function:

protected function _hasPreviousValue($selection)
    
{
        
if ($this->getProduct()->hasPreconfiguredValues()) {
            $selectedQty 
= (int)$this->getProduct()->getPreconfiguredValues()
                ->
getData('bundle_option_qty/' $this->getOption()->getId().'/'.$selection->getSelectionId());
            if (
$selectedQty 0{
                $selectedQty 
0;
            
}
        } 
else {
            $selectedQty 
0;
        
}
        
return $selectedQty;
    
}

And in checkbox.phtml add this input :

<input type="text" class="input-text qty"  name="bundle_option_qty[<?php echo $_option->getId() ?>][<?php echo $_selection->getSelectionId() ?>]" value="<?php if( ($previousValue = $this->_hasPreviousValue($_selection)) > 0 ){ echo $previousValue; }else{ echo $_selection->getSelectionQty()*1; } ?>"/>
after this input:
<input class="change-container-classname checkbox bundle-option-<?php echo $_option->getId() ?> <?php if ($_option->getRequired()) echo '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 if ($this->_isSelected($_selection)) echo ' checked="checked"' ?><?php if (!$_selection->isSaleable()) echo ' disabled="disabled"' ?> value="<?php echo $_selection->getSelectionId() ?>" onclick="ProductConfigure.bundleControl.changeSelection(this)" price="<?php echo $this->getSelectionPrice($_selection) ?>"/>

Now the basic functionality should be working. (Styling and other features not included : ) )

 
Magento Community Magento Community
Magento Community
Magento Community
 
traptrap
Jr. Member
 
Total Posts:  10
Joined:  2011-04-17
London
 

Thank you for the amazing Magento feature!

 
Magento Community Magento Community
Magento Community
Magento Community
 
bluepiper
Jr. Member
 
Total Posts:  1
Joined:  2011-03-13
 

Hi Kabel, Thanks for this feature. I was able to make it work in the front-end but had problems in the admin. Now all my created bundle options are no longer showing and whenever i click on Add Option, there is an error saying that ‘bOption is not defined’. I tried to reinstall it a couple of times but still the same problem. Maybe i’m missing something here. Hope you can help. Thanks. Im using Magento 1.5.0.1

 
Magento Community Magento Community
Magento Community
Magento Community
 
sajeena123
Member
 
Total Posts:  34
Joined:  2011-04-06
 

I would like to know the pathe where to install the files. Do i need to overwrite any files in magento package .
I would like to get a solution as early as possible .

 
Magento Community Magento Community
Magento Community
Magento Community
 
sajeena123
Member
 
Total Posts:  34
Joined:  2011-04-06
 

I tried to place the corresponding folder of KAbel_BundlePlus_0.1.0.tgz in to my magento folder. Bu the following error comes.

Fatal error: Call to a member function setConfig() on a non-object in F:\\Projects\\Samples\\magento\\includes\\src\\Mage_Catalog_Model_Product_Type.php on line 8

Any idea ?
Version 1.5+

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