Zen Cart Logo
Forums / General Questions / Generating and email a custom QR code when a product is ordered

Generating and email a custom QR code when a product is ordered

Views: 1,215

Results 1 to 3 of 3
24 Aug 2012, 4:23 PM
#1
jonbowen234 avatar

jonbowen234

New Zenner

Join Date:
Aug 2012
Posts:
2
Plugin Contributions:
0

Generating and email a custom QR code when a product is ordered

I am working on a new site that will offer products with custom QR codes on them. I have installed zen cart on a local server and to be honest I don't have the time to dig really deep and modify anything heavily.

My other site uses squarespace and paypal. I can get that rolling in a few hours but I wanted to use this new site to learn zen cart.

I need to imbed a QR code generator in the product page and have it send me an email with the generated QR code. I think I can do most of it in javascript minus the email part.

I can also just display the QR code on the page and send the text to me as an option. Its a little more work on the back end for me because I have to generate each order's code before manufacturing. This is the route I plan to take on squarespace. I'll just embed a text field for the information and set it as an option in the paypal button code.

Is this possible or even easy to do with zen-cart? I don't have a lot of experience with building website and I don't really have the time to bash my head against it and learn more. Kinda looking for the path of least resistance right now.

Thanks!

24 Aug 2012, 6:58 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Generating and email a custom QR code when a product is ordered

A lot of questions

  • why does it need to email the QR code to you? Does the customer need this same email? Why?
  • is this email expected to be separate from the normal order-confirmation email?
  • how exactly are you generating this QR code? Is it all javascript on the front-end?
  • to have Zen Cart send an email with an attached image, you'd need to generate the QR code using PHP and dump the image contents into a PHP variable. You'll need to supply the code to do that.
  • or you could have your javascript upload the QR image to some webserver someplace and simply send an email containing a URL link to the image. Granted, if you do file uploads via javascript you open yourself up to serious hacking.
25 Aug 2012, 1:36 AM
#3
jonbowen234 avatar

jonbowen234

New Zenner

Join Date:
Aug 2012
Posts:
2
Plugin Contributions:
0

Re: Generating and email a custom QR code when a product is ordered

The customer does not need to see the email. They will need the normal order confirmation stuff.

I need it because it makes it really easy to just dump it into inkscape for laser cutting.

I may have found an alternative solution. I decided to try squarespace. The new squarespace 6 is taking some getting use to but I'm working that out.

I was originally trying to generate the code myself. That was a bit over my head so the work around is to use google charts api to generate it for me. This will give me a url to an image I can display on the page and update as much as I want. I'm currently using javascript to insert the text from an input box into the middle of the url and google spits back the image. I plan to steal that url and try to embed it into the paypal options. If I can't hide it from the customer then I'll just take the message and create a private page to help me copy and paste the text and create the images.

I think the zen cart + php + javascript + QR code learning curves combined are going to be to much for what I'm doing. I have a page that looks great and is almost working now. I'm only making 4 or 5 products. It should be a simple copy and paste process after that.