Jonh Carter Posted April 6, 2019 Share Posted April 6, 2019 Hello, currently monthly breakdown price is show a ( - ) hyphen and i want to show ( @ ) instead of hyphen. please suggest how can i do it. actually i want to show the more long billing term client choose client will get the more low price. thanks in advance. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 8, 2019 Share Posted April 8, 2019 On 06/04/2019 at 12:43, Jonh Carter said: currently monthly breakdown price is show a ( - ) hyphen and i want to show ( @ ) instead of hyphen. please suggest how can i do it. actually i want to show the more long billing term client choose client will get the more low price. long answer (e.g a tutorial on how to calculate/show savings per cycle)... medium answer would be to use a hook to replace the - with @ ... <?php /** * Modify BillingCycle Dropdown In Configure Product Cart Page Hook * @author brian! */ function cart_modify_billingcycle_dropdown($vars) { $billingcycles = array('monthly','quarterly','semiannually','annually','biennially','triennially'); if ($vars['templatefile']=='configureproduct'){ $pricing = $vars['pricing']; foreach ($billingcycles as $cycle) { if (!empty($pricing[$cycle])) { $pricing[$cycle] = str_replace(' - ',' @ ',$pricing[$cycle]); } } return array("pricing" => $pricing); } } add_hook("ClientAreaPageCart", 1, "cart_modify_billingcycle_dropdown"); short answer would be to edit configureproduct.tpl and change... <option value="monthly"{if $billingcycle eq "monthly"} selected{/if}> {$pricing.monthly} </option> to... <option value="monthly"{if $billingcycle eq "monthly"} selected{/if}> {$pricing.monthly|replace:' - ':' @ '} </option> ... and then do the same for the other recurring cycles... 2 Quote Link to comment Share on other sites More sharing options...
Jonh Carter Posted April 10, 2019 Author Share Posted April 10, 2019 thank you very much @brian! for your kind help. i really appreciate it. have a great day 🙂 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.