close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Order History and associated issue's

Thread began 5/23/2013 7:01 am by Jon Cunningham | Last modified 10/23/2013 12:10 pm by Jason Byrnes | 3506 views | 13 replies |

Jon CunninghamBeta Tester

Order History and associated issue's

Hi Guys, Thanks in advance for any help you can provide.

My Issue's.

I have created order history pages using the following tutorials.

Integrating Data Bridge and eCart
Added SecurityAssist
Applying Register/Login to your Checkout Process
Automatically populate form fields on your checkout page
Displaying Relational Table Data with Plugins

Having completed the above I have 2 issues.

Issue 1.
Automatically populating my form fields on the checkout page all works except for the county drop down menu. I have attached my page just in case i have missed something and would appreciate some direction.

Issue 2. (more complicated)

Having created the order history pages i want to implement these for the customer to see his/her order and order status once they are logged in.

Having secured these using SA i want to add a link from a dashboard page so if clicked they get taken to the order details page. I am sure i am doing this bit wrong. I have made a link to order_search,php and the output lists all orders (Kind of knew it would).

How would i make a link that would return all orders for that specific customer from the pages that i have created. Again any guidance would be greatly appreciated.

I have attached my order pages.

Kind regards

Jonathon

Sign in to reply to this post

Jason ByrnesWebAssist

1) The country list on your registration page and the country list on the checkout page don't match.

on the registration page, the Country list passes the full country name for the value, for example:
<option value="United States"

on the checkout page, the country list uses the Abbreviations:
<option value="US"

the values for the two lists will needs to use the same conventions, either use abbreviations for both, or use the ful countrry name.

2) when a user logs in, their ID is stored in a session variable named SecurityAssist_UserID. When the order summary is stored in the database, that ID value is stored in the OrderUserID column o the users table.

to show the orders for the logged in user, add a where statement to the recordsets on the order history pages to filter the OrderUserID column on the SecurityAssist_UserID session variable.


the Order History tutorial talks about this throughout:
http://www.webassist.com/community/tutorials/view_tutorial.php?tid=17

in the tutorial, the session is named UserID, but your login page creates the session as SecurityAssist_UserID

Sign in to reply to this post

Jon CunninghamBeta Tester

Hi Jason, thank you for replying.

I would not of guessed that eCart would output something different than SA but thank you for the heads up. i will change this over.

In regards to the order history, I followed the Displaying Relational Table Data with Plugins video tutorial on Order history and Order details. This seems very straight forward if i was implementing it as part of the Back end Admin but not so if as i am wanting to to use it for the client side admin.

Would you suggest that i follow the Kurt's Tutorial for implementing order history.

My order history page is orders_detail.php

SQl for that page is

SELECT OrderID, OrderAmount, OrderShipName, OrderShipAddress, OrderShipAddress2, OrderCity, OrderState, OrderZip, OrderCountry, OrderPhone, OrderFax, OrderShipping, OrderTax, OrderEmail, OrderDate
FROM orders
WHERE OrderID = ParamOrderID AND OrderUserID = SecurityAssist_UserID

are you suggesting that i change the above to

SELECT OrderID, OrderAmount, OrderShipName, OrderShipAddress, OrderShipAddress2, OrderCity, OrderState, OrderZip, OrderCountry, OrderPhone, OrderFax, OrderShipping, OrderTax, OrderEmail, OrderDate
FROM orders
WHERE OrderID = ParamOrderID AND OrderUserID = SecurityAssist_UserID

Jonathon

Sign in to reply to this post

Jason ByrnesWebAssist

for the where clause use:
WHERE OrderID = ParamOrderID AND OrderUserID = paramUserID

in the variables section, create a new variable as:
Name: paramUserID
Type: integer
Default value: -1
Runtime Value: $_SESSION['SecurityAssist_UserID']

Sign in to reply to this post

pistartech366237

Hello Jason,

It's been a struggle for me, and now - I need your help yet again.

I've created the customer_order_history and customer_order_details pages based on the tutorials. I've updated the login page to make sure it records the correct session (SecurityAssist_UserID). And I cannot get the customer_order_history to show the orders for particular user. However, when I'm testing the recordset in DW environment it shows the correct data if I use OrderUserID as a default value in the variable.... However, when I use -1 - it shows no data either.

I went through forum and tried different solutions - nothing seems to help.

The pages are attached, and please see the PM for the link

Please advise.

Attached Files
customer_order_details.php
customer_order_history.php
Sign in to reply to this post

Jason ByrnesWebAssist

I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

pistartech366237

Thank you so much Jason. Please see PM

Sign in to reply to this post

Jason ByrnesWebAssist

see PM

Sign in to reply to this post

pistartech366237

Please see pm

Sign in to reply to this post

Jason ByrnesWebAssist

your order and order history page needed code added to force the page top see the session. I added the code at line 1:
<?php @session_start(); ?>

this would not have been necessary if you you had used security assist access rules to protect access to the page.

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