Jump to content
lushlongboards

Bundled products

Recommended Posts

Thanks for your help, but i think, that i should wait an update of this contribution <_<

 

Because, i'm not very strong with php. And this contibution doesn't function perfectly.

 

chers

 

fred

Share this post


Link to post
Share on other sites

Hi,

 

Im wondering how many people got this contribution to work, Ive tried installing it twice with no luck. I never received any errors..it just didnt work.

 

Thanks,

KennethS


Kenneth S

--------------

Customer "Are you a real programmer?"

Me "No, but I did stay at a Holiday Inn Express last night"

Share this post


Link to post
Share on other sites

Hi Kenneth,

 

it is a little bit tricky - but after 4 attempts I finally have it all running effectively -

 

so far so good.

 

regards,

 

Maria

Share this post


Link to post
Share on other sites

im receing an SQL syntax error in products_info.php, "and language_id='1'". Someone earlier posted the exact same error I was having but no one over responded with a working resolution. Thanks for the uplifting post though heh.


Kenneth S

--------------

Customer "Are you a real programmer?"

Me "No, but I did stay at a Holiday Inn Express last night"

Share this post


Link to post
Share on other sites

Hi KennethS

 

what is the error exactly and when is it occuring ?

 

had a few of them myself so happy to help if I can.

 

Maria

Share this post


Link to post
Share on other sites

Ive already restored a backup of my code already but I can give you very close to the error. It was something like this:

 

1064 - SQL Query Syntax Error near 'language_id = "1".

 

Someone in the latter end of this thread was receiving the exact same error as me. It was in product_info.php in this code.

 

INNER JOIN products_bundles pb

 

ON pb.subproduct_id=pd.products_id

 

WHERE pb.bundle_id = " . tep_get_prid($products_id) . " and language_id = '" . (int)$languages_id . "'");

 

 

It was giving the error on that last line. If you happen to not see any errors could you post that block of code from your product_info.php file and Ill give it one more try before putting it on the back burner.

 

Thanks very much,

KennethS


Kenneth S

--------------

Customer "Are you a real programmer?"

Me "No, but I did stay at a Holiday Inn Express last night"

Share this post


Link to post
Share on other sites

Hi Kenneth

 

