Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

### POINTS AND REWARDS MODULE V1.00 ###


Recommended Posts

I can solve it, but not too elegant :)

 

Checkout_confirmation.php ~Line 77:

 

change

 

if ($customer_shopping_points_spending > (POINTS_MAX_VALUE) {

 

to

if ($customer_shopping_points_spending > (POINTS_MAX_VALUE * $order->info['subtotal'])) {

 

, and set up the Points_Max_Value = 0.5

 

but it is only solve only the SUBTOTAL

Link to comment
Share on other sites

Hi all

 

For some reason the order_id for each new customer order is not getting added to the customers_points_pending table. Any suggestion. I must edited is manully.

 

Thanks

Steven

 

bild.jpg

Link to comment
Share on other sites

Hi all

 

For some reason the order_id for each new customer order is not getting added to the customers_points_pending table. Any suggestion. I must edited is manully.

 

Thanks

Steven

 

mmm?

only new customers?

looking at the pixs can tell that some order has id no. and some not,

for those that has no order_id_no. have a value of 0,

if this module can't get the order no. the default is null(empty) but, in your case the have a 0.

there must be a reason for that wich has nothing to do with points modules.

Check to see the payment method used for those order.

and check if the same order has the id_no. in admin/orders.php

Remember - - - "STRESSED" spelled backwards "DESSERTS"

Link to comment
Share on other sites

Hi,

 

For some reason, the payment method selected is not being recognized and when you try to move to the confirmation page, it halts the process and has red banner at the top that asks you to select a payment method. Is this a common problem that is easily fixed? Please help and thanks in advance!

 

Jair

Link to comment
Share on other sites

Error when I open my_points.php

Warning: Missing argument 1 for tep_get_shopping_points() in /usr/local/apache/htdocs/evabijoux/includes/functions/redemptions.php on line 17

 

Fatal error: Call to undefined function: tep_count_pending_rows() in /usr/local/apache/htdocs/evabijoux/my_points.php on line 72

 

Was this ever answered(questioned in post #8 and #9)? i looked through the forum and have yet to find one, but i may have missed it. everything in my install works fine except when you check your points on my_points.php

 

"Fatal error: Call to undefined function: tep_count_customer_orders() in /usr/local/xx/xx/xx/xx/httpdocs/my_points.php on line 74"

 

line 74 is

$shopping_points = tep_get_shopping_points();

$pending_rows = tep_count_pending_rows($customer_id);

$orders_total = tep_count_customer_orders();

 

 

im using ms1 and am not sure if its the problem, but i did define step 11 and 12 in application_top.php, as this is where all others are define, and ms1 does not use the database_tables.php or filename.php files. but just to check myself i did load those two files (databases and filenames) to see if something had to be called for them and still i get the fatal error.

the only other problems i found so far is on admin/customers_points.php, it loads but with errors on the page, that apear to nothing more than the mouse over background colors for the table.

 

thanks and sorry if this was answered and i missed it, need coffee!

Link to comment
Share on other sites

Was this ever answered(questioned in post #8 and #9)? i looked through the forum and have yet to find one, but i may have missed it. everything in my install works fine except when you check your points on my_points.php

 

"Fatal error: Call to undefined function: tep_count_customer_orders() in /usr/local/xx/xx/xx/xx/httpdocs/my_points.php on line 74"

 

line 74 is

  $shopping_points = tep_get_shopping_points();

  $pending_rows = tep_count_pending_rows($customer_id);

  $orders_total = tep_count_customer_orders();

im using ms1 and am not sure if its the problem, but i did define step 11 and 12 in application_top.php, as this is where all others are define, and ms1 does not use the database_tables.php or filename.php files. but just to check myself i did load those two files (databases and filenames) to see if something had to be called for them and still i get the fatal error.

the only other problems i found so far is on admin/customers_points.php, it loads but with errors on the page, that apear to nothing more than the mouse over background colors for the table.

 

thanks and sorry if this was answered and i missed it, need coffee!

Yes i did answer all those post in regard to "Call to undefined function"

in your case the missing function cuse due to you using ms1 while this module is bild for ms2 ONLY. the function tep_count_customer_orders(); is taken from general.php and not this mod the fuction is a commen function for ms2 and found in catalog/account_history.php.

You can try to download ms2 ,open catalog/includes/functions/general.php and look for tep_count_customer_orders and copy the hole function to your catalog/includes/functions/general.php .

maybe it will work for you but i can't promiss you as i have no way to confirm it.

Good luck

Remember - - - "STRESSED" spelled backwards "DESSERTS"

Link to comment
Share on other sites

Hi,

 

For some reason, the payment method selected is not being recognized and when you try to move to the confirmation page, it halts the process and has red banner at the top that asks you to select a payment method.  Is this a common problem that is easily fixed?  Please help and thanks in advance!

 

Jair

make sure you did not miss the installation CATALOG STEP = 3. open catalog/checkout_confirmation.php

This will add an errors checker to checkout_confirmation page.

at the line that start like this.....

if ( (is_array($payment_modules->modules)) && (sizeof($payment_modules->modules) > 1) &&

you must have this statment alse it will not be recognized.

(!$customer_shopping_points_spending)

Remember - - - "STRESSED" spelled backwards "DESSERTS"

Link to comment
Share on other sites

Yes i did answer all those post in regard to  "Call to undefined function"

in your case the missing function cuse due to you using ms1 while this module is bild for ms2 ONLY. the function tep_count_customer_orders(); is taken from general.php and not this mod the fuction is a commen function for ms2 and found in catalog/account_history.php.

You can try to download ms2 ,open catalog/includes/functions/general.php and look for tep_count_customer_orders and copy the hole function to your catalog/includes/functions/general.php .

maybe it will work for you but i can't promiss you as i have no way to confirm it.

Good luck

 

 

that helped but still causes a missing arguments for splitpageresults problem. the split_page_results.php files between versions are different in a lot of ways, so hackin this for ms1 will be a little harder (unthough this is the last part to be), may just upgrade and reistall all the old mods (many).

thanks for the ideas though

Link to comment
Share on other sites

Hi, I have installed PRM V1.20 some time ago while creating my site. Now when I finished the website and started making orders I see that this script creates some big problems.

As soon as I or the customer uses the points and rewards the order is not processed correctly.

 

This creates a big problem in admin/orders.php and checkout_success.php and the database.

 

Let me explain.

There are customer A and customer B.

In the meanwhile, I as admin, give some points to a random customer.

Customer A makes order #1 but when he arrives at checkout_success.php he sees no products in there.

 

Now customer B makes order #2 and when he arrives at checkout_success.php he sees the contents of order #1 and not his.

 

In admin/orders.php I see B has made order #1 instead of order #2. For customer A I see the previous order in there, or nothing at all, no customer A order.

 

I see this problem happens when PRM is used. Is there a fix to it?

I use version 1.20, but I see no subsequent versions addressing this problem.

 

I also have the Credit Class/Gift Vouchers/Discount Coupons, which works.

 

thanks,

 

PS: this is really urgent since site is up and running.

Link to comment
Share on other sites

Hi, I have installed PRM V1.20 some time ago while creating my site. Now when I finished the website and started making orders I see that this script creates some big problems.

As soon as I or the customer uses the points and rewards the order is not processed correctly.

 

This creates a big problem in admin/orders.php and checkout_success.php and the database.

 

Let me explain.

There are customer A and customer B.

In the meanwhile, I as admin, give some points to a random customer.

Customer A makes order #1 but when he arrives at checkout_success.php he sees no products in there.

 

Now customer B makes order #2 and when he arrives at checkout_success.php he sees the contents of order #1 and not his.

 

In admin/orders.php I see B has made order #1 instead of order #2. For customer A I see the previous order in there, or nothing at all, no customer A order.

 

I see this problem happens when PRM is used. Is there a fix to it?

I use version 1.20, but I see no subsequent versions addressing this problem.

 

I also have the Credit Class/Gift Vouchers/Discount Coupons, which works.

 

thanks,

 

PS: this is really urgent since site is up and running.

you shuldget the latest version 5.0 as well as make sure that no other cotributions you recetly installed come accross with this module.

Also rerad post#187

http://www.oscommerce.com/forums/index.php?sho...ndpost&p=657159

you should clear all season before applaing any new contributions to your store.

just make sure no items left in cart for users or guest.

reinstall this module.

Remember - - - "STRESSED" spelled backwards "DESSERTS"

Link to comment
Share on other sites

hi deep-silver...

 

where's your forum for the 'single email' mod?

 

also, how to make the contribution work for affiliates? how to send a single email to an affliate... please advise

 

thanks

any comments please Deep Silver?

Edited by chooch

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

any comments please Deep Silver?

there is no forum for this mod as this is just a small hack.

Not much as been change just an extra single email.

For your need you will have to contact the aurtur for that contribution.

Remember - - - "STRESSED" spelled backwards "DESSERTS"

Link to comment
Share on other sites

Hi Deep-Silver

 

many many thanks for this superb mod... i thought v1.10 w brilliant but got bamboozled when i tried to upgrade to 1.20

 

i gave up until now and tried to install the latest 1.50 and it is totally awesome

 

apart from spelling mistakes and stuff, this i brilliant

 

at the moment it seems fin, if i have any hicups then i'll use this forum

 

i can't thank you enough :-)

 

Chooch

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

ok, i got one glitch

 

on the checkout payment page, this is what comes up in the top of the page when i tick gift voucher balance:

 

REDEEM POINTS ERROR ! You did not enter points to spend.

 

i have tried putting '0' (zero) but that don't work too

 

the only thing that gets it going is i put in a figure, or if i select a payment module - is this a deliberate attempt to get get customers to use Points (must use points), so they are actively using them and not saving them?

 

please advise

 

thanks

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

ok, i got one glitch

 

on the checkout payment page, this is what comes up in the top of the page when i tick gift voucher balance:

 

REDEEM POINTS ERROR ! You did not enter points to spend.

 

i have tried putting '0' (zero) but that don't work too

 

the only thing that gets it going is i put in a figure, or if i select a payment module - is this a deliberate attempt to get get customers to use Points (must use points), so they are actively using them and not saving them?

 

please advise

 

thanks

the latest GV version making a hard time here is how to fix so points/rewards will be compatiable with the latest gift voucher module.

 

open catalog/checkout_confirmation.php

replace the addon for points rewards module with this one.

##### Points/Rewards Module V1.50 check for error BOF #######
 if (isset($HTTP_POST_VARS['customer_shopping_points_spending'])  && (USE_REDEEM_SYSTEM == 'true')) {
     if (isset($HTTP_POST_VARS['customer_shopping_points_spending']) && (POINTS_LIMIT_EXACT == 'false')){
       $customer_shopping_points_spending = $HTTP_POST_VARS['customer_shopping_points_spending'];
     }
// customer can't use other then the exact amount when enabled         
     if (isset($HTTP_POST_VARS['customer_shopping_points_spending']) && (POINTS_LIMIT_EXACT == 'true')){
       $customer_shopping_points_spending = POINTS_EXACT_VALUE;
     }
// register customer shopping points         
       $customer_shopping_points = tep_get_shopping_points();
// customer can't use invalid points amount         
     if ($customer_shopping_points < $customer_shopping_points_spending) {
       $customer_shopping_points_spending = 0;
       tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS), 'SSL'));
     }
// customer can't use points over the max allowed         
     if ($customer_shopping_points_spending > POINTS_MAX_VALUE) {
       $customer_shopping_points_spending = 0;
       tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_MAX), 'SSL'));
     }
//force customers to select other payment method if the points total not enough to cover the cost.
     if ( $customer_shopping_points_spending && tep_calc_shopping_pvalue($customer_shopping_points_spending) < $order->info['total'] && !is_object($$payment)) {
       tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_NOT), 'SSL'));
     }
