Jump to content
 Explore Products App Shop Support Services App Shop Us
• Checkout
• Login
• Get in touch

osCommerce

The e-commerce.

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

Recommended Posts

I installed the 2 updated files for the bug fix... but I still have pending points of 0 for that order. I guess it is not a problem just won't confirm as I think it would not be ebst to have it show as 0 points earned in their accounts....

Maddie

Share this post

Share on other sites
I installed the 2 updated files for the bug fix... but I still have pending points of 0 for that order.  I guess it is not a problem just won't confirm as I think it would not be ebst to have it show as 0 points earned in their accounts....

Maddie

what was the order total amout for that order.

can you please give me the price of the item in that order so i can run a few test on my shop

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

Share this post

Share on other sites
I installed the 2 updated files for the bug fix... but I still have pending points of 0 for that order.  I guess it is not a problem just won't confirm as I think it would not be ebst to have it show as 0 points earned in their accounts....

Maddie

o.k

the problem is(not really a problem) according to your exchange rate

Awards : \$1.00 = 0.1 points

Redeem : 1 point = \$1.00

so for the customer to redeem \$1.00 woth he has to spend \$10.00 in order to earn

1 point.

Now in your order total

Total = \$2.19

points value = (\$2.19 x 0.1) \$0.22

points awarded = (\$2.19 x 0.1) 0.22

Now the system will show you that the customer have 0 points while the points value for that order is \$0.22 but 0.22 for points is less then one point and since

points are just number and mot currency there is no such thing as 0.22 points

anything below 1 will give you 0 points.

If it is a problem to you you will have to options.

1. change the exchange rate the other way around.

Awards : \$1.00 = 1 points

Redeem : 1 point = \$0.1

2. you will have to make change to your databse for customers_shopping_points in customers table from INT(11) to DECIMAL(15,4)

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

Share this post

Share on other sites

as always you ROCK! that is perfect solution! Thanks so much.

Maddie

Share this post

Share on other sites

## POINTS AND REWARDS MODULE V1.20 ##

Fixed bug in .

admin/customers_points_pending.php

where emails sent out with incorrect order date format.

Change the way points handled by the system.

points are now similar to the way values display.

Changed INT(11) to DECIMAL(15,2) so now points no. have .00

for example 100 points will now show 100.00 points.

I've made this change for store owners that deals with small amounts

and set the points value way below 1 points.

So now admin is able to handle/add/delete points value under 1

for example 1.50 points or 0.50 0.43 and so on.

(Read posts...

http://www.oscommerce.com/forums/index.php?sho...c=152746&st=146

http://www.oscommerce.com/forums/index.php?sho...c=152746&st=156

for more details).

As per requests at the forum...

(Read posts...

http://www.oscommerce.com/forums/index.php?sho...ic=152746&st=62

for more details).

Added Admin features.

1.Enable/Disable points awarded for discounded products.

Admin can choose if to award points for products that already discounded (i.e speacials).

If admin choose NOT to award points for specials and display points info in product info page is set

to 'true' .Customers will see "No points awarded for discounted products." insted of points value .

2.Enable/Disable Products Price Restriction.

Admin can choose if to allow points redeemptions for products that already discounded (i.e speacials).

tested to wotk with products specials. I'm not sure if it will work with PWA contribution but the idea

is that when ever Products Price Restriction enabled. Any price other then the full price will disable

the redeemptions box.

3.Enable/Disable Keeping Records of Redeemed Points.

Also an extra row for showing the amount of points spend on the order wouldn't hurt that much I guess. You are right that it shows on the order history pages but opening one and each of these to take a look at the points spend is not what I would like as a customer. Afterall it is a balance and showing all incoming and outgoing points is what I would like to see as a customer.

Admin now has the option to keep records of all redeemed points.

When disabled, redeemed points recorded in customers order history only.

When enabled, redeemed points recorded also in costomers points row and the customer will see the order

info and will be able to click the row and this will take him to the order history page.

Updated catalog/includes/languages/english/my_points_help.php

to have all new features information.

This page has an auto update info.When ever admin make change to the points system values,

it will say this page last updated (last modified dates are pulled up from database).

