Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Credit Class & Gift Voucher v3.2


Ian

Recommended Posts

Ian,

 

Just installed your 3.2 version in my testsystem. I am using Paypal IPN as my payment. I was able to redeem the same gift voucher twice by having two browsers open at the same time. What I would do is after I have one browser on the initial paypal screen, I use the other browser to empty my cart and get other items and check out. This allows me to use the some gift voucher at least twice.

 

Also, in Admin, I noticed that once you've established a gift voucher, there is no way to delete it (unless you edit the database). Am I missing something?

 

Thank you for all your work that you put into this contribution!

 

Joe.

Link to comment
Share on other sites

  • Replies 55
  • Created
  • Last Reply

Top Posters In This Topic

Joej,

 

Not sure whether this is related, but this type of thing has been reported about the cart before. Even without the gift voucher, you can establish a new browser window add stuff to the cart and the original browser window will only charge you for the original amount. Harald has fixed this in the new checkout procedure, by establishing a cart id.

 

Your also right about not being able to delete a voucher. I will not be adding a delete function for the gift voucher (doing so messes up historical records) but I will be adding a method to inactivate a voucher (as I hav done with coupons)

 

A i've said before, I'm loathe to make too many changes to the Gift Voucher code (unless they are obvious bugs) until the credit class code is commited to core cvs.

Trust me, I'm an Accountant.

Link to comment
Share on other sites

Ian,

 

Hopefully, I'm not being to dense about this subject, but the problem with the cart last until the point it hits Paypal (in my case). After it hits paypals first screen, the order is not changed. This can be remedied by just storing off the arrays in the order class and create a new order class upon completion of the confirmation screen. If the stored arrays equal the new instance, then continue processing else loop around again in the confirmation screen.

 

Now the Gift Voucher problem transends the confirmation screen and makes the Merchant vulnerable until the until the amount is removed from the database. By the way, I see that you provided the class ot_gv, but I didn't see it called anywhere. Did I miss something?

 

Like I said, I hope I'm not being too dense about this, but it seems to me this is a pretty big hole.

 

Thank you!

 

Joe.

Link to comment
Share on other sites

Why dense, sensible question.

 

I will look at the code again, it should be possible to ensure that the Gift Voucher is redeemed and locked before the redirect to the Paypal screen.

 

The ot_gv class is not loaded separately, as it's an order_total module, it is loaded everytime you load the order total class.

 

HTH

Trust me, I'm an Accountant.

Link to comment
Share on other sites

I am now a little confused,

 

Paypal IPN, as far as I can see uses a standard redirect of the submit button on checkout confirmation. By this time my code has already redeemed the voucher and marked that voucher code as redeemed.

 

Any attempt to re enter the same voucher code should be denied.

 

I'll install the paypal payment module, and test.

Trust me, I'm an Accountant.

Link to comment
Share on other sites

Hi Ian,

 

Thanks for the response. I still would love to hear how the ot_gv is loaded by the order_total module. I'm sure if I go through the code added, I should be able to figure it out.

 

As far as your confusion, maybe I need to step back a little and try to explain. This is in how I understand the code works (it may have nothing to do with reality).

 

This is one senerio...

 

Assuming I already have a gift voucher number.

 

1) I put items in my cart.

2) click checkout

3) put the GV number into the box provided on the screen and click redeem.

4) I Tick to use Gift Voucher account balance

5) click continue until I get to the first paypal screen.

6) open another browser (my cart is still the same).

7) remove the current items from my cart.

8) add new items to my cart.

9) click checkout.

10) in the gift voucher area it states that I have the original amount of the gift voucher entered in step 3.

11) I Tick to use Gift Voucher account balance (again, even though I am using it on my other screen).

12) click continue until I get to the first paypal screen.

13) go to the original browser and finish the transaction.

14) switch back to the second browser and finish the second transaction.

15) and I have just used my gift voucher twice.

 

Hopefully this makes sense.

 

Thanks...

 

Joe.

Link to comment
Share on other sites

That's makes a lot of sense.

 

And I don't think is solvable at the Gift Voucher level. The amount cannot be deducted from your account until you click the submit button on checkout confirmation.

 

I'll look at the new checkout procedure code to see if this solves the problem.

 

There maybe away, by setting up a temporary deduction but it feels messy, will look into it.

 

I'll get back to you later with a more detailed description of the order_total module and ot_gv interaction

Trust me, I'm an Accountant.

Link to comment
Share on other sites