// customer can't use points over the order total         
     if (tep_calc_shopping_pvalue($customer_shopping_points_spending) > $order->info['total']) {
       $customer_shopping_points_spending = 0;
       tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_OVER), 'SSL'));
     }
 } 
// if ( (is_array($payment_modules->modules)) && (sizeof($payment_modules->modules) > 1) && (!is_object($$payment)) && (!$credit_covers) ) {
  if ( (is_array($payment_modules->modules)) && (sizeof($payment_modules->modules) > 1) && (!is_object($$payment)) && (!$credit_covers) && (!$customer_shopping_points_spending) ) {
    tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL'));
  }
########  Points/Rewards Module V1.50 EOF #################*/

Remember - - - "STRESSED" spelled backwards "DESSERTS"

Link to comment
Share on other sites

the latest GV version making a hard time here is how to fix so points/rewards will be compatiable with the latest gift voucher module.

 

open catalog/checkout_confirmation.php

replace the addon for points rewards module with this one.

##### Points/Rewards Module V1.50 check for error BOF #######

######## ?Points/Rewards Module V1.50 EOF #################*/

 

Thanks Deep-Silver, I did it but it still needs looking at because one problem has gone but another is still there.

 

I can now choose the Gift Voucher and it allows me to carry on as normal but when i choose to type in Points (says 4, or any figure other than exact required for checkout) and then click the Gift Voucher too, instead of minusing the 4 Points from the total and then using the Gift Voucher for the rest of the part payment, this is what comes up:

 

