Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


Recommended Posts

When users select to pay with Paypal (IPN) and tick to use their points, and then hit the continue button, their points are deducted at that stage, without the order having been confirmed. Therefore, if they hit the back button, or change their mind somehow, the points have already been lost...

If they hit the back button, or change their mind somehow. or don't even order, the order is still there.

why?

Paypal (IPN) build in a way that it record the order before sending the customers to paypal, else when the customer mess up with paypal, you got nothing.

anyway in case of Paypal (IPN) once you choose paypal for your order there is no going back or changing your mind.

is it a customer friendly idea??? is it worth paying paypal 4.3% out of your order and still give customers points discount???.

if you a store owner you can process your customers card order without directing them to a third party site, and paying much less then 4.3%.

You should reconsider the whole idea.

We give points in order to push and keep our customers with us.

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

Link to comment
Share on other sites

We are trying to give the customer what they want. They want to pay using PayPal. I stopped arguing about the how someone wants to give me money many years ago. I will take it any way they wish. I would like to accommodate them by making PayPal easy to use. I may be in the minority but who knows.

Link to comment
Share on other sites

Hi Ashley,

 

If you are only interested in the customer getting the points then merely add the 'tep_add_welcome_points($customer_id);' line someone under the if(EMAIL_USE_HTML == 'true')... i.e. the below:

 

if (EMAIL_USE_HTML == 'true') {

require(DIR_WS_MODULES . 'UHtmlEmails/'. ULTIMATE_HTML_EMAIL_LAYOUT .'/create_account.php');

 

tep_add_welcome_points($customer_id);

 

$email_text = $html_email;

}else{

 

 

Please note that the contribution was designed to give an updated email to include the fact that they were given points and if you use the HTML contribution without even more work it won't generate any different e-mail message.

 

The above will solve the problem of the points not being added, if you want to amend the e-mail text some additional changes would also be required (I wasn't bothered about the e-mail so 'patched' the issue and leaving the default e-mail text in place).

 

Mike

 

Thanks alot Mike. I have got my welcome points!

Link to comment
Share on other sites

If they hit the back button, or change their mind somehow. or don't even order, the order is still there.

why?

Paypal (IPN) build in a way that it record the order before sending the customers to paypal, else when the customer mess up with paypal, you got nothing.

anyway in case of Paypal (IPN) once you choose paypal for your order there is no going back or changing your mind.

is it a customer friendly idea??? is it worth paying paypal 4.3% out of your order and still give customers points discount???.

if you a store owner you can process your customers card order without directing them to a third party site, and paying much less then 4.3%.

You should reconsider the whole idea.

We give points in order to push and keep our customers with us.

 

Thanks Deep. You are correct, of course. And you have raised a question that is very relevent to many small businesses. How to receive payments!

 

I am curious to know what alternative to paypal you would suggest? I have found that having paypal as a payment option has definitely increased sales, so maybe 4% is worth it when you can double your orders. The only working alternatives I know of is to use bank transfer payment (manual, requires customer to "do it later") and using a Credit Card payment option, but then you have to pay merchant and bank fees (at least up to 4%?), so - your suggestion is? I am dying to hear it!

 

If they hit the back button etc, the order is still there, yes, but the points are gone. I have stated this clearly on the payment page, so hopefully customers will behave!

Link to comment
Share on other sites

Thanks Deep. You are correct, of course. And you have raised a question that is very relevent to many small businesses. How to receive payments!

 

I am curious to know what alternative to paypal you would suggest? I have found that having paypal as a payment option has definitely increased sales, so maybe 4% is worth it when you can double your orders. The only working alternatives I know of is to use bank transfer payment (manual, requires customer to "do it later") and using a Credit Card payment option, but then you have to pay merchant and bank fees (at least up to 4%?), so - your suggestion is? I am dying to hear it!

 

If they hit the back button etc, the order is still there, yes, but the points are gone. I have stated this clearly on the payment page, so hopefully customers will behave!

I own a store in Japan, for us paypal is nothing but a third party that want to have a bit out of my cake!

I process my credit card order offline via my store POS register. once I'm done i delete the card record.

You really want to pay a third party,(i guess you making enough profit and able to share it :rolleyes: .)

You don't have to use paypal IPN why don't you use paypal standard???.

I am curious to know what alternative to paypal you would suggest?

I can't really suggest because as wrote above, here in Japan things are different, 95% of my customers choose COD, the fees are low there is no risk of not getting what they buy, and for me i get the money to my bank account from the shipping company, BOOM done! income tax, insurance, shipping, refund, all covered.

Just don't forget that you are a store owner and do your best to work for yourself not for others.

all am saying is that if you really need paypal(sure they need you :lol: ) try to find a way that work out fine for you and your customers. not processing points for order paid by a third party is not a bad marketing. you could give them a paypal choice but without points.

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

Link to comment
Share on other sites

Hello...

This is by far one of the best contrib. I have ever installed. Everything works GREAT except when a customer gets to the checkout confirmation page, The points are not deducted from the total amount. Has there been a fix for this? I don't know if this has been posted or not. I read through 57 pages and didn't see anyone else having this issue...

 

Can anyone help me with this?

 

Thanks,

Matt

Link to comment
Share on other sites

Hello...

This is by far one of the best contrib. I have ever installed. Everything works GREAT except when a customer gets to the checkout confirmation page, The points are not deducted from the total amount. Has there been a fix for this? I don't know if this has been posted or not. I read through 57 pages and didn't see anyone else having this issue...

 

Can anyone help me with this?

 

Thanks,

Matt

 

Hi Matt

 

Did you download Deep Silver's latest updated package? It DOES work. Maybe retrace your steps...?

 

 

Deep

 

I own a store in Japan, for us paypal is nothing but a third party that want to have a bit out of my cake!

 

Yes, I know they like cake!

 

I process my credit card order offline via my store POS register. once I'm done i delete the card record.

 

This is a good idea and we can do this too, but how do you make this secure for your customers?

 

 

You really want to pay a third party,(i guess you making enough profit and able to share it rolleyes.gif .)

 

Is there any amount that is considered "enough"?

 

You don't have to use paypal IPN why don't you use paypal standard???.

 

Why? Are the fees different?

 

 

I can't really suggest because as wrote above, here in Japan things are different, 95% of my customers choose COD, the fees are low there is no risk of not getting what they buy, and for me i get the money to my bank account from the shipping company, BOOM done! income tax, insurance, shipping, refund, all covered.

 

Interesting. So your courier company delivers AND collects the payment for you? Do you ever have problems with people not paying?

 

 

you could give them a paypal choice but without points.

 

How would I do that with P&R? Can you disable it for certain payment methods? That would be a very good idea.

 

Cheers

Sol

Link to comment
Share on other sites

I'm trying to install this mod for my online store and I've followed all the steps in the install file.

But I've got the following problems:

 

1) When I run the redemptions.sql file, I got an error message:

 

#1060 - Duplicate column name 'customers_shopping_points'

 

I think this is just because this field already exists, so is it ignorable?

 

 

2) After all the install procedures, when I go to Admin/module, there is no "point redemptions" under order total. I've double checked the directory and the point_redemptions file is under catalog/includes/modules/order_total/ot_redemptions.php.

 

Also, "Points/RewardsV2.1rc2a" is also NOT found under Admin/configuration

But, "customer points", "pending points" and "referral points" are all successfully added to the Admin/customers.

 

 

Does anyone know how to fix this problem? Thank you!

Link to comment
Share on other sites

I'm trying to install this mod for my online store and I've followed all the steps in the install file.

But I've got the following problems:

 

1) When I run the redemptions.sql file, I got an error message:

 

#1060 - Duplicate column name 'customers_shopping_points'

 

I think this is just because this field already exists, so is it ignorable?

 

 

2) After all the install procedures, when I go to Admin/module, there is no "point redemptions" under order total. I've double checked the directory and the point_redemptions file is under catalog/includes/modules/order_total/ot_redemptions.php.

 

Also, "Points/RewardsV2.1rc2a" is also NOT found under Admin/configuration

But, "customer points", "pending points" and "referral points" are all successfully added to the Admin/customers.

 

 

Does anyone know how to fix this problem? Thank you!

use the installer and run the uninstall, then run the install again.

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

Link to comment
Share on other sites

