Hey, Me again.

I was doing some more testing hoping to get this live on a site this week.

I've successfully created and used coupons with both 5.x beta3 and the April 21 5.x dev version. Unfortunately though, after the coupon is used, it is still available for use again. I've tried transactions where the full amount of the GC is used and covers only a portion of the total AND I've tried a transaction where the GC is more than enough to cover the whole transaction.

The transaction comes out right and the order completes but the available GC amount remains the same. (The full amount).

One other un-related issue is the way the GC line item is displayed on the checkout pane, the review page, and the completed order. It's a little confusing because the "subtotal before taxes" has the discount applied but the GC line item appears AFTER the tax line item on the review and the completed order pages. But I guess that should be a separate issue. It doesn't break functionality. It's just confusing to read.

CommentFileSizeAuthor
#5 uc_gift_certificate-5-dev.patch791 bytessleepingmonk

Comments

torgospizza’s picture

Interesting, I haven't seen this happen... and we're using the certificate on a live site.. maybe I should check some recent amounts, but I haven't seen that issue in a while.

I'll look into them both. Thanks!

torgospizza’s picture

Question, can you tell me what your Attribute is set to? It should be "Certificate Amount" and not "Dollar Amount"... that has generally been the cause of issues in the past.

EDIT: I just tested with a new install of the Dev version, starting with $63.33 worth of certificates; bought a $0.99 track; and my remaining certificate is now $62.34.

If this issue is, in fact, being caused by the wrong spelling (or name) of an attribute, then I'm considering adding a hook_node and creating my own Gift_Certificate product class / content type. I'm pretty sure I can do that. I'll have to look into what the limitations are, and what the best way is to go about it, but I think that way it'll be less restrictive than always requiring the same attribute to be added to the Certificate product.

sleepingmonk’s picture

Tried the DEV version on a clean install of drupal 5 and it seems to be working now. Not sure what happened on my dev site but I'll try it again there to see if I can track down the reason it didn't work. I'll let you know if I find anything.

As for the beta 3 version. I still had troubles even on a clean install of drupal 5:

beta3 doesn't create gc on  order complete.  Adding manually works. But doesn't subtract on use.  Payment made by check, check received and order set to complete.

My latest tests with DEV version used the credit card test gateway, and the paypal sandbox, which all worked. I didn't try check payment on the clean install with DEV version of Gift Certificate. I don't think check payment would be an issue but it's the only thing I did differently between the 2 tests.

Thanks!

torgospizza’s picture

Cool, yeah I would tend to use Dev more than Beta3 - Beta3 is outdated now. I hope to release an updated version soon. Glad you got it working! I'll try and work on a 2.0 or something that uses Product class rather than Attribute, since that seems a more straightforward way of doing it, but then again I might find that Attributes are the best way to go... won't know until I try!

sleepingmonk’s picture

Version: 5.x-1.1-beta3 » 5.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new791 bytes

Ok, I found a problem.

The GC amount wasn't updating after sale completion because the order status was being set to payment received. While the settings had that status checked off, the module wasn't checking the variables table for those settings. I'm not using the PayPal module but one based on it. The current dev version is hard coded to apply for status "complete" OR (paypal_wps AND payment received).

I've created a small patch that works for me so far. Please have a look and let me know if it makes sense. Rather than hard coding this it compares the status to the set variables.

torgospizza’s picture

That's great, I should really make the "status to adjust cert levels" a configurable option. I'll look at your patch and see if I can work it into something flexible for all users. (If that's not what your patch already does).

Thanks again!