Jump to content

Display of Credit Balance and Total


Recommended Posts

I must set JPY and USD in Currencies for SSL Pligin for WHMCS 7.0.1.

But I want to deal only JPY.

I hid USD in ClientArea and my client can select only JPY.

And I set Curencies as setting_curencies.png.

setting_curencies.png

But if client use credit balance, I have a problem.

 

I set the following code in viewcart.tpl.

I use standard_cart.

{if $clientsdetails.credit > 0}

{assign var="inttotal" value=$total|replace:$currency.suffix:''}

{assign var="inttotal" value=$inttotal|replace:$currency.prefix:''}

{assign var="inttotal" value=$inttotal|replace:',':''}

<div class="recurring-totals clearfix">

<span class="pull-left">{$LANG.statscreditbalance}:  </span>

<span class="pull-right recurring-charges">{$clientsstats.creditbalance}</span>

</div>

{if $clientsdetails.credit > $inttotal}

<div class="total-due-today total-due-today-padded">

<span class="amt">{$currency.prefix}0.00{$currency.suffix}</span>

<span>{$LANG.ordertotalduetoday}</span>

</div>

{else}

{assign var="total" value=$inttotal-$clientsdetails.credit}

{assign var="total" value=$total|number_format:2}

<div class="total-due-today total-due-today-padded">

<span class="amt">{$currency.prefix}{$total}{$currency.suffix}</span>

<span>{$LANG.ordertotalduetoday}</span>

</div>

{/if}

{else}

<div class="total-due-today total-due-today-padded">

<span class="amt">{$total}</span>

<span>{$LANG.ordertotalduetoday}</span>

</div>

{/if}

 

Please look at cart.png.

cart.png

Total is 2,700.00.

I need Total 2,700.

I meet error in PayPal.

Please teach me how to resolve.

Link to comment
Share on other sites

I resolve display cart in WHMCS.

But I can not resolve in PayPal.

I select Automatically forward the user to the payment gateway in Auto Redirect on Checkout of General Settings.

 

*viewcart.tpl

 

{if $clientsdetails.credit > 0}

{assign var="inttotal" value=$total|replace:$currency.suffix:''}

{assign var="inttotal" value=$inttotal|replace:$currency.prefix:''}

{assign var="inttotal" value=$inttotal|replace:',':''}

<div class="recurring-totals clearfix">

<span class="pull-left">{$LANG.statscreditbalance}:  </span>

<span class="pull-right recurring-charges">{$clientsstats.creditbalance}</span>

</div>

{if $clientsdetails.credit > $inttotal}

<div class="total-due-today total-due-today-padded">

<span class="amt">{$currency.prefix}0{$currency.suffix}</span>

<span>{$LANG.ordertotalduetoday}</span>

</div>

{else}

{assign var="total" value=$inttotal-$clientsdetails.credit}

{assign var="total" value=$total|number_format:0}

<div class="total-due-today total-due-today-padded">

<span class="amt">{$currency.prefix}{$total}{$currency.suffix}</span>

<span>{$LANG.ordertotalduetoday}</span>

</div>

{/if}

{else}

<div class="total-due-today total-due-today-padded">

<span class="amt">{$total}</span>

<span>{$LANG.ordertotalduetoday}</span>

</div>

{/if}

 

 

*checkout.tpl

 

{if $clientsdetails.credit > 0}

{assign var="inttotal" value=$total|replace:$currency.suffix:''}

{assign var="inttotal" value=$inttotal|replace:$currency.prefix:''}

{assign var="inttotal" value=$inttotal|replace:',':''}

{if $clientsdetails.credit > $inttotal}

<div class="alert alert-success text-center large-text" role="alert">

{$LANG.ordertotalduetoday}:   <strong>{$currency.prefix}0{$currency.suffix}</strong>

</div>

{else}

{assign var="total" value=$inttotal-$clientsdetails.credit}

{assign var="total" value=$total|number_format:0}

<div class="alert alert-success text-center large-text" role="alert">

{$LANG.ordertotalduetoday}:   <strong>{$currency.prefix}{$total}{$currency.suffix}</strong>

</div>

{/if}

{else}

<div class="alert alert-success text-center large-text" role="alert">

{$LANG.ordertotalduetoday}:   <strong>{$total}</strong>

</div>

{/if}

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