here is my code from products_info.php from lines 71 - new bit in red

 

} else {

    $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, p.products_bundle from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

    $product_info = tep_db_fetch_array($product_info_query);

 

and then the change at around line 120 - existing code in red

 

]<p><?php echo stripslashes($product_info['products_description']); ?></p><!-- start bundle -->

    <?php   

    if ($product_info['products_bundle'] == "yes") {

    $products_bundle = $product_info['products_bundle'];

    echo "This product contains the following items:";

  $bundle_query = tep_db_query(" SELECT pd.products_name, pb.*, p.products_bundle, p.products_id, p.products_price

          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 = " . tep_get_prid($products_id) . " and language_id = '" . (int)$languages_id . "'");

  while ($bundle_data = tep_db_fetch_array($bundle_query)) {

    if ($bundle_data['products_bundle'] == "yes") {

    // uncomment the following line to display subproduct qty

                              // echo "<br>» <b>" . $bundle_data['subproduct_qty'] . " x " . $bundle_data['products_name'] . "</b>";

    echo "<br>» <b> " . $bundle_data['products_name'] . "</b>";

    $bundle_query_nested = tep_db_query(" SELECT pd.products_name, pb.*, p.products_bundle, p.products_id, p.products_price

          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 = " . $bundle_data['products_id'] . " and language_id = '" . (int)$languages_id . "'");

    while ($bundle_data_nested = tep_db_fetch_array($bundle_query_nested)) {

          // uncomment the following line to display subproduct qty

                                    // echo "<br><i>     " . $bundle_data_nested['subproduct_qty'] . " x " . $bundle_data_nested['products_name'] . "</i>";

      echo "<br><i>     " . $bundle_data_nested['products_name'] . "</i>";

      $bundle_sum += $bundle_data_nested['products_price']*$bundle_data_nested['subproduct_qty'];

    }

    } else {

    // uncomment the following line to display subproduct qty

                              // echo "<br>» <b>" . $bundle_data['subproduct_qty'] . " x " . $bundle_data['products_name'] . "</b>";

    echo "<br>» <b> " . $bundle_data['products_name'] . "</b>";

    $bundle_sum += $bundle_data['products_price']*$bundle_data['subproduct_qty'];

    }

  }

  $bundle_saving = $bundle_sum - $product_info['products_price'];

  $bundle_sum = $currencies->display_price($bundle_sum, tep_get_tax_rate($product_info['products_tax_class_id']));

  $bundle_saving =  $currencies->display_price($bundle_saving, tep_get_tax_rate($product_info['products_tax_class_id']));

                  // comment out the following line to hide the "saving" text

  echo "<p><b>Cost of items if purchased separatley: " . $bundle_sum . '<br><font color="red">You save ' . $bundle_saving . '</font></b>';

    }

    ?>

<!-- end bundle -->

<?php

 

Really hope this helps a little

 

regards,

Maria

Share this post


Link to post
Share on other sites

Ill give this a shot before the end of the day hopefully, they came out with another update for phpbb and Ill be busy with that for a bit.

 

Thanks for the help,

Kenneth


Kenneth S

--------------

Customer "Are you a real programmer?"

Me "No, but I did stay at a Holiday Inn Express last night"

Share this post


Link to post
Share on other sites

Hello,

 

Ive had a chance to re-install it all, got the same error as before. Decided to try to bit of code from product_info.php and got pretty much the same error again.

 

This product contains the following items:1064 - You have an error in your SQL syntax near 'WHERE pb.bundle_id = and language_id = '1'' at line 6

SELECT pd.products_name, pb.*, p.products_bundle, p.products_id, p.products_price FROM products p INNER JOIN products_description pd ON p.products_id=pd.products_id INNER JOIN products_bundles pb WHERE pb.bundle_id = and language_id = '1'

[TEP STOP]

 

Its a very odd problem, I inserted your exact code incase your wondering what code I used in product_info.php. The rest of the code I pulled from the contribution file "install_bundles.txt". Thanks for all your help!

 

Kenneth


Kenneth S

--------------

Customer "Are you a real programmer?"

Me "No, but I did stay at a Holiday Inn Express last night"

Share this post


Link to post
Share on other sites

Ive finally got it working. There is an error Im guessing with the syntax of some lines. If anyone else is having the same error I was having just ask (But be warned I dont use the stock level part of the code) and i will post the code I changed.

 

Ive now hit the problem of Options/Attributes with the Bundle code. I have certain materials that have the option to be downloaded (Electronic Copy), and then an option for printed and sent to them (Hard Copy). However if I created bundles and they choose "Electronic Copies" they cannot download all of the internal parts of the bundle. Any solution to this other than zipping them all up?


Kenneth S

--------------

Customer "Are you a real programmer?"

Me "No, but I did stay at a Holiday Inn Express last night"

Share this post


Link to post
Share on other sites

Nevermind, It's still broken, the problem is arising from this bit of code:

 

WHERE pb.bundle_id = " . tep_get_prid($products_id) . " and language_id = '" . (int)$languages_id . "'");

 

If I delete these 2 lines (I dont use multilingual anyway) It works and even shows the products in a list etc.

But after closer examination and creating a second bundle it combines all of the subproducts. In other words both bundles contain the exact same thing, which is a combination of things added seperatly too each. Any help with this line would be appreciated.


Kenneth S

--------------

Customer "Are you a real programmer?"

Me "No, but I did stay at a Holiday Inn Express last night"

Share this post


Link to post
Share on other sites

OKay I've reviewed thsi thread and havent found answers to 2 issues I have.

 

1) In Admin - if I set it to "yes" and put some products to bundle with and hit preview/update. ONLY the yes gets saved, if i go back to edit the product, the bundles prod's are not there any more.

 

2) in checkout_confirmatoin.php where it shows "Products [edit]" I have this error:

 

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 '' at line 1

 

