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

Creating Order History

Thread began 8/05/2009 8:24 pm by 4egidio363291 | Last modified 5/27/2010 1:53 pm by Jason Byrnes | 1857 views | 10 replies |

4egidio363291

Creating Order History

I am trying to create or Order History page per the .pdf help file. On page 6, it says to modify the sql statement. Everything works until my where statement. I changed it as told to WHERE orderdetails.DetailOrderID = paramOrderID AND orders.OrderUserID = paramUserID

When I try to test it says paramOrderID is an invalid variable name. It does not appear in the sql. This is after I adder the new variable on page 8 of instructions.

Any help would be appreciated.

Sign in to reply to this post

Jason ByrnesWebAssist

That error suggests that the when you created the variable, the name was not exactly the same as what was used in the SQL.

Remember, the variable names are case sensitive. paramOrderID is not the same as ParamOrderID (Note the capital P) If you continue to get an error, post a screen shot of the Recordset window showing the SQL and the variable.

Sign in to reply to this post

4egidio363291

Oder History

Thanks that seemed to solve that problem but now I get a error message when I load the page after I am already logged in.

Fatal error: Call to undefined function: wa_auth_rulepasses() in /homepages/44/d232789399/htdocs/buyorsellvideos/Templates/customer_order_history.php on line 333

Here is the code on customer_order_history.php line 333

<?php if (!WA_Auth_RulePasses("Logged in to Users")){ ?>
<a href="../Users_LogIn.php">Login</a>
<?php } else { ?>
<a href="../Users_LogOut.php?ID=<?php echo $_SESSION['UserID']; ?>">Logout</a>
<?php } ?>
<?php if (WA_Auth_RulePasses("Logged in to Users")){ ?>
Welcome <?php echo $row_welcome['UserFirstName']; ?> &nbsp;<a href="../orderhistory.php">My Listings</a>
<?php } ?>

Sign in to reply to this post

Jason ByrnesWebAssist

There is most likely a problem with the code order,

Find the line similar to:
<?php require_once( "WA_SecurityAssist/Helper_PHP.php" ); ?>

and move it to line 1.

Sign in to reply to this post

4egidio363291

new error

I did have a coding error but now I get results but there are blank records but still numbered (1-4) Also, when I click to view the details of the results I get following error.

Fatal error: Cannot redeclare class wa_altclassiterator in /homepages/44/d232789399/htdocs/buyorsellvideos/Templates/customer_order_details.php on line 162

This is line 162

<?php
//WA AltClass Iterator
class WA_AltClassIterator {
var $DisplayIndex;
var $DisplayArray;

function WA_AltClassIterator($theDisplayArray = array(1)) {
$this->ClassCounter = 0;
$this->ClassArray = $theDisplayArray;

Sign in to reply to this post

Jason ByrnesWebAssist

That error means the following code is duplicated on the page:

<?php
//WA AltClass Iterator
class WA_AltClassIterator {
var $DisplayIndex;
var $DisplayArray;

function WA_AltClassIterator($theDisplayArray = array(1)) {
$this->ClassCounter = 0;
$this->ClassArray = $theDisplayArray;
}

function getClass($incrementClass) {
if (sizeof($this->ClassArray) == 0) return "";
if ($incrementClass) {
if ($this->ClassCounter >= sizeof($this->ClassArray)) $this->ClassCounter = 0;
$this->ClassCounter++;
}
if ($this->ClassCounter > 0)
return $this->ClassArray[$this->ClassCounter-1];
else
return $this->ClassArray[0];
}
}
?>


The second instance of that code can be deleted.

Sign in to reply to this post

4egidio363291

Order History

Thanks, I'm not getting any error messages but still not getting order history to come up. It says there are records but the columns are blank. Then when I click on view,edit or delete. It says no records found. Should I open a ticket?

Please advise.

Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket for you. Please replay to your ticket by logging into your support history at the following URL:
supporthistory.php

Sign in to reply to this post

Jason ByrnesWebAssist

Looking at the code on the page, i found that the recordsets where not created properly:

On the Order History page, the problem is the WADAOrders recordset.


the select statement was limiting the columns returned:
SELECT OrderUserID FROM Orders

It should be:
SELECT * FROM Orders


On the order details, User ID Session Variable was being compared to the Order ID column in the Where statement:
AND Orders.OrderID = paramUID

it should be the OrderUserID column
AND Orders.OrderUserID = paramUID

Sign in to reply to this post

paul298707

Need a great coder to spot my error - help

This problem is very similar to mine -- I'm sure it's something wrong with my code.

Here's a screenshot of what I have. I've pasted the code below in case you can't read the image.

Note that my table is "visitors" and not "users."

SELECT orders.*, orderdetails.*
FROM orders INNER JOIN orderdetails ON orders.OrderID = orderdetails.DetailOrderID
WHERE orderdetails.DetailOrderID = WADAOrderID AND orders.OrderVisitorID = paramUserID

Also note that in the wizard when I create the param I already have an exisiting param. Are there supposed to be 2 param?

Thanks.

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