Jump to content

Billing Cycle Prices


Giannis

Recommended Posts

Hello,

How can i show all billing cycles prices that are enable for a product using Standard Cart?

I have products with Monthly/Yearly Cycle but also only Yearly.

I want to display all the prices in order cart.

I have try to edit products.tpl but no luck.

 

Thank you.

Link to comment
Share on other sites

Actually i have seen this thread, but i do not want to have dropdown.

I only need to display all prices for each cycle that is enable.

User is able to select the desired cycle on the next step.

the answers going to be basically the same as the code in the above thread, e.g it's going to be using the same foreach loop.

 

but if you don't want to show the cycle options as a dropdown, how do you want to show them?

Link to comment
Share on other sites

in standard_cart, you could do it quite easily using the foreach loop I mentioned previously by replacing in products.tpl...

 

                                            <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}

with...

 

                                            {foreach $product.pricing.cycles as $cycle => $cycleprice}
                                               {$cycleprice}<br>
                                           {/foreach}

you may also have to use some css to adjust the font size (as formatting the output will be a big issue - especially when using multiple languages), but you'd end up with something like this...

 

Pk3RsYN.png

 

it will only output the billing cycles that are enabled.

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