close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Continue Shopping button and dynamic results and detail pages

Thread began 2/13/2014 6:57 am by m79618373377 | Last modified 2/13/2014 11:21 am by Jason Byrnes | 963 views | 3 replies |

m79618373377

Continue Shopping button and dynamic results and detail pages

I am having problems with the 'Continue Shopping' Button and dynamic results and detail pages in ecart5.

As it stands if a user adds to the cart from the results page, they can click on the 'Continue Shopping' button in the cart and this redirects them back to the dynamic results page. This is fine. However, if they click on an 'Add to cart' button on a detail page, although it takes them to the cart, if they then click on a 'Continue Shopping' Button they are redirected back to the Detail page, when I require that they be redirected back to the dynamic results page.

After looking around the Community forums the only solution I could find was changing the code from 'Submit' to a button and using javascript with regarding to the 'Continue Shopping' button. For example:

<input type="button" name="WA_Store_Cart_Continue_100" id="WA_Store_Cart_Continue_100" value="Continue Shopping" alt="Continue Shopping" onClick="javascript: history.go(-1)"/>

There are two problems I perceive with this:

1. Although initially it seems workable, I would require two cart pages. One for the results page having a history of -1 and one for the detail page having a history of -2 with regard to the 'Continue Shopping' button.

2. Even if I decided to use the above method, this would still leave me in a predicament of what happens if someone clears the cart or removes an item and updates it. As soon as they click on any of these buttons, this would then refresh the page and users would have to click on the continue shopping button numerous times as the history would have changed.

Does anyone have a solution?

Sign in to reply to this post

Jason ByrnesWebAssist

so regardless of where the user clicks the add to cart button, you want the continue shopping link to always point tot he results page?



just make the continue shopping button a link to the results page then:
<a href="results.php"><input type="button" name="WA_Store_Cart_Continue_100" id="WA_Store_Cart_Continue_100" value="Continue Shopping" alt="Continue Shopping" /></a>

Sign in to reply to this post

m79618373377

Thanks Jason.

The problem with this is the results page is created by the user through a search using 'get': For example the URL may be :

http://www.domain.com/results.php?id=1 or http://www.domain.com/results.php?id=2

In other words the results page they need to be sent back to is dynamic and different in every case.

From my understanding using the code you mention I can only send them back to a generic results page. ie results.php without the search criteria created through a form (?id=1). Hence the reason for using a Javascript back history approach on the Continue Shopping button. The problem with this is that it will not work if a user empties or removes from the cart as they will have to click multiple times on the Continue Shopping button.

Sign in to reply to this post

Jason ByrnesWebAssist

Is this a results page created by Data Assist? if so, the search is stored in a session so this will not be a problem


If this is a results page you created your self, you will need to store the ID in a session and use the session if the ID is not present.

Sign in to reply to this post

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