You never said if this was a fresh install or a upgrade of Reward Points.
If this is not and upgrade run the Uninstall_Reward_Points.sql and try again.
I know this installs perfectly fine on a zen cart v1.5.4 if installed correctly.
Printable View
This is a new, fresh install of the Reward Points Full Suite v2.5. I ran the Uninstall_Reward_Points.sql and then ran the Reward_Points_Full_Install.sql again, just now. I am getting the same results. I get 22 errors that state " ERROR: Cannot insert configuration_key "" because it already exists".
Hi Guys,
I installed V2.5 on Zencart 1.5.1 on 4th June.
All worked fine at first but in the last few weeks, the points haven't been adding to customers accounts (they showed up on the order however)
I added the points manually as 'Pending' then updated status of the order to 'Posted' or 'Delivered' but that didn't trigger the points to move to 'Earned'.
Have just discovered that the problem does not occur when customer selects 'Direct Bank Deposit' as the payment option so that then means Paypal is the common denominator.
Have scoured this thread and can't find anybody else having this problem.
Any help would be appreciated.
If you need any further info please let me know.
Cheers.
Have you added any new plugins since the problem started? If not I'm not sure what it could be. I haven't run into this problem with PayPal. All works fine. You can try this, change paypal from pending status to processing then see when you transfer orders status to delivered if they transfer. If not look a the Reward Point Status Track
Thanks for the suggestions. I haven't installed any other plugins since this one and already have paypal set to processing as the default.
Could you please advise where I find the Reward Point Status Track?
(I might have to ask my web developer to look into that for me)
Cheers!
OK, so already had the status track set to advanced with points going from pending to earned when order status is updated to posted or delivered.
Changed this to simple setting and placed an order using paypal.
Still same result.
Just to make things interesting, I added 5 points to my account manually as pending. Changed the order status. Instead of moving to earned, 5 points were added to pending so I did it again - 5 more points were added to pending.
Do you think reinstalling might be the next step but will I loose all the current points data doing this?
Thanks for your help.
Couple question....
What version of reward points did you upgrade from?
Are you using Paypal express or PayPal IPN when accepting payment?
If you just upload the files it will not hurt anything. All your customers will still be there be in the database.
Let me know if that fixes it, it not I have one more thing up my sleeve, well maybe two. The other 2 requires adding a code snippet.
Also what is admin-->configuration-->Reward Points Configurations--> Reward Point Sunrise Period set to?
I know you mention you already had the status track set to advanced with points going from pending to earned but you didn't mention if you had all of them set to posted or delivered?
Hi Countrycharm,
This was a new install of v2.5b
I am using Paypal IPN
Sunrise Period is set to zero
All settings pictured below if that helps.
Attachment 15427
Will talk to my web manager and get her to upload all the files again and see if that fixes it. Will keep you posted.
Cheers. :smile:
Had to add database prefix to Reward_Points_Full_Install.sql statement and run it from phpMyAdmin. For some reason it would not except the Reward_Points_Full_Install.sql statement in admin/tools/install sql patches as you would normally do because of the errors. That states:
Cannot insert configuration_key "" because it already exists. The funny thing is there were nothing in the database either.
Fixed now anyway.
Reward Points v2.5e now has been released.
- Fixed Bug in the pagination code in admin-->customers_reward_points.php file - Fixed Limit Maximum Customers on Listings Page.
Thanks to Delia for pointing that out.- Fixed Bug in admin-->customers_reward_points.php file - When click on the edit button, the screen refreshes and you go back to page one.
Thanks to Delia for catching this. Thanks to Ajeh for providing the code to fix it.- Removed Delete Button on admin-->customers Reward Points Page. It didn't do anything, and doesn't really need to be there.
- Added a link to the orders for the Customer rather than just their customers_id on admin-->customers Reward Points page. Click on customers_id and it will carry you to customer orders page.
Thanks to Ajeh- Updated the _doc folder to reflect these changes.
- Updated the version number from 2.5d to 2.5e.
I think mine is having the same problem. I have to transfer from pending to earned every day. They do not automatically transfer.
Is the admin "delete reward points" supposed to delete the pending points to which it is referring? It just removes the listing from the status tracker, but doesn't subtract from pending points.
If that was not the intention, I've got some coding to do, because that's what we'd like to use it for. :)
Could anyone help me with 1.5.1 zencart?
My problem is:
My admin >reward point configuration> blank page!
Attachment 15589
I first installed 2.1b reward point full suite. Everything is good but only one problem I cannot solve. I found the reward pt ratio of sub-categories can only follow the global reward pt. ratio when order confirmation. Even the reward pt. of sub-categories was displaying correctly but it cannot calculate the actual point correctly.
I uninstalled it and install it again. I don't know whether my process was not correct. The reward point configuration list cannot show up again.
Then I upgrade to 2.5e but same problem occured. I uninstalled it and newly installed 2.5e and the problem is the same -- The reward point configuration list cannot show up again.
When I newly installed 2.5e There were some warnings as belows:
Attachment 15590
I've checked the logs file, it says:
America/Denver] PHP Fatal error: 1146:Table 'XXX_shop.reward_master' doesn't exist :: SELECT prp.point_ratio FROM reward_master prp WHERE prp.scope='0' LIMIT 1; in /.../.../public_html/includes/classes/db/mysql/query_factory.php on line 120
Please help and thanks a lot!!!
I'm having a problem with the calculation and value of the points. I have reward points full suite 2.5e on zen-cart 1.5.1. When I go to look at an order I see the value of the rewards points is always a positive number. I also notice that amount is not deducted from the order total. If I use edit orders to try to modify the value to a negative number, it has no effect on the order total. However, in those email notifications about having a new order, the calculations are correct and the total order amount is correct. So that makes me think the customer side is working as design but the admin side is not.
I do not get any errors in the logs.
I'm not sure what I can tell you here. I don't use edit orders so not sure if it is causing a conflict or not.
This is what I do know and can tell you. I installed reward points on a fresh zen cart 1.5.1 cart and reward points works just fine. Front end and backend and emails.
It is not doing as you are describing on the orders page. Works great, see screen shot I have uploaded. You will see it deducts points just fine.
My conclusion is edit order is conflicting some how, or you did not merge the admin/orders.php file correctly.
Attachment 15596
Hi Countrycharm,
Could you help me please?
Due to the destroyed of reward point module that was unable to displayed the reward config. menu, I built a test site and installed 2.5e reward point.
But there are still some problems.
I set the reward point ratio $1=10 points
case.1
I've set the configuration:
Attachment 15633
The product reward point display is correct:
Attachment 15634
But when checkout, the reward point calculated based on original price, i.e. $125 instead of $75. As a result, it earns 1250 pt.
Attachment 15635
case 2.
When I set the reward point mode to 1 (Reward Points are calculated on the Order Total or Subtotal )
The reward point earn was correct.
Attachment 15636
But when I tested with another item that the whole sub-category was set to 0 reward point ratio. There is problem:
continuous on next reply...
case 2
Here please find the config setting:
Attachment 15639
But when I tested with another item that the whole sub-category was set to 0 reward point ratio.
The reward point display is correct, 0 point earned:
Attachment 15637
But when check out, it earn 2050 points instead of 0 point!
Attachment 15638
When changed back the reward point mode to 0, this item will earn 0 reward point correctly. But it will have the problem as shown in case 1
I would like the point earned based on what it displayed on product detail page. I'm not sure whether there are something wrong on my setting. Could you please tell me how to fix it?
Thank you very much in advance!
I've tried uninstalled and installed again but the result is the same. And I found if there is product attributes added, the reward points earned will calculated depending on original price instead of the special price. Thanks
I installed the Reward Point Full Suite Module Version 25.e on ZenCart 1.5.4 and I have two issues one is I am unable to switch the Reward Point Status Track from Simple to Advanced so I can customize the order status I want for the points to be transferred.
I do not have any debug logs for this issue and I have looked through the MYSQL to see how I could change it to Advanced. I am able to change the value in the database from 0 to 1 so the configuration will show it is in the advanced mode, however I am still unable to select my preferred order status such as “Delivered” or “Completed”.
Is there any way I could modify the code or my database so I can switch the Reward Point Status Track from Simple to Advanced?
I have reward Points installed on a stock zen cart 1.5.4. When selecting The Reward Point Status Track,
Advance mode works just fine when switching between simple and Advance with no problem what so ever. Go back recheck to see if all files uploaded to there right place on your sever. You shouldn't have to do anything to the sql statement to get it to work. Uninstall the sql statement and reinstall it to see if that fixes it. Always make a backup of your database before dong any module installations. That way if something goes wrong you have the old backup right?
Countrycharm thanks for your reply. I uninstalled the module by restoring my backup and reinstalled each file along with an uninstall and reinstall of the SQL Statement and I still cannot select the Advanced Mode. When I click Advanced Mode, click save, and refresh my configuration page, the Reward Point Status Track still shows simple mode.
If I am able to get to Advanced Mode is there an additional drop down box or radio button for me to select which order status I would the points to change from "Pending" to "Earned"?
Yes there are additional radio buttons to check see image.. I'm not sure what else I can tell you without actually looking at it myself.
Attachment 15669
Hi Everyone,
Okay quite a simple query. I use zen v1.54 with a handful of mods including Sales Report and Reward Points 2.5e. The rewards suite works lovely. No problems at all.... In fact working perfect (well done creator, nice work).
I want to be able to run a report that shows how many points (& value) have been claimed. I have found in my DB the table order_total and the entries I want as follows "title" = "Loyalty Points Claimed" (I have changed the name from reward to loyalty) and can see the "class" = "ot_reward_points".
My question. How can I string this together to a report showing how many reward points have been spent/claimed in a given time frame (ie month of October)?
It doesn't matter if the report is done in phpMyAdmin or the Zen Cart Admin.
Any help would be gratefully received.
SpaceMonkey
Hi again,
I know I can run SQL query as follows:
SELECT *
FROM `zen_orders_total`
WHERE `class` = 'ot_reward_points'
However this shows the total points claimed for all time with no dates. For now I am removing the orders (by order number) that fall outside of the date range manually. Surely there must be an easier way....
Again any suggestions???? :blink:
I just installed Rewards Points Suite v2.5 on out Zen Cart 1.51. It appears to work as advertised except all points are pending and I want them to be awarded immediately.
Sunrise = 0
Status Track I have set to Advanced Pend: [Void] Earn: [Registered, Processing, Delivered, Manual] all others ignore.
The store is for registrations so we seldom CHANGE a status. Default is Registered. Maybe that is the problem?
Is there a way to have points go directly to AWARDED status?
Here is my config:
Attachment 15812
SpaceMonkey -
Try something like this:
SELECT *
FROM zen_orders_total ot INNER JOIN zen_orders o on ot.orders_id = o.orders_id
WHERE `class` = 'ot_reward_points'
and date_purchased > '2015-01-31'
If you just want to filter this might be better:
Select * from zen_orders_total
Where orders_id in (SELECT o.orders_id
FROM zen_orders_total ot INNER JOIN zen_orders o on ot.orders_id = o.orders_id
WHERE `class` = 'ot_reward_points'
and date_purchased > '2015-01-31')
Since there is a time in the date_purchased field the > includes all orders on that date.
Hello,
I've been using this plug-in for a few years now and it has always worked fine, until this weekend when it seems to have stopped applying any points that people are trying to use. I've made no changes to the settings or the code, no recent changes to the site at all.
Any ideas as to why this might have happened?
Thanks
Running 1.5.4
www.madrobotminiatures.com
OK, so I made some time to check the ZC logs and there are a bunch of errors, all the same thing:
Invalid argument supplied for foreach() in /home/content/88/7710088/html/zencart/includes/functions/extra_functions/reward_points_functions.php on line 314
That's about as far as I can get, any thoughts as to what could have caused this?
Step 1 is to look in that file at that line of code. I copied that section below. Line 314 is the 'foreach' line. Have you installed any other Order Total Modules recently or adjusted the advanced calculation setting? Also, what version of ZEn-Cart and this module are you using?
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;
}
Thanks for that, I installed the latest version and everything has been sorted out.
Thank you for your response :)
I'm trying to upgrade from 2.5b to 2.5e and after running Upgrade-to-2.5e.sql I have the following error:
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 , 'Show Reward Points on Product Info Display Page', 'SHOW_REWARD_POINTS_PRODUCT', '0', 'Display Reward Points on product info display page?<br />0= No<br />1= Yes', @cgi, '1', NULL, now(), NULL , 'zen_cfg_select_option(array(''0'', ''1''), ');
#1062 - Duplicate entry 'SHOW_REWARD_POINTS_PRODUCT' for key 'unq_config_key_zen'
What should I do now ?
Hello. I've upgraded to the newest version thinking it would fix the issues I had but they didn't get resolved with the upgrade.
1) If customer uses his/her reward points to pay for the order, the reward points given for that order are 0. Is there any way to give reward points to the customer on scenarios like this?
2) If customer uses his/her reward points to pay for the order, there is a difference of exactly $0.01 cent added to the total value of points used. Example below.
Subtotal: $33.30
Shipping: $6.00
Membership discount: -$3.33
Value of Reward Points: -$29.98 <- should be -$29.97
Total: $5.99 <- should be $6.00
I'm not using edit orders.
If anyone could shed some light on these issues I would really appreciate it.
Hi, I am looking to introduce a points system to our site. What I want to do is when I sell a bike you get so many points to put towards accessories. Is there a way to do it in a points way or is it always physical money? An example someone buys a bike you get 30 points to spend. so you could spend e.g 15 on shoes etc.............
Hello, I was wondering if there would be a way to view how many points a customer has on their account by going to the 'my account' page? Is there a PHP script I can use to call the value? Thanks :)
This isn't built in.
I wanted the same thing so I created it. I can give you some basics, but keep in mind this is specific to the Tableau template.
Also keep in mind I am not a 'programmer'. I hacked this together. It has been working for a couple months with no error logs, but it could be garbage :smile:
Here is a quick run down for my site: :
1) add the link to the My Account Page
on includes\templates\tableau\templates\tpl_modules_account_menu.php insert the following after line 11:
<li class="communications"><?php echo ' <a href="' . zen_href_link(FILENAME_ACCOUNT_REWARDS, '', 'SSL') . '">' . MY_ACCOUNT_REWARDS . '</a>'; ?></li>
2) In includes\languages\english\extra_definitions\account.php
Add something like the following after line 23:
define('MY_ACCOUNT_REWARDS','Rewards/Store Credit');
3) Create a file includes\templates\tableau\templates\tpl_account_rewards_default.php and put this in it:
<?php
/**
* Page Template
*
* Loaded automatically by index.php?main_page=account_rewards.<br />
* View or change Customer Account Information
*
* @package templateSystem
* @copyright Copyright 2003-2005 Zen Cart Development Team
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_account_rewards_default.php 3848 2006-06-25 20:33:42Z drbyte $
* @copyright Portions Copyright 2003 osCommerce
*/
?>
<div class="centerColumn" id="accountPassword">
<h1 class="back"><?php echo HEADING_TITLE; ?></h1>
<div class="required alert forward"><?php echo FORM_REQUIRED_INFORMATION; ?></div>
<?php require($template->get_template_dir('tpl_modules_account_menu.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_account_menu.php'); ?>
<div class="account-info-wrapper">
<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);
$value=($row!=null?$row['discount']:0);
if(MODULE_ORDER_TOTAL_REWARD_POINTS_DISCOUNT_TYPE==0)
$points_value=$value."%";
else
$points_value=$currencies->format($value);
}
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>';
echo '<br class="clearBoth" />';
echo '<a href="https://www.lindasdietdelites.com/pages/rewards-48.html">Rewards Info</a>';
?>
<br class="clearBoth" />
</fieldset>
</div>
</div>
4) Make sure includes/extra_datafiles/reward_points_filenames.php includes the following:
define('FILENAME_ACCOUNT_REWARDS','account_rewards');
5) Create a folder includes/modules/pages/account_rewards
6) Create a file includes/modules/pages/account_rewards/header_php.php and put this in it:
<?php
/**
* Header code file for the Account History page
*
* @package page
* @copyright Copyright 2003-2005 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: header_php.php 3160 2006-03-11 01:37:18Z drbyte $
*/
// This should be first line of the script:
$zco_notifier->notify('NOTIFY_HEADER_START_ACCOUNT_REWARDS');
if (!$_SESSION['customer_id']) {
$_SESSION['navigation']->set_snapshot();
zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
}
require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
$breadcrumb->add(NAVBAR_TITLE_1, zen_href_link(FILENAME_ACCOUNT, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_2);
// This should be last line of the script:
$zco_notifier->notify('NOTIFY_HEADER_END_ACCOUNT_REWARDS');
?>
7)
I have installed the mod and set up the points what works absolutely great but I have a few questions. When I bought an item and got points as a pretend customer I couldn't spend them straight away? Is there a way to change this at all? Also in the admin section I had to assign the pretend customer a "pricing group" for the reward points is this correct or am I doing it wrong? Finally last question when I logged back in as a customer once I had been given the points I tried to get an item purely with my points but it would not allow me and said I had to choose a payment option can this be bypassed also? Thank you
I just installed this, and it *seems* to be working fine. But I'm a bit fuzzy about how to set it so 25 points = $1.00 off the subtotal only?
Also, what happens when the old reward transaction period ends? Do those points just "expire"? If so, does the customer get a warning notice before it happens?
Hello,
I had an old version installed on ZC 1.5.0, as I'm in the process of upgrading to 1.5.4, I've installed the 2.5e version.
I didn't do any deep testing but as far as I've been I have a calculation problem.
My checkout confirmation page shows me :
$70.25 | Sub-Total:
-$2.30 | Value of Redeemed Reward Points:
$5.20 | FL TAX 7.0%:
$7.77 | Tip:
$4.00 | Delivery Area (Green Zone):
$84.92 | Total:
68 Reward Points earned:
Of course my subtotal is right, then why my taxes are 5.20 ?
Tax 70.25*0.07 = 4.9175
Let's imagine tax are on subtotal-points, i.e. 70.25-2.30=67.95
67.95*0.07=4.7565
Let's do that math the other way
5.20/0.07=74,285714286
I don't see any combination of 70.25+ ?? that gives me 74.28.
Points earned are ok since you get points on SubTotal-Points 70.25-2.30=67.95 rounded = 68.
Taxes should be calculated on the same amount, no ? so taxes should be (70,25-2,3)*0,07= 4.7565 and not 5.20.
If I try with delivery
(67,95+4)*0,07 = 5.0365
with tip
(67,95+7,77)*0,07 = 5.30
What I would line is point and taxes calculated on SubTot-RedeemedPoints cause there's no taxe on tips neither on delivery.
So my checkout should be
$70.25 | Sub-Total:
-$2.30 | Value of Redeemed Reward Points:
$4.76 | FL TAX 7.0%:
$7.77 | Tip:
$4.00 | Delivery Area (Green Zone):
$84.48 | Total:
68 Reward Points earned:
I'm lost.
I'm answering myself, and first sorry guys, Reward Point was not the culprit. The thing is the tax class parameter of each shipping and order total module appearing in the invoice, in fact everything which is not to be included in tax calculation has to have its tax class to None.
Thanks myself
Hello,
I've just notice a problem and I would like to know if it's my ZC 1.5.4 doing that or a general behavior.
Just login, build a cart then go to checkout and ask for reward points rebate, go till checkout confirmation but don't confirm, then go back to your cart and back to checkout.
On step 2, the Your frame show total with the reward points from your previous run, and then the reward points frame shows available points on this new Sub-Total. If you go to step 3, everything goes back to normal, i.e. the reward points are not over-calculated but in step 2 the infos given are wrong.
Let me give you the scenario,
-Run 1-
you buy $100, you have enough to get 20 % (the max) reward points rebate.
Checkout step 2 shows you that you're eligible to 20$ reward points rebate.
You ask for your rebate and go to step 3.
-Run 2-
On step 3 you don't confirm the order but instead you go back...say to a product page.
You go to checkout.
On checkout step 2 the Your total frame shows (Sub-Total) 100 - (Reward points) 20 (= 80)
The reward points frame show $ 16 rebate available (which is 20% of 80).
___
If you let the checkbox checked (I'm in automatic mode), on step three you get back to 100-20.
If you uncheck the box, you get 100 with no reward points at all.
Do you have the same behavior on your site ?
Stupid question.
Just installed the module and went through directions step by step. However when trying to do the "Switch on the 'Shopping Cart with Rewards' sidebox using Admin->Tools->Layout Box Controller. There is also a "Reward Points" sidebox which displays points in cart and points earned (if logged in)" this is not even showing up in the layout controller. I have tried changing to a different layout and then coming back, still nothing. I am using the template "responsive_classic" and even re-copied the entire template folder into it thinking that maybe something was missing.
Any suggestions?
Todd
ZenCart v1.5.5
Looking into admin pages table and the update sql, they are equal, so I guess it should be fine.
That means that particular entry is already in your database.Quote:
#1062 - Duplicate entry 'SHOW_REWARD_POINTS_PRODUCT' for key 'unq_config_key_zen'
Thanks
But this should be a upgrade... not a new install, so those entry's most certainly are there.
I did compare "manually" the upgrade sql and the already present entry and there's no changes. But one never know...
Hi there, is there a way to modify the code so that I could add reward another user for when a purchase is made? Even if I have to manually add the user to a new table I can do that. I was thinking it would be something like create a new table called rewardID and add the name or customer number that is associated to that account and when userA makes a purchase, userB gets the reward. Sorta like the referral plugin but I like this one better because I don't have to worry about cookies expiring to or getting cleaned out.
Thanks!
Hi guys,
Quick question (and hopefully a quick, easy answer).
I use edit_orders.php and I'd like to have the customer's points total show on the edit_orders.php file. Is there a way to get this done?
TIA!
No one? Maybe I need to be more specific. I don't simply want the reward points earned for that one order to show, I want the total reward points the customer has to show.
What would be super great, would be to have the following box that shows up in the checkout process to show in Edit Orders.
Attachment 16345
But, I would definitely settle for a simple snip that pulls the customers total Reward Points Earned to date.
Anyone at all?
@gigi3, I haven't had need to look at the Reward Points plugin's file-structure so I don't know what it will take to "integrate" with Edit Orders.
If the plugin is created as a true order-total module (that is, it makes its decisions based on the order rather than the storefront shopping-cart and/or customer session), then it should "just work" with EO.
Hi lat9,
Thanks so much for the quick response. The developer did integrate it with EO on several fronts, but I seem to be struggling with getting them to work. The earned points and redeem points functions are listed in the drop down along with the coupons, shipping etc.....and they will show up on the order when added, but the totals are not affected, at all.
My request for having a customer's point total showing in the edit orders screen is an add on that I would like.
Things are a little more complicated for me because I use ZC, for the most part, to function as a POS script by using both Edit Orders, and Admin New Order. We do take orders online, and that is fuctioning fine.
@gigi3, may I suggest that you open a new thread (Reward Points+Edit Orders, or another title to your choosing) so we don't hijack this support thread discussing possibilities?
It will "help" to know your Zen Cart, Edit Orders and Reward Points version in formulating any change-suggestion.
Thank you. I have done so. See: https://www.zen-cart.com/showthread....dmin-New-Order
My client does not update order status so we needed to find a way to award points when orders are placed. I set the completed order status of each payment module to Completed (renamed from Shipping of orders_status_id=3). The Reward Point Sunrise Period is set to zero.
I expected this would award the points as orders are placed. The order status for orders is showing up as 'Completed' but the their points as still Pending.
What did I misunderstand so I can get the desired result?
Hi
Is this working on zc155 ?
I've made a new intalation and a upgrade to the database from the reward previous version.
I've already put the site online since I had no log reports about this but:
The points are added and subtratect from the customer account, but on checkout, they have no effect on the total order.
And also, in the Set New Account Reward Points , I have them config to add to pending. But after a customer makes a purchase, they don't go anyware.
In the reward points configuration I have this jscritp error :
configuration.php?gID=41&cID=816&action=edit:415 Uncaught TypeError: Cannot read property 'length' of undefined
And in the advanced rules, sometimes I have e t_total.php (? didn't had this in v151) with a action to add....
There also the ot_shipping that I can't set ... I click update, but nothing.
So I have this options:
Why that t_total.php cames up....or when, I still didn't get it....HTML Code:<select rel="dropdown" name="moduleField">
<option value="ot_cod_fee">ot_cod_fee</option>
<option value="ot_coupon">ot_coupon</option>
<option value="ot_group_pricing">ot_group_pricing</option>
<option value="ot_gv">ot_gv</option>
<option value="ot_loworderfee">ot_loworderfee</option>
<option value="ot_shipping">ot_shipping</option>
<option value="ot_tax">ot_tax</option>
</select>
....the ot_total should be here, right ?
Thanks
About the configuration.php?gID=41&cID=816&action=edit:415 Uncaught TypeError: Cannot read property 'length' of undefined
Forget about this, I got this all over the place, and it's from a js that it's counting the chars in the metatag description, but should only run in there.
Checking the GetRewardPointAdvancedCalculateTable and the SetRewardPointAdvancedCalculateTableFunction , something is wrong here
If I choose the ot_shipping I guess it's related to the ot_total (?) , since when I click update ( with subtract) , it add the ot_total (but with the action add ) ....
But as you can see in the SetRewardPointAdvancedCalculateTableFunction it's setting a t_total.php .... maybe this is the issue ?
But related to what ? jscript ?
Still didn't find out
GetRewardPointAdvancedCalculateTable
Array
(
[0] => ot_total.php
)
SetRewardPointAdvancedCalculateTableFunction
Array
(
[0] => Array
(
[module] => t_total.php
[action] => Add
)
)
Well, after some digging I reach no were.
I've already uninstall the sql, and install it again, since I've done a upgrade...nothing.
The t_total -> Probably the list explode is not wright, but the ot_total is on the ignore list...so not sure why is here.
Changing the redem_points from manual to automatic, makes no difference, it simple doesn't do nothing to the total or sub_total amounts.
I'm not sure if this [redeem_checkout_flag] => should be set to 1 after the checkout_payment , but on checkout_confirmation it's empty
Array
(
[securityToken] => 3906a7a995203c0f60ddcbe065940b6c
[action] => submit
[dc_redeem_code] =>
[redeem_points] => 365
[redeem_checkout_flag] =>
[payment] => eustandardtransfer
[comments] =>
)
But I can find no errors here :
The customer loses his points and earns new ones on checkout... but it doesn't reflect on the total ....PHP Code:
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',true);
else
$prompt =zen_draw_input_field('redeem_points',$_SESSION['redeem_points']).' '.zen_draw_hidden_field('redeem_checkout_flag',true);
Must disable this until I find something, or I get into troubles.
A last clue :
in a zc151 :
($_REQUEST)
Array (
[main_page] => checkout_confirmation
[securityToken] => 332bc18f56cb21482a0c5bb28243620f
[action] => submit
[dc_redeem_code] =>
[redeem_points] => 100
[redeem_checkout_flag] => 1
[payment] => eustandardtransfer
[comments] => )
In zc155 :
Array
(
[main_page] => checkout_confirmation
[securityToken] => 3906a7a995203c0f60ddcbe065940b6c
[action] => submit
[dc_redeem_code] =>
[redeem_points] => 100
[redeem_checkout_flag] =>
[payment] => eustandardtransfer
[comments] =>
)
And in the SESSION values :
zc151:
[REWARD_POINTS_EARNED] => 75
[comments] =>
[redeem_points] => 100
[redeem_value] => 1
zc155:
[REWARD_POINTS_EARNED] => 134
[comments] =>
...so I getting closer.
In zc155 ( at least I'm the only one complaining until now ( could be a karma thing) )
I can get this to work if I change in modules/order_total/ot_reward_points.php this:
PHP Code:
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',true);
else
$prompt=zen_draw_input_field('redeem_points',$_SESSION['redeem_points']).' '.zen_draw_hidden_field('redeem_checkout_flag',true);
To this :
PHP Code:
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',true);
else
$prompt=zen_draw_input_field('redeem_points',isset($_SESSION['redeem_points'])).' '.zen_draw_hidden_field('redeem_checkout_flag',true);
Even so, only setting the zen_draw_hidden_field('redeem_checkout_flag',1) I get the [redeem_checkout_flag] => 1
So, now it's making the calculations, etc..
---------------
About the Advanced Reward Point Calculation Rules, still didn't find a solution...but for this case, or my case, it's not a priority
Well, I don't have this working either but in a different situation: the reward points given to the customer on registration do not pass to earn after the first purchase.
But in your case, have your try to change Reward Point Status Track from simple to advanced, and applied the earning at the pending state ?
Cool !
I end up changing the code also to transfer the points added on new account on the first purchase...since it was not processing this stuff....
Haven't check the sunrise period, but anyway I'm not using that either.
So on rewards admin extra functions I've changed this function... not sure if it's the best way, the smarter way, or if the script does this, but I can't find that piece of code anywere:
This is not entirely tested, got to go and watch the game against Croatia, but perhaps someone has a better idea...or something.
About the javascript in zc155, there are places where nothing works, others were it's ok.
PHP Code:
function TransferCustomerPointsFromPending($order_id)
{
global $messageStack, $db;
if(($record=GetLastRewardPointHistoryRecord($order_id)) && $record->fields['status']==STATUS_PENDING)
{
$customer_id=$record->fields['customers_id'];
$reward_points=$record->fields['reward_points'];
$pending_points=-$reward_points;
UpdateCustomerRewardPoints($customer_id,$reward_points,$pending_points);
UpdateRewardPointHistoryRecord($customer_id,$order_id,$reward_points,STATUS_PROCESSED);
$customer_pending_points = GetCustomersPendingPoints($customer_id);
if ( ($customer_pending_points) == abs(REWARD_POINTS_NEW_ACCOUNT_REWARD) ) {
$sql=$db->Execute("SELECT * FROM ".TABLE_REWARD_STATUS_TRACK." WHERE customers_id=".(int)$customer_id." and status =1");
if ($sql->RecordCount() >= 1 ) {
$updpoints = $reward_points + $customer_pending_points;
$sql=$db->Execute("UPDATE ".TABLE_REWARD_CUSTOMER_POINTS." SET pending_points=0 ,reward_points=".$updpoints." WHERE customers_id=".(int)$customer_id." ");
}
}
}
else
if(!$record)
$messageStack->add_session(WARNING_MISSING_RECORD.' '.$order_id, 'warning');
}
I must be the first one to use this Reward Points Full Suite v2.5 with ZC 1.5.5.a ? I don't find in any forums where anyone else is having this problem. When I change the screen to mobile mode, the Reward Points box which is normally set to be displayed in left-hand column stretches across the top of the entire screen, rather than disappearing as the other sideboxes do. I think I understand the problem ... the responsive_default.css controls displaying the sideboxes:
/* side-boxes */
/* ADD { display:none;visibility:hidden; } to Hide Side-Box */
/* LEAVE BLANK { } to Show Side-Box */
div#documentcategories {display:none;visibility:hidden;}
div#categories {display:none;visibility:hidden;}
div#whatsnew {display:none;visibility:hidden;}
div#manufacturers {display:none;visibility:hidden;}
div#reviews {display:none;visibility:hidden;}
div#featured {display:none;visibility:hidden;}
div#information {display:none;visibility:hidden;}
div#moreinformation {display:none;visibility:hidden;}
Since reward points box is a plug-in, the standard css file doesn't handle it. So I figured all I had to do was add the equivalent statement for the Reward Points box. But here is where I am puzzled ... I did a search for moreinformation in the entire structure of my installation and no where do I find the term moreinformation. So I don't understand how this works, and of course I don't know what term to add to the css file for the Reward Points box. Can someone help me ? Thanks.
Here is the link for the test site I am working on.
http://www.gottahaveitnwi.com/shop_155/
When there, if you click the link to view in Mobile mode, or just shrink the width of the browser window, you will see the Reward Points box spread across the upper part of the window.
Under Tools>Layout Box Controller
what do you have for Single Column Status for the rewards points box?
My guess is ON. Try setting it to OFF.
Sorry to disappoint but that was too obvious :P
Here is how the Reward Points box is set:
Box Details:
Box Name: reward_points.php
Left/Right Column Status: ON
Location: (Single Column ignores this setting) LEFT
Left/Right Column Sort Order: 75
Single Column Sort Order: 0
Single Column Status: OFF
I always start with the most obvious things. But had I read your first post closer, I would known the answer right way.
add:
div#rewardpointsHeading {display:none;visibility:hidden;}
right below
div#moreinformation {display:none;visibility:hidden;}
in your responsive_default.css mentioned above.
Well, that didn't change anything, but since the other sideboxes didn't have Heading after them, I tried
div#rewardpoints {display:none;visibility:hidden;}
and that worked for when I shrink the browser window, but still see it when I click for mobile mode.
Also if I log-in, my shopping cart with reward points shows-up in the center now. Looks like I have to play more with the three responsive_xxx.css files. Seems like the trick is knowing what term to use for those two "custom" boxes :huh:
Thanks to jeking for pointing me in the right direction, I think I got it figured-out.
For right or wrong, to get these two custom sideboxes to display correctly for all three modes (default, tablet, and mobile), here is what I did.
In responsive_default.css, I added these two lines in two places (to handle the two sets of media widths):
div#rewardpoints {display:none;visibility:hidden;}
div#shoppingcartwithrewards {display:none;visibility:hidden;}
In tablet.css, I added these two lines in two places (to handle the two orientations):
For orientation portrait,
div#rewardpoints {display:none;visibility:hidden;}
div#shoppingcartwithrewards {display:none;visibility:hidden;}
For orientation landscape,
div#rewardpoints {}
div#shoppingcartwithrewards {}
But here was the tricky one to figure out, for mobile, I had to add to jscript_responsive_framework.php:
For if ( $detect->isMobile() && !$detect->isTablet() || $_SESSION['layoutType'] == 'mobile' ),
$('#rewardpoints').css({ 'display': 'none', 'visibility': 'hidden' });
$('#shoppingcartwithrewards').css({ 'display': 'none', 'visibility': 'hidden' });
And for completeness, for else if ( $detect->isTablet() || $_SESSION['layoutType'] == 'tablet' ),
$('#rewardpoints').css({ });
$('#shoppingcartwithrewards').css({ });
Things seems to work the way I expect them to now :D
I hope someone else finds this helpful ?
Is it possible to set points so that they will expire after some time?
It looks like this plug-in does not support ZC version 1.5.5a ? During my testing, when I checkout as a customer who has enough reward points to earn a discount, I am shown my available discount, which I checked-off to apply to my order. But on the Final checkout screen, no discount is applied to the order. Assuming I am correct, is there going to be an update to this plug-in for 1.5.5a soon ? Otherwise, I don't know what to tell customers who have reward points earned when the store was 1.5.1 :huh:
Having a similar problem after upgrading to ZC 1.5.5a. Customers are earning their points, but doesn't look like they can redeem any of it. How many people are also having this problem? Im getting the feeling that there really hasn't been that many people who have migrated to ZC 1.5.5a since the release 2 months ago.
Nope, today, I actually spent a couple of hours looking to try to understand and to find some difference in how the code is structured in 1.5.5a that would not make it use the data processed in ot_reward_points_discount.php but had no luck. Everything seems fine to me.
If I decide to keep reward points program for this version of store, I am going to have to put a notice in Checkout Screen 2 where the reward points box appears telling customer how much of a discount he has, that they need to email me and I will send them a Gift Certificate for that amount. Later, they can then apply that to the order they were going to place. Problem is the customer may decide not to place the order while waiting for this turn-around period :(
That's pretty much what Im doing too. I've disabled to rewards points redemption module for now. If the customer wants to redeem it, it will have to be done manually via GV just like what you're doing. But I am keeping the rewards points total module running because it looks like customers are still accumulating points.
I sure hope we figure this one out soon, because the rewards points system is really popular. I'm also a bit surprised that there really hasn't been that many people migrating to ZC 155a after it has been out for such a long time. Guess most people are still running ZC 1.54?
I rather downgraded to 1.5.4 last month after I was not able to get reward points working :-(
Is it possible that one of core (at least I suppose) plugins would not be upgraded for so long? Not sure about it, have to be problem on our side...
I guess there's been no progress finding this bug for 1.55a. I've looked at all the code for this module and done a diff with 1.54 - nothing obvious pops out. My next task is to compare it with a built-in module like group discounts. If anyone cares to do a similar compare we might yet track this down.
Im actually quite surprised that there are no takers after being solicited.
Wonder what happened to Countrycharm?
Have you try this. I think it might be the same issue I was facing.
https://www.zen-cart.com/showthread....55#post1313855
mesnitu - thanks for pointing that out. I hadn't noticed that before. I will test later today and see how it works.
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?
Yep, you're right! None of this is working....... I thought I had this working, I mean, I had this working since I even put it online, but thanks for point that out.
For me now, is doing nothing. No calculations in the checkout and checkout / confirmations page, customer account page, etc...
It simply adds more points to earned
Well.....no fun.
I know that when I was looking for a solution, I found a reward points commercial module, and by the screenshots, it looks like this one.
Probably they ditch this free one for that one, or maybe didnd't had time to update this one for 155
I'll try to find a solution for myself, since we need this stuff, if I find anything I'll post it here.