forked from WHMCS/orderforms-standard_cart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsidebar-categories-collapsed.tpl
53 lines (49 loc) · 2.48 KB
/
sidebar-categories-collapsed.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<div class="categories-collapsed visible-xs visible-sm clearfix">
<div class="pull-left form-inline">
<form>
<select name="gid" id="gidForm" onchange="javascript:redirectToCartPage()" class="form-control">
<optgroup label="Product Categories">
{foreach key=num item=productgroup from=$productgroups}
<option value="{$productgroup.routePath}"{if $gid eq $productgroup.gid} selected="selected"{/if}>{$productgroup.name}</option>
{/foreach}
</optgroup>
<optgroup label="Actions">
{if $loggedin}
<option value="{$WEB_ROOT}/cart.php?gid=addons"{if $gid eq "addons"} selected{/if}>{$LANG.cartproductaddons}</option>
{if $renewalsenabled}
<option value="{$WEB_ROOT}/cart.php?gid=renewals"{if $gid eq "renewals"} selected{/if}>{$LANG.domainrenewals}</option>
{/if}
{/if}
{if $registerdomainenabled}
<option value="{$WEB_ROOT}/cart.php?gid=registerdomain"{if $domain eq "register"} selected{/if}>{$LANG.navregisterdomain}</option>
{/if}
{if $transferdomainenabled}
<option value="{$WEB_ROOT}/cart.php?gid=transferdomain"{if $domain eq "transfer"} selected{/if}>{$LANG.transferinadomain}</option>
{/if}
<option value="{$WEB_ROOT}/cart.php?a=view"{if $action eq "view"} selected{/if}>{$LANG.viewcart}</option>
</optgroup>
</select>
</form>
</div>
{if !$loggedin && $currencies}
<div class="pull-right form-inline">
<form method="post" action="cart.php{if $action}?a={$action}{elseif $gid}?gid={$gid}{/if}">
<select name="currency" onchange="submit()" class="form-control">
<option value="">{$LANG.choosecurrency}</option>
{foreach from=$currencies item=listcurr}
<option value="{$listcurr.id}"{if $listcurr.id == $currency.id} selected{/if}>{$listcurr.code}</option>
{/foreach}
</select>
</form>
</div>
{/if}
</div>
<script type="text/javascript">
function redirectToCartPage()
{
var path = jQuery('#gidForm').val();
if (path) {
window.location.href = path;
}
}
</script>