nickoleg Posted July 9, 2009 Posted July 9, 2009 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?
Guest Posted July 9, 2009 Posted July 9, 2009 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);
nickoleg Posted July 9, 2009 Author Posted July 9, 2009 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.
Guest Posted July 10, 2009 Posted July 10, 2009 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.
ABCommerce! Posted July 10, 2009 Posted July 10, 2009 http://addons.oscommerce.com/info/2628 I think there is one other but I can not remember its name.
nickoleg Posted July 23, 2009 Author Posted July 23, 2009 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.