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
 

sajeena123: I responded to your PM (but the email address you provided is invalid). Please review that and the rest of this thread for complete instructions.
Install notes are at http://www.magentocommerce.com/boards/viewreply/204062/
Latest Downloads are at http://www.magentocommerce.com/boards/viewreply/319760/

The contents of the .tgz file are meant to be installed at the root of your magento install.
HOWEVER: The design and skin files assume you have configured your store to use the “default/blank” theme. This is usually not the case for a standard install, so you will need to move the following folders/files to the proper location depending on the theme you are using.
The module was designed such that it doesn’t override any core files, but if you move the design files to a core folder, it will probably replace some core files.
Design/Skin files to move as necessary:
skin/default/blank (please note the contents of css/extra.css are not included anywhere, but simply serve as a style reference)
app/design/frontend/default/blank

bluepiper: This error might occur if you had some install issues with the adminhtml files. Please check the following files to make sure that are installed in the right place, and that Magento is registering the override correctly.

app/design/adminhtml/default/default/template/kabel/bundle/product/edit/bundle/option.phtml
If that file is correctly installed, you need to make sure the Magento block override is working by checking the result of this expression in PHP (somewhere in your app)
Mage::helper('core')->getLayout()->createBlock('bundle/adminhtml_catalog_product_edit_tab_bundle_option') instanceof KAbel_BundlePlus_Block_Adminhtml_Catalog_Product_Edit_Tab_Bundle_Option
 
Magento Community Magento Community
Magento Community
Magento Community
 
C44Supra
Jr. Member
 
Total Posts:  4
Joined:  2011-02-02
 

I’m getting the exact same error on my fresh install of Magento. I put all the files in their proper locations (checked, double checked and triple checked again) but as soon as i want to create or edit a bundle item in Magento’s admin an error is thrown and the following line is added to the php log

[03-Aug-2011 15:40:41] PHP Fatal error:  Call to a member function setConfig() on a non-object in /Applications/MAMP/htdocs/magento/includes/src/Mage_Catalog_Model_Product_Type.php on line 80

Trying to view a bundle item in the frontend itself produces a near empty page (just header and stuff) and the exact same error in my log.
Strangest thing is that i have it working on my mac at work, which does run an earlier version of Magento i think.

Edit:
I’ve been doing some further drilling, somehow it seems to be related to the config.xml for this module. More specifically the place where you have

<bundle>
                <
rewrite>
                    <
product_type>Kabel_BundlePlus_Model_Bundle_Product_Type</product_type>
                </
rewrite>
            </
bundle>

Without that bit of code it at least renders the frontend and admin part, i can’t however add products to the actual bundle itself.

The code that is also being written to the Mage.log is

