close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Creating a Gift Message Field

Thread began 5/21/2010 4:04 pm by mrobben375515 | Last modified 6/07/2010 5:56 pm by Eric Mittman | 3088 views | 12 replies |

mrobben375515

Creating a Gift Message Field

I'm trying to create a gift message field on the checkout page at the bottom. I created the textarea and gave it a unique name. I want the text to show up in the receipt email. How do I do that? I know that you can attach info from the WA_Store_Cart binding into the receipt.php but I'm not sure how to get the Gift Message into the binding.

I've attached the page so you can see what I've done. Thanks

Attached Files
checkout.zip
Sign in to reply to this post

Eric Mittman

One way that you can get this message in your email is to store it in a session variable on your confirm page. Use a eCart > general > set session value server behavior to store the posted message field in a session variable.

Then in your email receipt page you can just drag and drop the session variable where you would like it to appear.

Sign in to reply to this post

mrobben375515

I followed your instructions but it still isn't showing up. I've attached both the confirm and receipt pages. Any other suggestions?

Attached Files
confirm.zip
receipt.zip
Sign in to reply to this post

Eric Mittman

It looks like your set session value server behavior is using the wrong trigger. You are currently using the any page post trigger, it looks like this:

php:
if($_SERVER["REQUEST_METHOD"] == "POST")     {



You will need to update the trigger so it only sets the session variable if your posted GiftMessage element is set and has a value. To update the trigger you can edit the server behavior and use the lightning bolt to point to the GiftMessage form element. If the form element is not available you will need to go to Bindings > Form Data and select the checkout page. This will get the checkout form bindings into the bindings panel on this page. You can then choose the GiftMessage form field for the trigger.

So long as you are setting the value of this element to a session variable and that session variable exists it should appear in the email where you added the session variable binding.

Sign in to reply to this post

mrobben375515

still not working....do I need to add something to the checkout page or change anything in the reciept.php file? I've attached the confirm page again...

Attached Files
confirm.zip
Sign in to reply to this post

Eric Mittman

The code that you have now on your confirm page looks fine to me. Your form element is called Gift_Message correct? If so then the set session value looks ok to me.

If you are not seeing this in the email receipt it means one of two things, either the value is not being set, or the value is being cleared after it has been set. You can check the status of all of the session variables on your checkout success page by adding this code into the checkout success page:

php:
<?php

print("<pre>");
var_dump($_SESSION);
print(
"</pre>");
?>



This will print out all of the session variables that exist when you are on this page. In this list of session variables look for the one that is 'GiftMessage', you should be able to see the value that it is set to as well.

Sign in to reply to this post

mrobben375515

["GiftMessage"]=>
string(18) "this is my message"


that's what showed up...maybe I didn't attach it right in the receipt email. I've attached it below.

Attached Files
receipt.zip
Sign in to reply to this post

Eric Mittman

If you are seeing the session variable on the success page then it should be making it's way into the receipt. The reference in the receipt looks correct to me, it looks as though you are using other session variables in the receipt without issue. Is your store checkout in test mode rite now? If so I can attempt to make a test transaction and check on the email message that is sent to get a better idea for what is going on.

Sign in to reply to this post

mrobben375515

I can't leave it on test mode, is there any other way to check it....

Sign in to reply to this post

Eric Mittman

I have opened a ticket for you on this issue so we can exchange info in private. To update the ticket login and visit your support history.

supporthistory.php

Sign in to reply to this post
loading

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

Content

rating

Layout

rating

Ease of use

rating

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...