close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Multiple issues adding eCart to DataAssist Results page

Thread began 3/03/2016 9:45 am by tmcbinc99963 | Last modified 3/10/2016 9:21 am by Ray Borduin | 2104 views | 13 replies |

tmcbinc99963

Multiple issues adding eCart to DataAssist Results page

Added a checkbox to DataAssist results page items with an Add to Cart button at bottom, submitting to a Request for Quote page, which has an eCart display.

The checkboxes don't stay checked when navigating the results back and forth.

The Add to Cart button submits back to the results page with a Cached Resize image error on one image only (should submit to Request for Quote page). This is the only time this error shows up.

Haven't gotten far enough along to know if the Button will submit the correct checked items.

Files attached.

Sign in to reply to this post

Ray BorduinWebAssist

Did you want to automatically check the boxes for items already in the cart? Is that what you are referring to? If so, when they add to cart again it will increment the quantity unless you use the option in the add to cart server behavior "If item is already in cart: Replace".

To do that you could add code to the checkbox:

php:
<input name="itemchecked" type="checkbox" id="itemchecked" value="<?php echo($row_WADAProd['ProdID']); ?><?php echo($eCart1->InCart($row_WADAProd['ProdID'])?"checked":""); ?>>



The error for the image is probably because the image field for that product is blank or the image doesn't exist. You can fix that by wrapping the image in an IF statement like:

php:
<?php if ($row_WADAProd['ProdImage']) { ?>

<img  src="images/Products/<?php echo $row_WADAProd['ProdImage']; ?>" width="73" height="65" alt="" >
<?php  ?>
Sign in to reply to this post
Did this help? Tips are appreciated...

tmcbinc99963

When I check a couple of the first 10 result items, navigate to the next 10 and check a couple more, then return to the first 10, the items are no longer checked.

Regarding the images, they don't show in results using the home page search, but do show using the results page search.

Also getting the following error when submitting using the Add to Cart button (private message). I was using the results page with checkboxes to select some of the items, then adding them to the cart where user will select quantity and weight.

Sign in to reply to this post

Ray BorduinWebAssist

Checkboxes won't maintain the checked attribute from page to page like that. Did you also expect the add to cart to add items checked on previous pages? That won't happen either.

I could help you get something like that working in a premium support ticket, but it is going to be quite a bit of work. We will have to submit the checkboxes in the navigation and maintain the checked values in the session in an array and then use that stored array to re-check boxes and eventually add to the cart.

The error message is because you have deleted the quantity input field and are just using a checkbox. The solution is probably to just update the quantity to "1" on the line referenced in the error.

Sign in to reply to this post
Did this help? Tips are appreciated...

tmcbinc99963

It looks like I have three options with eCart out of the box:

Return all the search results on one page without navigation with an Add to Cart at bottom of page, so the checkboxes will work.

Add an Add to Cart button within each product

Eliminate the checkboxes on the results page, and only have the Add to Cart button on the product detail page

Sign in to reply to this post

Ray BorduinWebAssist

Those are options. Or you could have the user add to cart with checkboxes on a page by page basis but only add from one page at a time and have to click add to cart before going to the next page. Or we could help you implement something more complex in a premium support ticket.

Sign in to reply to this post
Did this help? Tips are appreciated...

tmcbinc99963

I've added checkboxes to the search results, and an Add To Cart button at bottom. After making selections and clicking Add To Cart, the RequestforQuote.php page displays an empty cart.

Tried to check the eCart_RequestforQuote recordset, but when I click on Test, I get a DW error message. The box is so small, I can't see what the message is. Every time I get the error, DW crashes.

After restarting DW, and checking the Db connection, it shows the Db but no tables. When I try to open the Db, I get: An unidentified error has occurred.

Tried deleting the Db connection and recreating, but DW won't allow it; (-) is inactive.

Also get an unknown error when trying to discover dynamically related files.

The prod_results.php page has no problems using the same Db connection and its own record sets.

Files are attached as well as screen shots of recordset errors and link to view online.

Sign in to reply to this post

Ray BorduinWebAssist

Your add to cart button is in a different form than your checkboxes... which means the checkboxes aren't submitted with the add to cart form. They need to be all wrapped in the same form.

When using this technique to add multiple items to the cart with checkboxes on a result page you shouldn't be using the add to cart button interface at all.

1) You can just add a submit button to the results page for the add to cart.
2) Then you add a recordset to the page that filters and returns the rows that are checked based on the checkbox value
3) Apply the "Add to cart from Recordset" server behavior to add all of the rows from the recordset created in step 2

You may want to use a premium support ticket to tackle this for the first time since I can see you are having difficulty and I could walk you through it in a screen sharing session.

Sign in to reply to this post
Did this help? Tips are appreciated...

tmcbinc99963

There will be many opportunities for Premium Support, but I learn more when figuring it out for myself if possible.

Found the Christopher West tutorial on adding form posts with checkboxes to eCart. After implementing, the eCart display page says 'the cart is empty'.

Files attached.

Sign in to reply to this post

Ray BorduinWebAssist

Your button has : name=WebCartATC

I think it needs to be: name="WebCartATC"

That might be part of the issue. Also your filter trigger is using: isset($_GET["Search"]) so it wouldn't filter based on the checkboxes after submit. To fix that change your form action to: action="Prod_results.php?Search=1" on line 497.

Sign in to reply to this post
Did this help? Tips are appreciated...
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...