Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

default --Please Select-- for product attributes


nickoleg

Recommended Posts

I'm setting up a store that has a ton of attributes for a lot of different products. And since these are custom orders, I need to make sure that the user actually picks their desired attribute and no default or random attributes show up in the cart. SO... is there a way that each product attribute dropdown can have a default -- Select -- as the first option?

Link to comment
Share on other sites

Not sure how well this works so you may want to test it out first.

 

In catalog/product_info.php find

		$products_options_array = array();

Just below that add

		$products_options_array[] = array('id' => '', 'text' => PULL_DOWN_DEFAULT);

Link to comment
Share on other sites

Brian -

 

Thanks for the help. This is what it did...

 

Made the top choice on the dropdown blank (which I'm fine with). But if you hit "add to cart" button without selecting something for EACH dropdown it takes you to the cart but does NOT add the product. And, of course there is no explination why. It took me 3-4 times to figure it out.

 

Wonder if there is another solution out there? Any and all help is greatly appreciated.

Link to comment
Share on other sites

In a stock osc the above code should display Please Select or PULL_DOWN)DEFAULT. The part I was concerned about is what would happen if you clicked add to cart with that being selected. Is what happens is there is no id set to the option value. That is why you get your shopping cart page saying there are no products. I'm not sure what the work around would be.

 

Maybe you could use some javascript of ajax to check if the id firld is set.

Link to comment
Share on other sites

  • 2 weeks later...
http://addons.oscommerce.com/info/2628

 

I think there is one other but I can not remember its name.

 

Just in case anyone else is looking for this solution, I ended up using the contribution Dynamic force attribute selection v1.7 (http://addons.oscommerce.com/info/5208)

 

Thanks for helping me find a solution.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...