Jump to content
Sign in to follow this  
lildog

Bundled Products

Recommended Posts

This is the thread for the bundled products contribution. This is a very useful mod but the installation instructions are barely legible. I am currently fixing the install docs, I don't think there will be any code changes just cleaning up the code to start with.

 

lildog

Share this post


Link to post
Share on other sites

Hi, my osC install is now giving the following error after installing bundled products:

1146 - Table 'commerce.TABLE_ADMINISTRATORS' doesn't exist

 

select id from TABLE_ADMINISTRATORS limit 1

 

[TEP STOP]

 

my table for my admin login is the default for osC which is "administrators" and nothing has been changed other than copying your files over and updating the tables as designated in your directions.

 

How do I fix this?

Thanks,

Sue

 

update - I found the error. somehow, the "administrators" syntax got replaced with the uppercase reference. and i am now able to get into my admin panel again.

Edited by prazim

Share this post


Link to post
Share on other sites

Is there someplace where we can view an example as to how to edit a product to include it in a bundle? I am not seeing a drop down from which to select products to add to the bundle.

 

Thanks,

Sue

Share this post


Link to post
Share on other sites

Got it installed and it is going to save me a lot of work - much thanks. Everything looks like it is working fine.

 

When you click on the product image in the shopping cart (to take you back the the bundled product after it is in the cart you get this:

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{31}126{7}58 and language_id = '1'' at line 7

 

SELECT pd.products_name, pb.*, p.products_bundle, p.products_id, p.products_price, p.products_image FROM products p INNER JOIN products_description pd ON p.products_id=pd.products_id INNER JOIN products_bundles pb ON pb.subproduct_id=pd.products_id WHERE pb.bundle_id = 514{31}126{7}58 and language_id = '1'

 

[TEP STOP]

 

This product contains the following items:

 

Looks to me like it this part " 514{31}126{7}58 " that is added to the end of the url (which is because of the added attributes I assume) messes it up. The regular URL for the bundled product works fine and looks like this: /test-p-514.html

but the cart makes the URL like this: product_info.php?products_id=514{31}126{7}58 which gives the error

 

Other items in the cart that are not bundled products still work fine with the same URL type such as this: /product_info.php?products_id=480{7}58{55}167{56}170

 

This appears to be a simple fix if I knew what I was doing - please help.

Thanks

Randy

Share this post


Link to post
Share on other sites
Hi, my osC install is now giving the following error after installing bundled products:

1146 - Table 'commerce.TABLE_ADMINISTRATORS' doesn't exist

 

select id from TABLE_ADMINISTRATORS limit 1

 

[TEP STOP]

 

my table for my admin login is the default for osC which is "administrators" and nothing has been changed other than copying your files over and updating the tables as designated in your directions.

 

How do I fix this?

Thanks,

Sue

 

update - I found the error. somehow, the "administrators" syntax got replaced with the uppercase reference. and i am now able to get into my admin panel again.

 

I have the same error. It happened after I made the SQL changes. I went into the admin/login.php and changed all the TABLE_ADMINISTRATORS to TABLE_administrator and I got the same error but with lower case.

 

Is there a way to undo the SQL changes easily? Actually, it just might be easier to reinstall OSC again.

Share this post


Link to post
Share on other sites
Hi, my osC install is now giving the following error after installing bundled products:

1146 - Table 'commerce.TABLE_ADMINISTRATORS' doesn't exist

 

select id from TABLE_ADMINISTRATORS limit 1

 

[TEP STOP]

 

my table for my admin login is the default for osC which is "administrators" and nothing has been changed other than copying your files over and updating the tables as designated in your directions.

 

How do I fix this?

Thanks,

Sue

 

update - I found the error. somehow, the "administrators" syntax got replaced with the uppercase reference. and i am now able to get into my admin panel again.

 

I found the problem!

 

The file admin/includes/database_tables.php is missing the define('TABLE_ADMINISTRATORS', 'administrators');

 

lildog, can you add this to your contribution please?

Share this post


Link to post
Share on other sites

We need help modifying this contribution. Where do you set the bundled price discount at? As of right now it's why we aren't using module. We'd like to be able to control how much the customer gets off the bundle.

 

Any help or documentation will be greatly appreciated.

 

Thanks.

Share this post


Link to post
Share on other sites

I have this installed and am happy with it. However I want to add stock levels to attributes and need to install QT Pro V1.0 but there's some really big differences in the code where this contrib needs to affect the same thing as the other contribution.

 

Has anyone had any success with installing both of these?

Share this post


Link to post
Share on other sites
I have this installed and am happy with it. However I want to add stock levels to attributes and need to install QT Pro V1.0 but there's some really big differences in the code where this contrib needs to affect the same thing as the other contribution.

 

Has anyone had any success with installing both of these?

 

My store have install QTPro now, but how to install this module and make it can work with QTPro?

Please help to give some advice asap.

 

Thanks & Best Regards,

Sunrise

Share this post


Link to post
Share on other sites

this looks like a must have for shops that have a lot of items that can be bundled. My shop is a farm parts store and this would be real handy.

 

But after seeing that there appears to be some problems with the contribution and so very little support, I think for the time being I will manually create bundles and use cross sell.

Share this post


Link to post
Share on other sites
Same here :)

