Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


Recommended Posts

Further to my previous post I'm not doing so well on the new install....

 

1. If I select to use all my points it will still ask me for a credit card number but will not charge the card if I confirm checkout.

 

2. If I select to use partial points it bills the credit card for the whole amount

 

I'm using the "PayPal Pro Direct Payments & Express Checkout" as my payment module...

 

Any ideas on what is wrong?

 

Thanks

 

mike

Link to comment
Share on other sites

Further to my previous post I'm not doing so well on the new install....

 

1. If I select to use all my points it will still ask me for a credit card number but will not charge the card if I confirm checkout.

 

2. If I select to use partial points it bills the credit card for the whole amount

 

I'm using the "PayPal Pro Direct Payments & Express Checkout" as my payment module...

 

Any ideas on what is wrong?

 

Thanks

 

mike

Try the same thing at the demo site, if its not happen then your setup is wrong.

check your coding in refer to catalog/checkout_process.php and catalog/checkout_confirmation.php

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

Link to comment
Share on other sites

its happening on the demo site as well as im having the same problem

 

Sub-Total: $32.00

Flat Rate (Best Way): $5.00

FL TAX 7.0%: $2.24

Points Redeemed: -$39.24

Total: $0.0

Credit Card Error!

 

The first four digits of the number entered are: . If that number is correct, we do not accept that type of credit card. If it is wrong, please try again.

 

 

i didnt enter anything....

 

love everything else about the app thou :) thanks

Link to comment
Share on other sites

Try the same thing at the demo site, if its not happen then your setup is wrong.

check your coding in refer to catalog/checkout_process.php and catalog/checkout_confirmation.php

 

Thanks Deep-Silver but as per the above post it looks like the problem with forcing to use the credit card details if using all points is appearing on the demo site.

 

Unfortunately I can't test the partial points redemption since everything on the site will show it to be correct, its only if I login to Paypal that I see the points weren't redeemed.

 

In addition, there seems to be no reference in Admin / the order that points were redeemed..all that shows is payment type = 'Credit/Debit Card'....

 

I trawled through the whole day yesterday and looked at posts since 2005 which all described the issue of partial points not being redeemed if using PayPal WPP but there seems to be no indication of a fix... In the WPP module there is code compatibility for CCV but since this module uses a different total module (redemptions) the payment module isn't picking up the true total.

 

Any ideas would be really appreciated, as I'm sure lots of people are wanting to get this module working with PayPal WPP.

 

Thanks!

 

Mike

Link to comment
Share on other sites

its happening on the demo site as well as im having the same problem

love everything else about the app thou :) thanks

Work fine at the demo site.

If you have enough points to cover the order, you don't need to choose a payment method, just check the box to use the points and continue.

if you check the radio button for any payment, that payment is on.

there is a way around by adding if statement before the payment checker,

like the way CV where the add

if ($cover) $payment ="";

but this is a big security hole.

so if the module show you that you got enough points to cover your order, there is no need to check the radio button.

You probably already notice that on core osCommerce site, once you check the radio button you can't get rid of it, even if you log of and log in again.

its happen because its a radio button, i prefer check box that give you the ability to check it on/off.

anyway i will look into it tomorrow .

Edited by deep-silver

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

Link to comment
Share on other sites

Work fine at the demo site.

If you have enough points to cover the order, you don't need to choose a payment method, just check the box to use the points and continue.

 

 

ahhhhh that would be the problem then.... i chose a payment method :) so its all good then sorry bout that :)

Link to comment
Share on other sites

Hi Deep-Silver,

 

The PayPal WPP module works slightly different as it asks you for the credit card details at the checkout_Payment page and not the checkout_confirmation. So I guess something needs to be changed somewhere...

 

The payment module for PayPal at checkout uses the order_total module, which I do not believe is edited by this contribution so it doesn't know to take the redemption amount from the order total and charges the full amount.

 

