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

couple of cart issues

Thread began 4/22/2014 8:48 am by Jamie | Last modified 4/23/2014 1:52 pm by Jason Byrnes | 528 views | 7 replies |

Jamie

couple of cart issues

Hey Jason

How would I make this clear cart

<form name="ArtLaser_Clear_form_1" method="POST" action="<?php echo $_SERVER["PHP_SELF"];  echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".$_SERVER["QUERY_STRING"]:""; ?>">
<input type="image" src="images/misc/clear-cart.jpg" border="0" class="eC_ImageButton" value="Clear Cart" name="ArtLaser_Clear_1"></form>


into text only as I want to use it along these sorts of lines:

<div id="headerMyAccount" style="color: #fff;"><a href="#">My Account</a> | <a href="cart.php">Checkout / View Basket</a> | <a href="#">Clear Cart</a> </div>



Also, for some reason the price is not showing either in the top right basket area or in the cart page and not sure what I may have done wrong. Link in the PM and if you need any access just let me know

Cheers

Jamie

Sign in to reply to this post

Jason ByrnesWebAssist

for the clear cart, point the link top the cart page and use a URL variable:

<a href="cart.php?clear=true">Clear Cart</a>

Then find the clear cart behavior code, it will look similar to this:

<?php
// WA eCart Clear Cart
if (isset($_POST["eCart1_Clear_100"]) || isset($_POST["eCart1_Clear_100_x"])) {
$eCart1->ClearCart();
$Redirect_redirStr="";
if ($Redirect_redirStr != "") {
$eCart1->redirStr = $Redirect_redirStr;
}
$eCart1->cartAction = "ClearCart";
}
?>



make a copy of it just after the original (so the clear cart button will still work, in the copy change the trigger code:

if (isset($_POST["eCart1_Clear_100"]) || isset($_POST["eCart1_Clear_100_x"]))     {



to use the URL variable:

if (isset($_GRT["clear"]))     {



for the price issue, I will need to see the code for the add to cart.

Sign in to reply to this post

Jamie

here you go.. have attached the product detail page and the checkout include

Sign in to reply to this post

Jason ByrnesWebAssist

in the add to cart behavior, you have not set the price column:

$ATC_itemPrice = floatval("0");// column binding

in the add to cart behavior, bind the price cart column to the Price column of the PageContents recordset.

Sign in to reply to this post

Jamie

re the not setting the price column... doh and that would make sense for the thumbnail as well! thanks for pointing it out

re the clear cart, is there no way to do this using text as opposed to an image without redirecting the visitor to the cart page? Also, have tried as you suggested and when you click on it it goes to the cart page but it doesnt clear the cart. (files attached)

Sign in to reply to this post

Jason ByrnesWebAssist

Sorry, typo in the trigger code.

it should be:
if (isset($_GET["clear"])) {

If you where to crate a new php page and add the eCart Display Manager to it and use the Quick Cart display type, the use framework builder to include that page a s a plugin to show the cart quantity and price, you could do the same modification to create another instance of the clear cart behavior using the clear URL variable.

the way you are using bare HTML pages as php includes wont work for this though.

Sign in to reply to this post

Jamie

OK thanks Jason. Going to have to get my head round creating frameworks and plugins then!

Sign in to reply to this post

Jason ByrnesWebAssist

here are a couple tutorial to help you get started using framework builder and plugins:

http://www.webassist.com/tutorials/Getting-Started-with-Framework-Builder

http://www.webassist.com/tutorials/Display-relational-table-data-with-plug-ins

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