Just remove the screwup from Suhayb, Calculate Quantity and all is displayed perfectly:

 

Open catalog\includes\modules\product_listing.php

 

Find :

case 'PRODUCT_LIST_QUANTITY':

$lc_align = 'right';

$StockChecker = tep_get_products_stock($listing['products_id']);

$lc_text = TEXT_QUANTITY .' (' . $StockChecker .')';

break;

 

and Replace With :

case 'PRODUCT_LIST_QUANTITY':

$lc_align = 'right';

$lc_text = ' ' . $listing['products_quantity'] . ' ';

break;

 

 

And :

 

Find :

case 'PRODUCT_LIST_BUY_NOW':

$lc_align = 'center';

$StockChecker1 = tep_get_products_stock($listing['products_id']);

If ( $StockChecker1 <> 0){

$lc_text = (($listing['products_price'] > 0) ? '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ' : ' ');

}else{

$lc_text = tep_image_button('button_out_of_stock.gif', IMAGE_BUTTON_OUT_OF_STOCK) . ' ';

}

 

break;

 

Replace With :

 

case 'PRODUCT_LIST_BUY_NOW':

$lc_align = 'center';

$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';

break;

Share this post


Link to post
Share on other sites

I've been using the the bundling system and it works pretty great.

The way I've been doing it is by creating each item individually, then creating a new "item" with the bundle in it and changing the price of the new "item"

 

i.e.

 

1. Drum Shell Pack is an item you can buy individually

2. Hardware Pack "C" is an item you can buy individually

 

3. Drum Shell Pack with Hardware Pack "C" is an item you can buy with a special price.

 

My question is if someone clicks to buy both items individually, is there anyway that it would lower the price to the bundle price...or change what's in the cart to the bundled item??

 

Thanks

Share this post


Link to post
Share on other sites

Still love this add on contribution.

 

Does anyone know if this can be modified so that the buyer can tweak the amounts of the sub products within a bundle?

 

This would be very useful for bundles which are, for example,kits for building something, as opposed to ones which are just a way to get rid of cheaper stock and increase revenue...

 

I can do the modification to allow the qty field to be an editable text field, but i need to know the way to approach the back end (cart, stock, price change etc) aspect of it...

 

If anyone could suggest a possible method to tackle this, it would be greatly appreciated

 

 

Best regards

 

Bee


There are 10 types of people in this world, those who understand binary and those who don't...

Share this post


Link to post
Share on other sites

This is a great contribution and is working perfectly on my site, www.rc-bearings.com

 

One thing I noticed is that you need to set the bundled part as QTY 1 or the inventory doesn't work right.

 

One thing that needs to be added is to have all the products in a bundle show up in the Products Purchased report. Right now it only shows the kit as being sold. I would rather use this report to show me how many individual items are going out the door rather than the kits that are sold.

 

Any help with this?

Share this post


Link to post
Share on other sites

Hi all,

 

I use this contribution for more than 1 year and it is great.

 

But does someone find how to choose the slave products depending on the color chosen (attribute)?

 

Thanks a lot ;)

Share this post


Link to post
Share on other sites

Just wanted to say thanks for this great add-on! I had a bit of trouble (Step 18, I had to use the older version, even though I'm using v2.2).

 

I do have a question - I would really like to NOT have the "This product contains.... you save X amount" box. I've taken out the second section of Step 7 (in catalog/product_info.php after "<p><?php echo stripslashes($product_info['products_description']); ?></p>" ADD <!-- BOF Bundled Products-->...), and it seems to work fine so far.

 

Is there anything else I need to do? Just thought I'd confirm and through it up there for newbies like me :)

Share this post


Link to post
Share on other sites

Hi,

 

I have just installed this contribution which I have to say is great!

 

I am however having a problem with it, as if I setup a product as a bundle, add the consituent products to the bundle, save and close the product, everything appears fine. But when I go back and edit the Bundled Product, the bundle constituents are no longer listed in the bundle fields.

 

Also, is there a quick and easy way to change the fact that a bundle can have up to 6 constituent products to a potentially unlimited number of products. The reason for this in my case is I sell a complete package of a radio controlled model helicopter, which in itself can have probably a dozen or so constituent products in the bundle and also it would need to list things like, build, setup and number of hours flight training which are also included in the bundle.

 

Any comments or ideas would be greatfully received!

 

Regards,

Peter.

Share this post


Link to post
Share on other sites

Working!

 

except some bugs ¿?

 

In admin/categories.php

 

There is only 3 lines to add a product.

If you click on add a line, it added. Then you save the changes. But when you come again there is only 3 lines. If you added 4, 5 , 6 or more products these dont appear in the lines (but they appear right in catalog).

 

Is there any form to order the product list by name and not by products_id (they appear disordered).

 

ref:

      echo "\n" . '<option name="' . $products_values['products_id'] . '" value="' . $products_values['products_id'] . '">' . $products_values['products_id'] . ' - - - ' . $products_values['products_name'] . " (" . $products_values['products_model'] . ')</option>';

Share this post


Link to post
Share on other sites

On more thing:

 

in checkout_confirmation.php

ref:

		   } else if ($bundle_stock['products_quantity'] <= 0 && STOCK_ALLOW_CHECKOUT == true) {
	     echo '<br>Extra 2 days delivery for item ' . $bundle_stock['products_name'];
	   } 

 

