Jump to content

Direct payment with credit


Remitur

Recommended Posts

If 'apply credit to invoices automatically' in setup is set to "no", using credit to pay is quite complicated for the customer: he needs to go on with another kind of payment (i.e. wire transfer), and only at last passage he's finally proposed to use available credit to pay.

This is causing a lot of confusion in customers, and it's timewasting.

 

It would be nice that a "pay with credit" would be proposed as any other payment instrument, so the customer freely can choose if paying with available credit or go on and pay with other instruments...

 

Years ago in this forum was posted a fix ( https://forum.whmcs.com/showthread.php?31405-Pay-with-Credit-Balance&p=271762#post271762 ) but it apply only to old, deprecated "modern cart" template, and i didn't dound any way to apply it to new versions...

 

Any idea?

Link to comment
Share on other sites

Years ago in this forum was posted a fix ( https://forum.whmcs.com/showthread.php?31405-Pay-with-Credit-Balance&p=271762#post271762 ) but it apply only to old, deprecated "modern cart" template, and i didn't dound any way to apply it to new versions...

Any idea?

for standard_cart/viewcart.tpl, it would roughly be (you could trim it down further for v7, but they'd be no real benefit)...

                                    {if $clientsdetails.credit gt 0}
                                       {assign var="inttotal" value=$total|replace:$currency.suffix:''|replace:$currency.prefix:''}
                                       <span>{$LANG.statscreditbalance}:  {$clientsstats.creditbalance}</span>
                                       {if $clientsdetails.credit gt $inttotal}
                                           <span>{$LANG.ordertotalduetoday}:  {$currency.prefix}0.00{$currency.suffix}</span>
                                       {else}
                                           {assign var="total" value=($inttotal-$clientsdetails.credit)|number_format:2}
                                           <span>{$LANG.ordertotalduetoday}:  {$currency.prefix}{$total}{$currency.suffix}</span>
                                       {/if}
                                   {else}
                                       <span>{$LANG.ordertotalduetoday}:  {$total}</span>
                                   {/if}

the layout may need to be tweaked for your own purposes, but the output should be correct. :idea:

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