Jump to content

Multi Currency formatting


Recommended Posts

I want to display the domain pricing in the appropriate format dependent on the currency

so for GBP it would be £10.00/yr and for Euros would be 10,00€/an (in French or whatever the translated short year is)

The bit of code below in domainregister.tpl and domain-pricing.tpl means currencies with suffixes are displayed without the currency symbol

{$tldinfo.register->toPrefixed()}{if $tldinfo.period > 1}{lang key="orderForm.shortPerYears" years={$tldinfo.period}}{else}{lang key="orderForm.shortPerYear" years=''}

Changing toPrefixed to toSuffixed causes the € to be displayed however that obviously breaks GBP

Want I want to do is an if currency = GBP then use toPrefixed else use toSuffixed

However my coding skills are not up to that ....

I have raised tickets with WHMCS but as always they insist that this is by design and not a bug (although it seems pretty fundamental to display pricing correctly and others might consider it a bug if it didnt)

Link to comment
Share on other sites

31 minutes ago, MrGettingRatherFrustrated said:

Want I want to do is an if currency = GBP then use toPrefixed else use toSuffixed

{if $currency.code eq 'GBP'}{$tldinfo.register->toPrefixed()}{else}{$tldinfo.register->toSuffixed()}{/if}{if $tldinfo.period > 1}{lang key="orderForm.shortPerYears" years={$tldinfo.period}}{else}{lang key="orderForm.shortPerYear" years=''}{/if}
31 minutes ago, MrGettingRatherFrustrated said:

I have raised tickets with WHMCS but as always they insist that this is by design and not a bug (although it seems pretty fundamental to display pricing correctly and others might consider it a bug if it didnt)

by their definition, it isn't a bug - they consider a bug to be WHMCS doing something that they haven't designed it to...

to give an example, if WHMCS intentionally designed a car that could only turn right, then the fact that it couldn't turn left or drive straight wouldn't be a bug... now if it suddenly started to be able to turn left etc, then *that* would be a bug.

the fact that currencies are shown in different formats all over the place isn't a bug (in their eyes) - it's just very poor design. 😕

Link to comment
Share on other sites

7 minutes ago, brian! said:

{if $currency.code eq 'GBP'}{$tldinfo.register->toPrefixed()}{else}{$tldinfo.register->toSuffixed()}{/if}{if $tldinfo.period > 1}{lang key="orderForm.shortPerYears" years={$tldinfo.period}}{else}{lang key="orderForm.shortPerYear" years=''}{/if}

by their definition, it isn't a bug - they consider a bug to be WHMCS doing something that they haven't designed it to...

to give an example, if WHMCS intentionally designed a car that could only turn right, then the fact that it couldn't turn left or drive straight wouldn't be a bug... now if it suddenly started to be able to turn left etc, then *that* would be a bug.

the fact that currencies are shown in different formats all over the place isn't a bug (in their eyes) - it's just very poor design. 😕

And that is fundamentally what is "boiling my piss" to use one of my favourite expressions.

Software has bugs, we all make mistakes, we all make oversights, we can all often learn from others viewpoints, none of us know it all (although you appear to be close 😉 )

Nobody reporting anything either on here, as a bug or a feature request has any desire but to fix/improve the product and this is endlessly frustrated (as I may have already mentioned in my first short 6 weeks here) by outright obstructiveness from the support team.

Because I am a stubborn person (my wife's phrase sanitised) I will fight when they try and sweep my tickets and issues under the carpet - one of us will break at some point and I wont put money on it either way but I wont go quietly that's for sure!

So sad that so much potential is lost ...

Link to comment
Share on other sites

17 hours ago, MrGettingRatherFrustrated said:

Software has bugs, we all make mistakes, we all make oversights, we can all often learn from others viewpoints, none of us know it all (although you appear to be close 😉 )

what is it they say about empty vessels making the most noise... 🤪

there will be many users with far more WHMCS knowledge than me... fair enough if they're still interested and their income depends on that... in the past, there used to be far more users sharing their knowledge than do now. ⚰️

17 hours ago, MrGettingRatherFrustrated said:

Nobody reporting anything either on here, as a bug or a feature request has any desire but to fix/improve the product and this is endlessly frustrated (as I may have already mentioned in my first short 6 weeks here) by outright obstructiveness from the support team.

you're only scratching the surface... most new users will blindly submit feature requests in the assumption that things will be added quickly.... most experienced users no longer bother because they know that it would take years...

in years gone by, bug reports used to be handled here... that was often useful as you could see where the bugs where in the latest version and find temporary solutions... sadly, bug reports now get reported directly and often the first the users will know will be when they are "fixed" in the next maintenance release... but then there is the risk that the fixes create new bugs and so the madness continues.

some statistics about these forums that you might be interested in (from last year)...

  1. 66% of accounts here have a zero post count - so they've either never posted or have their their initial posts deleted (due to being spammers I assume) - that's 53,000+ accounts.
  2. 13% of accounts have only posted once - that's another 10,000+ accounts.
  3. 6% of accounts have only posted twice - that's another nearly 5,000 accounts.
  4. 3% of accounts have only posted three times - that's another 2,500+ accounts.

so two-thirds have (effectively) never posted; 4 out of 5 accounts here have posted once or less; 91% have posted 5 times or less...

if you want a more recnt example of the contempt WHMCS have for their customers, posts by new members are reviewed before being published... often they have remained unreviewed for 3+ weeks, so by the time they are published and I spend time replying to them, the OP later replies that the issues have already been resolved... an utter waste of time for everyone.

this morning we have release of 15+ now-reviewed threads from new members, the oldest of which had been waiting 9 days to be reviewed... and one of them was even a spam post that went unnoticed.... i'm not going to waste my time replying to most of them.

how frustrated would you be if you had to wait 3 weeks to see your post appear ?

18 hours ago, MrGettingRatherFrustrated said:

but only in euros and not gbp in /portal/domain/pricing 

the problem will be that the domain pricing page isn't a cart page and therefore won't have access to the $currency array... if you wanted a line of code to cover both pages, then...

<div class="price {$tldinfo.tldNoDots}">
	{if is_object($tldinfo.register)}
		{if $tldinfo.register|strstr:'£'}{$tldinfo.register->toPrefixed()}{else}{$tldinfo.register->toSuffixed()}{/if}
		{if $tldinfo.period > 1}{lang key="orderForm.shortPerYears" years={$tldinfo.period}}{else}{lang key="orderForm.shortPerYear" years=''}{/if}
	{else}
		{lang key="domainregnotavailable"}
	{/if}
</div>

if you had more than those 2 currencies, GBP and EUR, then the above code would likely need to be tweaked.... you'd just need to decide which currencies were being prefixed, which were being suffixed... or you do what you've done and just display both prefix and suffix! 🙂

Link to comment
Share on other sites

Thanks Brian,

My first post on here took 3 weeks to be approved, and I still have loads of feature requests that they are stalling on approving. 
It really is a poor effort and those figures you quoted perhaps show how many potential customers they have lost as a result of the experiences with support - something that should be making senior management sit up and pay vert serious attention ....

As it turns out all that was required was to change from toPrefix() to toBoth() in domainregister,tpl - why the hell that isnt the defaut to start with god only knows and similarly in a few other templates

Annoyingly that doesnt work on domain-pricing.tpl for some reason - your code does thanks once more

<snipped>

 

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