?
Solved

Using end user entered promo code to redirect to promo product page

Posted on 2010-04-11
9
Medium Priority
?
295 Views
Last Modified: 2013-12-24
Greetings, this seems like such an easy thing to do, so i must be missing something...

I am developing a website that caters to schools athletic departments, each school will have its own category in an online shopping cart system (these categories will be hidden and only accessible thru direct URL)

I need to build a form that allows the end user to enter a "promo" code, the form would then reference a list, either xml or some other method. and with a match the end user would be redirected to the proper page....

so for example the user lands on www.mydomain.com and is presented with an option to enter their promo code.

they enter their code and the form checks with a list to see if there is a match, if there is a match the user is redirected to that promo code's specific category URL

The category ID and promo codes are not the same.... for example our categories have numbers assigned to them, but the promo codes will be words...

so to sum it up, when a user enters a promo code of "wolverines" they would be taken to the wolverines category page of www.mydomain.com/cart/catID?=1001

Thank you in advance for any advice!

0
Comment
Question by:Advantage-Group
  • 3
  • 3
7 Comments
 
LVL 1

Expert Comment

by:LCARSx32
ID: 30387448
If you have some sort of database, you could easily have two columns, one the promo code word, and the other, the category ID.  

Are you using anything like PHP or ASP?  It would be very simple using something like PHP to check the database for the promo code.  If it exists, then it would redirect the page using either a meta refresh or javascript, to the correct page using the category ID from the corresponding column.

-Ray
0
 

Author Comment

by:Advantage-Group
ID: 30387851
The cart solution is asp based and i do want to incorporate the form into some of the carts pages as well as an HTML landing page. I was hoping to be able to do this with xml as it would be much easier for the store admin to update a simple xml doc with new codes and URLs
0
 
LVL 1

Accepted Solution

by:
LCARSx32 earned 2000 total points
ID: 30388330
That shouldn't be a problem.  I don't know ASP myself, but I know it can read and write files.  I know from my experience in VB.NET that .NET has built in classes for reading and writing XML files (XML.XMLreader should be very useful).  Then it's just a matter of having a node called "Promo" with two child nodes "Code" and "CatID".  For example:

<promo>
     <code>TENPERCENTOFF</code>
     <catid>3</catid>
</promo>

It should be super easy to parse.

-Ray
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 

Author Comment

by:Advantage-Group
ID: 30388589
Thanks for the info Ray!

I can incorporate html into the carts articles but since i also want to make a static html landing page how can i access the data in a straight HTML file?

-Joseph
0
 
LVL 1

Expert Comment

by:LCARSx32
ID: 30390247
I don't think you can do it with straight HTML.  HTML is, like you said, static.  It doesn't do any reading/writing etc.  However, ASP feeds the browser straight HTML.  It just does it's thing before hand.

I may be misunderstanding what you mean.

-Ray
0
 

Author Comment

by:Advantage-Group
ID: 30435510
You got the right idea ray, guess i was looking for there to be a way via a javascript or something.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 36042153
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Custom Android App Development is the need of an hour for several businesses. If you go through the right firm for Android Application Development, it can make a huge difference to the ways in which customers interact with your business.
Each password manager has its own problems in dealing with certain websites and their login methods. In Part 1, I review the Top 5 Password Managers that I've found to be the best. In Part 2 we'll look at which ones co-exist together and why it'…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Notifications on Experts Exchange help you keep track of your activity and updates in one place. Watch this video to learn how to use them on the site to quickly access the content that matters to you.

593 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question