View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

eCart Binding....maybe?

Thread began 6/16/2009 3:52 pm by Stan | Last modified 6/19/2009 1:05 pm by Stan | 3150 views | 25 replies

Stan

LOL, thanks Ray. I just deleted and redid everything last night because there were several parts I wasn't happy with. And.....I was feeling a little bit frustrated.
Anyway, everything is back working with I think only one part left to resolve. Correct me if I'm wrong:

In the form, there is an editable text box for quantity, and two selection boxes, one for product and one for size. There is a hidden SizeID. Apparently the hidden SizeID always stays the same even when the size is changed.

In the binding, the SizeID is being used to find a record which is where the price and weight come from. Since the SizeID is always the first in the list and never changes the price and weight always stay the same, first in the list. To test this I hard coded a change in the SizeID, inside the form and the price and weight changed correspondingly.

So I made these changes to the binding:
if (isset($_POST["BPeCart_1_ATC"]) || isset($_POST["BPeCart_1_ATC_x"])) {
$ATC_itemName = $_POST["BPeCart_1_Name_Add"];
$ATC_itemID = $_POST["BPeCart_1_ID_Add"];
$ATC_AddIfIn = 2;
$ATC_RedirectAfter = "cart.php";
$ATC_RedirectIfIn = "";
if (isset($totalRows_rsPPsize) && $totalRows_rsPPsize > 0)
{
$row_rsPPsize = WAEC_findRecordMySQL($rsPPsize, "ItemSizeName", $ATC_itemName);
//$row_rsPPsize = WAEC_findRecordMySQL($rsPPsize, "SizeID", $ATC_itemID);
$row_rsPPsize = mysql_fetch_assoc($rsPPsize);
if ($row_rsPPsize) {
//$ATC_itemName = "".$_POST["BPeCart_1_Name_Add"] ."";// column binding
$ATC_itemDescription = "".$_POST["BPeCart_1_Description_Add"] ."";// column binding
$ATC_itemWeight = "".$row_rsPPsize["ItemSizeWeight"] ."";// column binding
$ATC_itemQuantity = "".$_POST["BPeCart_1_Quantity_Add"] ."";// column binding
$ATC_itemPrice = "".$row_rsPPsize["ItemSizePrice"] ."";// column binding
mysql_data_seek($rsPPsize, 0);
$row_rsPPsize = mysql_fetch_assoc($rsPPsize);
}
}

Now the price is changing according to the size selected. However, it's off by one. Always the next larger size. NOW I'm almost there. Thanks for your help Ray.

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