keat Posted February 3, 2016 Share Posted February 3, 2016 Is there any way to make a product option to default to something rather than 'Please Select' I did ask something similar when i tried V6 a while back. Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 3, 2016 Share Posted February 3, 2016 That is a decision made by the skin designer. In the skin template content.product.php, find (the following is for Foundation, other skins will be similar): {elseif $option.type == Catalogue::OPTION_SELECT} <div class="row"> <div class="small-12 columns"> {* If we only have one required option replace with hidden field *} {if $option.required && count($option.values)===1} <label for="option_{$option.option_id}" class="return">{$option.option_name}</label> {$option.values.0.value_name}{if $option.values.0.price} {$option.values.0.symbol}{$option.values.0.price}{/if} <input type="hidden" name="productOptions[{$option.option_id}]" id="option_{$option.option_id}" value="{$option.values.0.assign_id}" data-price="{$option.values.0.decimal_price}"> {else} <label for="option_{$option.option_id}" class="return">{$option.option_name}{if $option.required} ({$LANG.common.required}){/if}</label> <select name="productOptions[{$option.option_id}]" id="option_{$option.option_id}" class="nomarg" {if $option.required}required{/if}> <option value="">{$LANG.form.please_select}</option> {foreach from=$option.values item=value} <option value="{$value.assign_id}"{if $value.absolute_price == '1'}class="absolute"{/if} data-price="{$value.decimal_price}">{$value.value_name}{if $value.price} {$value.symbol}{$value.price}{/if}</option> {/foreach} </select> {/if} </div> </div> Change this line: <option value="">{$LANG.form.please_select}</option> To this: {* <option value="">{$LANG.form.please_select}</option> *} Quote Link to comment Share on other sites More sharing options...
keat Posted February 4, 2016 Author Share Posted February 4, 2016 Thanks Brian, I'll take a look Quote Link to comment Share on other sites More sharing options...
keat Posted February 9, 2016 Author Share Posted February 9, 2016 Hi Brian. I made the subtle change, and whilst it did indeed now default to something, it wasn't the lowest denominator. For instance (fuses again), we sell in bags of 25, 50, 100, 500 & 1000. It defaulted to 100 The entry for 100 units does appear in the table before the entry for 25 units.. I exported the table Cubecart_Option_Value, reordered the entries in a tidy order, changed the priority to suit, re-imported the table and now it defaults to the lowest option. I assume this is OK ? Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 9, 2016 Share Posted February 9, 2016 Is the image above now accurate based on what you manipulated in the table? In admin, Product Options, Option Attributes tab, select from the drop-down the Option Name referencing the bag quantity. In the table that appears, the up/down icon is a draggable handle that allows you to sort the Attributes (aka Option Values) for this option. (Supposedly) No matter in which order these Attributes are assigned to the product, they will be sorted by the order shown in this table. Quote Link to comment Share on other sites More sharing options...
keat Posted February 9, 2016 Author Share Posted February 9, 2016 Wish I'd known this earlier, however the method I took didn't take me long, less than 5 minutes to re-arrange the whole table. Baically, I exported the table to a CSV file. Arranged this in to order by value_name asc, re-arranged a few additional things like small, medium, large & X-large, then set the priority order from 1 through to however many entries it had (about 40) The image above was before I re-arranged the priority. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.