Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Bundled Products - Bugfix


pmoule

Recommended Posts

Hi,

 

I am using "Bundled Products" (Version: Yet_another_bundles_addition-bugfix) with Firefox 1.06.

When adding a subproduct to a new/existing bundle by selecting it from the selectbox the product's name is not displayed in the input field above. Instead of that 'undefined' is displayed. The problem is the invalid 'name'-attribute in the option tag. I changed this to 'title'.

 

Solution:

change the following lines in /catalog/admin/categories.php

 

original:

01 function fillCodes() {
02  for (var n=0;n<6;n++) {
03    var this_subproduct_id = eval("document.new_product.subproduct_" + n + "_id")
04    var this_subproduct_name = eval("document.new_product.subproduct_" + n + "_name")
05    var this_subproduct_qty = eval("document.new_product.subproduct_" + n + "_qty")
06    if (this_subproduct_id.value == "") {
07      this_subproduct_id.value = document.new_product.subproduct_selector.value
08      this_subproduct_qty.value = "1"
09      var name = document.new_product.subproduct_selector[document.new_product.subproduct_selector.selectedIndex].name
10        this_subproduct_name.value = name
11        document.returnValue = true;
12        return true;
13    } 
14  }
15 }

 

new:

09      var name = document.new_product.subproduct_selector[document.new_product.subproduct_selector.selectedIndex].title

 

and a few lines below

 

original:

01 while($products_values = tep_db_fetch_array($products)) {
02      echo "\n" . '<option name="' . $products_values['products_name'] . '" value="' . $products_values['products_id'] . '">' . $products_values['products_name'] . " (" . $products_values['products_id'] . ')</option>';
03    }

 

new:

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

 

Best regards,

Patrick

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