Jump to content

Order Summary Promotion Code Application


natanray

Recommended Posts

Hello,

Previously I had used this code tutorial in my WHMCS 7.8. That's worked fine.

But today after latest version update 7.9, order summary discount is not showing like the that article.

I would like to modify order summary like the attachment.

So, if any development could help to update the codes, that will be helpful.

Thanks

 

IMG_20200111_003626.jpg

Edited by natanray
Link to comment
Share on other sites

22 minutes ago, brian! said:

which bit of the code where you using and on which template file ?

Hello,

I am using WHMCS six theme with standard_cart orderform and previously used below code in ordersummary.tpl. But in new standard_cart orderforum, codes are changed, and unable to find where to input the code.

    {if $carttotals.rawdiscount gt 0}
        <div class="clearfix">
        <span class="pull-left">Total:</span>
        <span class="pull-right">{$producttotals.pricing.totaltoday}</span>
        </div>
        <div class="clearfix">
        <span class="pull-left">Savings:</span>
        <span class="pull-right"> {$currency.prefix}-{$carttotals.rawdiscount}{$currency.suffix}</span>
        </div>
        <div class="clearfix">
        <span class="pull-left">You Pay:</span>
        <span class="pull-right"><h3>{$currency.prefix}{$carttotals.rawtotal}{$currency.suffix}</h3></span>
        </div>
        <div class="clearfix">
        <span class="pull-right">Total Due Today With Promo: <b>{$smarty.session.cart.promo}</b></span>
        </div>
        
    {else}
        <div class="clearfix">
        <span class="pull-left">You Pay:</span>
        <span class="pull-right"><h3>{$currency.prefix}{$carttotals.rawtotal}{$currency.suffix}</h3></span>
        
{/if}

 

IMG_20200111_182158.jpg

Edited by natanray
Link to comment
Share on other sites

2 hours ago, natanray said:

I am using WHMCS six theme with standard_cart orderform and previously used below code in ordersummary.tpl. But in new standard_cart orderforum, codes are changed, and unable to find where to input the code.

the advice is always to make a backup of your install & db before upgrading.

there should be no template changes to ordersummary between v7.8.3 and v7.9, so unless changes have been made to the $carttotals array and rawdiscount no longer exists, the code should still work.

you could add {debug} to the template, that should generate a popup window when you refresh the page and check if the $carttotals array still includes rawdiscount... don't forget to remove {debug} afterwards.

Link to comment
Share on other sites

1 hour ago, brian! said:

the advice is always to make a backup of your install & db before upgrading.

there should be no template changes to ordersummary between v7.8.3 and v7.9, so unless changes have been made to the $carttotals array and rawdiscount no longer exists, the code should still work.

you could add {debug} to the template, that should generate a popup window when you refresh the page and check if the $carttotals array still includes rawdiscount... don't forget to remove {debug} afterwards.

Thank you for your information. I have replaced below code with my code, and it's working fine.

<div class="total-due-today">
        <span class="amt">{$producttotals.pricing.totaltoday}</span>
        <span>{$LANG.ordertotalduetoday}</span>
    </div>

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.

×
×
  • 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