close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Ecart4 errors on remove from shopping cart

Thread began 10/27/2010 5:19 pm by phil107723 | Last modified 11/02/2010 12:54 pm by Jason Byrnes | 2121 views | 8 replies |

phil107723

Ecart4 errors on remove from shopping cart

Ecart4 errors on remove from shopping cart
Hi
I've experienced this problem many times the checkbox to remove an item from the display manager doesn't work and I just take out the remove checkbox from the shopping cart display manager. But this time it worked ... once and now it doesn't. I've removed it several times and replaced it but it isn't working.


<?php
// WA eCart Update
if (isset($_POST["eCart1_Update_100"]) || isset($_POST["eCart1_Update_100_x"])) {
$eCart1->UpdateCart();
$Redirect_redirStr="";
if ($Redirect_redirStr != "") {
$eCart1->redirStr = $Redirect_redirStr;
}
$eCart1->cartAction = "Update";
}
?>
<?php
//WA eCart Check Out Update
if (isset($_POST["eCart1_Checkout_1"]) || isset($_POST["eCart1_Checkout_1_x"])) {
$eCart1->UpdateCart();
$eCart1->cartAction = "CheckOutUpdate";
}
?><?php
// WA eCart Continue Shopping
if (isset($_POST["eCart1_Continue_100"]) || isset($_POST["eCart1_Continue_100_x"])) {
$Redirect_redirStr="";
if (true && isset($_SESSION['WAEC_ContinueRedirect'])) {
$Redirect_redirStr=siteToPageRel($_SESSION['WAEC_ContinueRedirect']);
}
if ($Redirect_redirStr != "") {
$eCart1->redirStr = $Redirect_redirStr;
}
$eCart1->cartAction = "Continue";
}
?><?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";
}
?><?php
//WA eCart Redirect Check Out
if (isset($_POST["eCart1_Checkout_1"]) || isset($_POST["eCart1_Checkout_1_x"])) {
$Redirect_redirStr="checkout.php";
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'];
}
}

$eCart1->redirStr = $Redirect_redirStr;
}
$eCart1->cartAction = "Checkout";
}
?>
<?php
// WA eCart Redirect
if ($eCart1->redirStr != "") {
header("Location: ".$eCart1->redirStr);
}
?>


And this is the code for the display itself the only thing I have changed is I have manually added some of columns headings because they weren't inserted or in the wrong place.