What in the meaning of "Extra 2 days delivery for item"?????

 

Also some descriptions are white in the chackout_confirmation.php

 

ref:

Products (change)9

4x BUNDLE PROCESOR E1400 + MB ASUS P5K 556.00€

Extra 2 days delivery for item PROCESADOR INTEL CELERON E1400 2,0GHz [s775]

Extra 2 days delivery for item

Extra 2 days delivery for item

Share this post


Link to post
Share on other sites

semi-solved:

	     $bundle_stock_query = tep_db_query("SELECT pb.subproduct_id, p.products_quantity, pd.products_name from " . TABLE_PRODUCTS_BUNDLES . " pb LEFT JOIN products p on p.products_id=pb.subproduct_id LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id=pd.products_id where pb.bundle_id = '" . tep_get_prid($order->products[$i]['id']) . "' and pd.language_id = '1'");

 

pd.language_id = '1'

by default it tekas only one language.

 

 

'<br>Extra 2 days delivery for item '

Should be defined as . TEXT_EXTRA_TIME . on *language/checkout_confirmation.php

Share this post


Link to post
Share on other sites

new checkout_confirmation.php

 

changed to:

	   if ($bundle_status['products_bundle'] == "yes") {
     $bundle_stock_query = tep_db_query("SELECT pb.subproduct_id, p.products_quantity, pd.products_name from " . TABLE_PRODUCTS_BUNDLES . " pb LEFT JOIN products p on p.products_id=pb.subproduct_id LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id=pd.products_id where pb.bundle_id = '" . tep_get_prid($order->products[$i]['id']) . "' and pd.language_id = '" . (int)$languages_id . "'");
	 while ($bundle_stock = tep_db_fetch_array($bundle_stock_query)) {
	   if ($bundle_stock['products_quantity'] <= 0 && STOCK_ALLOW_CHECKOUT != true) {
	     echo '<br><b><font color="red">' . $bundle_stock['products_name'] . ' is out of stock</font></b>' ;
		 $any_out_of_stock = true;
	   } else if ($bundle_stock['products_quantity'] <= 0 && STOCK_ALLOW_CHECKOUT == true) {
	     echo '<br>' . $bundle_stock['products_name'] . '<br><font color="red">' . TEXT_EXTRA_TIME . '</font>' ;
	   } 
	 }

 

In includes/languages/*/checkout_confirmation.php

 

add

 

define('TEXT_EXTRA_TIME', '(Sin stock. 2 dias más para el envio)');

 

or

 

define('TEXT_EXTRA_TIME', '(No stock. Extra 2 days delivery.)');

Share this post


Link to post
Share on other sites

Hello,

 

I have just spent a little time looking through the code for bundled products. It would seem that the only reason the number of products that can be added to a bundle is 6 is because that is what has been hard coded, I found this code in catalog/admin/categories.php

 

I am still incidentially, having a problem where if I create or edit a product and set it up with other products as bundle products and exit, everything works fine. If I then go back in to the bundle product, the bundled products are no longer listed, which if I save and exit as it is, and then go into the product on the customer side, the product is no longer a bundle and has no bundled products. This means that each time I edit a bundled product I have to setup the bundle products again.

 

Having looked at the code again in catalog/admin/categories.php I can see there is a call to perform an SQL delete or an insert, but no select.

 

I would also like to suggest that the entry of the bundled products be more of a table form as the product attributes are at the bottom of the product_attributes.php this would enable people like me who need more than 6 products in various bundles to utilise this cntribution to the fullest.

 

I have already tested that the rest of the logic works, which it does fine, by manually adding around 12 or so products to the products_bundles table via an SQL insert into statement in MySql.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×