Jump to content

Product Menu Display as Pull donw on Shopping Cart


envyu36

Recommended Posts

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>

Link to comment
Share on other sites

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>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated