@rknabe - You are right. I had the same problem, I think DunWeb missed a few things. I had to download v2 of option types and look at their versions to compare.
In the includes/classes/shopping_cart.php make the following changes:
//BOF - Zappo - Option Types v2 - Check options loop, and add attributes accordingly...
$attr_value = NULL;
$blank_value = FALSE;
if (strstr($option, TEXT_PREFIX)) { //Check for Text and Upload Options
if (trim($value) == NULL) { //Check if the Text Option has a value (Or is the value blank?)
$blank_value = TRUE;
} else { //Value is valid and contains data --> Add Text Option value
$option = str_replace(TEXT_PREFIX,'',$option);
$attr_value = htmlspecialchars(stripslashes($value), ENT_QUOTES);
$value = OPTIONS_VALUE_TEXT_ID;
$this->contents[$products_id_string]['attributes_values'][$option] = $attr_value;
}
}
if (!$blank_value) { // If the Value is valid and Contains Data, add the option to the Cart....
$this->contents[$products_id_string]['attributes'][$option] = $value;
// insert into database
// - Zappo - Option Types v2 - Added products_options_value_text For saving Text and Upload Option Values
if (tep_session_is_registered('customer_id')) tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " (customers_id, products_id, products_options_id, products_options_value_id, products_options_value_text) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id_string) . "', '" . $option . "', '" . (int)$value . "', '" . tep_db_input($attr_value) . "')");
}
//EOF - Zappo - Option Types v2 - Check options loop, and add attributes accordingly...
Comment out line 175-184:
/* if (is_array($attributes)) {
reset($attributes);
while (list($option, $value) = each($attributes)) {
if (!is_numeric($option) || !is_numeric($value)) {
$attributes_pass_check = false;
break;
}
}
}
*/
Find around lines 193-195:
$this->contents[$products_id_string]['attributes'][$option] = $value;
// update database
if (tep_session_is_registered('customer_id')) tep_db_query("update " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " set products_options_value_id = '" . (int)$value . "' where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id_string) . "' and products_options_id = '" . (int)$option . "'");
Replace it with:
//BOF - Zappo - Option Types v2 - Check options loop for Text & Uploads, and add attributes accordingly...
$attr_value = NULL;
$blank_value = FALSE;
if (strstr($option, TEXT_PREFIX)) { //Check for Text and Upload Options
if (trim($value) == NULL) { //Check if the Text Option has a value (Or is the value blank?)
$blank_value = TRUE;
} else { //Value is valid and contains data --> Prepare for database
$option = str_replace(TEXT_PREFIX,'',$option);
$attr_value = htmlspecialchars(stripslashes($value), ENT_QUOTES);
$value = OPTIONS_VALUE_TEXT_ID;
$this->contents[$products_id_string]['attributes_values'][$option] = $attr_value;
}
}
if (!$blank_value) {
$this->contents[$products_id_string]['attributes'][$option] = $value;
// update database
if (tep_session_is_registered('customer_id')) tep_db_query("update " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " set products_options_value_id = '" . (int)$value . "', products_options_value_text = '" . tep_db_input($attr_value) . "' where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id) . "' and products_options_id = '" . (int)$option . "'");
}
//EOF - Zappo - Option Types v2 - Check options loop for Text & Uploads, and add attributes accordingly...
Find around line 356:
global $customer_id;
Add below it:
//BOF - Zappo - Option Types v2 - ONE LINE - Add call to tep_get_uprid to correctly format product ids containing quotes
$products_id = tep_get_uprid($products_id, $attributes);
Find around line 378:
'image' => $products['products_image'],
Add below it:
'attributes_values' => (isset($this->contents[$products_id]['attributes_values']) ? $this->contents[$products_id]['attributes_values'] : ''),
Hope that helps. Share if you find something else that needs modifying! :-)