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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

products results does not populate cart

Thread began 8/03/2016 9:25 am by phill401410 | Last modified 8/08/2016 1:40 pm by Ray Borduin | 1379 views | 10 replies |

phill401410

products results does not populate cart

products_results.php add to cart button opens cart.php but does not populate cart.php
Any thoughts. Thanking you in advance.

Sign in to reply to this post

Ray BorduinWebAssist

I can't spot the problem. If you can give me FTP access and a url to reproduce I'll debug it directly.

Sign in to reply to this post

phill401410

FTP

Originally Said By: Ray Borduin
  I can't spot the problem. If you can give me FTP access and a url to reproduce I'll debug it directly.  


Thanks, Ray

Sign in to reply to this post

Ray BorduinWebAssist

You had an override of your form action in your submit button code. That caused the page to submit directly to the cart page and the add to cart code never ran. I've corrected that issue and the add to cart is working now.

Sign in to reply to this post

phill401410

Thank you for the fix, I am going through the code to see if there is anything I can learn from this.

Sign in to reply to this post

phill401410

Found two things.

One, the WA eCart Redirect code was moved down to just above DOCTYPE.

<?php
// WA eCart Redirect
if ($DIYbyPhill->redirStr != "") {
if (function_exists("rel2abs")) $DIYbyPhill->redirStr = rel2abs($DIYbyPhill->redirStr,dirname(__FILE__));
header("Location: ".$DIYbyPhill->redirStr);
die();
}
?>

Two, formaction and formmethod deleted from Add to Cart input name.

<input name="DIYbyPhill_1_ATC" type="submit" class="eC_FormButton" formaction="cart.php" formmethod="POST" value="Add to Cart">

<input name="DIYbyPhill_1_ATC" type="submit" class="eC_FormButton" value="Add to Cart">

I deleted formaction and formmethod without moving the Redirect code and prod_results did not propagate cart.php. When I moved the order of the Redirect code, prod_results worked. So I guess the order in which code is called makes a difference. Something I will never comprehend, thanks for your expertise.

Sign in to reply to this post

phill401410

This should be easier to solve, i'm sure I'll feel really stupid when you direct me to the issue but the thumbnail still is not showing in cart.php. I've tried writing <img src="images/thumbs<?php echo $DIYbyPhill->DisplayInfo("ProductThumb"); ?>" alt="Product thumbnail" class="eC_ProductThumb" /> several ways and tried various recordsets. Thanks for your help.

Sign in to reply to this post

Ray BorduinWebAssist

At line 199 of the cart.php page you had:

php:
<img  src="images/thumbs<?php echo $DIYbyPhill->DisplayInfo("ProductThumb"); ?>" alt="Product thumbnail" class="eC_ProductThumb" />


But the column in your cart is named "Thumbnail", so it should be:

php:
<img  src="images/thumbs/<?php echo $DIYbyPhill->DisplayInfo("Thumbnail"); ?>" alt="Product thumbnail" class="eC_ProductThumb" />
Sign in to reply to this post

phill401410

Thank you for your prompt reply as always, new it was going to be a simple answer. I was assuming the column name was from the product table in my database. Just out of curiosity where else is column name designated?

Sign in to reply to this post

Ray BorduinWebAssist

These are the cart columns... you can add and remove and rename columns in the cart object. If you drag/drop from the bindings panel you won't make these mistakes.

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