SELECT products_bundle FROM products where products_id =

 

Any help is appreciated.

 

jacob

Share this post


Link to post
Share on other sites

Can someone shed some ligth on this little problem.

 

I create a bundle and add 4 items to it, but when i view the product it only shows the first 3 items. I tried many bundles and it only shows the first 3 items in it in the list on the site.

 

Thanks

Share this post


Link to post
Share on other sites

Hi Jacob,

 

I was installing this contribution yesterday and had a hard time getting it to work. I encountered the same errors that everyone was getting, but after looking at the installation files and the codes, I have found the fix to both of your problems.

 

(1) In admin\categories.php

 

ORIGINAL INSTALLATION INSTRUCTIONS:

add the following code

   // update bundle contents
   if ($HTTP_POST_VARS['products_bundle'] = "yes") {
     tep_db_query("DELETE FROM products_bundles WHERE bundle_id = '" . $products_id . "'");
	 
     for ($i=0, $n=6; $i<$n; $i++) {
    if (isset($HTTP_POST_VARS['subproduct_' . $i . '_qty']) && $HTTP_POST_VARS['subproduct_' . $i . '_qty'] > 0) {
   tep_db_query("INSERT INTO products_bundles (bundle_id, subproduct_id, subproduct_qty) VALUES ('" . $products_id . "', '" . $HTTP_POST_VARS['subproduct_' . $i . '_id'] . "', '" . $HTTP_POST_VARS['subproduct_' . $i . '_qty'] . "')");
    }
	 }
   }

after

           tep_db_perform(TABLE_PRODUCTS, $sql_data_array);
           $products_id = tep_db_insert_id();

 

THIS SHOULD BE CHANGED TO:

add the following code
                                 
              }
   // update bundle contents
   if ($HTTP_POST_VARS['products_bundle'] = "yes") {
     tep_db_query("DELETE FROM products_bundles WHERE bundle_id = '" . $products_id . "'");
	 
     for ($i=0, $n=6; $i<$n; $i++) {
    if (isset($HTTP_POST_VARS['subproduct_' . $i . '_qty']) && $HTTP_POST_VARS['subproduct_' . $i . '_qty'] > 0) {
   tep_db_query("INSERT INTO products_bundles (bundle_id, subproduct_id, subproduct_qty) VALUES ('" . $products_id . "', '" . $HTTP_POST_VARS['subproduct_' . $i . '_id'] . "', '" . $HTTP_POST_VARS['subproduct_' . $i . '_qty'] . "')");

	 }
   }

after

           tep_db_perform(TABLE_PRODUCTS, $sql_data_array);
           $products_id = tep_db_insert_id();

 

If you look carefully, one of the "}" has been moved to the top. This will correct your first problem.

 

(2) Add the following change in catalog\includes\database_tables.php

 

FIND:

define('TABLE_PRODUCTS', 'products');

 

ADD the following after the above code:

define('TABLE_PRODUCTS_BUNDLES', 'products_bundles');

 

This should fix both of your problems. Best of Luck!

 

StrictlyPC

Share this post


Link to post
Share on other sites

I appreciate the help but when I now preview and hit update in admin I get the following error:

 

1062 - Duplicate entry '46-31' for key 1

 

insert into products_to_categories (products_id, categories_id) values ('46', '31')

 

[TEP STOP]

 

 

 

And the second problem still persists:

 

At checkout_confirmation I have this error where products should be listed:

 

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 '' at line 1

 

SELECT products_bundle FROM products where products_id =

 

[TEP STOP]

 

Any ideas? been at this for a week now, reviewing all the instructions again and again but seems like I did it all right.

 

Jacob

Share this post


Link to post
Share on other sites

I've just read this thread to date, and don't see any answer

to the problem I'm having, so I wonder if anyone might know...

 

I installed this mod and got it working fine, no errors or anything.

 

But then I installed another mod called Add Weight To Product Attributes.

 

Now that new mod is working beautifully, but this Bundle mod

no longer works. No error messages... it just won't hold anything.

Creating a bundle is the same as creating any other product.

 

If I put "yes" in its field, and add products to the bundle, they

don't show up. And all the bundles that were previous working

aren't working anymore.

 

The "Add Weight" mod makes changes to:

  • catalog\admin\includes\languages\english\products_attributes.php
  • catalog\admin\products_attributes.php
  • catalog\includes\classes\shopping_cart.php

(which you need to do manually by comparing them to the original

files with a diff program (I got ExamDiff from download.com).)

 

Anyway, the Bundle mod makes changes to:

  • catalog/admin/categories.php
  • catalog/product_info.php
  • catalog/checkout_process.php
  • catalog/checkout_confirmation.php

...so I don't see why one should affect the other.

 

Any ideas?

 

Please?

 

OZ

Share this post


Link to post
Share on other sites

strictlypc, thanks for your help.

 

But when you say, In admin\categories.php if you move "}" like your screencopy that fix the pb number 1:

 

1) In Admin - if I set it to "yes" and put some products to bundle with and hit preview/update. ONLY the yes gets saved, if i go back to edit the product, the bundles prod's are not there any more.

 

