close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Sale Code

Thread began 2/10/2010 1:57 pm by Art | Last modified 2/11/2010 7:30 pm by Eric Mittman | 754 views | 4 replies |

Art

Sale Code

Tracking Sale Campaigns

I have a table with sale products and codes and pricing

I have everything working with the sale bit but I now want to be able to track orders to see if they order a particular product from a particular campaign.

My original idea was to write a session if they hit this one page; this didn't work.

So, if any item in their order is on the list of this or that Sale, they will get one or another Sale Code.

With all that said, how do most people do this?

Sign in to reply to this post

Eric Mittman

This will be a very custom setup and will require you to do some hand coding to get it worked out.

You could make use of the eCart functions to check for a particular item by it's id. If the item is found then you could do some processing like set a session variable to a coupon code. You could then send an email to the user with this coupon code.

Sign in to reply to this post

Art

I added a recordset that pulls in all the sales. I do a LEFT OUTER JOIN to only pull in those that match.

So, if an item is on the sales list, a Sale Name will show up in the recordset.

When I create the "Column" in WAssist, it works fine until I try to pull the saleName from the recordset. Because most of them don't have a sale, that column result from the recordset is empty or NULL and when I add to cart, it gives me an error:

Microsoft VBScript runtime error '800a005e'

Invalid use of Null: 'cStr'

/standarddetail.asp, line 232

Would the standard "hide if empty" WA function work for this?

Sign in to reply to this post

Art

I next tried putting the recordset in a form and pulling from that when the add to cart button was pressed. That got rid of the error but now when I try to see the output and bind that new column to the page as text, the text doesn't display...

No errors though.

It's been a while since adding a new column to the cart so I"m a bit rusty.

I'm not sure if I've told you what you need; any ideas what I might be doing wrong?

I think I also need to filter my recordset a little different so that it only pulls in active sale codes.

Sign in to reply to this post

Eric Mittman

I'm not sure if the new recordset setup you have is triggering, if it were you should either see the output or get an error. If you can post back with the page that has the recordset in it I can take a look to see if I can spot any issues.

Did you ever try wrapping the 'if recordset not empty' code around the display text when you were getting the error earlier?

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

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