osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

Product Attributes - Option Type Feature

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 ...


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > New osCommerce Contributions

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Reply

 

LinkBack Thread Tools
  #1  
Old 06-18-2007, 02:41 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 11,100
Thanks: 81
Thanked 348 Times in 327 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Post Product Attributes - Option Type Feature

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


  • osCMax Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -8. The time now is 07:52 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax