This is a discussion on Product Attributes - Option Type Feature within the New osCommerce Contributions forums, part of the osCommerce 2.2 Forums category; 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 ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| ||||
| ||||
| 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...
__________________ Michael Sasek osCMax Developer
|
| Sponsored Links | ||
| ||
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Product Attributes - Option Type Feature | michael_s | New osCommerce Contributions | 0 | 05-18-2007 12:44 AM |
| Product Attributes - Option Type Feature avail for OSCMax | dinki | osCMax v2 Features Discussion | 1 | 10-08-2006 10:29 PM |
| Product Attributes - Option Type Feature | adam71o | osCMax v2 Customization/Mods | 21 | 08-10-2006 03:19 PM |
| Contribution Product Attributes - Option Type Features | a1designs | osCommerce 2.2 Modification Help | 2 | 03-16-2005 12:30 PM |
| Product Attributes - Option Type Feature | flypie | osCMax v1.7 Discussion | 1 | 09-15-2003 09:47 PM |