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 redirect question

Thread began 2/03/2014 9:18 pm by JBWebWorks | Last modified 2/04/2014 2:27 pm by Jason Byrnes | 720 views | 9 replies |

JBWebWorks

continue shopping redirect question

products page has bicycle tours choices with a select list of product choices from each tour. Customer picks product and adds to cart. When they click 'Continue Shopping' it takes them to the top of the products page and I want it to go to the select list that they just added a product from. Can this be done with some type of named anchor?

Link to products page http://www.comfycampers.info/products.php

Sign in to reply to this post

Jason ByrnesWebAssist

yes, you can add the anchor just above the cart form.

use the product ID as the anchor name.

edit the cart form action to include the anchor.

Sign in to reply to this post

JBWebWorks

Jason,

Not sure what edit should be done to the form action?
This is form action now
<form action="<?php echo $_SERVER["PHP_SELF"]; ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".$_SERVER["QUERY_STRING"]:""; ?>"

And what, if anything, should be done to the 'Continue Shopping' button?
this is the current redirect from the cart continue shopping
<?php
// WA eCart Continue Shopping
if (isset($_POST["comfycampers_Continue_100"]) || isset($_POST["comfycampers_Continue_100_x"])) {
$Redirect_redirStr="";
if (true && isset($_SESSION['WAEC_ContinueRedirect'])) {
$Redirect_redirStr=siteToPageRel($_SESSION['WAEC_ContinueRedirect']);
}
if ($Redirect_redirStr != "") {
$comfycampers->redirStr = $Redirect_redirStr;
}
$comfycampers->cartAction = "Continue";
}

Sign in to reply to this post

Jason ByrnesWebAssist

add the anchor at the end of the action:

"<?php echo $_SERVER["PHP_SELF"]; ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".$_SERVER["QUERY_STRING"]:""; ?>#<id val>"

where <id val> is the product ID.


nothing needs to be done to the continue shopping code.

Sign in to reply to this post

JBWebWorks

Jason,

It's not working?
Here is the anchor and the form action
<a name="<?php echo $row_rs_products['ProductID']; ?>"></a><form action="<?php echo $_SERVER["PHP_SELF"]; ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".$_SERVER["QUERY_STRING"]:""; ?>#<?php echo $row_rs_products['ProductID']; ?>"

Sign in to reply to this post

Jason ByrnesWebAssist

send a coy of the page please.

Sign in to reply to this post

JBWebWorks

included products page and cart page

Sign in to reply to this post

Jason ByrnesWebAssist

on the products page, try changing line 144-149:

if (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != "")  {
$_SESSION['WAEC_ContinueRedirect'] = $_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING'];
}
else {
$_SESSION['WAEC_ContinueRedirect'] = $_SERVER['PHP_SELF'];
}



to:

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

JBWebWorks

That did it; works just like I need.

Thanks Jason!

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

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