Manual installation has instructions to update attribute value ($attr_value) in shopping_cart.php and includes/classes/order.php. This works just fine, but in some cases attribute *name* does not come out right. Just add the following code (in both files) after the first $attr_value assignment to show name.
$attr_name_sql_raw = 'SELECT po.products_options_name FROM ' .
TABLE_PRODUCTS_OPTIONS . ' po, ' .
TABLE_CUSTOMERS_BASKET_ATTRIBUTES . ' cba, ' .
TABLE_PRODUCTS_ATTRIBUTES . ' pa WHERE ' .
' pa.products_id="' . $products[$i]['id'] . '" AND ' .
' pa.products_id="' . $products[$i]['id'] . '" AND ' .
' pa.options_id="' . $option . '" AND ' .
' pa.options_id=po.products_options_id AND ' .
' po.language_id="' . $languages_id . '" AND ' .
' cba.products_id="' . $products[$i]['id'] . '" AND ' .
' cba.products_options_value_id="' . $value . '"';
$attr_name_sql = tep_db_query($attr_name_sql_raw);
if ($arr = tep_db_fetch_array($attr_name_sql)) {
$attr_name = $arr['products_options_name'];
}
Also remember to set default value for $attr_name in the else clause, say,
$attr_name = $attributes_values['products_options_name'];
in shopping_cart.php, and
$attr_name = $attributes['products_options_name'];
in includes/classes/order.php.
Then, in shopping_cart.php, replace
'option' => $$attributes_values['products_options_name'],
with
//'option' => $$attributes_values['products_options_name'],
'option' => $attr_name,
and in includes/classes/order.php, replace
'option' => $$attributes['products_options_name'],
with
//'option' => $$attributes['products_options_name'],
'option' => $attr_name,
That should fix the name issue.
More...





LinkBack URL
About LinkBacks









Bookmarks