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

Reward Points Module for ZC v13x

Locked

Views: 470,583

Results 2,221 to 2,240 of 2,476
This thread is locked. New replies are disabled.
22 Mar 2013, 2:24 PM
#2221
ahhs9162 avatar

ahhs9162

New Zenner

Join Date:
Aug 2012
Location:
North Carolina
Posts:
28
Plugin Contributions:
0

Reward Points Module for ZC v13x

SOLVED!

First, on

/www/includes/functions/extra_functions/reward_points_functions.php

I added a new function ,after the function GetRedeemRatio() :

function GetRedeemGroup($customers_id)
{
	global $db;
	
	$sql = "SELECT gp.group_name
	        FROM ".TABLE_GROUP_PRICING." gp
			LEFT JOIN (".TABLE_CUSTOMERS." as c)
			ON (gp.group_id=c.customers_group_pricing)
			WHERE c.customers_id='".(int)$customers_id."'
			ORDER BY gp.group_id
			"; 

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

    if($result)
	 return $result->fields['group_name'];
	else
	 return 0;
}

and

on

/www/includes/templates/YOUR_TEMPLATE/sideboxes/tpl_reward_points.php

after $reward_points=GetRewardPoints($_SESSION['cart']->get_products()); (LINE AROUND 11)

add this :

$group_name=GetRedeemGroup($_SESSION['customer_id']);

and one a line about 25, afther the if($reward_points>0) statement

change the line

$content='<div class="cartBoxRewardPoints">'. .....
```       to :

```php
$content.='<div class="cartBoxRewardPoints">'. '<p style="color:green;text-align:center;font-size:12px;font-weight:bold;">My Level : ' . $group_name . '</p><br />' . $customers->fields['group_name'].(int)$reward_points.' '.REWARD_POINTS_IN_CART_TAG.'</div>';

This will make you able to show the customer's group name on the sidebox.

I was trying to build the customer's membership policy,

and now I finally can.

Thank you for this great module... that I can provide betther service to my customer.

23 Mar 2013, 2:25 AM
#2222
cooledit avatar

cooledit

New Zenner

Join Date:
Mar 2013
Posts:
1
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

hem:

http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_60&products_id=1002

Hello There
I have just installed the reward point full suite. but theres a question. how i can get the customer upgrade automaticlly to the higher pricing group level? i have tested three times. still did not find out the right solution.

Please give me some advice. thanks

24 Mar 2013, 11:16 AM
#2223
teochris avatar

teochris

New Zenner

Join Date:
Aug 2011
Posts:
7
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

I have chosen from the configuration - reward points - Reward Point Status Track - select mode - advanced - all my order statuses (i have more than 50) as pending except one that i call order completed - however all the tests i did and even if i change the order status to order completed - the customer does not earn the points they are still pending all the time - BUT i have noticed that sometimes some customers (the percentage is 1 to 20) earn the points after i change the status of their order to completed!
I even updated the reward points to the latest version for my 1.3.9h zen cart this did not fix the problem.

I have also tried all order statuses as ignored except the default one that puts point to pending and the order completed status that is supposed to put the points to earned.

I can manually change the points from pending to earned for my customers.

I have a test server with this addon installed if someone can help me then please tell me so and i will give all the access details!

24 Mar 2013, 11:31 AM
#2224
teochris avatar

teochris

New Zenner

Join Date:
Aug 2011
Posts:
7
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Between the update.sql and the new.sql the only difference is the following line

UPDATE configuration_group SET sort_order = LAST_INSERT_ID() WHERE configuration_group_id = LAST_INSERT_ID();

what exactly this line mean - do i have to run the update patch or i may run only the above line if needed?

I just found what is happening - I have super orders addon installed and if i change the status of the order from the super_orders.php?page=1&oID=3911&action=edit page then the reward points just ignore it! But if i change the order status from edit_orders.php?page=1&oID=3911&action=edit then everything works properly!

Can someone tell me what i have to add or change for the super_orders.php to work properly?

