Giannis Posted March 20, 2017 Share Posted March 20, 2017 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. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 20, 2017 Share Posted March 20, 2017 https://forum.whmcs.com/showthread.php?125686-order-form-price-display&p=503786#post503786 0 Quote Link to comment Share on other sites More sharing options...
Giannis Posted March 20, 2017 Author Share Posted March 20, 2017 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. Thank you 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 20, 2017 Share Posted March 20, 2017 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? 0 Quote Link to comment Share on other sites More sharing options...
Giannis Posted March 20, 2017 Author Share Posted March 20, 2017 Hello, I want to show the prices here https://www.intechs.gr/clients/cart.php?gid=2 As you see now is displayed only the minimum cycle. I want to display all cycles there. This was like this in some older version. Also the free domain was mentioned where it was eligible. Thank you 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 21, 2017 Share Posted March 21, 2017 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... it will only output the billing cycles that are enabled. 0 Quote Link to comment Share on other sites More sharing options...
Giannis Posted March 22, 2017 Author Share Posted March 22, 2017 That's what i wanted. Thank you, 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.