Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * * 12 votes

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


2100 replies to this topic

#2061 Lumbridge

  • Community Member
  • 3 posts
  • Real Name:Lum Bridge

Posted 01 September 2010, 07:40

Sorry, I cannot edit my post in the last..

Please help

Below is an example for the checkout payment problem


When the order is over $1000.00, in the checkout payment page, select payment with redeem points:

then,

In checkout confirmation page:

Sub-Total: $1199.97
Flat Rate (Best Way): $5.00
Points Redeemed: -$75.00
Total: $1.00

The order can successfully checkout but the customer just has to pay $1.00 instead of $1129.97


When the order is below $1000.00, there is not problems at all.

#2062 Lumbridge

  • Community Member
  • 3 posts
  • Real Name:Lum Bridge

Posted 01 September 2010, 08:41

The problem is solved. I got this tip from "sashaben", it was posted few years ago, on page 100. Thanks so much sashaben.


Below is the original code changed from sashaben

FIND:
includes/modules/order_total/ot_redemption.php

Replace this:
$order->info['total'] = number_format($order->info['total'] - tep_calc_shopping_pvalue($customer_shopping_points_spending), 4);

With the following:
$order->info['total'] -= tep_calc_shopping_pvalue($customer_shopping_points_spending);

Edited by Lumbridge, 01 September 2010, 08:44.


#2063 Tjappie W

  • Community Member
  • 3 posts
  • Real Name:Werner

Posted 04 October 2010, 16:19

Hello all,

I'm trying to install this contribute..... on step 5 (first part) i need to find:
  if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) {
    tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL'));
  }
in checkout_process.php

I can't find it in my checkout_process.php........ so who can help me with this issue???

Thnx
Tjappie W (NL)

#2064 lupole

  • Community Member
  • 81 posts
  • Real Name:Larry Lupole

Posted 04 November 2010, 15:46

When I tick the redemption box, it doubles the redemption amount on the checkout_confirmation.php page. If I then hit my browser back button, and return to my checkout_payment.php page. It then shows the correct redemption calculation in the product(s) edit area.

Within this support thread, in post #1871, there is a solution for the confirmation page. Although, this solution did not work for me, because the code "$order_total_modules->process();" was already removed.

I am using v2.2rc2a. And am using V2.1rc2a of this contribution, the version To be used with osCommerce-2.2rc2a. I have reviewed my installation and could find no errors, and could find no other solution within the support thread. All other functions work perfectly. I am using Credit Class Gift Voucher, latest version and the weave was quite simple per the instructions. I have looked at my order_total modules as well as my payment modules and my checkout_process.php page, but have yet to find a solution. :-"

Has anyone had this problem and been able to fix it? Please let me know of that solution. :-"

Thank you
Larry

This is a very nice contribution

#2065 pctekcomponents

  • Community Member
  • 46 posts
  • Real Name:Steven
  • Gender:Male
  • Location:Scotland

Posted 11 November 2010, 01:05

I seem to be having a couple of issues with this contrib.

The 1st has been mentioned before but i haven't seen a fix for it....

issue 1....
Points are being deducted at the checkout confirmation page. If customers change their mind and back out of the checkout they have lost their points.

issue 2....
emails don't seem to be sending to customers when points are added to their account via Admin. a message is shown saying the email was sent successfully but the customer never receives it.

Other than the issues above, everything else seems to be working perfectly.

Any help on these would be really appreciated.

Thanks,
Steven

#2066 pctekcomponents

  • Community Member
  • 46 posts
  • Real Name:Steven
  • Gender:Male
  • Location:Scotland

Posted 11 November 2010, 20:00

OK Got the email notification working now.....

The fix is posted HERE

(post 1814)

Edited by pctekcomponents, 11 November 2010, 20:01.


#2067 lupole

  • Community Member
  • 81 posts
  • Real Name:Larry Lupole

Posted 16 November 2010, 17:15

View Postlupole, on 04 November 2010, 15:46, said:

When I tick the redemption box, it doubles the redemption amount on the checkout_confirmation.php page. If I then hit my browser back button, and return to my checkout_payment.php page. It then shows the correct redemption calculation in the product(s) edit area.

Within this support thread, in post #1871, there is a solution for the confirmation page. Although, this solution did not work for me, because the code "$order_total_modules->process();" was already removed.

I am using v2.2rc2a. And am using V2.1rc2a of this contribution, the version To be used with osCommerce-2.2rc2a. I have reviewed my installation and could find no errors, and could find no other solution within the support thread. All other functions work perfectly. I am using Credit Class Gift Voucher, latest version and the weave was quite simple per the instructions. I have looked at my order_total modules as well as my payment modules and my checkout_process.php page, but have yet to find a solution. :-"

Has anyone had this problem and been able to fix it? Please let me know of that solution. :-"

Thank you
Larry

This is a very nice contribution
I was able to solve this problem. Everything works as expected, with no errors.

#2068 DarrenHoldaway

  • Community Member
  • 2 posts

Posted 19 November 2010, 19:48

Hello,

on my customer order screen i am now unable to change the status of orders.

i get the the following error

1054 - Unknown column 'status' in 'field list'

select orders_id, status from customers_points_pending where status = 1 and orders_id = 2159

[TEP STOP]

i tried using the search but i could not find anything.

i am using the V2.1rc2a version

can anyone help me?

thanks

Edited by DarrenHoldaway, 19 November 2010, 19:49.


#2069 Dive Right In Scuba

  • Community Member
  • 40 posts
  • Real Name:Mike Pedersen
  • Gender:Male
  • Location:Plainfield, IL

Posted 13 December 2010, 04:54

If your thinking of using this contrib...I highly recommend it!!! It is a great way to get customers to keep coming back to you instead of your competition!!!

I only have one problem that I can't seem to fix....

We have Free Shipping on Items over $75 - If someone buys something for $100, and use $50 in points, it currently gives them free shipping as it adds the total before the points. I want it to look at the total after points as I need the customers to pay $75 out of their pocket to get free shipping. Any ideas?

#2070 skhuu

  • Community Member
  • 36 posts
  • Real Name:Sipho

Posted 20 February 2011, 15:30

Hi all, I have installed this contribution. Everything seems okay, but on the payment page there is no option for the points to be used. I am using this with One Page Checkout.
One Page checkout uses a payment_Meethod.php which is in /includes/checkout/, there is a code for points in there.

Any help will be appreeciated.

#2071 martinerko

  • Community Member
  • 7 posts
  • Real Name:martin

Posted 14 March 2011, 16:17

View Postskhuu, on 20 February 2011, 15:30, said:

Hi all, I have installed this contribution. Everything seems okay, but on the payment page there is no option for the points to be used. I am using this with One Page Checkout.
One Page checkout uses a payment_Meethod.php which is in /includes/checkout/, there is a code for points in there.

Any help will be appreeciated.
Hi,
I have the same problem. Can you help?

#2072 desmoworks

  • Community Member
  • 52 posts
  • Real Name:Anthony
  • Gender:Male

Posted 19 March 2011, 03:49

I'd like to have a total accumulated points calculation as we are offering special one time rewards for different levels of achievement. Such as 2000 points, 5000 points, 10000 points, etc... Kind of like an airline where they have various levels of achievement within their rewards systems.

#2073 desmoworks

  • Community Member
  • 52 posts
  • Real Name:Anthony
  • Gender:Male

Posted 19 March 2011, 10:36

View Postdesmoworks, on 19 March 2011, 03:49, said:

I'd like to have a total accumulated points calculation as we are offering special one time rewards for different levels of achievement. Such as 2000 points, 5000 points, 10000 points, etc... Kind of like an airline where they have various levels of achievement within their rewards systems.

Looks like I've got it. Basically just takes the customers current points and adds (well, subtracts the negative) the redeemed points to get the total accumulated points. Below is for what the customers see in their account. Just finishing up the report in the admin section so we can track these people easily. Next up will be to make loyalty groups at the different point levels and an automated system to alert those who qualify.

The query:

<?php $accumulated_points_query = tep_db_query("select c.customers_id, c.customers_shopping_points, pp.customer_id, sum(pp.points_pending) as points_redeemed from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_POINTS_PENDING . " pp where points_status = 4 and c.customers_id = pp.customer_id and customers_id = '" . (int)$customer_id . "'"); 
				
$accumulated = tep_db_fetch_array($accumulated_points_query);?>


And to display the data:

Lifetime Accumulated Loyalty Points: <?php echo number_format($accumulated['customers_shopping_points'] - $accumulated['points_redeemed'],POINTS_DECIMAL_PLACES); ?>


#2074 desmoworks

  • Community Member
  • 52 posts
  • Real Name:Anthony
  • Gender:Male

Posted 20 March 2011, 01:25

For the report I had to do it a little differently. In order to do a proper sort by accumulated points I had to get the math done in the query instead. Now I can sort by customers name, current points, accumulated points, etc... I also added their emails to the report and next will figure out how to export the report with selected parameters to excel.

The query:

$customers_query_raw = "select c.customers_id, c.customers_firstname, c.customers_lastname, c.customers_email_address, c.customers_points_expires, c.customers_shopping_points, pp.customer_id, (c.customers_shopping_points - sum(case when pp.points_status = 4 then pp.points_pending else 0 end)) as points_accumulated from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_POINTS_PENDING . " pp where c.customers_id = pp.customer_id group by c.customers_firstname, c.customers_lastname order by $sort "; 

The output:

<?php echo number_format($customers['points_accumulated'],POINTS_DECIMAL_PLACES); ?>


#2075 skhuu

  • Community Member
  • 36 posts
  • Real Name:Sipho

Posted 22 March 2011, 17:03

View Postmartinerko, on 14 March 2011, 16:17, said:

Hi,
I have the same problem. Can you help?

I am still trying to fix, but not working up to now.

#2076 desmoworks

  • Community Member
  • 52 posts
  • Real Name:Anthony
  • Gender:Male

Posted 23 March 2011, 08:09

Any ideas how to make a report to show the total new points for the day and for the month? I was trying to use a modified version of this to account for the date, but the problem is the points store in the customers table don't have an "added" date attached to them like the points in the pending table do!

$customers_query_raw = "select c.customers_id, c.customers_firstname, c.customers_lastname, c.customers_email_address, c.customers_points_expires, c.customers_shopping_points, pp.customer_id, (c.customers_shopping_points - sum(case when pp.points_status = 4 then pp.points_pending else 0 end)) as points_accumulated from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_POINTS_PENDING . " pp where c.customers_id = pp.customer_id group by c.customers_firstname, c.customers_lastname order by $sort ";


#2077 2 estilos

  • Community Member
  • 12 posts
  • Real Name:manuel

Posted 02 April 2011, 12:10

Hello everyone. :)

I hope you apologize my English, I do not speak well.
I need your help, if possible, please.

I have installed this module, but I need to make me discount points on the sub-total and not the final total.

As I have it now:

____________________________

Product: 20 €
____________________________


sub-total: 16, 95 €
Other discounts: 0 €
18% VAT: € 3.051
Shipping costs: 5 €
----------------------------
discount coupons: - 10 €
____________________________
____________________________

TOTAL: 15 €
____________________________
____________________________




But it would have to be this way:

____________________________

Product: 20 €
____________________________


sub-total: 16, 95 €
discount coupons: - 10 €
Other discounts: 0 €
18% VAT: € 1.251
Shipping costs: 5 €
____________________________
____________________________

TOTAL: 13.20 €
____________________________
____________________________


I tried to change the disposition of all modules in OrderTotal and not get the expected results.
I appreciate any help. please.

#2078 gshutzy

  • Community Member
  • 98 posts
  • Real Name:graham shuttleworth
  • Gender:Male
  • Location:lancashire,uk

Posted 12 May 2011, 11:02

could someone tell me if this will work with v2.3

#2079 nlaur86

  • Community Member
  • 44 posts
  • Real Name:Laurentiu

Posted 17 May 2011, 14:29

Ok, this may sound a little stupid but... I have a question about the referral system.
As I can see now, after a user creates an account, when he places his first order he is asked if he/she was referred by someone else and asked to type the email address.
This is too complicated, because one can enter a wrong address...
So, wouldn't it be possible to create a referral link in every customer's account page?
Something that whey will show to their friends, and if someone visits the page and creates an acount, they are credited with points?
The link should be something like www.domain.com/referrer.php?client_id=xxx or something like that...
How hard would it be to implement that?

#2080 blakey989

  • Community Member
  • 23 posts
  • Real Name:Dan Blakey

Posted 23 June 2011, 15:42

Hi all, 1st off great contribution, must have for any store.

right now to the problem.

1st: I sell digital products via my store and would like the points to be automatically awarded once the order status has been set to delivered, i know you can automatically award them after a set amount of days or immidiately but what if they didn't finish payment, are the points still awarded?, so i shouldn't imagine it would be too difficult to change it to award points once a 'desired' order status is reached i.e. delivered, has anyone got an idea of what code to alter and how?

2nd I use the activate account contribution and have got both to work, but once the customer has activated account it still tells me unverified in the admin section, i merged both codes as follows:

//Account activation BOF
if (ACTIVATION_CODE == 'off') {
// Points/Rewards system V2.1beta BOF
if ((USE_POINTS_SYSTEM == 'true') && (NEW_SIGNUP_POINT_AMOUNT > 0)) {
tep_add_welcome_points($customer_id);

$points_account = '<a href="' . tep_href_link(FILENAME_MY_POINTS, '', 'SSL') . '"><b><u>' . EMAIL_POINTS_ACCOUNT . '</u></b></a>.';
$points_faq = '<a href="' . tep_href_link(FILENAME_MY_POINTS_HELP, '', 'NONSSL') . '"><b><u>' . EMAIL_POINTS_FAQ . '</u></b></a>.';
$text_points = sprintf(EMAIL_WELCOME_POINTS , $points_account, number_format(NEW_SIGNUP_POINT_AMOUNT,POINTS_DECIMAL_PLACES), $currencies->format(tep_calc_shopping_pvalue(NEW_SIGNUP_POINT_AMOUNT)), $points_faq) ."\n\n";

$email_text .= EMAIL_WELCOME . EMAIL_TEXT . $text_points . EMAIL_CONTACT . EMAIL_WARNING;
} else {
$email_text .= EMAIL_WELCOME . EMAIL_TEXT .EMAIL_CONTACT . EMAIL_WARNING;
}
// Points/Rewards system V2.1beta EOF
tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));
} else {
$activation_id = md5($email_address);
$verification_href = tep_href_link(FILENAME_ACCOUNT_ACTIVATE, 'activation_id=' . $activation_id, 'SSL');
$verification_mail = tep_href_link(FILENAME_ACCOUNT_ACTIVATE, 'activation_id=' . $activation_id . '&submit=true&activation_code=' . $activation_code, 'SSL');
$verification_link = '<a href="' . $verification_mail . '">' . $verification_mail . '</a>' ."\n\n";
// Points/Rewards system V2.1beta BOF
if ((USE_POINTS_SYSTEM == 'true') && (NEW_SIGNUP_POINT_AMOUNT > 0)) {
tep_add_welcome_points($customer_id);

$points_account = '<a href="' . tep_href_link(FILENAME_MY_POINTS, '', 'SSL') . '"><b><u>' . EMAIL_POINTS_ACCOUNT . '</u></b></a>.';
$points_faq = '<a href="' . tep_href_link(FILENAME_MY_POINTS_HELP, '', 'NONSSL') . '"><b><u>' . EMAIL_POINTS_FAQ . '</u></b></a>.';
$text_points = sprintf(EMAIL_WELCOME_POINTS , $points_account, number_format(NEW_SIGNUP_POINT_AMOUNT,POINTS_DECIMAL_PLACES), $currencies->format(tep_calc_shopping_pvalue(NEW_SIGNUP_POINT_AMOUNT)), $points_faq) ."\n\n";

$email_text .= EMAIL_WELCOME . EMAIL_TEXT . $text_points . TEXT_ACTIVATION_CODE . $activation_code . "\n\n" . EMAIL_TEXT_ACTIVATION . $verification_link . EMAIL_CONTACT . EMAIL_WARNING;
} else {
$email_text .= EMAIL_WELCOME . EMAIL_TEXT . TEXT_ACTIVATION_CODE . $activation_code . "\n\n" . EMAIL_TEXT_ACTIVATION . $verification_link . EMAIL_CONTACT . EMAIL_WARNING;
}
// Points/Rewards system V2.1beta EOF
tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
tep_redirect($verification_href);
}
//Account Activation EOF


Crude i know but seems to be working as customer can indeed activate their account, but causes some confusion as it states they haven't.

3rd: Last and most importantly (as both of the above do not cause immidiate problems but would be nice if working), when a customer places an order they can use their points as desired, but if they decide to cancel their purchase after clicking confirm order button when they return they find that their points have been deducted (GONE) and that price of the item has gone back up to it's original value (before redeeming points).

This for me personally is not an option and would result in me not being able to use this contribution in an active store. as all businesses recognise you can not allow your customers to feel they have lost out in anyway, it would undermine what this whole contribution is about (rewarding your loyal customers) and would result in the exact opposite in losing valuable customers.

I will help find a solution to this problem for me and the others who noticed and am willing to put some hard work in on my behalf but i am only a php novice :rolleyes:

PLEASE UNDERSTAND THAT'S NOT MEANT AS A DIG AS THIS IS AN AWSOME CONTRIBUTION AND I WANT IT IN ALL MY STORES :) :)

thanks

Dan