Print Page | Close Window

Generating Gift Certificate Codes

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Using ProductCart
Forum Description: Running your store with ProductCart
URL: https://forum.productcart.com/forum_posts.asp?TID=4400
Printed Date: 04-March-2025 at 11:17pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Generating Gift Certificate Codes
Posted By: rotokirby
Subject: Generating Gift Certificate Codes
Date Posted: 04-April-2011 at 3:14pm
I need to generate 1000 new gift certificate codes for gift cards we'll be printing soon....the codes will be pre-printed on the cards so I need to generate the codes now so that I can give them to the printer.

We use PC to generate the codes so that we can easily make them usable on our online store as well as within our point of sale system.

The problem is that PC is taking approximately 85 seconds to generate just 10 codes, during which time our entire site is locked up.

Is this normal? Doesn't seem so to me, but maybe there's a lot more to generating unique codes than I'm aware of.

If there's no solution to make the default gift code generator faster and less processor intensive, what are the alternatives?

I've got several hundred PC-generated codes out there already and I'd like to keep the same 10-digit format.

-------------
Rotofugi Designer Toy Store & Gallery
Chicago > IL > US
http://rotofugi.com - http://rotofugi.com



Replies:
Posted By: ProductCart
Date Posted: 04-April-2011 at 3:56pm
Which version are you running? If I remember correctly there was a performance issue in the generation of Gift Certificates, and it was corrected in one of the latest versions.

-------------
The ProductCart Team

Home of ProductCart http://www.productcart.com" rel="nofollow - shopping cart software


Posted By: rotokirby
Date Posted: 04-April-2011 at 4:02pm
We're running 3.11a on our live site, but I also just tested on our development site which is running 4.1a SP 1.

4.1a was faster, about 35 seconds to generate 10 codes...but it still locks up our entire site while generating the codes.

Since I need to generate 1,000 codes that means a completely unresponsive site for nearly an hour (if I'm doing my math correctly). ;)

-------------
Rotofugi Designer Toy Store & Gallery
Chicago > IL > US
http://rotofugi.com - http://rotofugi.com


Posted By: ProductCart
Date Posted: 04-April-2011 at 4:34pm
Let us do a bit of research and get back to you. Maybe the performance improvements that we are thinking of have not yet been released :-)
If that's the case, we could send you some BETA files. We'll let you know in a bit.

-------------
The ProductCart Team

Home of ProductCart http://www.productcart.com" rel="nofollow - shopping cart software


Posted By: rotokirby
Date Posted: 04-April-2011 at 4:42pm
Thanks for the top-notch service folks!

-------------
Rotofugi Designer Toy Store & Gallery
Chicago > IL > US
http://rotofugi.com - http://rotofugi.com


Posted By: ProductCart
Date Posted: 04-April-2011 at 7:58pm
In our internal tests, 100 Gift Certificate codes were generated in just a couple of seconds. Here are the latest files. Give them a try.

uploads/1/gift_certificate_generator_latest.zip - gift_certificate_generator_latest.zip

NOTE: these files assume that you are running ProductCart with "parent paths enabled".

-------------
The ProductCart Team

Home of ProductCart http://www.productcart.com" rel="nofollow - shopping cart software


Posted By: rotokirby
Date Posted: 04-April-2011 at 8:22pm
I must have had a bad or old file somewhere...replaced our files with the ones in the download and ZOOM! Everything working great now. :)



-------------
Rotofugi Designer Toy Store & Gallery
Chicago > IL > US
http://rotofugi.com - http://rotofugi.com


Posted By: rotokirby
Date Posted: 04-April-2011 at 9:08pm
Oops....ran into a small problem, but found my own workaround....

No matter what string length I chose for CodeStrLen in DefaultGiftCode.asp it was generating a 15 digit code, when I really wanted a 10 digit code.

I was able to fix it by changing the values further down ...

Original Code:


Array( 10, "abcdefghijklmnopqrstuvwxyz" ), _
Array( 5, "0123456789" ) _


Changed to:


Array( 5, "abcdefghijklmnopqrstuvwxyz" ), _
Array( 5, "0123456789" ) _



-------------
Rotofugi Designer Toy Store & Gallery
Chicago > IL > US
http://rotofugi.com - http://rotofugi.com



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net