close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


Gift Card Help Needed

Thread began 12/01/2011 4:24 am by sabastian130416448 | Last modified 12/06/2011 11:02 am by Jason Byrnes | 1404 views | 4 replies |


Gift Card Help Needed


I am trying to set up a gift card page and need some help.

I want the gift card to be such that a customer can enter any amount they wish to enter along with a to and from and message boxes.

The problem I am having is this.

1. The gift card has to be automatically entered into its own table in my database.

2. The gift card along with the selected price needs to be added to the shopping cart.

3. A random code needs to be given. Security Assist will sort that one.

What I want to find out is how to let the gift card be added to the database as well as to the shopping cart without having pre entered fixed amounts or rather gift cards in the table beforehand.

Everything has to happen on the fly so to speak.

An example of what I am looking to do can be found here (customize_gc_product.jsp?productId=751283&type=product&categoryId=106042680&WTz_l=Header%3Bcat106042680)

I hope that you can help me with this problem even if it is just step by step. Main problem is to get the gift card to be added to the database table and the shopping cart at the same time.


Sign in to reply to this post


A nother site that also shows roughly what I am aiming to do is (index.php?dispatch=gift_certificates.add)

Sign in to reply to this post

Jason ByrnesWebAssist

the gift card should not be added to the database at the same time it is added to the cart. What happens if they add the item to the cart, but dont check out? Now you have an gift card that was not actually paid for.

let eCart handle this for you.

eCart will automatically add the order and order details info to the orders and order details table, the gift card item will be added to the order details table.

for the Price, from to and message, set up from, to and message columns in the cart,

in the add to cart button, make those column editable from a text box along with the price.

Sign in to reply to this post


Hi Jason.

I have attatched my vouchers page and my cart page. Everything is working so far but now I have a couple of other problems I need some help with.

On the vouchers page, how do I add the random password so that I can use it as the unique voucher code? Every time I try it I get a message stating that the password.php file doesn't excist.

A nother question that I have is still how to put the voucher in my database as I just want the info on the voucher page to be placed in a table so that I can get the voucher number and test it on my local server. ECart places the whole order in the database and it is a struggle to find out where is what.

Last question for now, on the cart page I added a promo code button that u manually enter the discount and it takes the ammount off of the total, what I would like to know is how to use the random password that gets created in the database along with the unique price to be deducted from the grand total dynamically?


Attached Files
Sign in to reply to this post

Jason ByrnesWebAssist

in your cart object, you should have a column to hold the gift card number.

Go to the bindings panel, and click the plus button. Select Security Assist -> Random Password to add the random password binding.

In the add to cart button, set the Gift card number to be editable from a hidden form element.

after the add to cart button is added to the page, select the gift card hidden element, in the property inspector, click the lightning bolt icon next to Initial value. Select the random pass word binding.

The gift card in to needs to be added to the database during checkout into the order details table. you can get the gift card number form the order details table.

your last question is going to take some custom development, it will require hand coding php and creating a complex SQL query. I would recommend signing up for a premiere ticket appointment where we could work with you in a one on one session to implement this.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...