| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Show $$ value for BCSE's Reward Points Mod | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
Show $$ value for BCSE's Reward Points Mod
To display the $$ value anywhere, make sure that you have installed the reward points mod to display the points in the location of which you want to show the dollar value. Then:
Open auth.php and before ?> put: Code:
In your template file: Code:
Voila. |
|||||||||
|
#2
|
|||||||
|
|||||||
Re: Show $$ value for BCSE's Reward Points Mod
nice
__________________
X-Cart 4.4.5 | Linux/Apache | PHP 5.2.17 | MySQL 5.0.77 | FireFox |
|||||||
#3
|
|||||||
|
|||||||
Re: Show $$ value for BCSE's Reward Points Mod
You Champion
Ok, so here is the modified code a side bar menu item reward_points.tpl for the Customer rewards mod to show Line 1 - link to Points System Explanation ( your static page ) Line 2 - Link to Customer Referral programme ( the crp_referral.php ) Line 3 - if logged in show current points balance Line 4 - if logged in show current points equivilent $ Value {capture name=menu} <table border="0" cellpadding="3" cellspacing="0" width="100%"> <tr><td>Earn Points</td><td><a href="/store/pages.php?pageid=30" title="Coffee Shrine's Customer Reward Points Programme">{include file="buttons/search_head.tpl"}</a> </td></tr> <tr><td colspan="2"><hr class="VertMenuHr" size="1"/></td></tr> <tr><td>Refer a Friend</td><td><a href="/store/crp_referral.php" title="Refer a Friend and receive Bonus Points">{include file="buttons/search_head.tpl"}</a></td></tr> {if $login eq "" } <tr><td colspan="2"><hr class="VertMenuHr" size="1"/></td></tr> <tr><td colspan="2>">(User must be logged in)</td></tr> {else} {* Points Added*} <tr><td colspan="2"><hr class="VertMenuHr" size="1"/></td></tr> <tr> <td>Points Balance:</td> <td><b>{$points.total}</b></td> </tr> <tr> <td>Points Value:</td> <td>{math x=$points.total y=$wcmPaymentRate equation="x / y" format="%.2f" assign="wcmPointsDollars"} {include file="currency.tpl" value=$wcmPointsDollars}</td> </tr> {/if} {* End Points added*}</table> {/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_reward_points menu_content=$smarty.capture.menu } Enjoy - comments welcome
__________________
X-Cart Gold 4.1.10, 4.1.18, 4.4.4, 4.4.5 |
|||||||
#4
|
|||||||
|
|||||||
Re: Show $$ value for BCSE's Reward Points Mod
Hi there-
Great mod, however I notice a bug on my end. Everything seems to be working great when a user is logged in, but when a user registers from the first time on the register page the "point value" script give me this error... Points Value:FPRIVATE "TYPE=PICT;ALT=" Warning: Smarty error: math ``x / y'' in ``modules/Special_Offers/customer/new_offers_short_list.tpl'': parameter ``x'' is empty in /home/professi/public_html/upgrade/Smarty-2.6.19/Smarty.class.php on line 1092 $ It seems the error comes from the Special Offers module, but is present where the points value mod is. anybody have any ideas?
__________________
X-cart gold 4.5.2 (live) X-payments 1.0.5 http://www.professionalcarcare.com Your online source for all your car care needs |
|||||||
#5
|
|||||||
|
|||||||
Re: Show $$ value for BCSE's Reward Points Mod
Hmmm, I do not get the same error but I also do not use the special offers module...
It may be a version thing. Way out of my leauge - I am just an agregator of other peoples code...
__________________
X-Cart Gold 4.1.10, 4.1.18, 4.4.4, 4.4.5 |
|||||||
#6
|
|||||||
|
|||||||
Re: Show $$ value for BCSE's Reward Points Mod
Quote:
Maybe try an if else statement. if points =0 then 0 otherwise use the formula...
__________________
X-Cart Gold 4.1.10, 4.1.18, 4.4.4, 4.4.5 |
|||||||
#7
|
|||||||
|
|||||||
Re: Show $$ value for BCSE's Reward Points Mod
Try this - it includes an if else statement that doesnt seem to break anything
{capture name=menu} <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr><td colspan="2"><a href="/reward-points.html" title="Coffee Shrine's Customer Reward Points Programme"><b> Earn Points</b></a></td></tr> <tr><td colspan="2"><hr class="VertMenuHr" size="1"/></td></tr> <tr><td colspan="2"><a href="/crp_referral.php" title="Refer a Friend and receive Bonus Points"><b> Refer a Friend</b></a></td></tr> {if $login eq "" } <tr><td colspan="2"><hr class="VertMenuHr" size="1"/></td></tr> <tr><td colspan="2>">(User must be logged in)</td></tr> {else} {* Points Added*} <tr><td colspan="2"><hr class="VertMenuHr" size="1"/></td></tr> <tr> <td>Points Balance:</td> <td><b>{$points.total}</b></td> </tr> <tr> <td>Points Value:</td> <td>{if $points.total ne ""}{math x=$points.total y=$wcmPaymentRate equation="x / y" format="%.2f" assign="wcmPointsDollars"} {include file="currency.tpl" value=$wcmPointsDollars}{else}0{/if}</td> </tr> {/if} {* End Points added*}</table> {/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title=$lng.lbl_reward_points menu_content=$smarty.capture.menu } regards
__________________
X-Cart Gold 4.1.10, 4.1.18, 4.4.4, 4.4.5 |
|||||||
|
#8
|
|||||||
|
|||||||
Re: Show $$ value for BCSE's Reward Points Mod
Paul-
That seems to work. Thanks for your help.
__________________
X-cart gold 4.5.2 (live) X-payments 1.0.5 http://www.professionalcarcare.com Your online source for all your car care needs |
|||||||
#9
|
|||||||||
|
|||||||||
Re: Show $$ value for BCSE's Reward Points Mod
Has anyone figured out a way to get a customer's point count to show on a static page?
__________________
- www.nerdseven.com - Gadgets & Gizmos from Out of This World - Sound Sensitive T-Shirts That Flash to the Beat of Music (http://www.tqualizer.com) X-Cart Version 4.1.10 |
|||||||||
#10
|
|||||||
|
|||||||
Re: Show $$ value for BCSE's Reward Points Mod
I have a hunch that {$points.total} has become {$points} in vers 2 of this mod.
Confirmed by Carrie. Vers 2 is slightly different, and uses {$points} instead of {$points.total}
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
|
|
|||
X-Cart forums © 2001-2020
|