This is a good idea and we can do this too, but how do you make this secure for your customers?

use ssl on your domain, and try Credit Card Number Encryption mod.

http://addons.oscommerce.com/info/4359

Is there any amount that is considered "enough"?

can't really tell but, there are lots of websites that rip there customers like selling 10 times more.

Why? Are the fees different?

no the only differnt is that paypal send you an email with the result therefore you have to process each order manually.

Interesting. So your courier company delivers AND collects the payment for you? Do you ever have problems with people not paying?

Its a COD, they must pay the delivery guy first! :lol:

and the funny thing is that they paid for it so the chance that you have to deal with refund is low compare with Credit Cards.

How would I do that with P&R? Can you disable it for certain payment methods? That would be a very good idea.

if you like you could add a statement against any payment method you don't want to use point with.

like

if ((USE_POINTS_SYSTEM == 'true') && (USE_REDEEM_SYSTEM == 'true') && ($payment->code != 'paypal')) {

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

Link to comment
Share on other sites

Great Contribution this one!

 

I have to make a few changes for my shop needs.

 

I want to use the referral system in silent mode, with this process:

 

"The shop is a closed shop, new customers can register only when a registred customer give your e-mail address for use in the registration process."

 

1 - Registred customer of the shop talks with a friend and tell him to register in the shop using "[email protected]" email.

 

2 - In the registration process the new costumer will use the email friend([email protected]) to register with success. Whitout an registred customer e-mail in the signup process new customers can't register.

 

3 - When the new customer makes the first order, the customer ([email protected]) will earn points/cash. The referral system will give points only in the first order of the new registred customer to "[email protected]".

 

It is difficult to do this in this contribution?

 

 

Best Regards,

André.

Link to comment
Share on other sites

Receiving this error on the product_info page:

 

Fatal error: Call to undefined function tep_display_points() in /xxxx/xxxxxxxxxxxxxx/public_html/product_info.php on line 139

Did compare my original with the one in the latest contribution. At google search, it ask if have correct redemptions.php file. It is the included in package.

 

Any other suggestions?

 

site is located here!

 

Thanks.

Link to comment
Share on other sites

Receiving this error on the product_info page:

 

Fatal error: Call to undefined function tep_display_points() in /xxxx/xxxxxxxxxxxxxx/public_html/product_info.php on line 139

Did compare my original with the one in the latest contribution. At google search, it ask if have correct redemptions.php file. It is the included in package.

 

Any other suggestions?

 

site is located here!

 

Thanks.

 

Forgot this. Here is the code for product_info.php line 139

// Points/Rewards system V2.1rc2a BOF
[sub]line 135[/sub]    if ((USE_POINTS_SYSTEM == 'true') && (DISPLAY_POINTS_INFO == 'true')) {
    if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
	    $products_price_points = tep_display_points($new_price, tep_get_tax_rate($product_info['products_tax_class_id']));
    } else {
	    $products_price_points = tep_display_points($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
    }
    $products_points = tep_calc_products_price_points($products_price_points);
    $products_points_value = tep_calc_price_pvalue($products_points);
    if ((USE_POINTS_FOR_SPECIALS == 'true') || $new_price == false) {
	    echo '<p>' . sprintf(TEXT_PRODUCT_POINTS , number_format($products_points,POINTS_DECIMAL_PLACES), $currencies->format($products_points_value)) . '</p>';
    }
   }
// Points/Rewards system V2.1rc2a EOF

Edited by blr044
Link to comment
Share on other sites

Forgot this. Here is the code for product_info.php line 139

Please finish the install process, before posting.

you are seeing this error because you are missing parts of the install!

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

Link to comment
Share on other sites

I am really sorry. After making modification on hard drive, I ended up copying wrong files to my store.

 

But now I have a small problem. After points have been added in admin, customer does not receive email of the points.

Even though message at op of page states - email sent to customer. Have viewed post 1322235, 1322004 and 1310906,

but it did not solve issue. Have also posted here going by one suggestion. The section of code from catalog/create_account.php that may be causing the issue is below:

 

// build the message content
//---  Beginning of addition: Ultimate HTML Emails  ---//
if (EMAIL_USE_HTML == 'true') {
require(DIR_WS_MODULES . 'UHtmlEmails/'. ULTIMATE_HTML_EMAIL_LAYOUT .'/create_account.php');
$email_text = $html_email;
}else{
//---  End of addition: Ultimate HTML Emails  ---//
        $name = $firstname . ' ' . $lastname;

if (ACCOUNT_GENDER == 'true') {
        if ($gender == 'm') {
        $email_text = sprintf(EMAIL_GREET_MR, $lastname);
        } else {
        $email_text = sprintf(EMAIL_GREET_MS, $lastname);
        }
        } else {
        $email_text = sprintf(EMAIL_GREET_NONE, $firstname);
        }

// Points/Rewards system V2.1rc2a 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";
)

   $Vartextmail .= EMAIL_WELCOME . EMAIL_TEXT . $text_points .EMAIL_CONTACT . EMAIL_WARNING;

//    $email_text .= EMAIL_WELCOME . EMAIL_USERNAME . EMAIL_PASSWORD . EMAIL_TEXT . $text_points . EMAIL_CONTACT . EMAIL_WARNING;
     } else {
      $email_text .= EMAIL_WELCOME . EMAIL_USERNAME . EMAIL_PASSWORD . EMAIL_TEXT .EMAIL_CONTACT . EMAIL_WARNING;
     }