"Points value are not enough to cover the cost of your purchase. Please select another payment method"

 

It doesn't allow me to choose Points part payment but does allow me to type the full figure in and redeem... Also, if total Points redeemed is less than final amount in cart then it does let me use the Gift Voucher as part payment and show show up correctly in the order total.....

 

can you advise please?

 

I also deleted the Points for my customer in Admin. When customer who has no Points goes to checkout and enters Gift Voucher, it has an error the 'Points are not enough'....

 

this is a super-duper mod and it would be a shame if i have un-install it because i can't get it to work on just one page!

 

thanks alot Deep-Silver :-)

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

Thanks Deep-Silver, I did it but it still needs looking at because one problem has gone but another is still there.

 

let me download the latest addon to CGV and go tough it here i will get back to you as sonn as possiable

Remember - - - "STRESSED" spelled backwards "DESSERTS"

Link to comment
Share on other sites

let me download the latest addon to CGV and go tough it here i will get back to you as sonn as possiable

Aaaa-Haaaa

 

you are a star, the fix works brilliantly....

 

it can't be easy for you to tweak the code and final tune it again and again, but well done deep-Silver for giving this absolutely awesome mod.. it has to up there with some of the most complicated to write and important to use, like CCGV and affiliate (i guess)

 

... just one question, i deliberately typed in a strange figure in Points redemption at checkout - 0.0001 and then whether i used the gift voucher or not it allowed on the final page and showed my Grand Total as -?150

 