I have performed the install 3 times now and have the same problem, so think this is just an incompatibility between the 2 modules.

 

I'd really appreciate it (as I'm sure lots of other people would) if you were willing to provide added support for the PayPal WPP module and would be happy to provide any information and testing.

 

Thanks again

 

Mike

 

Work fine at the demo site.

If you have enough points to cover the order, you don't need to choose a payment method, just check the box to use the points and continue.

if you check the radio button for any payment, that payment is on.

there is a way around by adding if statement before the payment checker,

like the way CV where the add

if ($cover) $payment ="";

but this is a big security hole.

so if the module show you that you got enough points to cover your order, there is no need to check the radio button.

You probably already notice that on core osCommerce site, once you check the radio button you can't get rid of it, even if you log of and log in again.

its happen because its a radio button, i prefer check box that give you the ability to check it on/off.

anyway i will look into it tomorrow .

Link to comment
Share on other sites

ok i have a prob....

 

when i log into /admin/index.php and look under "Modules" the Order Total Modules option isnt there there fore the "Points Redemptions" option isnt either.

 

the Redemptions part is showing up in the checkout but not deducting the point oss the total when the box is checked.

 

ive been thru all the steps twice now....any thoughts?

Edited by silkvixen
Link to comment
Share on other sites

Tracy, never seen that before...even if you deleted the order_total folder the option should still appear...Have you made any changes to the modules.php file recently?

 

ok i have a prob....

 

when i log into /admin/index.php and look under "Modules" the Order Total Modules option isnt there there fore the "Points Redemptions" option isnt either.

 

the Redemptions part is showing up in the checkout but not deducting the point oss the total when the box is checked.

 

ive been thru all the steps twice now....any thoughts?

Link to comment
Share on other sites

Hi Deep Silver, I'm looking forward to trying your updated code.

 

Can you please tell me what is the best way to upgrade, expecialy since many of my customers already have existing points - how do I retain this info whilst upgrading?

 

I guess what I am really asking is - do I need to update the DB - are there any new updates to the SQL?

 

If not, then I presume that all the existing info will be fine, is that correct?

 

Thanks

SSNB

Edited by ssnb
Link to comment
Share on other sites

Further to my previous post I'm not doing so well on the new install....

 

1. If I select to use all my points it will still ask me for a credit card number but will not charge the card if I confirm checkout.

 

2. If I select to use partial points it bills the credit card for the whole amount

 

I'm using the "PayPal Pro Direct Payments & Express Checkout" as my payment module...

 

Any ideas on what is wrong?

 

Thanks

 

mike

 

 

Well, this is the same issue that was occurring on the previous release. There was a fix posted by phocea and texmaxx back on page 55 or so. However, I could never get that part of the code to work (and I wouldn't advise mixing that code with Deep's new code)

 