** Please note when you first install this mudule you must update all vaiables in admin points/reward option

screen alse the last update date will not show.

Clean up the code in order to try to boost up the system.

On the customer account points and reward page only the value is shown. It would be nice to show the actual points also

Changed the way points shown up in my points page.Now points shown with their values.

if the customer made order but has got no points yet, instad of showing points info with 0 values.

it will now show "You don't have Qualified Points yet.".

The demo site is still online.

Store owners wanting screenshots will be able to download a packge includs screenshots from the link at the site.

Thank you all for your interest in this module.

Hope this answer all requested post and will be happy to have your feedback or new suggestions.

DEEP SILVER ACCESSORY :P

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

Share this post

Share on other sites

Two quick corrections to the latest update needed.

In /catalog/includes/languages/product_info.php

"Corrently" should be "Currently". Everytime I see that it sounds like Curly saying it. :D

Also in /catalog/checkout_process.php

Instructions say around line 318. That is not true. Double check.

Also the instructions says products_info.php should be modified. It should say product_info.php

Thanks. Great contribution.

Remember what the Bible says: He who is without sin, cast the first rock. And I shall smoketh it.

Share this post

Share on other sites
## POINTS AND REWARDS MODULE V1.20 ##

Fixed bug in .

admin/customers_points_pending.php

where emails sent out with incorrect order date format.

Change the way points handled by the system.

points are now similar to the way values display.

Changed INT(11) to DECIMAL(15,2) so now points no. have .00

for example 100 points will now show 100.00 points.

I've made this change for store owners that deals with small amounts

and set the points value way below 1 points.

So now admin is able to handle/add/delete points value under 1

for example 1.50 points or 0.50 0.43 and so on.

(Read posts...

http://www.oscommerce.com/forums/index.php?sho...c=152746&st=146

http://www.oscommerce.com/forums/index.php?sho...c=152746&st=156

for more details).

As per requests at the forum...

(Read posts...

http://www.oscommerce.com/forums/index.php?sho...ic=152746&st=62

for more details).

Added Admin features.

1.Enable/Disable points awarded for discounded products.

Admin can choose if to award points for products that already discounded (i.e speacials).

If admin choose NOT to award points for specials and display points info in product info page is set

to 'true' .Customers will see "No points awarded for discounted products." insted of points value .

2.Enable/Disable Products Price Restriction.

Admin can choose if to allow points redeemptions for products that already discounded (i.e speacials).

tested to wotk with products specials. I'm not sure if it will work with PWA contribution but the idea

is that when ever Products Price Restriction enabled. Any price other then the full price will disable

the redeemptions box.

3.Enable/Disable Keeping Records of Redeemed Points.

Admin now has the option to keep records of all redeemed points.

When disabled, redeemed points recorded in customers order history only.

When enabled, redeemed points recorded also in costomers points row and the customer will see the order

info and will be able to click the row and this will take him to the order history page.

Updated catalog/includes/languages/english/my_points_help.php

to have all new features information.

This page has an auto update info.When ever admin make change to the points system values,

it will say this page last updated (last modified dates are pulled up from database).

** Please note when you first install this mudule you must update all vaiables in admin points/reward option

screen alse the last update date will not show.

Clean up the code in order to try to boost up the system.

Changed the way points shown up in my points page.Now points shown with their values.

if the customer made order but has got no points yet, instad of showing points info with 0 values.

it will now show "You don't have Qualified Points yet.".

The demo site is still online.

Store owners wanting screenshots will be able to download a packge includs screenshots from the link at the site.

Thank you all for your interest in this module.

Hope this answer all requested post and will be happy to have your feedback or new suggestions.

DEEP SILVER ACCESSORY? :P

just updated to the new version you posted here.... unfortuntely the faq don't work properly... this error to do with getting the last date is causing it:

Fatal error: Call to undefined function: tep_get_last_date() in /home/osa786/public_html/shop/includes/languages/english/my_points_help.php on line 101

it appears in faq1, 3, 5, 6, 7, 8, 9, 10 and 11

also, when looged in as a customer, this fault happens whenyou click the views points balance and points received link.

both these happened after installing the update and the fresh files... please advise!

i havent had a chance to check the admin properly yet but it seems to work fine.

thanks again dep-silver, this is a very good script.. i wish i knew how to add a referral system to it too.

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

Share this post

Share on other sites
just updated to the new version you posted here.... unfortuntely the faq don't work properly... this error to do with getting the last date is causing it:

Fatal error: Call to undefined function: tep_get_last_date() in /home/osa786/public_html/shop/includes/languages/english/my_points_help.php on line 101

it appears in faq1, 3, 5, 6, 7, 8, 9, 10 and 11

also, when looged in as a customer, this fault happens whenyou click the views points balance and points received link:

Fatal error: Call to undefined function: tep_get_shopping_points() in /home/osa786/public_html/shop/my_points.php on line 72

both these happened after installing the update and the fresh files... please advise!

i havent had a chance to check the admin properly yet but it seems to work fine.

thanks again dep-silver, this is a very good script.. i wish i knew how to add a referral  system to it too.

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

Share this post

Share on other sites

I just updated mine. FAQ works fine. Double check your coding.

FYI ... I have used nothing but the updates since the first initial release and found many errors due to me not doing the update correctly.

One other note, when running the SQL update, you may see double admin options. Just go into MySQL and delete them but make sure they have the correct corresponding ID key.

Remember what the Bible says: He who is without sin, cast the first rock. And I shall smoketh it.

Share this post

Share on other sites
just updated to the new version you posted here.... unfortuntely the faq don't work properly... this error to do with getting the last date is causing it:

Fatal error: Call to undefined function: tep_get_last_date() in /home/osa786/public_html/shop/includes/languages/english/my_points_help.php on line 101

Please make sure to have the latest

catalog/includes/functions/redemptions.php

You must replace it with the one in the latest version.

The demo site is on and runing, its always a good idea to check it and if it works fine there then as Young Tae Byun advised you.

Double check your coding

** Please note when you first install this mudule you must update all vaiables in admin points/reward option

screen alse the last update date will not show.

DEEP SILVER ACCESSORY

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

Share this post

Share on other sites
Hello,

Ok I ran a few tests :

1- The shopping points now get correctly added in the Customers Pending Points.

2- However when redeeming points and paying through Paypal, redeemed points don't get deducted from the Client's points balance. I.e. if the user has 20 points for a \$20 value, used 5 points worth \$5, there still are 20 points into the user account.

Fabien

Hi there.

sorry for getting back to you so late but i had to open an account with paypal

as well as a test account and it tooks me a while before i understood how to use the test system.

Anyway I have just uploaded POINTS AND REWARDS MODULE V1.20 and included

Paypal IPN Modifications instrctions as well as a modified paypal_ipn.php (V1.1)

Note the include attached paypal_ipn file has been modified with all updates and patch.

use it at your own risk.

Please run few more test under you invariment and let me know the result.

Deep Silver.

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

Share this post

Share on other sites

Just a quick suggestion. Please keep two versions of this contribution as some of don't want to bother with the PayPal IPN as it still doesn't work too well.

Just a suggestion ... it's your contribution. :D

Remember what the Bible says: He who is without sin, cast the first rock. And I shall smoketh it.

Share this post

Share on other sites

It works great thanks! One question though...

Your update file said

catalog/products_info.php

catalog/includes/languages/english.php

catalog/includes/languages/english/products_info.php

But I did not see what to edit for this file catalog/includes/languages/english.php

Just want to make sure it isnt missing.

Maddie

Share this post

Share on other sites

hmmm just checked and some of the math doesn't add up unless I am doing it wrong. Could it be because they already had points when I did the update? Seems some updated correctly and some didn't...

order for \$16.51 points=1.49 value=\$1.49 shouldn't it be \$1.65?

order for \$41.51 points=4.15 value=\$4.15 this one is correct

Just wanted to let you know. Thanks

Maddie

Share this post

Share on other sites
hmmm just checked and some of the math doesn't add up unless I am doing it wrong. Could it be because they already had points when I did the update? Seems some updated correctly and some didn't...

order for    \$16.51  points=1.49  value=\$1.49  shouldn't it be \$1.65?

order for    \$41.51  points=4.15  value=\$4.15  this one is correct

Just wanted to let you know. Thanks

Maddie

for order \$16.51.

im not sure of your setting as you did not provide enough info.

but from the way the result are it looks like you set the points value to 0.1 point

and 1 point = \$1.00 when redeemed.

the result are correct if you set the total exclude tax and shipping.

shouldn't it be \$1.65?

only if you set the total include tax and shipping.

Please let me know if alse so i can run test on my demo site.

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

Share this post

Share on other sites
for order \$16.51.

im not sure of your setting as you did not provide enough info.

but from the way the result are it looks like you set the points value to 0.1 point

and 1 point = \$1.00 when redeemed.

the result are correct if you set the total exclude tax and shipping.

only if you set the total include tax and shipping.

Please let me know if alse so i can run test on my demo site.

You are right again! I did not take into account the tax and shipping. I went back and checked them and here is what I have. I tried to find an exapmle of each, but I only have 5 that have points... sure hope you can follow htis and that I gave you enough info.

Maddie

My points value to 0.1 point and 1 point = \$1.00 when redeemed

for this order there was tax and shipping:

total=\$16.51 points=1.49 value=\$1.49

Sub-Total: \$13.89

Sales Tax: \$1.08

United States Postal Service (1 x 0.32lbs) (First-Class Mail): \$1.54

Total: \$16.51

So would it not be \$13.89 x .1= \$1.39 but it shows \$1.49 ?

-----------------------------------------------------------------------------

For this order there was shipping and a discount:

This one is correct:

total=\$21.81 points=1.93 value=\$1.93

Sub-Total: \$21.50

United States Postal Service (1 x 0.54lbs) (First-Class Mail): \$2.46

Discount Coupons:Welcome2005: -\$2.15

Total: \$21.81

\$21.81 - 2.46= \$19.35 x .1 = \$1.93

-------------------------------------------------------------------------

For this order there was tax, coupon and free shipping:

total=\$41.51 points=4.15 value=\$4.15

But ths one is not correct??

Sub-Total: \$42.47

Sales Tax: \$3.29

Shipping: \$0.00

Discount Coupons:Migration05: -\$4.25

Total: \$41.51

--------------------------------------------------------------------------

Here is screenshot of my configuration

Edited by MzBeanz

Share this post

Share on other sites
My points value to 0.1 point  and 1 point = \$1.00 when redeemed

for this order there was tax and shipping:

total=\$16.51    points=1.49    value=\$1.49

Sub-Total: \$13.89

Sales Tax: \$1.08

United States Postal Service (1 x 0.32lbs) (First-Class Mail): \$1.54

Total: \$16.51

So would it not be \$13.89 x .1= \$1.39 but it shows \$1.49 ?

in this order it looks like the taxes in. while shipping ex.

Do you remember your setting for that day?

For this order there was tax, coupon and free shipping:

total=\$41.51 points=4.15 value=\$4.15

But ths one is not correct??

Sub-Total: \$42.47

Sales Tax: \$3.29

Shipping: \$0.00

Discount Coupons:Migration05: -\$4.25

Total: \$41.51

In this order you must check to see if the Sub-Total: \$42.47 matches the conditions in your setting.

any item in that order as a special price(discounted product)? any price other then the full price?

as some points values might get rounded both way up or down. this can end up with wrong results.

in this case you will have to ajust those points manually.

if you did not approve those pending point yet then accsess you phpAdmin and under table CUSTOMERS_POINTS_PENDING ajust the points value before approving them.

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

Share this post

Share on other sites

in this order it looks like the taxes in. while shipping ex.

Do you remember your setting for that day?

I had both tax and shipping excuded from the beginning

In this order you must check to see if the Sub-Total: \$42.47 matches the conditions in your setting. any item in that order as a special price(discounted product)? any price other then the full price?

No products on special, full price for all

as some points values might get rounded both way up or down. this can end up with wrong results. in this case you will have to ajust those points manually.

ok

if you did not approve those pending point yet then accsess you phpAdmin and under table CUSTOMERS_POINTS_PENDING ajust the points value before approving them.

I will make sure to check in future orders thanks!

Thanks so much I will keep an eye on it. I have both tax and shipping set to false. Will let you kow.

Maddie

Share this post

Share on other sites

My Order Confirmation page does not indicate that any reward points are being used. I installed this contribution on a clean osCommerce 2.2-MS2. Should anything be displayed, or is the discount taken in the background?

Thanks

Share this post

Share on other sites
My Order Confirmation page does not indicate that any reward points are being used.  I installed this contribution on a clean osCommerce 2.2-MS2.  Should anything be displayed, or is the discount taken in the background?

Thanks

Have you installed/actived the order_total module for points/rewards in the Admin->Modules->Order Total ?

Share this post

Share on other sites
My Order Confirmation page does not indicate that any reward points are being used.  I installed this contribution on a clean osCommerce 2.2-MS2.  Should anything be displayed, or is the discount taken in the background?

Thanks

Go to Admin->Modules->Order Total under Points Redemptions make sure its install and the sort order is less then TOTAL and higher then SUB-TOTAL.

On a fresh install of oscommerce the sort order for Points Redemptions and TOTAL

are the same = 4 you must change the sort order for TOTAL to higher then 4.

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

Share this post

Share on other sites

HISTORY BACK BUTTON

When customer click on one of the rows shown it my points page the link will take him/her

to the order history page to view the details. then trying to return to my points page, using

the default back buttom shown will take the customer to My Order History page.

This will solve the problem as it use the jave script to return one step back (history.go(-1)).

```open catalog/account_history_info.php

Find this.... (Start at aprox. line no.238)
<td><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, tep_get_all_get_params(array('order_id')), 'SSL') . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>

..and replace it with this.......

<!-- // Points/Rewards Module v1.20 history_back_bof
<td><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, tep_get_all_get_params(array('order_id')), 'SSL') . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>
//-->         <td class="main"><a href="javascript:history.go(-1)"><?php echo tep_image_button('button_back.gif', IMAGE_BUTTON_BACK); ?></a></td>
<!-- // Points/Rewards Module v1.20 history_back_eof //-->```

Done!

P.S

I've included a modified file catalog/account_history_info.php into the last upload.

just incase some when is in need.

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

Share this post

Share on other sites
Go to Admin->Modules->Order Total under Points Redemptions make sure its install and the sort order is less then TOTAL and higher then SUB-TOTAL.

On a fresh install of oscommerce the sort order for Points Redemptions  and TOTAL

are the same = 4 you must change the sort order for TOTAL to higher then 4.

This fixed the problem that I was experiencing.

Share this post

Share on other sites
HISTORY BACK BUTTON

When customer click on one of the rows shown it my points page the link will take him/her

to the order history page to view the details. then trying to return to my points page, using

the default back buttom shown will take the customer to My Order History page.

This will solve the problem as it use the jave script to return one step back (history.go(-1)).

```open catalog/account_history_info.php

Find this.... (Start at aprox. line no.238)
? ? ? ? ? ? ? ?<td><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, tep_get_all_get_params(array('order_id')), 'SSL') . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>

..and replace it with this.......

<!-- // Points/Rewards Module v1.20 history_back_bof  [B][COLOR=red]//--> [/COLOR][/B]
? ? ? ? ? ? ? ?<td><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, tep_get_all_get_params(array('order_id')), 'SSL') . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>
//--> ? ? ? ? <td class="main"><a href="javascript:history.go(-1)"><?php echo tep_image_button('button_back.gif', IMAGE_BUTTON_BACK); ?></a></td>
<!-- // Points/Rewards Module v1.20 history_back_eof //-->```

Done!

P.S

I've included a modified file catalog/account_history_info.php into the last upload.

just incase some when is in need.

Just a note this line in the replacement section has a part missing should read

<!-- // Points/Rewards Module v1.20 history_back_bof //-->

Thanks for the fix deep-silver!

Maddie

Share this post

Share on other sites
Just a note this line in the replacement section has a part missing should read

<!-- // Points/Rewards Module v1.20 history_back_bof  //-->

Thanks for the fix deep-silver!

Maddie

its not missing its there just after the original line so it will comment out the original line.

if by any chance it dose not look clear enough for you when the code is placed here at the forum then download the package from oscommerce site and check out the modified file you refer to.

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×