Jump to content

[Solved] Customer Referral Program not showing percentage


Recommended Posts

The Customer Referral Program does not show a percentage sign in the value, creating the impression that the value (10) indicates a dollar amount instead of percentage (10%). How do I change that so it reads properly?

 

Here is a screenshot:

 

revised

Edited by touchdez (see edit history)
Link to comment
Share on other sites

Will do - sorry for the delay in answering :wub:

post-513637-0-22123100-1368907517_thumb.jpg

 

hello, touchdez

 

i try all the way but not find solution to show 5%. in the tpl file there is no way to trace whether it is fixed referral or percentage referral

 

so you need to edit this tpl and add your 5% sign there.

 

\modules\referralprogram\views\templates\front\program.tpl

 

hope this will solve your issue. if the problem is solved that edit the post title and add [solved]

  • Like 2
Link to comment
Share on other sites

Good morning, smartdatasoft.

 

I have changed the file you mentioned, but cannot include the % character in the line - line 86:

 

<strong>{l s='Get a discount of %d percent for you and your friends by recommending this Website.' sprintf=$discount mod='referralprogram'}</strong>

 

When I type in the % character, the whole line disappears. I can type in the word percent and it will display, but would still like the character. Is there a way to do this?

Edited by touchdez (see edit history)
Link to comment
Share on other sites

smartdatasoft, I think I got it figured out. It is a hex code that had to be included to show the character. Line 86 now reads like this and it shows up correctly on the page:

 

<strong>{l s='Get a discount of %d% for you and your friends by recommending this Website.' sprintf=$discount mod='referralprogram'}</strong>

 

Thank you for your help - it is appreciated!

  • Like 1
Link to comment
Share on other sites

For clarification: the hex code % has to be included in the string as shown in post #9. That was the only way I could get the percentage sign to show on the page.

 

smartsoftdata, thank you for your help and I "liked" your post!

  • Like 1
Link to comment
Share on other sites

  • 3 months later...

The problem is in the sprintf conversion format. It cast a string into a integer value. To solve the problem just replace %d to %s

 

<strong>{l s='Get a discount of %s for you and your friends by recommending this Website.' sprintf=$discount mod='referralprogram'}</strong>

Edited by fjesteban (see edit history)
  • Like 3
Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

I have a similar problem the issue is NOT solved.

 

1) it persists in 1.5.6 and PS folks have still not fixed it permanently

2) that fix above does not work if you want to use a fixed dollar amount rather than a percentage

 

If I enter a 5$ fixed amount it shows "Get a discount of 0$"

If I enter a 5% discount it shows "Get a discount of 5$"

 

Module version is 1.8

Edited by claybourg (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
  • 1 year later...
  • 9 months later...
×
×
  • Create New...