I was thinking the same thing about the temporary amount. The only thing I thought about was increasing the gv_customer table to include 2 extra fields. The first field is a temporary amount field, the second is a date/time stamp. When displaying the amount, you automatically deduct the temporary amount. You can reset the temporary amount field everytime you login. But as you say, it is sloppy.

 

Thanks for all your help!

 

Joe.

Link to comment
Share on other sites

Ian,

 

I noticed that some of the files involved in installing installing your module are some that I changed when I installed BN's Authorizenet module. Should I do the old cut and paste into the files involved rather than replace them? I finally got Authorizenet working and would hate to screw that up, but your module suits our store type perfectly; we're a gift store. Gift vouchers, what a concept for a gift store :D

 

Jerry Nielsen

Link to comment
Share on other sites

Ian,

 

I think I have answered my own question. It will probably be easier to cut and paste BN's contribs to your contrib than the other way around. Let me know what you think.

 

Jerry Nielsen

Link to comment
Share on other sites

Joej

 

Maybe Harald's solution is the best. The new checkout procedure includes security measures which stop you having two carts running simultanously.

 

Although this doesn't help people using older snapshot's who don't want to upgrade. It would however be possible to add the just the checking code to their checkout pages. As ever Harald has kept it nice and simple and most of all effective.

Trust me, I'm an Accountant.

Link to comment
Share on other sites

Jerry,

 

I don't know the authorizenet code that well. The number of changes I've made to the checkout pages are not that great and should be well marked. Howver it's always easy to miss something.

 

I'll take a look at the authorizenet code and let you know what I think.

Trust me, I'm an Accountant.

Link to comment
Share on other sites

joej,

I installed the Authorizenet contribution last week AFTER I had installed this gift voucher contribution, and I just had to strategically cut and paste a few lines of code. By the time you read this, you should already have it done; it's that easy. Let me know if you have any questions and i can maybe help, but i never ran into any problems.

Link to comment
Share on other sites

I am getting the following error at checkout on the catalog/checkout_confirmation.php...

 

Warning: Missing argument 1 for credit_deduction() in /mnt/web/guide/christiancinema/www/catalog/includes/modules/credit/gv.php on line 49

 

 

Thoughts anyone?

 

Thanks!

Jared Geesey

Link to comment
Share on other sites

When I press Confirm Order... I get the following error on the next page...

 

 

 

Warning: Missing argument 1 for apply_credit() in /mnt/web/guide/christiancinema/www/catalog/includes/modules/credit/gv.php on line 60

 

Warning: Cannot add header information - headers already sent by (output started at /mnt/web/guide/christiancinema/www/catalog/includes/modules/credit/gv.php:60) in /mnt/web/guide/christiancinema/www/catalog/includes/functions/general.php on line 23

 

 

This seems to be a Gift Voucher error since it is signaling gv.php.

 

Anyone?

 

thanks.

Jared Geesey

Link to comment
Share on other sites

I installed Credit Class GV 3.1 to bring GV up to date.

 

Only errors are: shipping weight error (if a GV is the only item).

 

And

 

During checkout, GIFT VOUCHER is not an option for Payment Method.

 

Any ideas?

Jared Geesey

Link to comment
Share on other sites

Hi.

 

I am wondering if the Gift Voucher System 3.2 is able to have 0% tax. Also, the confirmation page shows $0.00 Shipping Costs.

 

When you set the Free Shipping and Handling for certain amount of purchase in Admin, the shipping and handling cost shows up $0.00 in the checkout_confirmation.php page.

 

I am wondering if there is a fix for Gift Voucher 3.2 to do that also.

 

Thank you

Link to comment
Share on other sites

Have you tested this module on a recent/fresh install?

 

When I install against tep_snapshot_catalog-20021107 I gte errors on checkout_payment.php

 

[sat Nov 9 02:02:10 2002] [error] PHP Fatal error: Call to undefined function: display() in /mnt/apache/htdocs/XXXXXXXXXXX/html/catalog/checkout_payment.php on line 222

 

 

It seems that now there is a new method of payment and shipping names.

.

 

 

Also, with the UPS module enabled, The checkout_process.php doesnt work at all.

Link to comment
Share on other sites

The Credit Class/GV System is will currntly not work with the new checkout procedure. I've just finished tweaking it, so expect a new version this weekend, along with a new loaded snapshot based on th new checkout.

Trust me, I'm an Accountant.

Link to comment
Share on other sites

  • 2 weeks later...

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