Active
Project:
UC Gift Certificate
Version:
6.x-1.0-beta5
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
28 Oct 2009 at 20:16 UTC
Updated:
15 Nov 2010 at 19:46 UTC
What's the best way to use this module to sell paper certificates, rather than electronic ones? I'd like to let customers buy certificates but not have it emailed to anyone right away. I'll print the generated certificate code on the paper certificate and send it to the order delivery address via mail.
Can I just disable the "recipient" email address attribute on the product nodes?
Thanks!
Comments
Comment #1
torgospizzaPlease see my comment here: http://drupal.org/node/665956#comment-2400004
It can definitely be done but we need to check for a different certificate attribute. It's how we're doing it in our office (had to hack the module but I'm confident this won't have a negative effect on the electronic certificates).
Comment #2
greatwhitebuffalo commentedI'm looking to have a printable certificate generated when someone purchases a gift certificate. The printed certificate would include a unique code that could be entered and verified when someone comes to the physical store to redeem. Is this possible with this module?
Thanks!
Comment #3
torgospizzaYes. Please see my previous comment. It will require some minor modification of how the module currently works.
Comment #4
greatwhitebuffalo commentedWhat I'd like to do is have the system issue a certificate, much like the web site Restaurant.com does. It's for a restaurant that wants to offer certificates say for $10 that could be redeemed for $25 in food as long as the customer spends at least $35 on the visit.
So what I need is a system where the person can pay and either get the certificate e-mailed to them or able to print a pdf at the time of purchase. These coupons would need a unique number that the restaurant could check off to make sure they were used only once.
I hope that makes sense.
Thanks,
Darren
Comment #5
aniskhwaja commentedI am working on printable gift certificates if anyone is interested. One potential issue that I see is that Eric's dev branch has a hard rule that doesn't allow certificates to be added to the cart if the email is not used. It would be ideal if the this was controlled by installation setting.
I am implementing the following features:
1. Create a module setting that would control whether the site supports certificate without email addresses.
2. Allow users to buy a certificate without using a recipients email address
3. Allow users to view certificates purchased by them, and if unredeemed assign them to someone else
4. Allow users to view a "printable" page which has the certificate code on it.
One issue that I have with doing #3 is that if a recipient has used part of the certificate you don't want the sender taking the balance back, but to do that we need to track the original price of the certificate which not currently tracked.
After I have made my changes I would like to submit them to the dev branch and make them available for others what would be process for doing that ?
I guess I could put it all in separate module but i think #1 would need to be changed in this module, and I believe it is significant for people who need functionality for paper gift certificates.
Seems like there is not a lot of recent activity on this module and several issues have been unresolved for a while. So I am somewhat divided on what to do?
Perhaps one of the maintainers of the module can give some advice.
Comment #6
torgospizzaHi! Sorry, I've been crazy swamped with work at my day job and so I haven't been able to give this module the attention that deserves. I would love to do a major rewrite anyway - and on our production version (which varies slightly from the one on d.o.) we are using paper certificates, quite easily I might add.
Basically all I needed to do was edit some conditions in the module itself for issuing certificates during hook_order. Right now it looks for an email address, but a printable certificate should be a shippable product, so no email is required.
Basically we are doing two things:
- User has the ability to select a dollar amount, which is an Option/Attribute in Ubercart, and what the recipient's name is (and who it should say it's "from"
- During hook_order it sees this product (right now we are specifying it but it should be configurable for a product class or SKU, etc.) and if it is a certificate product, it creates a new certificate code and adds it to the product data in the $order object.
That's really it. When we receive orders for the printed certificates, our admin person just prints them out on demand and ships them to the purchaser in a gift envelope.
I'd like to write a patch that takes what we have working and adds it to the drupal.org version of the module. I need to do it carefully so that I don't break existing functionality, although I think the majority of the underlying changes are fairly minor.
With regard to your other ideas, a "printable page" I think could work, and I thought about it, but having the server capabilities to create images or PDFs dynamically is a bit too advanced and I think (at least for now) the module should ignore it. But it's always a good idea to think about possible future integration with that type of server-side app.
If I get some extra time this weekend I will try to address this again and post my patch for it. Like I said I've just been super busy and I was hoping jrust would pick up some of the slack, but if you have any interest in submitting patches or being a co-maintainer, please let me know.
Comment #7
aniskhwaja commentedBy paper certificate I didn't mean an pdf or server side processed. What i had in mind was create a path to a page which would display the certificate with some configurable text. My thought was that on that page i would turn of most of the other blocks and just leave content on, and open it in a separate window. And if some wants to attach the print/pdf module it would work like any other page.
Initially I had started working with the disabled my_gift_certificates / uc_gift_certificate_issue code and turned it out but today I looked that this http://drupal.org/node/670206#comment-3028594 and I think he has made some good changes making the uc_gift_certificate_issue unnecessary. I haven't tried out the module yet but comparing the code, I would suggest making it the new baseline. Since he has fixed most of the math problems, I think that may be a good candidate for 6.x-2.x codebase and the printable stuff can go there.
I would be willing to help, if you want.
Comment #8
torgospizzaOh cool, I actually didn't have a chance to give this a look, yet. I wonder if I can use this as a drop-in replacement. I'll take a look at that issue and respond accordingly.
Comment #9
aniskhwaja commentedYou should be able to use it as drop-in replacement, the code cleaned up quite a bit.
Things to note:
1. He has removed the coupon functionality, I guess where it affects the most is on using the paper certs, because now they will have to go and do the redeem before they can use the cert, it may be a little inconvienent. But give the overall issues with complexity, i think this is probably the right thing to do, especially if it make the math simpler.
2. He has cleaned up the double deduction issue, but the crazy checkboxes still affect control when the value is deducted so if you don't have both the completed and payment received check-boxes turned on your balance never goes down if the order goes straight to completion. But this no different than what is there now in the other branches. I think default should be to have both checke on.
3. The issue with certificate balance being used even if the user selects paypal is still there but i have added a check in the beginning of the hook function as I described in the other thread. I am not very familiar with all the scenarios, so this fix may lead other issues, such as what happens in case of partial paymets, in any case its not an issue he has introduced its always been there.
4. He added a nice tab in the user's profile that shows the admin the certs assigned to the user.
5. There seems to be a bug in his reporting functionality, and it needs to be debugged, looks like code was lifted from the coupon module and my have some dependencies, I haven't looked this in detail yet, current it give me an error.
I have expanded on his code to do the follow
1. Show both the admin and the users their certs, I also show both the certs purchased by them and assigned to them as long as they have value. (Admin still sees 0.00 value certs just like his code)
2. Added a new permission which controls which role can view their own certs
3. i have added a view function which opens the cert up in a popup page, what I do in my site are two things,
1. turn off all blocks on that page
2. i have added a page-...tpl.php file in my them that produces semi decent output fit for printing.
I will upload my variation of his code in a day or so and you can consider it for including it if you wish.
regards
- anis
Comment #10
freelockHi,
1. Not exactly sure when (if) the coupon code was actually being called. I did leave the redeem code in place (saw your other bug about this) as a mechanism for re-assigning certificate balances, but have not deployed this or tested.
2. Yes, with my version, having both checkboxes selected by default makes sense. Could definitely be further improved (I think a rewrite of uc_gift_certificate_order is highly called for, and may fix a lot of the remaining issues).
3. I continued the model of "if there's a gift certificate balance, use it first, and then apply other payment methods." If there's another use case that's desired, I would want to understand how it should work. As it is, the most substantial user interface change I made was fixing the Javascript to hide other payment methods if the gc balance covered the entire order, and hide the gc payment method if it doesn't. (Why force the user to make a choice here? Simpler is better!). And to achieve this, I made gift certificate balance appear on the checkout form, instead of on the next step, the review form (which was the source of a lot of problems!). Gift certificates interact with both the order line items and the payment methods -- and the logic is very twisted. Needs to be more separated.
5. Ah, looks like I'm a bit sloppy: drupal_add_css(drupal_get_path('module', 'uc_coupon') .'/reports.css', 'uc_coupon'); ... loading the css file from uc_coupon. Is that the error you're getting? We're running uc_coupon on this site as well as uc_gift_certificate.
Cheers,
John
Comment #11
aniskhwaja commentedI agree with you simpler is better
lets move this discussion to the this thread and keep it in one place
http://drupal.org/node/670206
The error I am getting is Fatal error: Call to undefined function _uc_coupon_date_range()
so its another dependency on the coupon module.
Comment #12
freelockAh, ok... those are in the form field definitions, callback functions on line 1237 and 1243. Probably need to copy this function into the module -- or find one we can add as a dependency -- seems like there should be something available in uc_reports...
Comment #13
torgospizzaShould I mark this as duplicate of #670206: Gift Certificates are not created (when purchased) if order goes right to Completed?
Comment #14
aniskhwaja commentedseems that would be a good idea, since we repurposed the whole discussion now.
Comment #15
troybthompson commentedDo you know if there is an Ubercart module that creates dynamic PDF files for the user to use at a brick and mortar store? It sounds like you're not headed in that direction but this was the closest I could find. I'm not much of a programmer to adapt this one.
Comment #16
torgospizzaUnfortunately a PDF process is something that the server handles; you'd need a special PDF-creating package on your server to do that. That being said you can look at something like FillPDF which is one of the only PDF-creating modules I found that has a 6.x version: http://drupal.org/project/fillpdf
The main issue is getting the content to the PDF. For our site we just do them by hand because we get way more electronic gift certificate orders than we do physical certificates. But I'd love to revisit this feature and provide some support for PDF creation in the future.