close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Add To Cart - reposts to self with no product info

Thread began 5/12/2011 3:28 pm by jswaringen | Last modified 8/21/2013 4:10 pm by Patrice | 2289 views | 12 replies |

jswaringen

Add To Cart - reposts to self with no product info

I have a strange problem. I have a page that is set to post the shopping cart view ("cart.php") however whenever I add it to the cart it reposts to itself, and there is no product information on the page. If I post again it's added to the cart properly. Any suggestions on how to troubleshoot this would be appreciated.

The page can be seen at:

products_Detail.php?ProductID=26

And the code is attached.

Attached Files
products_Detail.zip
Sign in to reply to this post

Jason ByrnesWebAssist

mve this code form line 10 - 15:

php:
<?php

// WA eCart Redirect
if ($htcCart->redirStr != "")     {
  
header("Location: ".$htcCart->redirStr);
}
?>




to be just before the doctype tag.

Sign in to reply to this post

jswaringen

Originally Said By: Jason Byrnes
  mve this code form line 10 - 15:
php:
<?php

// WA eCart Redirect
if ($htcCart->redirStr != "")     {
  
header("Location: ".$htcCart->redirStr);
}
?>

to be just before the doctype tag.  




I did this and still no change. I'm thinking that somewhere in this code is where the error is, but it seems to match up with everything above it:

php:
if ($ATC_RedirectAfter != "" && $htcCart->redirStr == "")     {

      $htcCart->redirStr = $ATC_RedirectAfter;
    }
    if (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != "")  {
      $_SESSION['WAEC_ContinueRedirect'] = $_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING'];
    }
    else  {
      $_SESSION['WAEC_ContinueRedirect'] = $_SERVER['PHP_SELF'];
    }
Sign in to reply to this post

Jason ByrnesWebAssist

try changing:

php:
header("Location: ".$htcCart->redirStr);


to:

php:
session_commit();

header("Location: ".$htcCart->redirStr);
Sign in to reply to this post

jswaringen

For some reason the "redirStr" property is never being set. I used Firebug/FirePHP and it always shows up empty.

Sign in to reply to this post

Jason ByrnesWebAssist

change:

php:
$row_WADAproducts = WAEC_findRecordMySQL($WADAproducts, "", $ATC_itemID);


to:

php:
$row_WADAproducts = WAEC_findRecordMySQL($WADAproducts, "ProductID", $ATC_itemID);
Sign in to reply to this post

jswaringen

That fixed it, thanks for the help.

Sign in to reply to this post

Jason ByrnesWebAssist

You're welcome.

Sign in to reply to this post

Patrice

I tried a couple of these suggestions on current install of ecart but wasn't successful. If you get a minute can you look at this please?

http://wyoming-county-health.org/donationsTEST.php

Sign in to reply to this post

Jason ByrnesWebAssist

just looking at the code you posted i can see 2 problems:

1) the add to cart code needs to come after the code for the recordsets

2) you have blank lines between php code blocks that will cause the redirect to fail.

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