envyu36 Posted April 29, 2010 Share Posted April 29, 2010 Hi all, I am trying to customze product menu on shopping cart as pull down menu instead of showing block lists. My products menu is getting longer and showing all isn't a good way to display for me. This is what I've tried to make it work and the auto product group showing isn't working since something is missing on 'option' I was told that 'the option value should be numerical using $productgroup.gid' by WHMCS after looking for help but I don't even understand what that mean... Hope someone can help me out this! Cheers! <form method="get" action="{$smarty.server.PHP_SELF}"> <select name="gid" onchange="submit()"> {foreach key=num item=productgroup from=$productgroups} {if $gid eq $productgroup.gid} <option><strong>{$productgroup.name}</strong></option> | {else}<option><a href="{$smarty.server.PHP_SELF}?gid={$productgroup.gid}">{$productgroup.name}</a></option> | {/if} {/foreach} {if $loggedin} <option><a href="{$smarty.server.PHP_SELF}?gid=addons">{$LANG.cartproductaddons}</a></option> | {if $renewalsenabled}<option><a href="{$smarty.server.PHP_SELF}?gid=renewals">{$LANG.domainrenewals}</a></option> | {/if} {/if} {if $registerdomainenabled}<option><a href="{$smarty.server.PHP_SELF}?a=add&domain=register">{$LANG.registerdomain}</a></option> |{/if} {if $transferdomainenabled}<option><a href="{$smarty.server.PHP_SELF}?a=add&domain=transfer">{$LANG.transferdomain}</a></option> |{/if} <option><a href="{$smarty.server.PHP_SELF}?a=view">{$LANG.viewcart}</a></option> </select> </form> 0 Quote Link to comment Share on other sites More sharing options...
robb3369 Posted April 29, 2010 Share Posted April 29, 2010 Here is a quick throw together (and has NOT been tested) and should get you pointed in the right direction: <select name="prod" onchange="window.location=this.value;"> {foreach key=num item=productgroup from=$productgroups} <option value="{$smarty.server.PHP_SELF}?gid={$productgroup.gid}"{if $gid eq $productgroup.gid} selected="selected"{/if}>{$productgroup.name}</option> {/foreach} {if $loggedin} <option value="{$smarty.server.PHP_SELF}?gid=addons">{$LANG.cartproductaddons}</option> {if $renewalsenabled} <option value="{$smarty.server.PHP_SELF}?gid=renewals">{$LANG.domainrenewals}</option> {/if} {/if} {if $registerdomainenabled} <option value="{$smarty.server.PHP_SELF}?a=add&domain=register"{if $domain eq "register"} selected="selected"{/if}>{$LANG.registerdomain}</option> {/if} {if $transferdomainenabled} <a href="{$smarty.server.PHP_SELF}?a=add&domain=transfer"{if $domain eq "transfer"} selected="selected"{/if}>{$LANG.transferdomain}</option> {/if} <option value="{$smarty.server.PHP_SELF}?a=view">{$LANG.viewcart}</option> </select> 0 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.