Jump to content

Supreme-Comparison orderform: how to translate {$product.pricing.minprice.cycleText}


michael24

Recommended Posts

I too could see no reference to the cycles in the language files, nothing in the template either... therefore, it looks like it's hard-coded to me - i'll leave it up to others to decide if this was intentional or just overlooked when they tested it! :roll:

 

but that being the case, your best option is to use Smarty replace - or multiple replaces if you're using multiple cycles.. for example...

 

{$product.pricing.minprice.cycleText|replace:'/mo':'per month'}

or if you want to do multiple replaces for all the periods...

 

{$product.pricing.minprice.cycleText|replace:'/mo':'<br />per month'|replace:'/3 mo':'<br />per 3 months'|replace:'/6 mo':'<br />per 6 months'|replace:'/yr':'<br />per year'|replace:'/2 yr':'<br />every 2 years'|replace:'/3 yr':'<br />every 3 years'}

or if it needed to be multilingual and use existing language strings...

 

{$product.pricing.minprice.cycleText|replace:'/mo':$LANG.orderpaymentterm1month|replace:'/3 mo':$LANG.orderpaymentterm3month|replace:'/6 mo':$LANG.orderpaymentterm6month|replace:'/yr':$LANG.orderpaymenttermannually|replace:'/2 yr':$LANG.orderpaymenttermbiennially|replace:'/3 yr':$LANG.orderpaymenttermtriennially}

personally, if I was going to do this, i'd use new language strings for this purpose (using Language Overrides - http://docs.whmcs.com/Language_Overrides), add a break return to the start of each... or alternatively, use the replace to remove the "/mo" and "/yr" etc from {$product.pricing.minprice.cycleText} and then use the value of {$product.pricing.minprice.cycle} to determine the cycle string to use and output it either below or above the price.

 

anyway, I have to idea what you want to change it to, but hopefully that's given you a few ideas about how to do it. :idea:

Link to comment
Share on other sites

This should be fixed by WHMCS Devs.

that really depends if they did it on purpose or overlooked it - reporting it as a bug or contacting support might be an idea as they'll likely tell you which one it was - the devs don't necessarily come to these forums, so unless one of the support guys sees the thread and passes it on, they might not realise.

 

btw - they've done the same thing with the Universal Slider template too. :)

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