Re: ReReward Points Module does not update with paypal
Two points..
1. All those "tep_db_*" functions are OS Commerce functions.. (as is this code..) I hope you are aware that you can't just drop this into the Zen Cart module..
2. If the issue you are having is with PayPal Standard, disable it, and activate PayPal Express, and see if the issue persists..
Reward Points Module does not update with paypal
Thanks for the answer, but I had asked if there was a solution for zen cart, and or adapt the query to the DB zen, and I will not turn paypal express. Thank you
Re: Reward Points Module does not update with paypal
Quote:
Originally Posted by
giancalr
Thanks for the answer, but I had asked if there was a solution for zen cart, and or adapt the query to the DB zen, and I will not turn paypal express. Thank you
Right.. so let me put it another way.. Outside of Rewards Points, the PayPal Standard module has ISSUES in general.. and the recommended solution for all of those issues is to NOT use PayPal Standard ever, and use PayPal Express module.. So, it is possible that your issue will go away if you simply turn on the PayPal Express module.. If you choose not to that is certainly your choice.. but you should know the issue you report is not a known issue with Rewards Points, which leads me to believe that the issue could be resolved by simply using PayPal Express vs PayPal Standard..
As for the code you posted, if a community member knows how to convert that osCommerce code, hopefully they will share their solution.. otherwise you could look for a developer to help you with that..
Happy Zenning..
Re: Reward Points Module does not update with paypal
I have a question on customization. Not confident enough to through this up on a live site. Unfortunately we are in a slow move from one server to the next. But with free migration I can't complain.
Anyways I want to not write points to the table_reward_customer_points if the email address contains a certain domain. I'm pretty sure I would change the catalog/includes/functions/extra_functions/reward_points_functions.php file. Specifically
Code:
function UpdateCustomerRewardPoints($customer_id,$reward_points,$pending_points)
{
global $db;
$sql="INSERT INTO ".TABLE_REWARD_CUSTOMER_POINTS." VALUES ('".$customer_id."', '".$reward_points."', '".$pending_points."') ON DUPLICATE KEY UPDATE reward_points=reward_points+".$reward_points.", pending_points=pending_points+".$pending_points.";";
$db->Execute($sql);
}
I'm thinking something like
Code:
function UpdateCustomerRewardPoints($customer_id,$reward_points,$pending_points)
{
global $db;
if (strpos($order->info['customer_email_address'],'@domain.com') == false) {
$sql="INSERT INTO ".TABLE_REWARD_CUSTOMER_POINTS." VALUES ('".$customer_id."', '".$reward_points."', '".$pending_points."') ON DUPLICATE KEY UPDATE reward_points=reward_points+".$reward_points.", pending_points=pending_points+".$pending_points.";";
$db->Execute($sql);
}
}
Can someone verify my logic here and let me know if I'm on the right track? Is the variable "$order->info['customer_email_address']" even available at this point? Thank you.
Re: Reward Points Module does not update with paypal
Quote:
Originally Posted by
southshorepizza
I have a question on customization. Not confident enough to through this up on a live site. Unfortunately we are in a slow move from one server to the next. But with free migration I can't complain.
Anyways I want to not write points to the table_reward_customer_points if the email address contains a certain domain. I'm pretty sure I would change the catalog/includes/functions/extra_functions/reward_points_functions.php file. Specifically
Code:
function UpdateCustomerRewardPoints($customer_id,$reward_points,$pending_points)
{
global $db;
$sql="INSERT INTO ".TABLE_REWARD_CUSTOMER_POINTS." VALUES ('".$customer_id."', '".$reward_points."', '".$pending_points."') ON DUPLICATE KEY UPDATE reward_points=reward_points+".$reward_points.", pending_points=pending_points+".$pending_points.";";
$db->Execute($sql);
}
I'm thinking something like
Code:
function UpdateCustomerRewardPoints($customer_id,$reward_points,$pending_points)
{
global $db;
if (strpos($order->info['customer_email_address'],'@domain.com') == false) {
$sql="INSERT INTO ".TABLE_REWARD_CUSTOMER_POINTS." VALUES ('".$customer_id."', '".$reward_points."', '".$pending_points."') ON DUPLICATE KEY UPDATE reward_points=reward_points+".$reward_points.", pending_points=pending_points+".$pending_points.";";
$db->Execute($sql);
}
}
Can someone verify my logic here and let me know if I'm on the right track? Is the variable "$order->info['customer_email_address']" even available at this point? Thank you.
I don't have an answer as much as a suggestion which has helped me get answers to things.. Create a clone of your live site to use as your test bed.. That way you can test your code and if it works, you share..:laugh: and if it doesn't, then you can say, "this is what I tried".. "this is the result"..