Jump to content
deep-silver

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

Recommended Posts

Been playing with this contrib for a few days and have it about 90% going now. I have a few kinks to work out..as I am using a pretty heavily modified MS1. I can't seem to get my admin/orders.php right or resolve the splitpageresults issue fixed yet. Still plugging away though.....

 

I was thinking about these reward points and my shop. My shop is a specialized health products site and I was thinking how great it would be if people could elect to donate their accumulated rewards to a stated foundation or use them to shop with.

 

Has anyone implemented something like this?

Edited by nnclyn

Nancy

Share this post


Link to post
Share on other sites
Deep-Silver, can you give me a hint on how to fix my problem please. :(

Sound like you have other charges added to order total like maybe service charge or handling charges

in this case when a customers use points its only against product in cart and shipping and /or tax if set to true via admin

 

PS: if you ask someone to test your site, you should setup a test account and post here the loging details.

Edited by deep-silver

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

Share this post


Link to post
Share on other sites
Sound like you have other charges added to order total like maybe service charge or handling charges

in this case when a customers use points its only against product in cart and shipping and /or tax if set to true via admin

 

PS: if you ask someone to test your site, you should setup a test account and post here the loging details.

 

No way. I have a flat rate shipping enabled an that's it. No other fees. I started having anothe rproblem which looks even more scarry :(. While Confirming points follwoing error is received:

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 1

 

select o.orders_id, o.orders_status, o.customers_name, o.customers_email_address, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total, cpp.points_pending as points_pending, cpp.comment as comment, cpp.status as status from orders o , orders_total ot , orders_status s , customers_points_pending cpp where ot.class = 'ot_total' and cpp.status = '1' and cpp.orders_id = o.orders_id and o.orders_id = ot.orders_id and o.orders_status = s.orders_status_id and s.language_id = '1' order by o.orders_id DESC limit -20, 20

 

what's that?


People dont change, people realize.

Share this post


Link to post
Share on other sites
ATTN:

Anyone that will test the points system and make a false order on my real site other then the demo site will be banned forever with no support at the forum.

all test should be made ONLY on the demo site

http://www.deep-silver.com/shop/

 

and not the main url.

This is a real shop so do not setup account or/and make false order.

Yup, got you loud and clear not guitly by the way :D


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


Link to post
Share on other sites
No way. I have a flat rate shipping enabled an that's it. No other fees. I started having anothe rproblem which looks even more scarry :(. While Confirming points follwoing error is received:

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 1

 

select o.orders_id, o.orders_status, o.customers_name, o.customers_email_address, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total, cpp.points_pending as points_pending, cpp.comment as comment, cpp.status as status from orders o , orders_total ot , orders_status s , customers_points_pending cpp where ot.class = 'ot_total' and cpp.status = '1' and cpp.orders_id = o.orders_id and o.orders_id = ot.orders_id and o.orders_status = s.orders_status_id and s.language_id = '1' order by o.orders_id DESC limit -20, 20

 

what's that?

can you post here the list of confirmation page:

like...

subtotal =

tax =

 

also in refer to your admin, you should download the latest version of osCommerce. there you will find the update information in refer to split page.


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

Share this post


Link to post
Share on other sites
can you post here the list of confirmation page:

like...

subtotal =

tax =

That's the thing. I never get to the confirmation page; it throughs me b ack to the Payment Info page with the REDEEM_SYSTEM_ERROR_POINTS_OVER error message in the URL :(.

 

Test account is

 

email: test@test.com

pass: test5

 

There is an item in the shopping cart that produces the problem behavior. I have recently noticed that if you put other item(s) in the shopping cart then it lets you through onto the confimration page. I havnt figured out the pattern though.

 

also in refer to your admin, you should download the latest version of osCommerce. there you will find the update information in refer to split page.

 

Got it! Fixed the lines in both admin and catalog. Thanks. :)

Edited by Voland

People dont change, people realize.

Share this post


Link to post
Share on other sites
Thank You for the Speedy reply to my query :) I checked the coding again and though I did not find any errors, just uploaded the file again and its working now. I did however also have a look at your demo site and I changed some of the settings in the configuration. I think that too may have helped.

 

Thank You for all the hard work that you have put into this contribution and your tireless efforts at answering all the post with regards to the Points/Reward Mod.

 

You are a star. :thumbsup:

 

Regards

Rose

 

 

Rose/Deep-Silver- I'm getting the same issue. In the checkout_confirmation page, the points selected in the checkout_payment page are not being displayed or calucated against the final order. I performed the 2 installation instructions against "checkout_payment.php" as indicated by deep-silver, but it is still not displaying the points in the confirmation page and not applying against the final order.

 

HELP !?!? I've been going at this for 8 hours and going nuts :blush:

 

Thanks in advance!

liquid

Share this post


Link to post
Share on other sites

How do I add a system where the checkout autodetects the account balance. Right now, if the customer has enough points to cover the order total, it is still taking them to PayPal. Once they are at the PayPal site, PayPal is telling them to increase the order total greater than 0. How can I prevent this from happening.

Share this post


Link to post
Share on other sites
Rose/Deep-Silver- I'm getting the same issue. In the checkout_confirmation page, the points selected in the checkout_payment page are not being displayed or calucated against the final order. I performed the 2 installation instructions against "checkout_payment.php" as indicated by deep-silver, but it is still not displaying the points in the confirmation page and not applying against the final order.

 

HELP !?!? I've been going at this for 8 hours and going nuts :blush:

 

Thanks in advance!

liquid

same things once again....

check your order total sort order


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

Share this post


Link to post
Share on other sites
That's the thing. I never get to the confirmation page; it throughs me b ack to the Payment Info page with the REDEEM_SYSTEM_ERROR_POINTS_OVER error message in the URL :(.

 

Test account is

 

email: test@test.com

pass: test5

 

There is an item in the shopping cart that produces the problem behavior. I have recently noticed that if you put other item(s) in the shopping cart then it lets you through onto the confimration page. I havnt figured out the pattern though.

Got it! Fixed the lines in both admin and catalog. Thanks. :)

Deep-Silver :), did you have a chance to lookinto the issue I'm having? ... I am so lost at this point. When you have time test it out please, see what the casue could be.

 

Arkady

Edited by Voland

People dont change, people realize.

Share this post


Link to post
Share on other sites

on checkout_confirmation.php the following shows:

 

Points Redeemed:(365x$0.05)

 

where can i change this? (such as remove the (365x$0.05))

Share this post


Link to post
Share on other sites
same things once again....

check your order total sort order

 

 

Thanks for your time dee-silver. My problem is with the redeemed points chosen from the checkout_payment are not displaying on the checkout_confirmation page. Are you saying, changing the sord order will make the points appear on my confimation page? If so, can you provide guidance on which file I have to modify. I've attached screenshots of my pages below.

 

I don't have other voucher contributions or the like installed, and have never changed the sort order so I'm a little confused with what exactly I have to do to have the points redeemed show up on the checkout_confirmation page and confused why changing the order will make the points appear.

 

Sorry if you've answered this before, but I could not find a clear answer.

 

Thanks again for your time!

-liquid

 

checkout_payment_ok.jpg

 

checkout_confirmation_not_o.jpg

Share this post


Link to post
Share on other sites

Is there any way to REMOVE points information from RESTRICTED ITEMs/Category?

 

Example:- ITEMS A (RESTRICTED)

 

Points Credit : 51.6 points Currently valued at RM5.16 (REMOVE)

 

Example:- ITEMS B ( NOT RESTRICTED)

 

Points Credit : 51.6 points Currently valued at RM5.16 (DISPLAY)

 

It's make my life easier...thanks

Share this post


Link to post
Share on other sites
Can copy it for me and I will just paste it :blush:

 

Try with this code:

 

<?php
$points_query_notyetredeemed = tep_db_query("select points_pending from " . TABLE_CUSTOMERS_POINTS_PENDING . " where orders_id = '" . tep_db_input($oID) . "'");
$points = tep_db_fetch_array($points_query_notyetredeemed);
if ($points['points_pending']>0) {
echo '<tr><td nowrap class="main"><b>POINTS EARNED:</b></td><td class="main"> '. number_format($points['points_pending'],0,",",".") . '  ('. $currencies->format($points['points_pending'] * REDEEM_POINT_VALUE).')</td></tr>';
}
?>

Share this post


Link to post
Share on other sites
Thanks for your time dee-silver. My problem is with the redeemed points chosen from the checkout_payment are not displaying on the checkout_confirmation page. Are you saying, changing the sord order will make the points appear on my confimation page? If so, can you provide guidance on which file I have to modify. I've attached screenshots of my pages below.

 

I don't have other voucher contributions or the like installed, and have never changed the sort order so I'm a little confused with what exactly I have to do to have the points redeemed show up on the checkout_confirmation page and confused why changing the order will make the points appear.

 

Sorry if you've answered this before, but I could not find a clear answer.

 

Thanks again for your time!

-liquid

*. Accses your admin page http://www.your_site_name /admin/index.php

under "Modules" choose Order Total Modules.

A new order total will appear called, " Points Redeemptions " make sure its installed and

that the sort order match yours. this option must appear after " Sub-Total " and before " Total".

When you first install " Points Redeemptions " the sort order no is 4, same as the " Total"

so you must change your value for " Total" sort order to any number higher then 4.


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

Share this post


Link to post
Share on other sites
on checkout_confirmation.php the following shows:

 

Points Redeemed:(365x$0.05)

 

where can i change this? (such as remove the (365x$0.05))

catalog/includes/languages/english/modules/order_total/ot_redemptions.php


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

Share this post


Link to post
Share on other sites
Deep-Silver :), did you have a chance to lookinto the issue I'm having? ... I am so lost at this point. When you have time test it out please, see what the casue could be.

 

Arkady

where is the demo page?


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

Share this post


Link to post
Share on other sites
where is the demo page?

 

Hi Deep-Silver,

 

silly me... for some reason I thought I mentioned it somehwere in my previous post, I guess not. Anyway, the url is mindphantom.com/shop. However someone helped me fix the problem. And the fix involves the following changes. Please let me know if this looks safe and/or will not cause any problems.

 

checkout_confirmation_php (// customer can't use points over the order total)

Replaced:

if (tep_calc_shopping_pvalue($customer_shopping_points_spending) > $order->info['total'])  {
				tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_OVER), 'SSL'));
  }

with:

if (round(tep_calc_shopping_pvalue($customer_shopping_points_spending),2) > round($order->info['total'],2)) {
				tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_OVER), 'SSL'));
  }

 

modules/order_total/ot_redemptions.php(// if customer is using points to pay)

Replaced:

if ($customer_shopping_points_spending > 0){

	$order->info['total'] = $order->info['total'] - (tep_calc_shopping_pvalue($customer_shopping_points_spending));

with:

if ($customer_shopping_points_spending > 0){

$order->info['total'] = round($order->info['total'],2) - round(tep_calc_shopping_pvalue($customer_shopping_points_spending),2);

 

redemptions.php

Replaced:

 function tep_calc_shopping_pvalue($points) {
return((float)$points * (float)REDEEM_POINT_VALUE);

with

function tep_calc_shopping_pvalue($points) {
return($points * REDEEM_POINT_VALUE);

 

The initial problem I remind is the following:

When a customer got to the payment information page while having enough points to cover the Total ticked the "use max points" box and clicked Continue, the checkout_confirmation.php sent him back to the payment page with the REDEEM_SYSTEM_ERROR_POINTS_OVER erro message in teh url. If you need me to recreate the behavior I can remove the above fixes so you can look at it. let me know :).

 

Your input will be very important to me, and thank you for your time

 

Arkady

Edited by Voland

People dont change, people realize.

Share this post


Link to post
Share on other sites
Is there any way to REMOVE points information from RESTRICTED ITEMs/Category?

 

Example:- ITEMS A (RESTRICTED)

 

Points Credit : 51.6 points Currently valued at RM5.16 (REMOVE)

 

Example:- ITEMS B ( NOT RESTRICTED)

 

Points Credit : 51.6 points Currently valued at RM5.16 (DISPLAY)

 

It's make my life easier...thanks

 

BUMP :huh: >_< <_<

Share this post


Link to post
Share on other sites
*. Accses your admin page http://www.your_site_name /admin/index.php

under "Modules" choose Order Total Modules.

A new order total will appear called, " Points Redeemptions " make sure its installed and

that the sort order match yours. this option must appear after " Sub-Total " and before " Total".

When you first install " Points Redeemptions " the sort order no is 4, same as the " Total"

so you must change your value for " Total" sort order to any number higher then 4.

 

That did it!! Thank you very much for your great contribution as I expect this to help with our sales and customer loyalty. This is the most thorough and well documented contribution I've used on this site. Excellent Job!

Share this post


Link to post
Share on other sites
ATTN:

Anyone that will test the points system and make a false order on my real site other then the demo site will be banned forever with no support at the forum.

all test should be made ONLY on the demo site

http://www.deep-silver.com/shop/

 

and not the main url.

This is a real shop so do not setup account or/and make false order.

New Banned information.

1.Philip Arends /philiparends@hotmail.com/06/08/2006

2.Ploe Tietoe / ploe_tietoe@hotmail.com/06/07/2006

 

Netherlands - Noord-brabant - Uden - Xs4all Internet Bv

vvision.xs4all.nl

80.126.84.234

 

The above account made by same person therefore same banned information.

has been used in fraud atempt and has therefor been blacklisted from our server,

If you feel that this is not the case, please contact us through either phone (+81 23 641 9733), or PM me we will do all we can to help get this straightend out.


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

Share this post


Link to post
Share on other sites

Is there any way to REMOVE points information/details from RESTRICTED ITEMs/Category?

 

Example:- ITEMS A (RESTRICTED)

 

Points Credit : 51.6 points Currently valued at RM5.16 (REMOVE)

 

Example:- ITEMS B ( NOT RESTRICTED)

 

Points Credit : 51.6 points Currently valued at RM5.16 (DISPLAY)

 

It's make my life easier...thanks

Share this post


Link to post
Share on other sites
catalog/includes/languages/english/modules/order_total/ot_redemptions.php

thank you :)

Share this post


Link to post
Share on other sites

Hi

 

I have the problem, that this error appears, when i click on "My Profile":

 

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

select count(*) as count from TABLE_CUSTOMERS_POINTS_PENDING where customer_id = '2'

[TEP STOP]

 

Who can help me?

 

Thanks! L?o

 

(Sorry for my bad english, I'm swiss... :blush: )

Share this post


Link to post
Share on other sites

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

×