close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Stop customers getting to download page

Thread began 8/26/2009 4:54 am by colin282897 | Last modified 8/27/2009 12:33 pm by Jason Byrnes | 1214 views | 3 replies |

colin282897

Stop customers getting to download page

I'm running eCart and security assist and need to stop customers accessing the download page until they have paid the product. If the customer just follows the directions they will be directed to the download page after payment has been processed. BUT a naughty customer could find their way directly to the download page without paying for it.

How can i send these people back to a start page if they try this?

Sign in to reply to this post

Jason ByrnesWebAssist

The best way to do this is to have the download page only show links for the products the customer has ordered.

eCart stores order information in the database using the store order Summary, and store Order Details server behavior.

On your Orders table, include a OrderUserID column to relate the order to the user.


This way the orders table will have Foriegn key relations to the OrderDetals and Users tables:
Orders.OrderID = OrderDetails.DetailOrderID
Orders.OrderUserID = Users.UserID

And the orderDetails table will have a foreign Key relationship to the Products Table:
OrderDetail.ProductID = products.ProductID


On the download page, you can create a recordset to show all of the downloads available to the user by filtering on the Logged in users session ID:
SELECT Orders.*, OrderDetails.*, Users.*
FROM Orders
INNER JOIN OrderDetails ON Orders.OrderID = OrderDetails.DetailOrderID
INNER JOIN Users ON Orders.OrderUserID = Users.UserID
WHERE Orders.OrderUserID = $_SESSION['userIDSessionVariabel']


and create download links. This way if the user has not purchased anything, there will not be any download links.

Sign in to reply to this post

colin282897

OK so now i'm going to complicate things for you. I tried to use the download page as a simple analogy. The page actually contains a form that customers fill in that inserts a record into a database. So when the customer pays for the service they are redirected to this form page to fill in. But I don't want people going to this page directly. Could i use the session ID you mention in security assist ie check if the session ID exists if it does grant access if it doesn't go back to the start.

Sign in to reply to this post

Jason ByrnesWebAssist

as long as you are storing the Users ID in the Orders table when they place an order, you cold query the Orders table for any records that contain the logged in users ID, If the recordset is empty, redirect them to the index page.

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