is there any way to stop customers going on the checkout confirmation page by putting another erro code across the top of the screen, like the one that says "Error! you dont have enough Points....": if they type number beginning with 'ZERO', or something that you see fit?

 

thanks a lot

 

Chooch

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

May somebody explain how change the points status into 'customers_points_pending.php to 'Redeemed'?

 

If the 'Points Status' is 'Pending' I see that I may press the following buttons:

 

* 'confirm' (change the status from 'pending' to 'confirmed').

* 'cancel' (cancel points in this order)

* 'ajust' (set the points we like, not necesary the points gain in this order)

* 'delete' (delete this record from the database = no points to this order)

* 'mail' (I hope to send mail with the status point of this order).

 

If the 'Points Status' is 'Processing' I see that I may press the following buttos:

 

* 'roll back (to change from 'Confirmed' to 'Pending' status)

* 'delete' (delete this record from the database.

* 'mail' (I hope to send mail with the status point of this order).

 

As you can see there are no button to 'Redeem' the 'confirmed' or 'Pending' points.

 

Also try to see into customers_points.php but, I think, only can 'add', 'delete', 'adjust' and 'goto orders' buttos...

 

I know that is a silly question, but I can't find where learn/read it...

 

All the best.

 

Antonio

Link to comment
Share on other sites

Hi Deep Silver and others,

 

first of all thanks for this beautifull contribution! I have a question.

 

I installed it in my shop and it works fine ;-), exept for the matter of recalculating tax. It doesn't recalculate.

 

Is recalculating tax possible?

If so, how can i work that out?

 

I work with: v1.50 - gv-contri and set the pointcontri on no point rewarding over tax and shipping.

 

I hope you can inform me.

 

Best regards,

 

Folkert

Link to comment
Share on other sites

May somebody explain how change the points status into 'customers_points_pending.php to 'Redeemed'?

 

Concerning my last post, I think, we must find some code into the admin files to change into the database 'customers_points_pending' the field 'status' to a value of '4' ( '4' == Redeemed Status). :unsure:

 

I can't find no '4' inside the files customers_points.php and customers_points_pending.php (Well, no coding -sql query- to change the value of this field).

 

Any ideas?

 

Antonio

Edited by Antonio Garcia
Link to comment
Share on other sites

I installed v1.50 with new update (also using ccgv on my shop) took me a couple of hours (ok, maybe more)...

