close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Added a "Quick Cart" via Display Manager but the "View Cart" button doesn't link to anything, nor does it appear in the Server Behaviours panel?

Thread began 6/09/2015 12:47 am by Nathon Jones Web Design | Last modified 6/11/2015 11:38 am by Ray Borduin | 9467 views | 5 replies |

Nathon Jones Web Design

Added a "Quick Cart" via Display Manager but the "View Cart" button doesn't link to anything, nor does it appear in the Server Behaviours panel?

Is this a bug with Quick Cart?

In Server Behaviours there is...
eCart Clear Cart Button
eCart Checkout Button

...but no View Cart.

1) Why is it doing this?
2) How do we tell it where to direct to when "View Cart" is clicked?

Thank you.
NJ

Sign in to reply to this post

Ray BorduinWebAssist

It tries to apply the Behavior "Go to Page"... but it appears Dreamweaver has removed that after DWCC.

The best solution is to just add an onclick event to go to the cart page on that button like:

onclick="document.location.href='cart.php'"

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

Nathon Jones Web Design

Here's what's inserted when we add a "Quick Cart" via Display Manager...

<?php
//WA eCart Include
require_once("WA_eCart/whiskyCART_PHP.php");
?>
<?php
$whiskyCART->GetContent();
?>
<?php
// WA eCart Clear Cart
if (isset($_POST["whiskyCART_Clear_100"]) || isset($_POST["whiskyCART_Clear_100_x"])) {
$whiskyCART->ClearCart();
$Redirect_redirStr="";
if ($Redirect_redirStr != "") {
$whiskyCART->redirStr = $Redirect_redirStr;
}
$whiskyCART->cartAction = "ClearCart";
}
?>
<?php
//WA eCart Redirect Check Out
if (isset($_POST["whiskyCART_Checkout"]) || isset($_POST["whiskyCART_Checkout_x"])) {
$Redirect_redirStr="";
if ($Redirect_redirStr != "") {
if (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != "") {
if (strpos($Redirect_redirStr, "?") === false) {
$Redirect_redirStr .= "?".$_SERVER['QUERY_STRING'];
}
else {
$Redirect_redirStr .= "&".$_SERVER['QUERY_STRING'];
}
}

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



And the quick cart form itself, on the page..

<form action="<?php echo ($_SERVER["PHP_SELF"].(isset($_SERVER["QUERY_STRING"])?"?".htmlentities($_SERVER["QUERY_STRING"]):""));?>" method="post">
<div class="text-center">
<input name="whiskyCART_View_100" type="submit" class="btn btn-default" id="whiskyCART_View_100" onClick="MM_goToURL('plugins/plugins/parent','');" value="View Basket" />
<input type="submit" name="whiskyCART_Clear_100" id="whiskyCART_Clear_100" class="btn btn-default" value="Clear Basket" />
<input type="submit" name="whiskyCART_Checkout" id="whiskyCART_Checkout" class="btn btn-default" value="Checkout" />
</div>
</form>



What I'm asking is why isn't the "View Cart" button working? I'm asking that Ray because if the extensions don't do what they're supposed to I don't have hours of time to waste finding that out the hard way - ie. applying them and them just not working. Are you telling me that Quick Cart doesn't work in Dreamweaver CC?

Also, your onclick suggestion...is there a reason you've added the "plugins" subdirectory to that link?

Thank you.
NJ

Sign in to reply to this post

Ray BorduinWebAssist

The reason why it isn't working is what I've stated above.

The button has a behavior attached to it:

<input name="whiskyCART_View_100" type="submit" class="btn btn-default" id="whiskyCART_View_100" onClick="MM_goToURL('plugins/plugins/parent','');" value="View Basket" />

but MM_goToURL() has been depricated and removed from dreamweaver, so the solution is to add the onclick I suggested instead.

The link is just a random string... it should be the location and name of your cart page wherever it is.

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

Nathon Jones Web Design

It was eCart that inserted the MM_goToURL() code when we opted for the Quick Cart option from Display Manager.
Is what you're saying basically that eCart inserts depricated code and we'll have to hand code it to fix it?

Thank you.
NJ

Sign in to reply to this post

Ray BorduinWebAssist

Yes, that is correct. The view cart button is simply a link. It doesn't have a server behavior or special code for it to work. It simply links to the cart page.

In fact you always had to type in the cart page by hand after application in every version of eCart because we don't ask you to specify the cart page when running the display manager... so the view cart link always had to be added manually after running the wizard.

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

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