close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

ecart only shows one iterm

Thread began 3/30/2011 8:13 am by osvaldo399181 | Last modified 3/30/2011 10:49 am by Jason Byrnes | 2287 views | 9 replies |

osvaldo399181

ecart only shows one iterm

I have list of items from a dynamic table, there is ItemName ItemDescription ItemPrice. I added a add to cart button, and configured display manager. When I click add to cart it only shows the last item on the shopping cart, it does not create a list. How do I associate ecart to a database?

Sign in to reply to this post

Jason ByrnesWebAssist

each item needs to have a unique ID as well.

If the iD is not unique, they will be treated as the same item.

Sign in to reply to this post

osvaldo399181

ecart Single item

I have a unique ID for the item, this here is some of the code.

<?php
// WA eCart AddToCart
if (isset($_POST["eCart1_1_ATC"]) || isset($_POST["eCart1_1_ATC_x"])) {
$ATC_itemID = $_POST["eCart1_1_ID_Add"];
$ATC_AddIfIn = 0;
$ATC_RedirectAfter = "../purchases/OMC_Shoppingcart.php";
$ATC_RedirectIfIn = "";
if (isset($totalRows_Recordset1) && $totalRows_Recordset1 > 0) {
$row_Recordset1 = WAEC_findRecordMySQL($Recordset1, "ORDERID", $ATC_itemID);
if ($row_Recordset1) {
$ATC_itemName = "".$_POST["eCart1_1_NUMBER_Add"] ." of " ;// column binding
$ATC_itemDescription = "".$_POST["eCart1_1_NUMBER_Add"] ."";// column binding
$ATC_itemThumbnail = "";// column binding
$ATC_itemWeight = floatval("0");// column binding
$ATC_itemQuantity = "".$_POST["eCart1_1_Quantity_Add"] ."";// column binding
$ATC_itemPrice = "".$_POST["eCart1_1_Sale_Add"] ."";// column binding
mysql_data_seek($Recordset1, 0);
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
}
}
$ATC_itemQuantity = floatval($ATC_itemQuantity);
if (is_numeric($ATC_itemQuantity) && $ATC_itemQuantity != 0) {
$eCart1->AddToCart($ATC_AddIfIn, $ATC_RedirectIfIn, $ATC_itemID, $ATC_itemName, $ATC_itemDescription, $ATC_itemThumbnail, $ATC_itemWeight, $ATC_itemQuantity, $ATC_itemPrice);
if ($ATC_RedirectAfter != "" && $eCart1->redirStr == "") {
$eCart1->redirStr = $ATC_RedirectAfter;
}
if (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != "") {
$_SESSION['WAEC_ContinueRedirect'] = $_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING'];
}
else {
$_SESSION['WAEC_ContinueRedirect'] = $_SERVER['PHP_SELF'];
}
}
}
?>



<form name="eCart1_1_ATC_<?php echo $row_Recordset1["ORDERID"]; ?>" method="POST" action="<?php echo $_SERVER["PHP_SELF"]; ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".$_SERVER["QUERY_STRING"]:""; ?>">
<input type="hidden" name="eCart1_1_ID_Add" value="<?php echo $row_Recordset1["ORDERID"]; ?>" >
<input type="hidden" name="eCart1_1_SIZE_Add" value="<?php echo $row_Recordset1["PhotoSize"]; ?>" >
<input type="hidden" name="eCart1_1_NUMBER_Add" value="<?php echo $row_Recordset1["PhotoNumber"]; ?>" >
<input type="hidden" name="eCart1_1_Quantity_Add" value="<?php echo $row_Recordset1['PhotoQty']; ?>" >
<input type="hidden" name="eCart1_1_Sale_Add" value="<?php echo $row_Recordset2['ItemSalePrice']; ?>" >
<input type="image" src="../WA_eCart/Images/Pacifica/Btn5_EN_addtocart.gif" border="0" class="eC_ImageButton" value="Add to Cart" name="eCart1_1_ATC">
</form>

Sign in to reply to this post

Jason ByrnesWebAssist

please send a link where i can see the problem.

Sign in to reply to this post

osvaldo399181

link

user.php

EventID : 61910
email: any
password: 1

after login click on ORDER LIST

Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

when i click on Order list, the order list showsa only one add to cart button.


the add to cart form does not have any values in it when i view the page source:
<form name="eCart1_1_ATC_" method="POST" action="/Clients/csweet15/2010/StephaAmp/OMC_Orders.php">
<input type="hidden" name="eCart1_1_ID_Add" value="" >

<input type="hidden" name="eCart1_1_SIZE_Add" value="" >
<input type="hidden" name="eCart1_1_NUMBER_Add" value="" >
<input type="hidden" name="eCart1_1_Quantity_Add" value="" >
<input type="hidden" name="eCart1_1_Sale_Add" value="" >
<input type="image" src="../../../../WA_eCart/Images/Pacifica/Btn5_EN_addtocart.gif" border="0" class="eC_ImageButton" value="Add to Cart" name="eCart1_1_ATC">
</form>


i'm not able to reproduce the error on this page.

Sign in to reply to this post

osvaldo399181

please use the email: osvaldo@omcvideo.com

This login has 3 items.

Sign in to reply to this post

Jason ByrnesWebAssist

please send a copy of your add to cart page and the cart display page in a zip archive so i can see the code.

Sign in to reply to this post

osvaldo399181

zip files

Thanks for your help.

Attached Files
OMC_Orders.php.zip
OMC_Shoppingcart.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

this page is very odly set up with the add to cart server behavior code in the body of the page, this will cause the cart redirect not to function.


the add to cart is also getting the values from the recordset1 recordset, but I do not see that defined anywhere.

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