touchdez Posted May 17, 2013 Share Posted May 17, 2013 (edited) 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 May 19, 2013 by touchdez (see edit history) Link to comment Share on other sites More sharing options...
touchdez Posted May 18, 2013 Author Share Posted May 18, 2013 Is there anyone that can tell me what I should do to correct this problem? Link to comment Share on other sites More sharing options...
SmartDataSoft Posted May 18, 2013 Share Posted May 18, 2013 will you told me which module you are using for custom referral so that i can check and give you a proper guide line. Link to comment Share on other sites More sharing options...
touchdez Posted May 18, 2013 Author Share Posted May 18, 2013 Thanks for getting back to me, smartdatasoft. It is the customer referral module included in the latest PrestaShop Version 1.5.4.1. Link to comment Share on other sites More sharing options...
SmartDataSoft Posted May 18, 2013 Share Posted May 18, 2013 Thanks for getting back to me, smartdatasoft. It is the customer referral module included in the latest PrestaShop Version 1.5.4.1. please see your screen shot is not attached. will you again attached that , so that i can visualize that. Link to comment Share on other sites More sharing options...
touchdez Posted May 18, 2013 Author Share Posted May 18, 2013 Will do - sorry for the delay in answering Link to comment Share on other sites More sharing options...
SmartDataSoft Posted May 19, 2013 Share Posted May 19, 2013 Will do - sorry for the delay in answering 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] 2 Link to comment Share on other sites More sharing options...
touchdez Posted May 19, 2013 Author Share Posted May 19, 2013 (edited) 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 May 19, 2013 by touchdez (see edit history) Link to comment Share on other sites More sharing options...
touchdez Posted May 19, 2013 Author Share Posted May 19, 2013 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! 1 Link to comment Share on other sites More sharing options...
SmartDataSoft Posted May 19, 2013 Share Posted May 19, 2013 touchdez your post is solved will you like my answer so that it build my deputation Link to comment Share on other sites More sharing options...
touchdez Posted May 19, 2013 Author Share Posted May 19, 2013 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! 1 Link to comment Share on other sites More sharing options...
fjesteban Posted August 29, 2013 Share Posted August 29, 2013 (edited) 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 August 29, 2013 by fjesteban (see edit history) 3 Link to comment Share on other sites More sharing options...
touchdez Posted August 30, 2013 Author Share Posted August 30, 2013 Thank you so much, fjesteban! I will change what I did previously. Link to comment Share on other sites More sharing options...
ishkey Posted September 30, 2013 Share Posted September 30, 2013 had the exact same problem following instructions above worked for me. many thanks. \modules\referralprogram\views\templates\front\program.tpl replace %d to %s 1 Link to comment Share on other sites More sharing options...
claybourg Posted November 7, 2013 Share Posted November 7, 2013 (edited) 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 November 7, 2013 by claybourg (see edit history) 1 Link to comment Share on other sites More sharing options...
liftbeisl Posted November 18, 2013 Share Posted November 18, 2013 Please change your program.php like this: https://github.com/PrestaShop/PrestaShop/commit/b9de912dd30f731b0c5757ba961937e09ff2b099 This is the only way th get the referral program working with % or $, as you want! Link to comment Share on other sites More sharing options...
claybourg Posted November 18, 2013 Share Posted November 18, 2013 Thanks but that did not do it, still showing "Get a discount of 0 $ for you and your friends by recommending this Website." Link to comment Share on other sites More sharing options...
dbeezer99 Posted November 25, 2013 Share Posted November 25, 2013 yes it still showing 0$ but if you change it to a % it will show the % so i just did that instead of fixed amount until they fix this bug 1 Link to comment Share on other sites More sharing options...
dformica Posted December 4, 2013 Share Posted December 4, 2013 yes it still showing 0$ but if you change it to a % it will show the % so i just did that instead of fixed amount until they fix this bug Doing the same until they fix the bug so we can use the dollar amount Link to comment Share on other sites More sharing options...
sancoLgates Posted January 8, 2015 Share Posted January 8, 2015 i do the same error...thanks Link to comment Share on other sites More sharing options...
rishabh0206 Posted October 16, 2015 Share Posted October 16, 2015 Had the exact same problem Following these instructions worked for me - \modules\referralprogram\views\templates\front\program.tpl replace %d to %s Thanks Link to comment Share on other sites More sharing options...
Recommended Posts