Im my case, it's not possible to acces a the menu categories of the admin and i ve got this error message:

 

Parse error: parse error, unexpected T_CASE in d:\web\easyphp1-7\www\catalog\admin\categories.php on line 440

 

 

 

my file admin\categories.php:

 

// update bundle contents
? ? if ($HTTP_POST_VARS['products_bundle'] = "yes") {
? ?tep_db_query("DELETE FROM products_bundles WHERE bundle_id = '" . $products_id . "'");
? ?
? ?for ($i=0, $n=6; $i<$n; $i++) {
?	if (isset($HTTP_POST_VARS['subproduct_' . $i . '_qty']) && $HTTP_POST_VARS['subproduct_' . $i . '_qty'] > 0) {
? ? tep_db_query("INSERT INTO products_bundles (bundle_id, subproduct_id, subproduct_qty) VALUES ('" . $products_id . "', '" . $HTTP_POST_VARS['subproduct_' . $i . '_id'] . "', '" . $HTTP_POST_VARS['subproduct_' . $i . '_qty'] . "')");
? ? 
? ? ?}
? ? ? }
? ? ? ? ? ?tep_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . (int)$products_id . "', '" . (int)$current_category_id . "')");
? ? ? ? ?} elseif ($action == 'update_product') {
? ? ? ? ? ?$update_sql_data = array('products_last_modified' => 'now()');

? ? ? ? ? ?$sql_data_array = array_merge($sql_data_array, $update_sql_data);

? ? ? ? ? ?tep_db_perform(TABLE_PRODUCTS, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "'");
? ? ? ? ?}

? ? ? ? ?$languages = tep_get_languages();
? ? ? ? ?for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
? ? ? ? ? ?$language_id = $languages[$i]['id'];

? ? ? ? ? ?$sql_data_array = array('products_name' => tep_db_prepare_input($HTTP_POST_VARS['products_name'][$language_id]),
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_description' => tep_db_prepare_input($HTTP_POST_VARS['products_description'][$language_id]),
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_url' => tep_db_prepare_input($HTTP_POST_VARS['products_url'][$language_id]),
? ? ? ?	'products_head_title_tag' => tep_db_prepare_input($HTTP_POST_VARS['products_head_title_tag'][$language_id]),
? ? ? ? ? ? ? ?'products_head_desc_tag' => tep_db_prepare_input($HTTP_POST_VARS['products_head_desc_tag'][$language_id]),
? ? ? ? ? ? ? ?'products_head_keywords_tag' => tep_db_prepare_input($HTTP_POST_VARS['products_head_keywords_tag'][$language_id]));

