Zen Cart Logo
Forums / All Other Contributions/Addons / Reward Points Module for ZC v13x

Reward Points Module for ZC v13x

Locked

Views: 470,672

Results 1,241 to 1,260 of 2,476
This thread is locked. New replies are disabled.
2 Mar 2010, 7:58 PM
#1241
hem avatar

hem

Totally Zenned

Join Date:
Sep 2007
Location:
Dublin, Ireland
Posts:
1,281
Plugin Contributions:
5

Reward Points Module for ZC v13x

medeano:

Sorry just one small question in the rewards admin folder there is a file called - sqlpatch.zip

Do i have to apply this patch ??

Many thanks

Just unzip it to your admin/ folder- It fixes a bug in the original.

2 Mar 2010, 7:59 PM
#1242
hem avatar

hem

Totally Zenned

Join Date:
Sep 2007
Location:
Dublin, Ireland
Posts:
1,281
Plugin Contributions:
5

Re: Reward Points Module for ZC v13x

ryanb4614:

I have the newest version, I use a cash value discount not a % percent..... but in the "My account" is shows it as a percent and everything else is a $ as it should be

if(defined(MODULE_ORDER_TOTAL_REWARD_POINTS_DISCOUNT_STATUS) && MODULE_ORDER_TOTAL_REWARD_POINTS_DISCOUNT_STATUS==true)
{
$row=GetRewardPointDiscountRow($total_points);
if($row!=null)
$points_value=$row['discount'].'%';
else
$points_value="0%";
}


Are you using 1.27a? I'll check this out in the morning...
3 Mar 2010, 12:10 AM
#1243
ryanb4614 avatar

ryanb4614

Totally Zenned

Join Date:
Feb 2008
Posts:
556
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Yes I am. It is only is in under "my account" view account information. Everywhere else it works. Thank you!

3 Mar 2010, 2:27 PM
#1244
hem avatar

hem

Totally Zenned

Join Date:
Sep 2007
Location:
Dublin, Ireland
Posts:
1,281
Plugin Contributions:
5

Re: Reward Points Module for ZC v13x

Make sure you've extracted the tpl_account_edit_default.php to your correct custom folder- the full code for that segment should be:

<fieldset>
<legend><?php echo REWARD_POINT_TITLE; ?></legend>
<?php
	$total_points=getCustomersRewardPoints($_SESSION['customer_id']);
	if(defined(MODULE_ORDER_TOTAL_REWARD_POINTS_STATUS) && MODULE_ORDER_TOTAL_REWARD_POINTS_STATUS==true)
	{
		$redeem_ratio=GetRedeemRatio($_SESSION['customer_id']);
		$points_value=$currencies->format($total_points*$redeem_ratio);
	}
	else
	 if(defined(MODULE_ORDER_TOTAL_REWARD_POINTS_DISCOUNT_STATUS) && MODULE_ORDER_TOTAL_REWARD_POINTS_DISCOUNT_STATUS==true)
	 {
		$row=GetRewardPointDiscountRow($total_points);
		if($row!=null)
		 $points_value=$row['discount'].'%';
		else
		 $points_value="0%";
	 }
	
	echo '<label class="inputLabel">'.REWARD_POINT_PROMPT.'</label>'.'<label class="inputLabel">'.$total_points.'</label>'; 
	echo '<br class="clearBoth" />';
	echo '<label class="inputLabel">'.REWARD_POINT_VALUE_PROMPT.'</label>'.'<label class="inputLabel">'.$points_value.'</label>';
?>
<br class="clearBoth" />
</fieldset>
3 Mar 2010, 3:40 PM
#1245
ryanb4614 avatar

ryanb4614

Totally Zenned

Join Date:
Feb 2008
Posts:
556
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

hem:

Make sure you've extracted the tpl_account_edit_default.php to your correct custom folder- the full code for that segment should be:

<fieldset> <legend><?php echo REWARD_POINT_TITLE; ?></legend> <?php $total_points=getCustomersRewardPoints($_SESSION['customer_id']); if(defined(MODULE_ORDER_TOTAL_REWARD_POINTS_STATUS) && MODULE_ORDER_TOTAL_REWARD_POINTS_STATUS==true) { $redeem_ratio=GetRedeemRatio($_SESSION['customer_id']); $points_value=$currencies->format($total_points*$redeem_ratio); } else if(defined(MODULE_ORDER_TOTAL_REWARD_POINTS_DISCOUNT_STATUS) && MODULE_ORDER_TOTAL_REWARD_POINTS_DISCOUNT_STATUS==true) { $row=GetRewardPointDiscountRow($total_points); if($row!=null) $points_value=$row['discount'].'%'; else $points_value="0%"; }
echo '<label class="inputLabel">'.REWARD_POINT_PROMPT.'</label>'.'<label class="inputLabel">'.$total_points.'</label>'; 
echo '<br class="clearBoth" />';
echo '<label class="inputLabel">'.REWARD_POINT_VALUE_PROMPT.'</label>'.'<label class="inputLabel">'.$points_value.'</label>';

?>
<br class="clearBoth" />

</fieldset> ```

I replaced what you had, its the same that I had anyways. Still shows as this:
Total Reward Point Value: 20%
When it should be Total Reward Point Value: $20 .... Everything is located in the correct directory. Please let me know. I don't see anything in the code that points to it that it should use a $ insted when using a cash discount not a % discount.... Again this only in the my account settings, during checkout everything is how it should and it deducts correctly using $, its just showing wrong in the "My Account". Thank you.

3 Mar 2010, 4:53 PM
#1246
hem avatar

hem

Totally Zenned

Join Date:
Sep 2007
Location:
Dublin, Ireland
Posts:
1,281
Plugin Contributions:
5

Re: Reward Points Module for ZC v13x

Check your configuration table in MySQL and double check that MODULE_ORDER_TOTAL_REWARD_POINTS_STATUS has been inserted.

3 Mar 2010, 7:36 PM
#1247
ryanb4614 avatar

ryanb4614

Totally Zenned

Join Date:
Feb 2008
Posts:
556
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

where would the exact location be I could only find:
MODULE_ORDER_TOTAL_REWARD_POINTS_DISPLAY_STATUS

3 Mar 2010, 11:17 PM
#1248
hem avatar

hem

Totally Zenned

Join Date:
Sep 2007
Location:
Dublin, Ireland
Posts:
1,281
Plugin Contributions:
5

Re: Reward Points Module for ZC v13x

ryanb4614:

where would the exact location be I could only find:
MODULE_ORDER_TOTAL_REWARD_POINTS_DISPLAY_STATUS

If you have phpmyadmin open your zencart database and search for it in the configuration table.

3 Mar 2010, 11:24 PM
#1249
ryanb4614 avatar

ryanb4614

Totally Zenned

Join Date:
Feb 2008
Posts:
556
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

nothing comes up for: MODULE_ORDER_TOTAL_REWARD_POINTS_STATUS

3 Mar 2010, 11:34 PM
#1250
hem avatar

hem

Totally Zenned

Join Date:
Sep 2007
Location:
Dublin, Ireland
Posts:
1,281
Plugin Contributions:
5

Re: Reward Points Module for ZC v13x

hmm- it looks like you need to run the update.sql through the sql patch.

3 Mar 2010, 11:41 PM
#1251
ryanb4614 avatar

ryanb4614

Totally Zenned

Join Date:
Feb 2008
Posts:
556
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

I have and still shows as a percent not dollars. And in the database still cant locate MODULE_ORDER_TOTAL_REWARD_POINTS_STATUS Also now I have in admin - config 2 reward points options

3 Mar 2010, 11:55 PM
#1252
ryanb4614 avatar

ryanb4614

Totally Zenned

Join Date:
Feb 2008
Posts:
556
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Okay I went through the database and removed both "Reward Points" and ran the update still shows as a % in my account :\

4 Mar 2010, 12:11 AM
#1253
ryanb4614 avatar

ryanb4614

Totally Zenned

Join Date:
Feb 2008
Posts:
556
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

sorry for the triple post, but I have also found another location in the admin-> Customers-> Reward Points... it shows as this:
Reward Points Pending: 0
Value of Pending: $0.00
Reward Points Earned: 113
Value of Earned: 5%
When the Value of Earned should be $5.00... maybe this will help you find the error. Is it doing the same for you?

4 Mar 2010, 2:43 AM
#1254
dropbop avatar

dropbop

Zen Follower

Join Date:
Apr 2008
Location:
Athlone, Ireland
Posts:
177
Plugin Contributions:
1

Re: Reward Points Module for ZC v13x

medeano:

Ive managed to sort it i found your -

Reward Point Mod Diagnostic Tool.

This is available here: http://www.omnicia.com/rpd.zip

This should a couple of files missing which were winkypinky template files, i made these files and its all up and running.
Just gotta learn how to use this mod.

Many many thanks for sharing this mod :clap:

Hi medeano,

is it possible to let me know what files were missing that were causing the problem.

PinkyWinky is my first template so would like to iron out any creases if I can.

Cheers

DB

4 Mar 2010, 9:00 AM
#1255
hem avatar

hem

Totally Zenned

Join Date:
Sep 2007
Location:
Dublin, Ireland
Posts:
1,281
Plugin Contributions:
5

Re: Reward Points Module for ZC v13x

ryanb4614:

Okay I went through the database and removed both "Reward Points" and ran the update still shows as a % in my account :\

Ryan- there is an sql script called "remove_multiple_config_items" which cleans up multiple config items (any- not only Reward Points).

5 Mar 2010, 6:32 PM
#1256
lauriesscraps avatar

lauriesscraps

Zen Follower

Join Date:
Sep 2009
Posts:
255
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

I installed this module and ran into a couple problems. When I go into admin.configure.reward points I get a bunch of error message up above the admin list.

When I click on Set New Account Reward Points and Set New Account Reward Points

Fatal error: Call to undefined function SetRewardPointStateFunction() in /home7/lauriess/public_html/store/lsadminls/configuration.php(192) : eval()'d code on line 1

Warning: call_user_func(UseRewardPointStateFunction) [function.call-user-func]: First argument is expected to be a valid callback in /home/xxxxx/public_html/store/xxxxx/includes/functions/general.php on line 1544

Warning: call_user_func(UseRewardPointNewAccountAwardFunction) [function.call-user-func]: First argument is expected to be a valid callback in /home/xxxxx/public_html/store/xxxxx/includes/functions/general.php on line

When I click on anything else I get this:

Warning: call_user_func(UseRewardPointStateFunction) [function.call-user-func]: First argument is expected to be a valid callback in /home/xxxxx/public_html/store/xxxxx/includes/functions/general.php on line 1544

Warning: call_user_func(UseRewardPointNewAccountAwardFunction) [function.call-user-func]: First argument is expected to be a valid callback in /home7/xxxxxs/public_html/store/xxxxx/includes/functions/general.php on line 1544

5 Mar 2010, 7:13 PM
#1257
lauriesscraps avatar

lauriesscraps

Zen Follower

Join Date:
Sep 2009
Posts:
255
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

lauriesscraps:

I installed this module and ran into a couple problems. When I go into admin.configure.reward points I get a bunch of error message up above the admin list.

When I click on Set New Account Reward Points and Set New Account Reward Points

:

Sorry this is suppossed to say Set New Account Reward Points and Reward Point Status Track

5 Mar 2010, 9:10 PM
#1258
lauriesscraps avatar

lauriesscraps

Zen Follower

Join Date:
Sep 2009
Posts:
255
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

lauriesscraps:

I installed this module and ran into a couple problems. When I go into admin.configure.reward points I get a bunch of error message up above the admin list.

When I click on Set New Account Reward Points and Set New Account Reward Points

When I click on anything else I get this:

After looking this up, the line (line 1544) it is talking about says this:

return call_user_func($function, $parameter);

and the other one in the configuration.php file... I have no idea, but the only line that has "eval" in it is this one..

eval('$value_field = ' . $cInfo->set_function . '"' . htmlspecialchars($cInfo->configuration_value) . '");');

Any suggestions?

5 Mar 2010, 10:34 PM
#1259
hem avatar

hem

Totally Zenned

Join Date:
Sep 2007
Location:
Dublin, Ireland
Posts:
1,281
Plugin Contributions:
5

Re: Reward Points Module for ZC v13x

Have you made any changes to your zencart database recently?

5 Mar 2010, 10:40 PM
#1260
hem avatar

hem

Totally Zenned

Join Date:
Sep 2007
Location:
Dublin, Ireland
Posts:
1,281
Plugin Contributions:
5

Re: Reward Points Module for ZC v13x

Also- try running rpd (Reward Point Diagnostics)- You can download the latest from https://www.omnicia.com/rpd.zip- Just copy the two files to your root folder and call rpd.php from your browser.