I had to modify classes/shopping cart.php
In two places code similar to:
Code:
$attribute_name = $db->Execute("select products_options_name
from ". TABLE_PRODUCTS_OPTIONS . "
where products_options_id = '" . (int)$option . "'");
$attribute_name->fields['products_options_name'];
if ($attribute_name->fields['products_options_name'] == 'Value: $')
{
$text_val = $this->contents[$products_id]['attributes_values'][$attribute_price->fields['options_id']];
$attributes_price += $text_val;
}
and
Code:
$attribute_name = $db->Execute("select products_options_name
from ". TABLE_PRODUCTS_OPTIONS . "
where products_options_id = '". $attribute_price->fields['options_id']. "'" );
$attribute_name->fields['products_options_name'];
if ($attribute_name->fields['products_options_name'] == 'Value: $')
{
$text_val = $this->contents[$products_id]['attributes_values'][$attribute_price->fields['options_id']];
$this->total += $qty * zen_add_tax($text_val, $products_tax);
}
I also had to modify modules/attributes to check the input:
Code:
$tmp_html = '<input type="text" name="id[' . TEXT_PREFIX . $products_options_names->fields['products_options_id'] . ']" size="' . $products_options_names->fields['products_options_size'] .'" maxlength="' . $products_options_names->fields['products_options_length'] . '" value="' . htmlspecialchars($tmp_value) .'" id="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '-' . $products_options_value_id . '" onchange="if (\''.$products_options_names->fields['products_options_name'].'\' == \'Value\' && !parseInt(document.all[\'id[' . TEXT_PREFIX . $products_options_names->fields['products_options_id'] . ']\'].value)) { alert(\'Enter a valid value, please.\');document.all[\'id[' . TEXT_PREFIX . $products_options_names->fields['products_options_id'] . ']\'].value = \'\'; }"/>';