? ? ? ? ? ?if ($action == 'insert_product') {
? ? ? ? ? ? ?$insert_sql_data = array('products_id' => $products_id,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'language_id' => $language_id);

? ? ? ? ? ? ?$sql_data_array = array_merge($sql_data_array, $insert_sql_data);

? ? ? ? ? ? ?tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array);
? ? ? ? ? ?} elseif ($action == 'update_product') {
? ? ? ? ? ? ?tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "' and language_id = '" . (int)$language_id . "'");
? ? ? ? ? ?}
? ? ? ? ?}

? ? ? ? ?if (USE_CACHE == 'true') {
? ? ? ? ? ?tep_reset_cache_block('categories');
? ? ? ? ? ?tep_reset_cache_block('also_purchased');
? ? ? ? ?}

? ? ? ? ?tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products_id));
? ? ? ?}
? ? ? ?break;
? ? ?case 'copy_to_confirm':
? ? ? ?if (isset($HTTP_POST_VARS['products_id']) && isset($HTTP_POST_VARS['categories_id'])) {
? ? ? ? ?$products_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']);
? ? ? ? ?$categories_id = tep_db_prepare_input($HTTP_POST_VARS['categories_id']);

? ? ? ? ?if ($HTTP_POST_VARS['copy_as'] == 'link') {
? ? ? ? ? ?if ($categories_id != $current_category_id) {
? ? ? ? ? ? ?$check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$products_id . "' and categories_id = '" . (int)$categories_id . "'");
? ? ? ? ? ? ?$check = tep_db_fetch_array($check_query);
? ? ? ? ? ? ?if ($check['total'] < '1') {
? ? ? ? ? ? ? ?tep_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . (int)$products_id . "', '" . (int)$categories_id . "')");
? ? ? ? ? ? ?}
? ? ? ? ? ?} else {
? ? ? ? ? ? ?$messageStack->add_session(ERROR_CANNOT_LINK_TO_SAME_CATEGORY, 'error');
? ? ? ? ? ?}
? ? ? ? ?} elseif ($HTTP_POST_VARS['copy_as'] == 'duplicate') {
? ? ? ? ? ?//PRODUCT_SORT_ORDER ADDED TO THIS SELECT
? ? ? ? ? ? $product_query = tep_db_query("select products_quantity, products_model, products_image, products_image_med, products_image_lrg, products_image_sm_1, products_image_xl_1, products_image_sm_2, products_image_xl_2, products_image_sm_3, products_image_xl_3, products_image_sm_4, products_image_xl_4, products_image_sm_5, products_image_xl_5, products_image_sm_6, products_image_xl_6, products_price, products_date_added, products_date_available, products_weight, products_tax_class_id, manufacturers_id, products_sort_order from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");
? ?$product = tep_db_fetch_array($product_query);

?	//PRODUCT_SORT_ORDER ADDED TO THIS INSERT
? ? ? ? ? ?tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model, products_image, products_image_med, products_image_lrg, products_image_sm_1, products_image_xl_1, products_image_sm_2, products_image_xl_2, products_image_sm_3, products_image_xl_3, products_image_sm_4, products_image_xl_4, products_image_sm_5, products_image_xl_5, products_image_sm_6, products_image_xl_6, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id, products_sort_order) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_image_med']) . "', '" . tep_db_input($product['products_image_lrg']) . "', '" . tep_db_input($product['products_image_sm_1']) . "', '" . tep_db_input($product['products_image_xl_1']) . "', '" . tep_db_input($product['products_image_sm_2']) . "',
? ? ? ? ? ? '" . tep_db_input($product['products_image_xl_2']) . "', '" . tep_db_input($product['products_image_sm_3']) . "', '" . tep_db_input($product['products_image_xl_3']) . "', '" . tep_db_input($product['products_image_sm_4']) . "', '" . tep_db_input($product['products_image_xl_4']) . "', '" . tep_db_input($product['products_image_sm_5']) . "', '" . tep_db_input($product['products_image_xl_5']) . "', '" . tep_db_input($product['products_image_sm_6']) . "', '" . tep_db_input($product['products_image_xl_6']) . "', '" . tep_db_input($product['products_price']) . "', ?now(), '" . tep_db_input($product['products_date_available']) . "', '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "', '" . (int)$product['products_sort_order'] . "')");
?	$dup_products_id = tep_db_insert_id();