2011-08-03T16:00:27+00:00 ERR (3): Warning: include(Kabel_BundlePlus_Model_Bundle_Product_Type.php[<a href='function.include'>function.include</a>]failed to open streamNo such file or directory  in /Applications/MAMP/htdocs/magento/includes/src/Varien_Autoload.php on line 93
2011
-08-03T16:00:27+00:00 ERR (3): Warning: include() [<a href='function.include'>function.include</a>]Failed opening 'Kabel_BundlePlus_Model_Bundle_Product_Type.php' for inclusion (include_path='/Applications/MAMP/htdocs/magento/includes/src:.:/Applications/MAMP/bin/php/php5.2.17/lib/php')  in /Applications/MAMP/htdocs/magento/includes/src/Varien_Autoload.php on line 93

Which basically says that it is looking for a php file instead of a php file in a certain path.

 
Magento Community Magento Community
Magento Community
Magento Community
 
C44Supra
Jr. Member
 
Total Posts:  4
Joined:  2011-02-02
 

And found a solution.

In admin go select System => Tools => Compilation and then “Run Compilation Process”.

I’ve seen this time and again and it still kind of baffles me as to why i have to do this to get most modules to work (properly or even at all).

In other words, put the files in the correct location and then run a compilation. If it works without having to run a compilation more power to you, otherwise this might be a solution to your problem.

 
Magento Community Magento Community
Magento Community
Magento Community
 
C44Supra
Jr. Member
 
Total Posts:  4
Joined:  2011-02-02
 

* doublepost *

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

Good to note C44Supra. Magento Compilation changes the entire way files are “auto-loaded” to improve performance. I don’t really see the value in it, but I guess it’s a nice feature to have.

That said, if you have installed new modules it is generally understood/required that you “recompile” to ensure that new classes are added to the compilation include path.

Of course all of the install instructions make the assumption that people are NOT using the Magento Compilation as it is not turned on by default and is NOT recommended to be used in production environments.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Rakesh Dsouza
Jr. Member
 
Total Posts:  21
Joined:  2011-01-09
 

Hi Kabel
I am using magento 1.5.1.0

I downloaded this
1.5 Branch Version (0.2.0): https://docs.google.com/leaf?id=0B3vwOF6cNaa6ZTk2ZDM0MzktOTg3NC00YjA3LTlhMzItYzE5NzFjNzM2OTQ5&hl;=en

I have uploaded all the files correctly, after loging into the admin pannel and edit/add a bundled product then go to
bundled items-> Add a new option -> Select input type as checkbox and click on Add selection nothing happens. While editing the existing product the selected items do not appear.

Error showing in IE:
Message: ‘bSelection’ is undefined
Line: 1
Char: 1
Code: 0
URI: http://your_domain.net/index.php/admin/catalog_product/edit/id/13/key/83cf8c86cc24d40bbfd93faa156e31f8/

---------

After a lot of checking i finally got it to work
it was the wrong file destinations. so now correctly showing in admin pannel

Now the problem is in frontend, i cannot see the qty field even after refreshing the cache several times next to the checkbox.

---------
Kindly help

Thanks
rakesh

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

@rakesh: I’m glad you figured out what was going on with your admin panel. For the frontend, as mentioned in the install notes, the package makes the assumption that you are using the default/blank frontend theme. If you are NOT using the blank theme, you need to move the file found at app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle/option/checkbox.phtml to the theme you are using.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ianc1
Jr. Member
 
Total Posts:  2
Joined:  2011-09-04
 

Hello Kabel,

I am currently trying to use this plugin on magento (version 1.5.0.1). The problem is when the product page is loaded the qty buttons are disabled and when clicking on the checkbox this does not affect the state of the qty box i.e it is still disabled.

Does anyone have a url that uses this plugin and is working so i could look at the code?

Or does anyone have any idea why this might be the case?

Thanks

Ian

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

@ianc1: The reason that functionality would not work on the frontend is if you didn’t have the

skin/default/blank/js/bundle.js
file properly installed in the proper location. It must be placed in the skin folder that matches the location of your current theme. So if you were using the default theme, it would need to be copied to
/path/to/magento/skin/default/default/js/bundle.js

There could be other JavaScript errors that are occurring, make sure you check the console.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ianc1
Jr. Member
 
Total Posts:  2
Joined:  2011-09-04
 

Hi Kabel,

We have the bundle.js folder in the following directory

skin/frontend/medical/default/js/bundle.js

\’medical\’ is the active theme, however on page load and every time a checkbox is clicked we get the following error

\’bundle is undefined\’, we have tried moving the order in which bundle.js is loaded and also turning off other javascript on the page.

Inspecting the page with firebug shows that the bundle.js file is loaded in correctly, we are using this version

https://docs.google.com/leaf?id=0B3vwOF6cNaa6ZTk2ZDM0MzktOTg3NC00YjA3LTlhMzItYzE5NzFjNzM2OTQ5&hl;=en

1. Do you have any ideas as to how to fix this?

2. Do you have a working copy of this so we can see the code?

3. Have you got time to look at this if we give you the site details privatley

Thanks for your help Kabel, looking at the code you have done this looks like a great plugin,

Ian

 
Magento Community Magento Community
Magento Community
Magento Community
 
Rakesh Dsouza
Jr. Member
 
Total Posts:  21
Joined:  2011-01-09
 

Hi Kabel

the file checkbox.phtml is in this location
app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option
not in the location that you have given

please give the correct location

Also give us the working site using your extension.

thanks
Rakesh

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

@Rakesh, yes, Magento’s core code comes with that template in the location you mention. In order to save people nightmare when it comes time to upgrade, I have designed my module such that it will not (by default) write over a core file. Thus you must choose where you’ll install it depending on the frontend theme you are using.

That said, again your issue appears to be that you have not installed the template in the correct location. Please review below for examples of where you need to move the file, if you are not using the default/blank theme, that is located in my module at

app/design/frontend/default/blank/template/bundle/catalog/product/view/type/bundle/option/checkbox.phtml

Example 1:
If you are using the Magento Default Theme (default/default), this tells the application to use this file instead of the one found in base/default. Copy file to

app/design/frontend/default/default/template/bundle/catalog/product/view/type/bundle/option/checkbox.phtml

Example 2:
If you are using your own custom theme (foobar/default), copy file to:

app/design/frontend/foobar/default/template/bundle/catalog/product/view/type/bundle/option/checkbox.phtml

Example 3:
If you want to override Magento’s default template (NOT UPGRADE SAFE) (base/default), copy file over the file found at:

app/design/frontend/base/default/template/bundle/catalog/product/view/type/bundle/option/checkbox.phtml
 
Magento Community Magento Community
Magento Community
Magento Community
 
jigmogroup
Jr. Member
 
Total Posts:  11
Joined:  2011-05-05
 

Let me just say you are the man. Works perfectly. Bravo good sir!

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

Thanks jigmogroup. There have been a few hiccups along the way, but I’m glad people are finding use in it. And maybe one of these days I’ll breakdown and actually put this into Magento Connect (I just hope it doesn’t change drastically again after x.commerce).

 
Magento Community Magento Community
Magento Community
Magento Community
 
chason70
Member
 
Total Posts:  67
Joined:  2008-05-24
 

Hi There,

I have installed your extension for Magento 1.5.1.0
When i will create a bundle product and push the button Add Button there is no action.

I see in firebug “bSelection is not defined”

Is there a fix??

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