close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

color recordset info on the cart

Thread began 5/28/2009 10:12 am by JBWebWorks | Last modified 6/02/2009 6:22 am by CraigR | 3452 views | 20 replies |

JBWebWorks

color recordset info on the cart

Ray

Continuation of thread of color choice menu from recordset nested inside a repeat region.

building the shopping cart and wondering should i add a column of colors in the ecart object and then bind it to the add to cart button on the products page? or is there another way to get the information of color choice to the cart page?

thanks
jim balthrop

Sign in to reply to this post

Ray BorduinWebAssist

That sounds like the correct way. Anything you want to vary on a product to product basis should be defined as a cart column... usually. Another option is to add it to the existing name or description column, but either way it is added to the cart and bound to the add to cart button whether in a new column or an existing one.

Sign in to reply to this post

JBWebWorks

Ray

i set a column for colors and bound it to the add to cart button with the colors recordset

i get this error
Warning: Cannot modify header information - headers already sent by (output started at C:\vhosts\farrington-enterprises\rain-gutters.php:71) in C:\vhosts\farrington-enterprises\rain-gutters.php on line 244

it stays on the products page and the repeat region shows the item that i added to the cart repeated 10 times on the page.

i tried also without the colors column and get the same error?

Sign in to reply to this post

Ray BorduinWebAssist

Looks like you may have added a reference to a file: rain-gutters.php in the wrong spot.

I am not familiar with that file, but if I could view the code I might be able to suggest how to fix the problem... most likely the solution is to move some code that you have added before lower on the page and moving the cart code up higher.

Sign in to reply to this post

JBWebWorks

Ray

i got the cart to work by moving the code shown below above this code,
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
(eCart had placed the code after the colors recordset query string)

i set a column (colorchoices) in the cart object and i tried to configure the columns of the cart by adding the colorchoices column in the display manager; it let me add the column and change the label, but when i click next to go to the set discounts display, the colorchoices column goes away?

thanks for your help,
jim balthrop

<?php
// WA eCart AddToCart
if (isset($_POST["Farrington_1_ATC"]) || isset($_POST["Farrington_1_ATC_x"])) {
$ATC_itemID = $_POST["Farrington_1_ID_Add"];
$ATC_AddIfIn = 0;
$ATC_RedirectAfter = "cart.php";
$ATC_RedirectIfIn = "";
if (isset($totalRows_rs_itemscat3) && $totalRows_rs_itemscat3 > 0) {
$row_rs_itemscat3 = WAEC_findRecordMySQL($rs_itemscat3, "item_ID", $ATC_itemID);
if ($row_rs_itemscat3) {
$ATC_itemName = "".$row_rs_itemscat3['itemName'] ."";// column binding
$ATC_itemDescription = "".$row_rs_itemscat3['itemShortDesc'] ."";// column binding
$ATC_itemWeight = floatval("".$row_rs_itemscat3['itemWeight'] ."");// column binding
$ATC_itemQuantity = "".$_POST["Farrington_1_Quantity_Add"] ."";// column binding
$ATC_itemPrice = floatval("".$row_rs_itemscat3['itemPrice'] ."");// column binding
$ATC_itemThumbnail = "".$row_rs_itemscat3['itemThumb'] ."";// column binding
$ATC_itemcolorchoice = "".$row_rs_colors['color'] ."";// column binding
mysql_data_seek($rs_itemscat3, 0);
$row_rs_itemscat3 = mysql_fetch_assoc($rs_itemscat3);
}
}
$ATC_itemQuantity = floatval($ATC_itemQuantity);
if (is_numeric($ATC_itemQuantity) && $ATC_itemQuantity != 0) {
$Farrington->AddToCart($ATC_AddIfIn, $ATC_RedirectIfIn, $ATC_itemID, $ATC_itemName, $ATC_itemDescription, $ATC_itemWeight, $ATC_itemQuantity, $ATC_itemPrice, $ATC_itemThumbnail, $ATC_itemcolorchoice);
if ($ATC_RedirectAfter != "" && $Farrington->redirStr == "") {
$Farrington->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'];
}
}
}
?>
<?php
// WA eCart Redirect
if ($Farrington->redirStr != "") {
header("Location: ".$Farrington->redirStr);
}
?>

Sign in to reply to this post

Ray BorduinWebAssist

I'm afraid I don't understand what you mean when you say:

"when i click next to go to the set discounts display, the colorchoices column goes away"

Sign in to reply to this post

JBWebWorks

In eCart Display Manger
step 2 of 3: Configure the columns of your cart
Added cart column 'colorchoices' and placed it after Description
clicked NEXT to go to step 3 of 3
clicked BACK to go back to configure columns of your cart and the column 'colorchoices' was gone.

Sign in to reply to this post

Ray BorduinWebAssist

I see. Just create the display and drag and then add a column to the table with DW and drag and drop the color column onto the page to be displayed.

I will look into what you are describing to see if it is a bug, but it should be easy enough to add the column after the display is created for now.

Sign in to reply to this post

JBWebWorks

Thanks Ray

i tried that and drag and dropped the color choice column from bindings, but when i test nothing appears in the cart under color.
i don't know if the add to cart button procedure has anything to do with this, but the first step in the add to cart button is setting 'Look up item ID from recordset' and the recordset is rs_itemscat3 for the items. The colors have a different recordset, rs_colors, so in the bindings column step, colorchoice has a default value of <?php echo $row_rs_colors['color']; ?>

Would this code here, somehow need changing to add the rs_colors recordset?
mysql_data_seek($rs_itemscat3, 0);
$row_rs_itemscat3 = mysql_fetch_assoc($rs_itemscat3);

Sign in to reply to this post

Ray BorduinWebAssist

You would probably have to create another recordset filtered by the submitted option selected. That way when you added to the cart from that recordset it would be on the correct row.

It sounds like your problem now is getting a recordset to filter to the correct selected option after the page is submitted on the add to cart page. Your display is probably correct now.

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