Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

rknabe

Members
  • Content count

    1
  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
    Knabe
  • Gender
    Male
  1. rknabe

    [Contribution] Option Types v2

    I'm having the same issues as Dr_DK. I also tried to do the manual merge from the install.txt, as well as the dropping over the file package. Same problem, the new option type work except for the text and text area. I stepped through the php in a debugger and it looks like the add_cart method of /includes/classes/shopping_cart is where the problems start. The if block starting in line 12 ends up with attributes_pass_check as false, and that prevents the cart addition. Here's the code I pulled from the "drop in files" of the add on package. if (is_array($attributes) && !empty($attributes)) { reset($attributes); while (list($option, $value) = each($attributes)) { if (!is_numeric($option) || !is_numeric($value)) { $attributes_pass_check = false; break; } else { $check_query = tep_db_query("select products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "' and options_id = '" . (int)$option . "' and options_values_id = '" . (int)$value . "' limit 1"); if (tep_db_num_rows($check_query) < 1) { $attributes_pass_check = false; break; } } } } elseif (tep_has_product_attributes($products_id)) { $attributes_pass_check = false; } I tried bypassing that, but there are other problems through that method. Also, you get a different file depending on if you do the manual merge, or what is in the "drop in" folder.
×