Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Attribute Problem


hailstormxp

Recommended Posts

OK I have the following problems and was hoping someone may be able shed some light on it.

 

In Product Attributes if I edit a Option Value then I end up with duplicate values under the same ID. If I delete 1 it deletes both.

 

This also has the knock on effect of setting the Option Name for another random Option Value to blank. If I then correct this it then changes another to blank. If I then try to correct this then it remain blank no matter how many times I try to update the value. The only way to fix it is to delete it altogether and create a new one.

 

The store I'm working on has to go live within the next 4 days! This will cause havoc if we need to enter new products.

 

Please help :?

Link to comment
Share on other sites

  • 2 weeks later...

How can I fix it without upgrading the entire package!? what files have been changed in order to make it work? can I just replace the products_attributes.php page in the admin? What was the problem exactly? All the info you can give me is helpful - thanks for replying (need to get this squared away ASAP)

Link to comment
Share on other sites

I appreciate you pointing me in the right direction, but I do not understand how scripting changes to the update command will help to display the data correctly? If that code would help, then I would be able to just switch out the new products_attributes.php page with the old one, but when I do, nothing is fixed. What is the root of this issue?

Link to comment
Share on other sites

I appreciate you pointing me in the right direction, but I do not understand how scripting changes to the update command will help to display the data correctly? If that code would help, then I would be able to just switch out the new products_attributes.php page with the old one, but when I do, nothing is fixed. What is the root of this issue?

 

Actually, you just need that one line of code to fix the bug.

 

The current products_attributes.php does not match your existing code.

 

You just want that one bug fix for the Options Values so that they do not continue to break any longer.

 

Changing the single line of code under:

 

case 'update_value': from

        tep_db_query("update " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " set products_options_id = '" . $HTTP_POST_VARS['option_id'] . "', products_options_values_id = '" . $HTTP_POST_VARS['value_id'] . "'  where products_options_values_to_products_options_id = '" . $HTTP_POST_VARS['value_id'] . "'");

 

To read:

tep_db_query("update " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " set products_options_id = '" . (int)$option_id . "'  where products_options_values_id = '" . (int)$value_id . "'");

 

Will fix this bug.

 

Be sure to do a backup before applying the change.

Link to comment
Share on other sites

  • 10 months later...

I am having a similar problem using Shoppe Enhancement Controller

v2.2 for osCommerce MS2 with Credit Class and Gift Voucher which already has this fix.

 

When adding option values I sometimes get two option values added but one of them will be assigned to a different option (both with the same ID and option value name) If I delete one they are both deleted.

 

i.e. I add color Red under Thread Color -- the program displays

 

27 Thread Color Red

27 Closure Red

 

Also, this is not a consistent problem -- seems to occur at random.

 

Thanks for any help :)

 

Maureen

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...