Forums / All Other Contributions/Addons / Reward Points Full Suite v2.5 (for ZC v1.5x) Support Thread

Reward Points Full Suite v2.5 (for ZC v1.5x) Support Thread

Views: 72,390

Results 201 to 220 of 364
19 Sep 2016, 9:01 AM
#201
mesnitu avatar

mesnitu

Totally Zenned

Join Date:
Aug 2014
Location:
Lisbon
Posts:
597
Plugin Contributions:
0

Reward Points Full Suite v2.5 (for ZC v1.5x) Support Thread

One thing I notice , and I also think I've mentioned in some previous thread, is that in Advanced Reward Point Calculation Rules, there's no ot_total to subtract to.

This configuration, has a strange behavior and it's coming or built from a jscript.

Sometimes I see a t_total but never the ot_total
I remember that I've saw this array, but never quite understood why it was not reading the proper name.

“Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

19 Sep 2016, 10:48 AM
#202
mesnitu avatar

mesnitu

Totally Zenned

Join Date:
Aug 2014
Location:
Lisbon
Posts:
597
Plugin Contributions:
0

Re: Reward Points Full Suite v2.5 (for ZC v1.5x) Support Thread

chibipaw:

Thanks for the point. Sometimes its just really hard to sift through the threads without missing critical pieces.
Looks like your code allowed redemption of the rewards points at check out.
but I have noticed now that a customer can check out, but the points are not actually subtracted from the customer's account. Are you having that problem too, or is there another patch for that?

I check the file again, and for some reason I didnt' change to what I've posted here:

See if this works ( at includes/modules/order_toral/ot_rewards_points.php around line 122 )
So change the zen_draw_hidden_field('redeem_checkout_flag',true) to zen_draw_hidden_field('redeem_checkout_flag',1)

 if(MODULE_ORDER_TOTAL_REWARD_POINTS_TYPE=="Automatic")
			   $prompt=zen_draw_checkbox_field('redeem_flag',true,isset($_SESSION['redeem_value']),'').' '.zen_draw_hidden_field('redeem_checkout_flag',1);
			  else
			   $prompt =zen_draw_input_field('redeem_points',isset($_SESSION['redeem_points'])).' '.zen_draw_hidden_field('redeem_checkout_flag',1);

I'm using the simple calculation mode, but I think this is working.
But also check if the Advanced Reward Point Calculation Rules are ok. As I mentioned, I think this is not working very well.

“Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

22 Sep 2016, 4:47 PM
#203
paul3648 avatar

paul3648

Zen Follower

Join Date:
Mar 2007
Location:
Taiwan
Posts:
239
Plugin Contributions:
0

Re: Reward Points Full Suite v2.5 (for ZC v1.5x) Support Thread

Thank you SO much! This seems to be working for me, and I have the advanced rules enabled.

22 Sep 2016, 5:09 PM
#204
mesnitu avatar

mesnitu

Totally Zenned

Join Date:
Aug 2014
Location:
Lisbon
Posts:
597
Plugin Contributions:
0

Re: Reward Points Full Suite v2.5 (for ZC v1.5x) Support Thread

I'm not sure if it's entirely working. I'm getting for some reason less 10 points on the check-out.
I'm on mobile, so cant give a example, but check if it's resetting points when clearing / changing a basket, and if the calculations are ok during the all check-out process.

“Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

22 Sep 2016, 6:08 PM
#205
paul3648 avatar

paul3648

Zen Follower

Join Date:
Mar 2007
Location:
Taiwan
Posts:
239
Plugin Contributions:
0

Re: Reward Points Full Suite v2.5 (for ZC v1.5x) Support Thread

I just tried a very convoluted process of adding products, selecting reward points to redeem, removing products, unchecking redeem points, in various combinations and the reward points were always accurate. I didn't go right through to the order confirmation though - is that where you are having trouble?

I just noticed though that I had done some previous editing on this file e.g. changing line 26 to function __construct()

There may be other changes too, it was a while since I did that.

22 Sep 2016, 6:18 PM
#206
mesnitu avatar

