Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Bundled Products


lildog

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

Link to comment
Share on other sites

  • 2 months later...
  • Replies 52
  • Created
  • Last Reply

Top Posters In This Topic

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
Link to comment
Share on other sites

  • 2 weeks later...
  • 5 weeks later...

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

Link to comment
Share on other sites

  • 4 weeks later...
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.

Link to comment
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?

Link to comment
Share on other sites

  • 4 weeks later...

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.

Link to comment
Share on other sites

  • 2 weeks later...

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?

Link to comment
Share on other sites

  • 2 weeks later...
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

Link to comment
Share on other sites

  • 3 weeks later...

I need HELP

 

After installing Bundled Products, when showing the product, it appears always THE OUT OF STOCK gif.

 

I do not know where could be the error, but now the shop is not opperative...

 

Any suggestion please

 

example http://www.coelvi.com/catalog/modulos-modu...rs-c-26_53.html

 

Thanks in advance I really needs you!

Link to comment
Share on other sites

  • 1 month later...
I need HELP

 

After installing Bundled Products, when showing the product, it appears always THE OUT OF STOCK gif.

 

I do not know where could be the error, but now the shop is not opperative...

 

Any suggestion please

 

example http://www.coelvi.com/catalog/modulos-modu...rs-c-26_53.html

 

Thanks in advance I really needs you!

 

Same here :)

Link to comment
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.

Link to comment
Share on other sites

  • 4 weeks later...
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;

Link to comment
Share on other sites

  • 1 month later...

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

Link to comment
Share on other sites

  • 3 weeks later...

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...

Link to comment
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?

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 months later...

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 :)

Link to comment
Share on other sites

  • 1 month later...

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.

Link to comment
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>';

Link to comment
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

Link to comment
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

Link to comment
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.)');

Link to comment
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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...