I have 2 errors and a couple of questions:

the errors i recieve are in admin, when clicking 'confirm points' this is what i recieve:

1146 - Table 'myshop_shop.TABLE_CUSTOMERS_POINTS_PENDING' doesn't exist

select customer_id, date_added, points_pending, status from TABLE_CUSTOMERS_POINTS_PENDING where status = 1 and orders_id = 83

[TEP STOP]

second error is in customer qualified points:

 

After: Last Name First Name Date of birth Points Value Action

1146 - Table 'myshop_shop.TABLE_CUSTOMERS_POINTS_PENDING' doesn't exist

select count(*) as number_of_points_pending from TABLE_CUSTOMERS_POINTS_PENDING where status = 1 and customer_id = '41'

[TEP STOP]

 

Questions i have:

1. Is it possible for the points to be auto accepted, so no admin confirmation is needed.

2. Can i give the points an expiry date (lets say 6 months)?

 

Thanks for this great contribution.

Alt.

Edited by altenter
Link to comment
Share on other sites

I installed v1.50 with new update (also using ccgv on my shop) took me a couple of hours (ok, maybe more)...

I have 2 errors and a couple of questions:

the errors i recieve are in admin, when clicking 'confirm points' this is what i recieve:

 

second error is in customer qualified points:

 

After: Last Name First Name Date of birth Points Value Action 

 

SOLVED!!! ofcourse this was my error, didnt properly insert step 2 in admin.

 

still have these few questions:

1. Is it possible for the points to be auto accepted, so no admin confirmation is needed.

2. Can i give the points an expiry date (lets say 6 months)?

3. How can i add to welcome text: you have X points in your account?

 

Thanks again for this great contribution,

alt.

Link to comment
Share on other sites

May somebody explain how change the points status into 'customers_points_pending.php to 'Redeemed'?

 

Please forgive my questions.

 

I found the mistake (I donwloaded a older version with a checkout_process.php with wrong code....).

 

Solved. The Redeemption is into this file (arround line 107):

 

#### Points/Rewards Module V1.50 balance customer points BOF ####
// customer shoppping points account balanced 
 if (USE_REDEEM_SYSTEM == 'true' && $customer_shopping_points_spending) {
   $customer_shopping_points = tep_get_shopping_points();
     tep_set_shopping_points(($customer_shopping_points - $customer_shopping_points_spending), $customer_id);
   if ($customer_shopping_points_spending && DISPLAY_POINTS_REDEEMED == 'true') {
     tep_add_redeemed_points($customer_id, $insert_id, $customer_shopping_points_spending);
   } 
 }

 

The function 'tep_add_redeemed_points' is the one with make the changes into the database...

 

Sorry for all.

 

Antonio

Link to comment
Share on other sites

SOLVED!!! ofcourse this was my error, didnt properly insert step 2 in admin.

 

still have these few questions:

1. Is it possible for the points to be auto accepted, so no admin confirmation is needed.

2. Can i give the points an expiry date (lets say 6 months)?

3. How can i add to welcome text: you have X points in your account?

 

Thanks again for this great contribution,

alt.

 

Dear Altenter:

 

1. Is it possible for the points to be auto accepted, so no admin confirmation is needed.

Reading the code, I found that into catalog/includes/functions/redemptions.php the function that makes 'Pending' the points are the 'tep_add_pending_points($customer_id, $insert_id, $points_toadd)'. If you change:

 

'status' => 1);

 

to

 

'status' => 2);

 

you get 'Confirmed' the points.

 

2. Can i give the points an expiry date (lets say 6 months)?

Yes. The easyest way I know is, going into admin/customers_points_pending.php, and then press 'cancel points' with orders older than 6 months.

 

If you want to make a automatic update you may do also but only if you don't delete no records into table 'customers_points_pending'. Remember that the total of points of each customers is into table 'customers' but the only way to know the story of all the points rewards/delete/redeemed are checking table 'customers_points_pending'.

If you delete a record in this table, not necesary delete points to table 'customers'.

 

 

My MySQL level is not so high, but you should do:

 

1.- Make a SQL query to show all records of 'customers_points_pending' older than 6 months.

 

2.- For each record see the value of the 'points_pending' field and add / delete from field 'customers_shopping_points'.

 

 

Sorry my bad English.... but I hope it may help a little.

 

Antonio

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...