<div class="eC_Clean_Pacifica_Arial">
<?php
//WA eCart Show If Start
if (!$eCart1->IsEmpty()) {
?>
<form action="<?php echo ($_SERVER["PHP_SELF"].(isset($_SERVER["QUERY_STRING"])?"?".htmlentities($_SERVER["QUERY_STRING"]):""));?>" method="post" >

<table class="eC_ShoppingCart" border="0" cellspacing="0" cellpadding="0">
<tr>
<th>Name</th>
<th>Colour</th>
<th>Size</th>
<th class="eC_PriceItem" >Price</th>
<th class="eC_FormItem" >Quantity</th>
<th class="eC_FormItem" >Remove</th>
<th class="eC_PriceItem" >Total</th>
</tr>
<?php
while (!$eCart1->EOF()) {
?>
<tr>
<td>
<?php echo $eCart1->DisplayInfo("Name"); ?></td>
<td><?php echo $eCart1->DisplayInfo("Colour"); ?></td>
<td><?php echo $eCart1->DisplayInfo("Size"); ?></td>
<td class="eC_PriceItem" ><?php echo WA_eCart_DisplayMoney($eCart1, $eCart1->DisplayInfo("Price")); ?></td>
<td class="eC_FormItem" ><input type="text" name="eCart1_Quantity_<?php echo $eCart1->DisplayIndex; ?>" size="3" value="<?php echo $eCart1->DisplayInfo("Quantity"); ?>" /></td>
<td class="eC_FormItem" ><input type="checkbox" value="<?php echo $eCart1->DisplayInfo("ID"); ?>" name="eCart1_Delete_<?php echo $eCart1->DisplayIndex; ?>" /></td>
<td class="eC_PriceItem" ><?php echo WA_eCart_DisplayMoney($eCart1, $eCart1->DisplayInfo("TotalPrice")); ?></td>
</tr>
<?php
$eCart1->MoveNext();
}
$eCart1->MoveFirst();
?>
</table>
<div class="eC_OrderSummary">
<table border="0" cellpadding="0" cellspacing="0" class="eC_CartSummary">
<?php
//WA eCart Merchandizing Show Start
//ecart="eCart1"
if ($eCart1->GetDiscounts() > 0 || $eCart1->GetCharges() > 0 || $eCart1->GetShipping() > 0 || $eCart1->GetTax() > 0) {
?>
<tr>
<td class="eC_Subtotal eC_SummaryLabel">Sub-total</td>
<td class="eC_Subtotal"><?php echo WA_eCart_DisplayMoney($eCart1, $eCart1->TotalColumn("TotalPrice")); ?></td>
</tr>
<?php
//WA eCart Merchandizing Show End
//ecart="eCart1"
}
?>
<?php
//WA eCart Merchandizing Show Start
//ecart="eCart1"
if ($eCart1->GetDiscounts() > 0) {
?>
<?php
//WA eCart Merchandizing Show End
//ecart="eCart1"
}
?>
<?php
//WA eCart Merchandizing Show Start
//ecart="eCart1"
if ($eCart1->GetCharges() > 0) {
?>
<?php
//WA eCart Merchandizing Show End
//ecart="eCart1"
}
?>
<?php
//WA eCart Merchandizing Show Start
//ecart="eCart1"
if ($eCart1->GetShipping() > 0) {
?>
<tr>
<td class="eC_SummaryLabel">Shipping</td>
<td>&nbsp;</td>
</tr>
<?php
if (!$eCart1->Rules_EOF("Shipping")) {
while (!$eCart1->Rules_EOF("Shipping")) {
if ($eCart1->RuleLooperValue("Shipping") > 0) {
?>
<tr>
<td class="eC_IndividualCharge"><?php echo $eCart1->RuleLooperName("Shipping"); ?></td>
<td><?php echo WA_eCart_DisplayMoney($eCart1, $eCart1->RuleLooperValue("Shipping")); ?></td>
</tr>
<?php
}
$eCart1->Rules_MoveNext("Shipping");
}
$eCart1->Rules_MoveFirst("Shipping");
}
?>
<?php
//WA eCart Merchandizing Show End
//ecart="eCart1"
}
?>
<?php
//WA eCart Merchandizing Show Start
//ecart="eCart1"
if ($eCart1->GetTax() > 0) {
?>
<?php
//WA eCart Merchandizing Show End
//ecart="eCart1"
}
?>
<tr class="eC_SummaryFooter">
<td class="eC_SummaryLabel">Total:</td>
<td><?php echo WA_eCart_DisplayMoney($eCart1, $eCart1->GrandTotal()); ?></td>
</tr>
</table>
</div>
<table class="eC_ButtonWrapper" cellpadding="0" cellspacing="0">
<tr>
<td><input type="submit" name="eCart1_Continue_100" id="eCart1_Continue_100" value="Continue Shopping" />
<input type="submit" name="eCart1_Clear_100" id="eCart1_Clear_100" value="Clear Cart" />
<input type="submit" name="eCart1_Update_100" id="eCart1_Update_100" value="Update" />
<input type="submit" value="Checkout" name="eCart1_Checkout_1">
</td>
</tr>
</table>
</form>
<?php
//WA eCart Show If Middle
}
else {
?><table><tr><td>The cart is empty</td></tr></table>
<?php
//WA eCart Show If End
}
?>
</div>

Thanks
Phil

Sign in to reply to this post

Jason ByrnesWebAssist

Please send a link where I could see the issue and a copy of the cart display page in a zip archive.

Sign in to reply to this post

phil107723

product.php?pCategory=Clothing&pSubcategory=Men and click a product add to cart .

Attached Files
shop_cart.zip
Sign in to reply to this post

Jason ByrnesWebAssist

when i add an item to the cart, I see this error a number of times:
Notice: Use of undefined constant Weight - assumed 'Weight' in C:\HostingSpaces\TRICKSTAR\trickstar.co.nz\wwwroot\sweetstreet\WA_eCart\eCart1_PHP.php on line 88


it is likely that this error is contributing to the issue with removing the item.

Please send a copy of the WA_eCart\eCart1_PHP.php file so i can see why this error is occuring.

Sign in to reply to this post

phil107723

Sorry that error was caused by something else

Hi Jason
That error was caused by me fiddling with the shipping calculations which you have just helped me with and thanks to you will have resolved shortly.
Phil

Sign in to reply to this post

Jason ByrnesWebAssist

when i view source of the cart page, the delete checkbox does not have a value:
<td class="eC_FormItem" ><input type="checkbox" value="" name="eCart1_Delete_0" /></td>



it should be getting a value from the cart ID column:
<td class="eC_FormItem" ><input type="checkbox" value="<?php echo $eCart1->DisplayInfo("ID"); ?>" name="eCart1_Delete_<?php echo $eCart1->DisplayIndex; ?>" /></td>



double check in the add to cart buttons that you are giving the ID cart column a value.

Sign in to reply to this post

phil107723

Thanks again

Thanks a lot . I'll have a look.

Sign in to reply to this post

phil107723

It Worked

For the ID wasn't being added to the add to cart information so I added it myself and it is working perfectly. Many thanks

Sign in to reply to this post

Jason ByrnesWebAssist

Ok, glad to hear it is working.

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