24 Mar 2013, 7:08 PM
#2225
teochris avatar

teochris

New Zenner

Join Date:
Aug 2011
Posts:
7
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

[24-Mar-2013 20:49:50] PHP Warning: Invalid argument supplied for foreach() in /home/......./public_html/includes/functions/extra_functions/reward_points_functions.php on line 314

I keep seeing errors like this in the cache folder whenever a customers completes an order

I have just installed the latest version of reward points (i had 1.32a version and i upgraded to 1.33a for zen cart 1.3.9h) I just copied the new files over the old ones but i did not run any update sql patch - However i used to see this error and with the previous version)

25 Mar 2013, 1:38 PM
#2226
devus avatar

devus

New Zenner

Join Date:
Jan 2009
Posts:
35
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

We recently upgraded to zen-cart 1.51 (new install with ported database from old site).

Reward points is installed but doesn't seem to be working properly. Points are not getting moved from pending to earned, plus a lot of customers seem to have 200 pending points for no particular reason. No points are awarded for new accounts.

I am seeing this error in the logs which seems to be related. The products_id field is not formatted correctly.

Any ideas as to the cause?

[25-Mar-2013 12:21:19 Europe/London] 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 '1215"''
                AND ((prp.scope_id=p.products_id AND prp.scope='2') 
                OR (p.pro' 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='1215"''
                AND p2c.products_id='1215"''
                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; in <site>/includes/classes/db/mysql/query_factory.php on line 120

Chris

26 Mar 2013, 8:29 AM
#2227
teochris avatar

teochris

New Zenner

Join Date:
Aug 2011
Posts:
7
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

In my previous posts i stated that i have a problem with reward points and super orders, and that i am also facing a problem with /home/......./public_html/includes/functions/extra_functions/reward_points_functions.php on line 314 which appears in my cache folder.

If a programmer can help me with these problems then i am willing to pay him or donate him - whatever!

26 Mar 2013, 9:51 PM
#2228
devus avatar

devus

New Zenner

Join Date:
Jan 2009
Posts:
35
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

We are also using rewards points and super orders. Maybe one of them will have to go.

27 Mar 2013, 12:56 AM
#2229
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Reward Points Module for ZC v13x

teochris:

In my previous posts i stated that i have a problem with reward points and super orders, and that i am also facing a problem with /home/......./public_html/includes/functions/extra_functions/reward_points_functions.php on line 314 which appears in my cache folder.

If a programmer can help me with these problems then i am willing to pay him or donate him - whatever!

devus:

We are also using rewards points and super orders. Maybe one of them will have to go.

I don't use Super Orders but you can try what curt_l did and see if that works for you.

http://www.zen-cart.com/showthread.p...65#post1143265

27 Mar 2013, 8:39 PM
#2230
beyond_dreams avatar

beyond_dreams

New Zenner

Join Date:
Feb 2013
Posts:
45
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Hi,

I installed this plugin and placed all files in the corresponding folders on my server... However, I have a few issues....
I don't have the following on my admin page
admin-catalog-reward points is not in my menu
admin-configuration-reward points is not in my menu
admin-customer-group reward redeem is not in my list

I also need to know where to change the point values, it seems it is automatically giving 1 point per dollar. I also need to know how i can go in and add points to existing customers who earned them before the module was installed.

Also this is a minor change but I want to change the colors of the font for the reward listings. And I want to change the name to dream dollars. Any help with these issues would be greatly appreciated. TY TY TY -victoria

27 Mar 2013, 9:09 PM
#2231
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Reward Points Module for ZC v13x

Beyond Dreams:

Hi,

I installed this plugin and placed all files in the corresponding folders on my server... However, I have a few issues....
I don't have the following on my admin page
admin-catalog-reward points is not in my menu
admin-configuration-reward points is not in my menu
admin-customer-group reward redeem is not in my list

I also need to know where to change the point values, it seems it is automatically giving 1 point per dollar. I also need to know how i can go in and add points to existing customers who earned them before the module was installed.

Also this is a minor change but I want to change the colors of the font for the reward listings. And I want to change the name to dream dollars. Any help with these issues would be greatly appreciated. TY TY TY -victoriaDid you run the install SQL file?? If not, doing so will probably address most of the issues/questions you have..

28 Mar 2013, 8:15 PM
#2232
beyond_dreams avatar

beyond_dreams

New Zenner

Join Date:
Feb 2013
Posts:
45
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

yes i ran it and it says error. i placed all the files in the directories they are supposed to be in by hand. My upload folder doesnt seem to work on my hosting site. I have the rewards box, I changed the rewards name, it adds 1 point per dollar when i put the items in the shopping cart, but I am still missing the menu options that will help me set these options.

I even tried cutting and pasting the sql patch into the tools sqlpatch and still got an error but no info to tell me what the error is. I have the main admin file where i put the files, I have no custom admin file. The only customized items i have are from using the an_upscale_boutique template, and i put the appropriate files in those folders. This is the latest version of zencart and the latest version of reward points and a fresh install. What else can I do to fix this?

I cant launch my store until i fix this. Any help would be greatly appreciated.
my site is https://www.beyonddreams.co

28 Mar 2013, 8:39 PM
#2233
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Reward Points Module for ZC v13x

Beyond Dreams:

yes i ran it and it says error. i placed all the files in the directories they are supposed to be in by hand. My upload folder doesnt seem to work on my hosting site. I have the rewards box, I changed the rewards name, it adds 1 point per dollar when i put the items in the shopping cart, but I am still missing the menu options that will help me set these options.

I even tried cutting and pasting the sql patch into the tools sqlpatch and still got an error but no info to tell me what the error is. I have the main admin file where i put the files, I have no custom admin file. The only customized items i have are from using the an_upscale_boutique template, and i put the appropriate files in those folders. This is the latest version of zencart and the latest version of reward points and a fresh install. What else can I do to fix this?

I cant launch my store until i fix this. Any help would be greatly appreciated.
my site is www.beyonddreams.coYou say you got an error when you ran the SQL.. well that's the start of your issue.. No SQL, no admin menu..

Errors = ERROR LOG file created.. Look at your error log and post that here.. It will tell you what happened.. without this information folks can only GUESS what happened, but clearly it's an installation issue..

28 Mar 2013, 8:46 PM
#2234
beyond_dreams avatar

beyond_dreams

New Zenner

Join Date:
Feb 2013
Posts:
45
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

where can i find the error log? sorry this is all new to me

28 Mar 2013, 9:53 PM
#2235
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Reward Points Module for ZC v13x

Beyond Dreams:

where can i find the error log?
See if these help..
http://www.zen-cart.com/content.php?311-warning-an-error-occurred-please-refresh-the-page-and-try-again
http://www.zen-cart.com/content.php?124-blank-page

Beyond Dreams:

sorry this is all new to me
Great! As a new Zenner you will want to spend some time getting to know Zen Cart.. the FAQ section is an excellent place to start. You should start with this FAQ SECTION:
http://www.zen-cart.com/content.php?25-troubleshooting

28 Mar 2013, 11:15 PM
#2236
beyond_dreams avatar

beyond_dreams

New Zenner

Join Date:
Feb 2013
Posts:
45
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

ok there is no log file created. so what does that tell me? The last log created was from 2/19/13 when i first started setting this site up.

28 Mar 2013, 11:43 PM
#2237
beyond_dreams avatar

beyond_dreams

New Zenner

Join Date:
Feb 2013
Posts:
45
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

here are the logs i have

[27-Mar-2013 12:25:09 America/Phoenix] 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 '<?php /** * @package admin * @copyright Copyright 2003-2006 Zen Cart Development' at line 1 :: <?php /** * @package admin * @copyright Copyright 2003-2006 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: sqlpatch.php 7166 2007-10-03 23:01:46Z drbyte $ */ require('includes/application_top.php'); in /home/content/16/10425116/html/includes/classes/db/mysql/query_factory.php on line 120

[28-Mar-2013 14:35:38 America/Phoenix] PHP Fatal error: 1062:Duplicate entry '0b1fbde067958a59fbe3acbb08d49cfe' for key 1 :: insert into zen_sessions
values ('0b1fbde067958a59fbe3acbb08d49cfe', '1364507438', 'c2VjdXJpdHlUb2tlbnxzOjMyOiI0ZmVkYjJiMmExN2U2Y2FjZGNiN2VhNjQ4OGMyMjU5NSI7bGFuZ3VhZ2V8czo3OiJlbmdsaXNoIjtsYW5ndWFnZXNfaWR8czoxOiIxIjtsYW5ndWFnZXNfY29kZXxzOjI6ImVuIjtzZWxlY3RlZF9ib3h8czoxMzoiY29uZmlndXJhdGlvbiI7') in /home/content/16/10425116/html/includes/classes/db/mysql/query_factory.php on line 120

[27-Mar-2013 12:55:53 America/Phoenix] PHP Fatal error: 1062:Duplicate entry '0-0' for key 2 :: INSERT INTO zen_reward_master (rewards_products_id ,scope ,scope_id ,point_ratio ,bonus_points, redeem_ratio, redeem_points) VALUES (NULL , '0', '0', '1.0000', NULL, 0.01, NULL); in /home/content/16/10425116/html/includes/classes/db/mysql/query_factory.php on line 120

thank you for your help

29 Mar 2013, 4:31 PM
#2238
beyond_dreams avatar

beyond_dreams

New Zenner

Join Date:
Feb 2013
Posts:
45
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

I also tried to do the sql patch command by command to see what ones produced an error and here is what I got

#1 already exists

#2 dup entry

#3 already exists

#4 already exists

#5 processed

#6 processed

#7 - 23 (the insert commands gave all the save errors)

INSERT INTO configuration
(configuration_id ,configuration_title ,configuration_key ,configuration_value ,configuration_description ,configuration_group_id ,sort_order ,last_modified ,date_added ,use_function ,set_function)
VALUES (NULL , 'Reward Point Mode', 'REWARD_POINT_MODE', '0', 'Select the Reward Point Mode<br />0= Reward Points are fixed to the product prices and are calculated individually.<br />1= Reward Points are calculated on the Order Total or Subtotal (depending on the setting of the <strong>Allow Redeem of Reward Points on Order Total or Subtotal</strong> configuration).', @cgi, '0', NULL, now(), NULL , 'zen_cfg_select_option(array(''0'', ''1''), ');

result:

[29-Mar-2013 08:50:48 America/Phoenix] PHP Fatal error: 1048:Column 'configuration_group_id' cannot be null :: INSERT INTO zen_configuration (configuration_id ,configuration_title ,configuration_key ,configuration_value ,configuration_description ,configuration_group_id ,sort_order ,last_modified ,date_added ,use_function ,set_function) VALUES (NULL , 'Reward Point Mode', 'REWARD_POINT_MODE', '0', 'Select the Reward Point Mode<br />0= Reward Points are fixed to the product prices and are calculated individually.<br />1= Reward Points are calculated on the Order Total or Subtotal (depending on the setting of the <strong>Allow Redeem of Reward Points on Order Total or Subtotal</strong> configuration).', @cgi, '0', NULL, now(), NULL , 'zen_cfg_select_option(array(''0'', ''1''), '); in /home/content/16/10425116/html/includes/classes/db/mysql/query_factory.php on line 120

#24

DELETE FROM admin_pages WHERE page_key='configRewardPoints';
DELETE FROM admin_pages WHERE page_key='GroupRewardRedeem';
DELETE FROM admin_pages WHERE page_key='RewardPoints';
DELETE FROM admin_pages WHERE page_key='CustomerRewardPoints';

results

processed

#25

INSERT INTO admin_pages (page_key,language_key,main_page,page_params,menu_key,display_on_menu,sort_order) VALUES ('configRewardPoints','BOX_CONFIGURATION_REWARD_POINTS','FILENAME_CONFIGURATION',CONCAT('gID=',@cgi), 'configuration', 'Y', @cgi);
INSERT INTO admin_pages (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order) VALUES ('GroupRewardRedeem', 'BOX_GROUP_REWARD_POINTS_REDEEM', 'FILENAME_ADMIN_GROUP_REWARD_POINTS_REDEEM', '', 'customers', 'Y', 35);
INSERT INTO admin_pages (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order) VALUES ('RewardPoints', 'BOX_REWARD_POINTS', 'FILENAME_ADMIN_REWARD_POINTS', '', 'catalog', 'Y', 36);
INSERT INTO admin_pages (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order) VALUES ('CustomerRewardPoints', 'BOX_CUSTOMER_REWARD_POINTS', 'FILENAME_ADMIN_CUSTOMER_REWARD_POINTS', '', 'customers', 'Y', 37);

results

[29-Mar-2013 09:21:06 America/Phoenix] PHP Fatal error: 1048:Column 'page_params' cannot be null :: INSERT INTO zen_admin_pages (page_key,language_key,main_page,page_params,menu_key,display_on_menu,sort_order) VALUES ('configRewardPoints','BOX_CONFIGURATION_REWARD_POINTS','FILENAME_CONFIGURATION',CONCAT('gID=',@cgi), 'configuration', 'Y', @cgi); in /home/content/16/10425116/html/includes/classes/db/mysql/query_factory.php on line 120

I hope this helps a bit. I just want to understand what is happening and how I can fix this.

Thank you so much for all your help.

29 Mar 2013, 9:29 PM
#2239
beyond_dreams avatar

beyond_dreams

New Zenner

Join Date:
Feb 2013
Posts:
45
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

ok, i uninstalled the new.sql and reinstalled it by opening it in notepad and pasting the file contents into the admin-tools-sqlpatch. I still do not have the menu items in my admin to set the point amounts and to control this module. missing...

I don't have the following on my admin page
admin-catalog-reward points is not in my menu
admin-configuration-reward points is not in my menu
admin-customer-group reward redeem is not in my list

This is the error I got from redoing the above...

[29-Mar-2013 14:01:35 America/Phoenix] PHP Fatal error: 1048:Column 'configuration_group_id' cannot be null :: INSERT INTO zen_configuration (configuration_id ,configuration_title ,configuration_key ,configuration_value ,configuration_description ,configuration_group_id ,sort_order ,last_modified ,date_added ,use_function ,set_function) VALUES (NULL , 'Allow Redeem of Reward Points on Order Total or Subtotal', 'REWARD_POINTS_ALLOW_TOTAL', '0', 'Allow points to be redeemed against the full order (including shipping) or only against the subtotal.<br />0= Against the subtotal.<br />1= Against the full order.', @cgi, '9', NULL, now(), NULL , 'zen_cfg_select_option(array(''0'', ''1''), '); in /home/content/16/10425116/html/includes/classes/db/mysql/query_factory.php on line 120

I don't know what else to do I have been trying to fix this for a month and my store launch has been on hold due to it. I see there are others with this issue and they too uninstalled and reinstalled to only get the same result. However they responded they are fixed but no details how they fixed it. Any help at this point would be greatly appreciated.

4 Apr 2013, 1:06 AM
#2240
beyond_dreams avatar

beyond_dreams

New Zenner

Join Date:
Feb 2013
Posts:
45
Plugin Contributions:
0

Re: Reward Points Module for ZC v13x

Stevesh and Country Charm Thank you... Thank you.... Thank you!!!!

Stevesh you were right! When I installed zen cart somehow it created an admin folder named adminurrhtcqq, I also had an admin folder. I moved all the files from the admin folder to the adminurrhtcqq folder and wala I now have menu items!!! I am sooo happy I don't know how to thank you guys! You are the best!! Now I just need to test it. I will keep my finger crossed! I need to try to figure out why I wasn't given the option to rename my own admin folder so this wouldn't have happened.

I am forever grateful to you both, and you are greatly appreciated!