Jump to content

Modify Standard Cart - Pricing to Annual Rates


gpx

Recommended Posts

Hey guys, I'm using standard cart, and I have enabled: "Monthly Pricing Breakdown"

We offer many services under either monthly or annual billing so for example monthly price could be $10/mo but if paid annually the breakdown of the monthly rate is $5/mo

So I want it so that when a customer is viewing the services in the cart it shows the breakdown of the lower rate which is the monthly breakdown of the annual rate, not the monthly breakdown of the monthly plan

Any ideas how to change this? WHMCS said I would change some lines below but they weren't specific how I would change them to achieve this result, any help would be great! 

 

 

        <div class="product-pricing" id="product{$product@iteration}-price">
                                        {if $product.bid}
                                            {$LANG.bundledeal}<br />
                                            {if $product.displayprice}
                                                <span class="price">{$product.displayprice}</span>
                                            {/if}
                                        {else}
                                            {if $product.pricing.hasconfigoptions}
                                                {$LANG.startingfrom}
                                                <br />
                                            {/if}
                                            <span class="price">{$product.pricing.minprice.price}</span>
                                            <br />
                                            {if $product.pricing.minprice.cycle eq "monthly"}
                                                {$LANG.orderpaymenttermmonthly}
                                            {elseif $product.pricing.minprice.cycle eq "quarterly"}
                                                {$LANG.orderpaymenttermquarterly}
                                            {elseif $product.pricing.minprice.cycle eq "semiannually"}
                                                {$LANG.orderpaymenttermsemiannually}
                                            {elseif $product.pricing.minprice.cycle eq "annually"}
                                                {$LANG.orderpaymenttermannually}
                                            {elseif $product.pricing.minprice.cycle eq "biennially"}
                                                {$LANG.orderpaymenttermbiennially}
                                            {elseif $product.pricing.minprice.cycle eq "triennially"}
                                                {$LANG.orderpaymenttermtriennially}
                                            {/if}
                                            <br>
                                            {if $product.pricing.minprice.setupFee}
                                                <small>{$product.pricing.minprice.setupFee->toPrefixed()} {$LANG.ordersetupfee}</small>
                                            {/if}
                                        {/if}
                                    </div>
Link to comment
Share on other sites

3 hours ago, gpx said:

WHMCS said I would change some lines below but they weren't specific how I would change them to achieve this result

that sounds like they were as much help as a chocolate teapot. 🙄 🍫

3 hours ago, gpx said:

So I want it so that when a customer is viewing the services in the cart it shows the breakdown of the lower rate which is the monthly breakdown of the annual rate, not the monthly breakdown of the monthly plan

the problem here is that the initial price shown on the cart opening page is always the price of the smallest billing cycle, and not necessarily the lowest price overall.... so if a monthly price is set, it will always show the monthly price; if no monthly price set, but priced annually, it will show the annual price....

there's no in-built option to show the lowest price overall - so the only way it could be done would be programmatically.

from a couple of previous answers... if you wanted to show all prices  for each product (though potentially causes layout issues)...

if at a later stage (product configuration), you wanted to show the savings over the monthly cycle, then 5 years ago I wrote a tutorial about doing that...

... that will be converted to a hook before the end of this month (now that I assume we're safe from imminent v7.8 updates).

if you're saying that you want the opening page to show the cheapest price for each product, regardless of cycle, then that's going to be an action hook - specifically a ClientAreaPageCart hook that loops though and modifies the products array.

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