? ? ? ? ? ?$description_query = tep_db_query("select language_id, products_name, products_description, products_head_title_tag, products_head_desc_tag, products_head_keywords_tag, products_url from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$products_id . "'");
? ? ? ? ? ?while ($description = tep_db_fetch_array($description_query)) {
? ? ? ? ? ? ?tep_db_query("insert into " . TABLE_PRODUCTS_DESCRIPTION . " (products_id, language_id, products_name, products_description, products_head_title_tag, products_head_desc_tag, products_head_keywords_tag, products_url, products_viewed) values ('" . (int)$dup_products_id . "', '" . (int)$description['language_id'] . "', '" . tep_db_input($description['products_name']) . "', '" . tep_db_input($description['products_description']) . "', '" . tep_db_input($description['products_head_title_tag']) . "', '" . tep_db_input($description['products_head_desc_tag']) . "', '" . tep_db_input($description['products_head_keywords_tag']) . "', '" . tep_db_input($description['products_url']) . "', '0')");
? ? ? ? ? ?} ? ? 

? ? ? ? ? ?tep_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . (int)$dup_products_id . "', '" . (int)$categories_id . "')");
? ? ? ? ? ?$products_id = $dup_products_id;
? ? ? ? ?}

? ? ? ? ?if (USE_CACHE == 'true') {
? ? ? ? ? ?tep_reset_cache_block('categories');
? ? ? ? ? ?tep_reset_cache_block('also_purchased');
? ? ? ? ?}
? ? ? ?}

? ? ? ?tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $categories_id . '&pID=' . $products_id));
? ? ? ?break;
? ? ? ?

 

 

sorry for my english.

Edited by whaou

Share this post


Link to post
Share on other sites

Whaou,

 

It seems that you did not change it correctly.

 

THIS IS WHAT YOU HAVE:

// update bundle contents
   if ($HTTP_POST_VARS['products_bundle'] = "yes") {
  tep_db_query("DELETE FROM products_bundles WHERE bundle_id = '" . $products_id . "'");
  
  for ($i=0, $n=6; $i<$n; $i++) {
 if (isset($HTTP_POST_VARS['subproduct_' . $i . '_qty']) && $HTTP_POST_VARS['subproduct_' . $i . '_qty'] > 0) {
   tep_db_query("INSERT INTO products_bundles (bundle_id, subproduct_id, subproduct_qty) VALUES ('" . $products_id . "', '" . $HTTP_POST_VARS['subproduct_' . $i . '_id'] . "', '" . $HTTP_POST_VARS['subproduct_' . $i . '_qty'] . "')");
   
    }
     }

 

THIS IS WHAT IT SHOULD BE:

             }
  // update bundle contents
  if ($HTTP_POST_VARS['products_bundle'] = "yes") {
    tep_db_query("DELETE FROM products_bundles WHERE bundle_id = '" . $products_id . "'");
 
    for ($i=0, $n=6; $i<$n; $i++) {
   if (isset($HTTP_POST_VARS['subproduct_' . $i . '_qty']) && $HTTP_POST_VARS['subproduct_' . $i . '_qty'] > 0) {
  tep_db_query("INSERT INTO products_bundles (bundle_id, subproduct_id, subproduct_qty) VALUES ('" . $products_id . "', '" . $HTTP_POST_VARS['subproduct_' . $i . '_id'] . "', '" . $HTTP_POST_VARS['subproduct_' . $i . '_qty'] . "')");

 }
  }

 

Do you see the "}" on top of the "// update bundle contents"?

 

Jacob: I encouter the same error that you are getting and I tried everything that I could, but I finally gave up. It seems that this is a known bug and there hasn't been a fix to it yet.

 

StrictlyPC

Share this post


Link to post
Share on other sites

Maybe I'll try asking my question a different way.

 

When I use the bundle mod, what could be the reasons

it doesn't work? ...In other words, where should I look

to try and fix this thing? Can anyone point me to the

specific code involved?

 

I create a new bundle. I select "yes", and choose the

items in the drop-down lists to create the bundle.

Update, update.

 

But it doesn't register.

 

Can anyone help me out, and point me to the code

where this type of problem would occur?

 

Thanks.

 

OZ

Share this post


Link to post
Share on other sites

Thanks for your help strictlypc,

 

I did the correction, i didn't saw the " }" above

// update bundle contents

;)

 

 

But after the correction, when i do in my back office a preview of an item and an update, i saw the same error message that jhdesign:

 

1062 - Duplicata du champ '45-21' pour la clef 1

insert into products_to_categories (products_id, categories_id) values ('45', '21')

[TEP STOP]

 

:unsure: :(

Share this post


Link to post
Share on other sites

Okay. Well...

 

I figured out what was wrong with the bundles not working.

A simple line of code was missing. (Be sure to read the

instructions carefully... I missed it on the second install of

the mod.)

 

However...

 

I'm having a problem with the Bundles mod, relating

to downloads...

  • Product A is a hardcopy book
  • Product B is an eBook version
  • The bundle is both!

Obviously, Product A has a weight (.2 kg), and therefore

a shipping cost, based on the customer's zone.

Product B doesn't have a shipping cost.

 

Here's the problem:

 

When I bundle them, the bundle won't recognize the

weight from Product A. It won't even list a weight if I

give the BUNDLE a weight. It seems to ignore the

weight/shipping, because it's a download.

 

But I still need to charge shipping for the hardcopy book.

 

Is this a bug with this mod?

 

Or is there a work-around?

 

...Anyone? Please help if you can! Thanks!

 

OZ

who's desparately hoping someone's out there...?

Share this post


Link to post
Share on other sites

Hi whaou,

 

It seems that this "Duplicate" is a known problem. If you read the past post, there hasn't been a fix to this problem yet. As of today, I have uninstall this contribution and will wait this this problem is fixed before installing again.

 

StrictlyPC

Share this post


Link to post
Share on other sites

Hi,

I am using bundled products contribution. It's great!!! Thanks for all effort to write this mod. I think it would be more than great if individual bundled products can be added to the order after customer check out. I believe it would not require creating addition tables, it mabe as easy as what have done for print order, but i can't figure out how to do it. anyone can help me on this matter?

 

Thanks in advance!

Share this post


Link to post
Share on other sites

Hello, I am using the Bundled Products contribution. It works fine if you are creating a NEW product contribution made up from one or more other products. This works Great!!

 

My problem is that I have several hundred products that I have entered into the inventory of my store, that are really made up from 2 other products. At the time, I did not know about the bundled products and now I want to go back and turn these items into a bundled product for inventory purposes.

 

The issue is the contribution DOES NOT let you edit an existing product to BECOME a bundled product. Nor does it allow you to edit a bundled product once it has been created.

 

Anyone that has an answer for this....I would love to hear!! It seems that others are having similar problems, and I know that we are only a short time till one of us figures it out.

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

×