I would be keen to see some kind of modification that would remove the payment option box if the customer ticks "use all points" (something similar to auto update cart?

 

Otherwise, I guess the alternative is to put up a note that sasy "do not select a payment method if you wish to use all of your points for this purchase"

Thoughts?

 

SSNB

Edited by ssnb
Link to comment
Share on other sites

Well, this is the same issue that was occurring on the previous release. There was a fix posted by phocea and texmaxx back on page 55 or so. However, I could never get that part of the code to work (and I wouldn't advise mixing that code with Deep's new code)

 

I would be keen to see some kind of modification that would remove the payment option box if the customer ticks "use all points" (something similar to auto update cart?

 

Otherwise, I guess the alternative is to put up a note that sasy "do not select a payment method if you wish to use all of your points for this purchase"

Thoughts?

 

SSNB

Guys you are probably having this problem while testing this module,

Lets say that while testing your site you go trough the checkout, your total is $95 your, points value 55$ you then must choose

payment method, so you do.

On the next screen it show you the confirmation and all work fine.

now without making that order. you went to your admin an added enough points to cover your order, then continue testing, that's for sure give you an error, your chosen payment method is still registered, else why the hack you will want to choose

payment to start with??.

Anyway in the real world there are no testing, so this should not happen.

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

Let me clear up a few things before we continue.

POINTS AND REWARDS MODULE is like the name says a points module sort of discount, not a replacement to a payment module.

I don't want to find myself getting paid by points!.

So why did i build this module?

With the growing no. of online commerce site, unless you are selling something unique that is no where to be found or your prices are the lowest, you will find it hard to keep your online customers at your store.

Now here is where points are the issue.

while shopping at your store, your customers earn point with the ability to redeem them on their NEXT order.(so if they would like to use their points they have to come back and buy more).

They do have to choice of surfing the net looking for a better price, but even if they do find (and they will!) they will only be able to use their points at your store.

In a real life because points value are usually less then 10% of the product price and unless you allow your customers to earn points for order paid with points, the chance that they will earn enough points to cover their full order (includes shipping and tax) is very rare.

if and by any chance they do, "Men you got your self an Hell of a customer".

In my case if there was a big chance that my customers will have enough points to cover their order, i wouldn't be using this module or at least set the points value lower.

I've been using this module since osCommerce early time and till today i never had such a case, so go figure it up.

Edited by deep-silver

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

Link to comment
Share on other sites

Hi Deep Silver, I'm looking forward to trying your updated code.

 

Can you please tell me what is the best way to upgrade, expecialy since many of my customers already have existing points - how do I retain this info whilst upgrading?

 

I guess what I am really asking is - do I need to update the DB - are there any new updates to the SQL?

 

If not, then I presume that all the existing info will be fine, is that correct?

 

Thanks

SSNB

please read the release note in refer to upgrade.

there is a minor change to points decimal place,

customers_shopping_points changed from (15,2) to (15.,4).

points_pending changed from (15,2) to (15.,4).

99% useless unless you are using 4 decimal places ie= your points look like this "128.0321".

made this chance in case osCommerce team will modified currencies class again, or in a very rare tax calculations(it will support a better rounded result).

As far as i know your store use $ like this $128.33, so you don't need to worry about it.

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

Link to comment
Share on other sites

Please Note.

in a rare case where you have enough points to cover your order and your store has only one payment option.

you stuck. why?

osCommerce choose that option as the default payment option.

the only why around is.

1. the safe way is to enable any other option.

2. you could add an extra code to go around it.

i will not post it now unless someone is really in need of it.

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

When using points to pay for your the whole order. you will notice that the payment method is empty.

this add on will show points as payment method or other payment + points.

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

find line no.37

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

and add after.

			$order->info['payment_method'] = ( $order->info['total'] > 0) ? $order->info['payment_method'] . '+' . str_replace(':', '', TEXT_POINTS) : str_replace(':', '', TEXT_POINTS);

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

Any none standard payment (third party that use api) like PayPal IPN.

will need to be merge in order to use it with this module.

I am looking into paypal IPN and will post soon.

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

Link to comment
Share on other sites

Deep,

 

That's all fine re: not showing that it displayed that I was paid by points, I can certainly live with that...

 

With regards to the forcing of entering a credit card number for WPP I'm sure I can work around this with a bit of code that I may be able to come up with...

 

My main issue and the one that I can't figure out on my own is that if I choose to redeem the points which doesn't cover the whole amount, the order to the customer shows that they would only be charged the discounted amount, however they actually get charged the full amount..

 

The PayPal WPP module uses the total order amount and it has added support to look up discounts applied by the CCGV which has added code to the order_total.php. However, their is no code which would take the total amount off of the total cost to support this Points and Rewards from what I can make out.

 

I'm really struggling, I know that this module wasn't designed specifically to work with each and every payment module, but I would hope that you may be able to help provide compatibility as I think this module is fantastic and it would be a real shame if I couldn't get this working on my live site....

Link to comment
Share on other sites

Deep,

 

That's all fine re: not showing that it displayed that I was paid by points, I can certainly live with that...

 

With regards to the forcing of entering a credit card number for WPP I'm sure I can work around this with a bit of code that I may be able to come up with...

 

My main issue and the one that I can't figure out on my own is that if I choose to redeem the points which doesn't cover the whole amount, the order to the customer shows that they would only be charged the discounted amount, however they actually get charged the full amount..

 

The PayPal WPP module uses the total order amount and it has added support to look up discounts applied by the CCGV which has added code to the order_total.php. However, their is no code which would take the total amount off of the total cost to support this Points and Rewards from what I can make out.

 

I'm really struggling, I know that this module wasn't designed specifically to work with each and every payment module, but I would hope that you may be able to help provide compatibility as I think this module is fantastic and it would be a real shame if I couldn't get this working on my live site....

i never used this payment, are you asking me to install it and get myself a sendbox test account so i can solf your problem?.

the points information needs to pass to that or any third party payment.

i don't know how that payment look like.

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

Link to comment
Share on other sites

Bug found.

In a very rare case where full amount is covered by point and shipping tax and regular items tax are separated

the order total is not rounded correctly and you will be returned to payment page asking you to choose payment method.

to fix it

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

find this at line no.37

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

and replace with this.

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

in a normal cases you won't see any different.

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

Link to comment
Share on other sites

Hi Deep, I'm sure you will say that it is a problem with the payment module and I appreciate that, but it still leaves me in a difficult situation as I am not a payment module coder and can't see how I can easily link the payment module to call the discount amount.

 

Without asking you to fix this completely for me (unless you were willing to ;) ), would you be willing to point to the relevant function in your module that I can call from another module when the payment is being made which would result in giving me the 'redeemed points amount'? - If you could provide me with that then I have a chance of being able to add code to the payment module to take the correct amount.

 

If I can get this working using the minimal help from you then I will be able to post the solution in the forum to stop anyone else with my payment module having the same issue.

 

I really appreciate your help!

 

Mike

 

i never used this payment, are you asking me to install it and get myself a sendbox test account so i can solf your problem?.

the points information needs to pass to that or any third party payment.

i don't know how that payment look like.

Link to comment
Share on other sites

Hi Deep, I'm sure you will say that it is a problem with the payment module and I appreciate that, but it still leaves me in a difficult situation as I am not a payment module coder and can't see how I can easily link the payment module to call the discount amount.

 

Without asking you to fix this completely for me (unless you were willing to ;) ), would you be willing to point to the relevant function in your module that I can call from another module when the payment is being made which would result in giving me the 'redeemed points amount'? - If you could provide me with that then I have a chance of being able to add code to the payment module to take the correct amount.

 

If I can get this working using the minimal help from you then I will be able to post the solution in the forum to stop anyone else with my payment module having the same issue.

 

I really appreciate your help!

 

Mike

i need to download and install this module to learn it.

therefore i need some some can you wait?(faster would be to give me access to your server, PM don't post)

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

Link to comment
Share on other sites

not sure if this is possible or not but is there any way to exclude the postage amout out of the total if they have enough points to cover the whole of the costs??

it can be done but, its mean that they will have to select a payment method to cover the rest.

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

Link to comment
Share on other sites

im also recieving this error when someone tries to sign up.....

 

Fatal error: Call to undefined function: tep_href_link() in /clientdata/n5200-2-dynamic/s/i/silkycreations.com.au/www/create_account_success.php on line 16

 

but if they refresh the index page they are logged in? points being allocated etc just not that in between page... i just noticed that when the other half tried to make an account

Link to comment
Share on other sites

My welcome points are not being credited to Points status when the user creates an account. Everything else seems fine.

 

BTW: The file catalog\create_account_success.php in the modified files archive appears to be the definition file not the public one.

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