mesnitu

Totally Zenned

Join Date:
Aug 2014
Location:
Lisbon
Posts:
597
Plugin Contributions:
0

Re: Reward Points Full Suite v2.5 (for ZC v1.5x) Support Thread

Probably I have something wrong, but I haven't yet figure out what
...
Do you use the round number ( in the configuration ? )
I have 0.5.....
But again, I cant give the right info since I'm on mobile. But if it's working for you, thats cool.

“Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

22 Sep 2016, 6:32 PM
#207
paul3648 avatar

paul3648

Zen Follower

Join Date:
Mar 2007
Location:
Taiwan
Posts:
239
Plugin Contributions:
0

Re: Reward Points Full Suite v2.5 (for ZC v1.5x) Support Thread

My reward point rounding is set to 0.0

Other settings:

Reward Point Status Track : Simple
Adjust Reward Points for Sales/Specials : 1
Advanced Reward Point Calculation Rules : Advanced Rules Enabled

Most other settings are at 0

23 Sep 2016, 5:58 AM
#208
chibipaw avatar

chibipaw

Zen Follower

Join Date:
Jul 2011
Posts:
167
Plugin Contributions:
0

Re: Reward Points Full Suite v2.5 (for ZC v1.5x) Support Thread

I've implemented the changes from post #202.
Quick test looks like the points are finally being subtracting.
My rounding is set to 0.025.
I have not noticed rounding problems yet. But then I haven't really fine tune examine the results yet.

23 Sep 2016, 8:46 PM
#209
spottycupcakes avatar

spottycupcakes

New Zenner

Join Date:
Jan 2014
Posts:
19
Plugin Contributions:
0

Re: Reward Points Full Suite v2.5 (for ZC v1.5x) Support Thread

chibipaw:

I've implemented the changes from post #202.
Quick test looks like the points are finally being subtracting.
My rounding is set to 0.025.
I have not noticed rounding problems yet. But then I haven't really fine tune examine the results yet.

I've upgraded my zen cart to the newest version and now my reward points are working right up to the redeem part. They are being calculated correctly but when the customer tries to redeem them it doesn't work. Will someone try and fix this module or would I be best issuing gift certificate balances for the amounts on every account and looking for something more reliable? If there is an official fix could someone please help me with this as I'm not hugely knowledgeable about coding and things or can you recommend a more reliable module? Thank you so much.

24 Sep 2016, 8:09 AM
#211
spottycupcakes avatar

spottycupcakes

New Zenner

Join Date:
Jan 2014
Posts:
19
Plugin Contributions:
0

Re: Reward Points Full Suite v2.5 (for ZC v1.5x) Support Thread

Thank you so much Paul3648. I had only changed the one instance. Seems to be working now.

28 Sep 2016, 8:46 AM
#212
mesnitu avatar

mesnitu

Totally Zenned

Join Date:
Aug 2014
Location:
Lisbon
Posts:
597
Plugin Contributions:
0

Re: Reward Points Full Suite v2.5 (for ZC v1.5x) Support Thread

Well, probably it's the way it works.... but for i.e:

A 8.5 order gives 85 points. Ok.
Lets say that the customers redeems 100 points.
But on checkout_confirmation page:

Sub-Total: 8,50€
Shipping : 1,50€
-1,00€ ( the amount for 100 points ):
Total: 9,00€

And the customers gets 75 reward points.

So, I thought that the customers would use his points, and receive the actual 85 points. But it's subtracting 10 points from the 85 ( so the points that the customers used for this purchase. )

But maybe this is explain in some older threads... I haven't check.

Another thing, that it's happening and I think it's confused, it's even if I clear the basket, and add some other product, on checkout_payment
the 100 points (for this example the last 100 reward points used ) are still there. And I think, that when clearing the basket , all that info should be clear too. ( I think )..... or maybe not.

“Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

29 Sep 2016, 7:37 AM
#213
chibipaw avatar

chibipaw

Zen Follower

Join Date:
Jul 2011
Posts:
167
Plugin Contributions:
0

