Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

default options for attributes?


Sid04

Recommended Posts

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...