// Points/Rewards system V2.1rc2a EOF
//---  Beginning of addition: Ultimate HTML Emails  ---//
}

if(ULTIMATE_HTML_EMAIL_DEVELOPMENT_MODE === 'true'){
//Save the contents of the generated html email to the harddrive in .htm file. This can be practical when developing a new layout.
$TheFileName = 'Last_mail_from_create_account.php.htm';
$TheFileHandle = fopen($TheFileName, 'w') or die("can't open error log file");
fwrite($TheFileHandle, $email_text);
fclose($TheFileHandle);
}
//---  End of addition: Ultimate HTML Emails  ---//

 

Customers gets all other emails plus the store owner.

 

Appreciate any clue on this. Thanks.

Edited by blr044
Link to comment
Share on other sites

I've got a similar issue to PuffDandEd here (http://www.oscommerce.com/forums/lofiversion/index.php?t152746-1150.html), basically the form isn't outputting even when the user has enough points and meets the various criteria. All the values are entered too so I'm not sure what else can be missing.

 

Any ideas?

 

Tim

the link you refer to is way too old. and belong to an older version.

try the demo site, if its not happening there, your coding is wrong!

http://www.deepsilver.co.cc/catalog/

Edited by deep-silver

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

Link to comment
Share on other sites

I am really sorry. After making modification on hard drive, I ended up copying wrong files to my store.

 

But now I have a small problem. After points have been added in admin, customer does not receive email of the points.

Even though message at op of page states - email sent to customer. Have viewed post 1322235, 1322004 and 1310906,

but it did not solve issue. Have also posted here going by one suggestion. The section of code from catalog/create_account.php that may be causing the issue is below:

 

// build the message content
//---  Beginning of addition: Ultimate HTML Emails  ---//
if (EMAIL_USE_HTML == 'true') {
require(DIR_WS_MODULES . 'UHtmlEmails/'. ULTIMATE_HTML_EMAIL_LAYOUT .'/create_account.php');
$email_text = $html_email;
}else{
//---  End of addition: Ultimate HTML Emails  ---//
        $name = $firstname . ' ' . $lastname;

if (ACCOUNT_GENDER == 'true') {
        if ($gender == 'm') {
        $email_text = sprintf(EMAIL_GREET_MR, $lastname);
        } else {
        $email_text = sprintf(EMAIL_GREET_MS, $lastname);
        }
        } else {
        $email_text = sprintf(EMAIL_GREET_NONE, $firstname);
        }

// Points/Rewards system V2.1rc2a 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";
)

   $Vartextmail .= EMAIL_WELCOME . EMAIL_TEXT . $text_points .EMAIL_CONTACT . EMAIL_WARNING;

//    $email_text .= EMAIL_WELCOME . EMAIL_USERNAME . EMAIL_PASSWORD . EMAIL_TEXT . $text_points . EMAIL_CONTACT . EMAIL_WARNING;
     } else {
      $email_text .= EMAIL_WELCOME . EMAIL_USERNAME . EMAIL_PASSWORD . EMAIL_TEXT .EMAIL_CONTACT . EMAIL_WARNING;
     }
