Sid04 Posted December 28, 2005 Share Posted December 28, 2005 How does one make a default option for all attributes, such as "please select"? Just FYI, this is relation to this contrib: http://www.oscommerce.com/community/contributions,3891 Thanks Link to comment Share on other sites More sharing options...
Guest Posted December 31, 2005 Share Posted December 31, 2005 like this: $attr_list = array(array('id' => '0', 'text' => 'Please Select')); echo tep_draw_pull_down_menu($drop_name, $attr_list, '', 'style="width: 80%"'); where $drop_name is the array populated with the rest of the options. Link to comment Share on other sites More sharing options...
Sid04 Posted January 1, 2006 Author Share Posted January 1, 2006 like this: $attr_list = array(array('id' => '0', 'text' => 'Please Select')); echo tep_draw_pull_down_menu($drop_name, $attr_list, '', 'style="width: 80%"'); where $drop_name is the array populated with the rest of the options. thanks for the input, but could you be alittle more specific? Im not sure how or where to add that code.....dont see anything like it in product_info.php Link to comment Share on other sites More sharing options...
Wizard Posted January 1, 2006 Share Posted January 1, 2006 thanks for the input, but could you be alittle more specific? Im not sure how or where to add that code.....dont see anything like it in product_info.php You don't really need to hard code it, you can just do it via the Admin area in the Catalog->Products Attributes area. You can create it once by first creating an option under the Product Options (you can call it for example, Please Select), then create a value under Option Values (call it also Please Select). Now, when you are adding a new product attibute at the bottom of that page, select the Please Select value as your first option value for the option type for your product. Make sure that when you add the option values you start with choosing the default one first, otherwise it will not show up first at the top as the default value. You could also use the Products Attributes Sort order to make sure the default option will be the first on top (this contribution also help you sort the rest of the option values the way you want them to appear) you can see the contrib. at http://www.oscommerce.com/community/contributions,1822 Who would have thought that so much can be created from 0`s and 1`s... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.