Re: Reward Points Full Suite v2.5 (for ZC v1.5x) Support Thread

Are you using it in advanced mode?
I've played with it and didnt have issues with circular points since the customers only get pending points, not earned points until I manually change their products to the "delivered" status.

29 Sep 2016, 6:06 PM
#214
paul3648 avatar

paul3648

Zen Follower

Join Date:
Mar 2007
Location:
Taiwan
Posts:
239
Plugin Contributions:
0

Re: Reward Points Full Suite v2.5 (for ZC v1.5x) Support Thread

mesnitu:

A 8.5 order gives 85 points. Ok.
Lets say that the customers redeems 100 points.
But on checkout_confirmation page:

Sub-Total: 8,50€
Shipping : 1,50€
-1,00€ ( the amount for 100 points ):
Total: 9,00€

And the customers gets 75 reward points.

He's getting 75 points because he's actually paying 7,50€. I think this is correct.

mesnitu:

Another thing, that it's happening and I think it's confused, it's even if I clear the basket, and add some other product, on checkout_payment
the 100 points (for this example the last 100 reward points used ) are still there. And I think, that when clearing the basket , all that info should be clear too. ( I think )..... or maybe not.

I think this is also correct, because the customer has already indicated he wants to redeem the points, so they are automatically selected in the same session.

18 Nov 2016, 11:09 AM
#215
mesnitu avatar

mesnitu

Totally Zenned

Join Date:
Aug 2014
Location:
Lisbon
Posts:
597
Plugin Contributions:
0

Re: Reward Points Full Suite v2.5 (for ZC v1.5x) Support Thread

There's another issue that I can't reproduce at xampp with PHP Version: 5.6.15 (Zend: 2.6.0) , and the online server with PHP Version: 5.6.28 (Zend: 2.6.0)

But if no advance Advanced Reward Point Calculation Rules are set , no modules are set there, it returns

[18-Nov-2016 10:40:29 Europe/Lisbon] PHP Warning:  Invalid argument supplied for foreach() in /home/public/includes/functions/extra_functions/reward_points_functions.php on line 314
function GetRewardPointAdvancedCalculateValue()
{
	$value=0;
	
	$module_list=GetRewardPointAdvancedCalculateTable();

        foreach($module_list as $module)
	 if($module['action']=="Subtract")
	  $value-=GetOrderTotalValue($module['module']);
	 else
	  $value+=GetOrderTotalValue($module['module']);
    	  
	return $value;
}

Looks like surrounding this foreach to loop only if there are odules to calculate , solves the warnings.

function GetRewardPointAdvancedCalculateValue()
{
	$value=0;
	
	$module_list=GetRewardPointAdvancedCalculateTable();
	
	 if (!empty($module_list)) {
     
        foreach($module_list as $module)
	 if($module['action']=="Subtract")
	  $value-=GetOrderTotalValue($module['module']);
	 else
	  $value+=GetOrderTotalValue($module['module']);
    }
	  
	return $value;
}

But, again, I can't reproduce on xampp...probably the php version.

“Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

27 Nov 2016, 1:03 AM
#216
jmsnyder23 avatar

jmsnyder23

Zen Follower

Join Date:
Jan 2010
Location:
Richmond, Virginia, United States
Posts:
122
Plugin Contributions:
0

Re: Reward Points Full Suite v2.5 (for ZC v1.5x) Support Thread

I just installed this mod and it's working well EXCEPT that order notification emails aren't being sent out. I don't get a copy as the store admin and the customer isn't getting a copy, either.

What could've made this happen?

30 Nov 2016, 5:54 PM
#217
jmsnyder23 avatar

jmsnyder23

Zen Follower

Join Date:
Jan 2010
Location:
Richmond, Virginia, United States
Posts:
122
Plugin Contributions:
0

Re: Reward Points Full Suite v2.5 (for ZC v1.5x) Support Thread

izar74:

Hi again,

I've got this error:

[25-May-2015 15:22:01] PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2')
OR (p.products_id=p2c.products_id AND prp.scope_id=p2c.categories_id A' at line 3 :: SELECT prp.point_ratio*p.products_price AS reward_points, prp.point_ratio, p.products_price, p.products_priced_by_attribute
FROM reward_master prp, products p, products_to_categories p2c
WHERE p.products_id='101'"'
AND p2c.products_id='101'"'
AND ((prp.scope_id=p.products_id AND prp.scope='2')
OR (p.products_id=p2c.products_id AND prp.scope_id=p2c.categories_id AND prp.scope='1')
OR (prp.scope='0'))
ORDER BY prp.scope DESC LIMIT 1; ==> (as called by) /var/www/vhosts/.../httpdocs/includes/functions/extra_functions/reward_points_functions.php on line 62 <== in /var/www/vhosts/.../httpdocs/includes/classes/db/mysql/query_factory.php on line 155

> 
> Check the file but it seem all fine... the line 51 to 62 of reward_points_functions.php look like this:
> 
> ```php
if(zen_get_products_price_is_free($products_id)==false || REWARD_POINTS_ALLOW_ON_FREE=='1') // Allow RP on free items (Admin settable)
	{
		$sql = "SELECT prp.point_ratio*p.products_price AS reward_points, prp.point_ratio, p.products_price, p.products_priced_by_attribute 
				FROM ".TABLE_REWARD_MASTER." prp, ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_TO_CATEGORIES." p2c 
				WHERE p.products_id='" . $products_id . "'
				AND p2c.products_id='" . $products_id . "'
				AND ((prp.scope_id=p.products_id AND prp.scope='".SCOPE_PRODUCT."') 
				OR (p.products_id=p2c.products_id AND prp.scope_id=p2c.categories_id AND prp.scope='".SCOPE_CATEGORY."')
				OR (prp.scope='".SCOPE_GLOBAL."'))
				ORDER BY prp.scope DESC LIMIT 1;";

		$result=$db->Execute($sql);

The specific of the server are:
Database: MySQL 5.1.73
Versione PHP: 5.3.3 (Zend: 2.3.0) PHP Memory Limit: 128M

I'm a little bit unsure of what that error could be... any guess would be helpful :smile:

I have this same error on a new installation of the Reward Points plugin.

Any reason why this appears?

26 Dec 2016, 3:37 PM
#218
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Reward Points Full Suite v2.5 (for ZC v1.5x) Support Thread

Can't seem to get this to work the way I want it to :-(

Item cost $8.00
Reward Points should be 8

Each Reward point should have CASH VALUE of $0.10

Pending Value is CORRECT $0.80

But Available is 0%

What am I doing incorrect?

26 Dec 2016, 3:55 PM
#219
jmsnyder23 avatar

jmsnyder23

Zen Follower

Join Date:
Jan 2010
Location:
Richmond, Virginia, United States
Posts:
122
Plugin Contributions:
0

Re: Reward Points Full Suite v2.5 (for ZC v1.5x) Support Thread

The points are PENDING until you approve them. You can set it up to approve them automatically, but the only way I managed to do that is by changing the Sunrise Period to 1 instead of 0.

In admin, go to Configuration / Reward Point Configuration. Look for "Reward Point Sunrise Period" and set this to 1.

All pending points will move to EARNED after 24 hours.

You can see the pending points by going to Customers / Reward Points and sorting by Points Pending.

Hope this helps!

27 Dec 2016, 5:01 PM
#220
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Reward Points Full Suite v2.5 (for ZC v1.5x) Support Thread

Thanks, but doesn't make a difference.

I'll just hack it to make it work the way I want it too!

jmsnyder23:

The points are PENDING until you approve them. You can set it up to approve them automatically, but the only way I managed to do that is by changing the Sunrise Period to 1 instead of 0.

In admin, go to Configuration / Reward Point Configuration. Look for "Reward Point Sunrise Period" and set this to 1.

All pending points will move to EARNED after 24 hours.

You can see the pending points by going to Customers / Reward Points and sorting by Points Pending.

Hope this helps!