// Points/Rewards system V2.1rc2a EOF
//---  Beginning of addition: Ultimate HTML Emails  ---//
}

if(ULTIMATE_HTML_EMAIL_DEVELOPMENT_MODE === 'true'){
//Save the contents of the generated html email to the harddrive in .htm file. This can be practical when developing a new layout.
$TheFileName = 'Last_mail_from_create_account.php.htm';
$TheFileHandle = fopen($TheFileName, 'w') or die("can't open error log file");
fwrite($TheFileHandle, $email_text);
fclose($TheFileHandle);
}
//---  End of addition: Ultimate HTML Emails  ---//

 

Customers gets all other emails plus the store owner.

 

Appreciate any clue on this. Thanks.

Your problem has got noting to do with this module.

You are using other "Ultimate HTML Emails" mod, you will have to merge it with this module if you like to email the points out.

Edited by deep-silver

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

Link to comment
Share on other sites

the link you refer to is way too old. and belong to an older version.

 

I suspect the code is wrong but I would apprechiate some pointers on where it might be wrong as it was working fine until recently and as far as I am aware, the code has not been changed recently.

Link to comment
Share on other sites

I suspect the code is wrong but I would apprechiate some pointers on where it might be wrong as it was working fine until recently and as far as I am aware, the code has not been changed recently.

 

 

After a little more digging, I've found that both of these return 0:

get_redemption_rules($order)

get_points_rules_discounted($order)

 

Tim

Link to comment
Share on other sites

Am still having a couple of issues. I did remove UJTML emails and points & rewards. Reinstalled points & rewards, stil same two problems. I can mail cutomer through admin and customers do receive emails of orders placed. But stiil when admin add points, even though it states email sent to customer, he does not get a email.

 

Second issue. Double checked admin -> configure -> points/rewards for settings. The necessary setting is set to true. And step 4 of instructions is there checkout_payment.php. But at website, there isn't a redeemption box.

 

Could use some help on this.

 

Thank you.

Link to comment
Share on other sites

Hi DEEP SILVER,

 

First of all. GREAT contiribution!! Installation went perfectly, but I think I''m looking at a bug.

When I use my redemption points at checkout and continue to the order total, my order total is show incorrectly.

This is what is shown:

 

1 x grande complications 0% 140,000.00EUR

1 x Certina Alter 19% 142,800.00EUR

 

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

 

Sub-Total: 282,800.00EUR

Flat Rate (Best Way): 5.00EUR

19.0% BTW: 22,800.00EUR

Points Redeemed: -100.00EUR

Total: 282.00EUR

 

The Total doesn't make any sense to me.

Could you maybe help me?

Thanks in advance.

Regards,

Sing

Link to comment
Share on other sites

nice to see you again, deep silver :)

 

 

i downloaded the newest version & overwrote my old files.

i compared all of the checkout pages to my own, didn't notice any new code.

 

but it still isn't working with register globals off. i have to put this at the top of checkout_shipping.php (shipping & payment pages combined into 1, with register globals off contribution):

ini_set('register_globals', 'on');
import_request_variables("cpg");

 

in order to get this to work. since php is phasing out register globals, i'd like to be able to stop relying on them. could you kindly let me know which code i am missing that isn't allowing my points to deduct without globals?

Link to comment
Share on other sites

Hi DEEP SILVER,

 

First of all. great contiribution gratitude.

 

osCommerce 2.2-MS2 - utf-8

PHP Version 5.2.5

MySQL 5.1.22-rc

register_globals off

languages & currency is Japanese

Multi-Store v2.0

 

 

When the following order is received without operating NOTIFY_POINTS, data is not input to TABLE_CUSTOMERS_POINTS_PENDING by the order from the same customer in order.php.

 

The point is input in all of customers' orders when this symptom occurs and data is not input to TABLE_CUSTOMERS_POINTS_PENDING.

 

The use of the point is possible.

 

Isn't there better method though this symptom is solved when importing uninstall.sql is executed, and redemptions.sql is done again?

 

any idears ?

 

thanks,

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...