Re: Reward Points Module- Live Release now available.
:clap::clap:
You are the star... Christon !
I change the Reward Point Status Track to SIMPLE and Paypal reward points works now !
I had it in Advanced mode which was the problem.
Thanks Andrew again for this great module!
Notes: I have Moneybookers Payment and Google Checkout installed.
Re: Reward Points Module- Live Release now available.
Woohoo, pleased I could help! *grinz*
Re: Reward Points Module- Live Release now available.
I installed the Reward Points Module a few months ago, but can't work on paypal, so i uninstall the Reward Points Module, now i re-install it, but problem appears, when i visit customers - reward points, my site have about 2000 customers, but just a few customers appears, and i can't delete or upgrade any informaton on the customers.
Any idear?
Re: Reward Points Module- Live Release now available.
/admin/customers_reward_points.php line 249
find:
$limit=" LIMIT 40";
replace with:
$limit=" LIMIT 200";
then you will be able to see 200 customers
Also you can use the "search" function to search for customer. But it only does for Firstname and Lastname.
You can modify the following line to support email and Customer ID search...
find:
$search=" WHERE (c.customers_lastname LIKE ".$safe_search_string." OR c.customers_firstname LIKE ".$safe_search_string.")";
replaced with:
$search=" WHERE (c.customers_lastname LIKE ".$safe_search_string." OR c.customers_firstname LIKE ".$safe_search_string." OR c.customers_id LIKE ".$safe_search_string." OR c.customers_email_address LIKE ".$safe_search_string.")";
find:
$customer_query_raw = "select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_group_pricing, r.pending_points, r.reward_points, gp.group_name, rm.redeem_ratio from ".TABLE_CUSTOMERS." as c LEFT JOIN (".TABLE_REWARD_CUSTOMER_POINTS." as r) ON (r.customers_id=c.customers_id) LEFT JOIN(".TABLE_GROUP_PRICING." as gp) ON (gp.group_id=c.customers_group_pricing) LEFT JOIN(".TABLE_REWARD_MASTER." as rm) ON ((c.customers_group_pricing!=0 AND rm.scope=".SCOPE_GROUP." AND rm.scope_id=c.customers_group_pricing) OR (c.customers_group_pricing=0 AND rm.scope=".SCOPE_GLOBAL." AND rm.scope_id=0))".$search.$order_by.$limit.";";
replaced with:
$customer_query_raw = "select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, c.customers_group_pricing, r.pending_points, r.reward_points, gp.group_name, rm.redeem_ratio from ".TABLE_CUSTOMERS." as c LEFT JOIN (".TABLE_REWARD_CUSTOMER_POINTS." as r) ON (r.customers_id=c.customers_id) LEFT JOIN(".TABLE_GROUP_PRICING." as gp) ON (gp.group_id=c.customers_group_pricing) LEFT JOIN(".TABLE_REWARD_MASTER." as rm) ON ((c.customers_group_pricing!=0 AND rm.scope=".SCOPE_GROUP." AND rm.scope_id=c.customers_group_pricing) OR (c.customers_group_pricing=0 AND rm.scope=".SCOPE_GLOBAL." AND rm.scope_id=0))".$search.$order_by.$limit.";";
Re: Reward Points Module Slows admin to a crawl
I noticed recently that the administrative section on one of our sites has slowed to a crawl. So much so that it actually times out at various intervals.
This only happens in the admin (front end is ok).
I narrowed this problem down to a query in the Rewards Points module and once I commented out that query the admin ran fine again. (I found this query by looking at my server processes in MySQL by the way.)
I localized the rewards points query that was slowing down the entire admin and listed it below. Once I commented this out to test, the admin ran fine again. With it active the admin slows to a crawl.
I realize this query is used to keep things up-to-date automatically from within the admin (as far as points are concerned) but is there a way to get it to operate more efficiently? Right now it makes it virtually impossible to operate.
The query is found in the "extra functions" area (it's the rewards points function file) around line 25 and looks like this:
PHP Code:
// Remove all reward point history records for deleted orders. Update customers pending points removing any deleted order with points still pending
if($db->Execute("UPDATE ".TABLE_REWARD_CUSTOMER_POINTS." rc SET `pending_points`=`pending_points`-IFNULL((SELECT SUM(`reward_points`) FROM ".TABLE_REWARD_STATUS_TRACK." ph WHERE ph.`customers_id`=rc.`customers_id` AND ph.`status`=0 AND ph.`orders_id` NOT IN (SELECT `orders_id` FROM ".TABLE_ORDERS.")),0);"))
$db->Execute("DELETE FROM ".TABLE_REWARD_STATUS_TRACK." WHERE `orders_id` NOT IN (SELECT `orders_id` FROM ".TABLE_ORDERS.");");
}
How can we optimize this query to run more efficiently?
We've got about 8000 customers in the database with tens of thousands of rewards points (obviously).
Re: Reward Points Module- Live Release now available.
Just noticed some Paypal orders still didn't generate Reward Points :(
I guess I have to wait for the next release...
Re: Reward Points Module- Live Release now available.
it looks like if txn_type=web_accept then the Reward Point gets generated... if txn_type=unique then there is no Reward Point for Paypal order
Re: Reward Points Module- Live Release now available.
Quote:
Originally Posted by
neteasy
it looks like if txn_type=web_accept then the Reward Point gets generated... if txn_type=unique then there is no Reward Point for Paypal order
Any idea what causes the different transaction types?
Re: Reward Points Module- Live Release now available.
Would Paypal themselves be able to give you that information? I know for my records, every single Paypal transaction since I put in the PDT Token has been web_accept, I only sell downloadables or virtual services and I don't do tax or shipping lol
Re: Reward Points Module- Live Release now available.
Thanks. neteasy. I fell that all customers should appear in the 'Customers - Reward Points'. It seems it won't
First issue.
I put on a test order in my site, then i get 160 points when purchase 160 dollars( one dollar earn on point), but there isn't any points appear in 'Customers - Reward Points'.
When i log in my site with the test account, there isn't any points appear in the 'Reward Points' sidebox.
Second issue
on the test order detail: it shows that 'Reward Points earned: 160', but in the 'Reward Points' sidebox, it shows that '185 reward points in cart', The total order with the shipping is 185 dollars. Why do the shipping cost be eared the points?
The Reward Points configration is
Reward Point Mode 1
Reward Point Sidebox Display 0
Reward Point Status Track Simple
Reward Point Sunrise Period 0
Reward Point Redeem Minimum 0
Reward Point Redeem Maximum 250
Reward Point Rounding 0.5
Max Transactions to Display in Customer Admin 12
Delete Old Reward Transactions Period 0
Adjust Reward Points for Sales/Specials 1
Allow Reward Points on Free Products 0
Allow Redeem of Reward Points on Order Total or Subtotal 1
Set Minimum Order Value to Redeem Points Against 0
Any help would be appreciated.