Jump to content
Sign in to follow this  

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

Recommended Posts

Where do this smarty var get it´s value:




it displays the pricing with a "/mo" or "/yr" tag, depending on the payment terms.

I need to change this but can´t find (or assume) lang strings for it.

Share this post

Link to post
Share on other sites

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:

Share this post

Link to post
Share on other sites

I already did the replace (at least for the main language), just thought it was something I overlooked or not possible to find. This should be fixed by WHMCS Devs.

Share this post

Link to post
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. :)

Share this post

Link to post
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.

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.

Sign in to follow this  

  • Similar Content

    • By 75CODES
      Hi guys, i translated few content on my whmcs theme installation by modifying language override. Ill is working fine, my issue is that when the page load first time the translation does not load directly, i have to refresh the page for all content to appear. Any advise to help me solve this? thanks
    • By ModulesGarden
      1. Halloween Promotion

      No Halloween celebration can do without a fully-fledged trick-or-treat. And it so happens that ModulesGarden is an exceptionally generous host this year! Feel the mystical Halloween vibe with our fang-tastic 7% discount applicable until the end of this week to every single product available in our Marketplace!

      Promo Code: 7%Halloween!

      To turn this spooktacular event into a really memorable experience, we invite you to maximize the savings by combining the Halloween deal with other promotions, such as the deal of the day and week, the discount for a bulk order as well as for the purchase of products we recommend specifically.

      Get ready for the spine-tingling treat!

      2. Advanced Billing For WHMCS v3.6.0

      Have you ever experienced how one simple tool can make your work routines a whole lot easier? This is exactly how our Advanced Billing For WHMCS works its wonders - it makes billing your clients for the exact resource usage not only possible, but also incredibly simple!

      To enhance your billing strategies even further, we have just brought out the module’s brand new 3.6.0 version. Apart from the perfect compatibility with WHMCS V8.0.4, you can now take full advantage of Prepaid Billing allowing you to charge your customers for their products by collecting only the prepaid credits. To keep the entire process as transparent as possible, the use of credits will be shown in the summaries instead of generating invoices.

      Explore the ins and outs of Advanced Billing For WHMCS v3.6.0!

      3. cPanel Survey - Last Call

      Have you already put to use the 10% promo code received after completing our 60-second survey?

      If you have not yet claimed your exclusive gift for answering a few questions about your cPanel experience, there isn’t much time left to do so, as the discount is valid only until the end of October! Let us know how you feel about the recently introduced price increase of cPanel plans, and what solutions you plan to incorporate to lower your running costs. Your valuable input will be rewarded with a special 10% discount for all modules available on our website!

      Have your say right away!

      4. Polish Language Translation For WHMCS v1.4.0

      With our highly regarded Polish Language Translation For WHMCS, you can choose Polish to be default language in both admin and client area of your WHMCS, or even give visitors the freedom to switch between language settings as they please. If this introduction excited your interest already, you’d better keep on reading!

      It is with indescribable joy that we present to you today the spanking new 1.4.0 version of our translation, updated comprehensively to secure tip-top integration with WHMCS V8.0.4. Almost 800 new and updated translation records remain at your full disposal!

      Hungry for more? Grab the source code of our spick-and-span translation available for the next 24 hours as our Deal Of The Day and save 30% in the process!

      Rediscover your WHMCS V8.0.4 with Polish language version!

      4. Last but not least, make sure to follow other updates that we have lately released as well:
      Client Area Designer For WHMCS - v1.1.7 CRM For WHMCS - v2.6.3 HOT! DigitalOcean Droplets For WHMCS - v1.6.3 DirectAdmin Licenses For WHMCS - v1.4.2 Discount Center For WHMCS - v1.4.9 EasyDCIM Dedicated Servers For WHMCS - v1.7.3 G Suite For WHMCS - v1.3.4 Hetzner VPS For WHMCS - v1.4.1 Proxmox Cloud For WHMCS - v2.9.3 Proxmox VPS For WHMCS - v2.9.3 Zendesk For WHMCS - v2.2.4

      Need Custom Software Development For Your Business?
      Get Your Free Quote Now! Specially for you we will adapt an application and its design to your own needs, create a new module or even a completely new system built from scratch!
    • By WGS
      We are giving an extra 30% off on already discounted WHMCS one page orderform template. 

      One Step Checkout Order Form WHMCS Template : $99 at $40 ClientX WHMCS Client Area Template : $79 at $55 Use Coupon Code: COV19
    • By Nona
      I had a theme developed a long time ago. I made a mistake today and can't get ahead on my own.
      I use all products with the option that a domain belongs to it. (Require Domain Tick to show domain registration options).
      If I switch off this option, the page cart.php?a=confproduct&i=1 is empty. my template with menu and everything is displayed, but the main area is empty. what is missing?
      unfortunately the developer does not work for me anymore

  • 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