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

eCart only one Size Option Price showing in cart from detail page

Thread began 3/13/2012 1:24 pm by toni272059 | Last modified 3/14/2012 4:56 pm by toni272059 | 965 views | 6 replies |

toni272059

eCart only one Size Option Price showing in cart from detail page

Basically online store sells two types of Clocks in two sizes/prices with numerous image options

Clock Type One -- Size large $129, Size small $89
Clock Type Two -- Size large $129, Size small $89
Then there are options for images printed on each item.

Have setup first products page for Type selection.
Then redirect to page to select image Option.
Then redirected to detail page where Size is selected from dynamic menu and then added to cart

Database tables are setup
clock_type: ClockTypeID, ClockType, ClockImage
clock_size: ClockSizeID, ClockSize, ClockPrice
options: OptionsID, ClockTypeID, ClockSizeID
clock_graphic: ClockGraphicID, ClockGraphicName, ClockGraphicImage, ClockTypeID
clock_options: ClockOptionID, ClockGraphicID, OptionID

I am having a hard time working out how to setup the Price for the shopping cart.

I have a recordset rsSize connected to table clock_size for the eCart itemPrice. That is the only table that has the clock prices because price is based only on Size
$ATC_itemPrice = floatval("".$row_rsSize['ClockPrice'] ."");// column binding

and a dynamic menu for the Size select
<select name="eCart1_1_Size_Add" id="eCart1_1_Size_Add">
<option value="">Select A Size</option>
<?php
do {
?>
<option value="<?php echo $row_rsSize['ClockSize']?>"><?php echo $row_rsSize['ClockSize']?></option>
<?php
} while ($row_rsSize = mysql_fetch_assoc($rsSize));
$rows = mysql_num_rows($rsSize);
if($rows > 0) {
mysql_data_seek($rsSize, 0);
$row_rsSize = mysql_fetch_assoc($rsSize);
}
?>
</select>

Problem is, on the shopping cart page the price is always displayed for the large item (first in select list). The description shows the correct item from the dynamic menu label. Screen grabs attached

Obviously I am missing a connection somewhere to pass the correct price to the shopping cart....?

Sign in to reply to this post

Jason ByrnesWebAssist

you need to create a price lookup recordset that is filtered on the selected size and use the price column from the lookup recordset.

set the lookup recordset to filter the ClockSize column on the eCart1_1_Size_Add form element to return the price associated to the selected size.

Sign in to reply to this post

toni272059

OK, I created a recordset for rsPriceLookup and have tried to work out how to get the eCart to return the correct price. Now I get $0.00 price result.

The rsPriceLookup filters by ClockSize = URL Parameter "ClockPrice" (I also tried ClockSize)

the eCart
$ATC_itemQuantity = "".$_POST["eCart1_1_Quantity_Add"] ."";// column binding
$ATC_itemSize = "".$_POST["eCart1_1_Size_Add"] ."";// column binding
$ATC_itemPrice = floatval("".$row_rsPriceLookup['ClockSize'] ."");// column binding

I tried changing to ClockPrice. Same result. 0.00

Attached is detail page and shopping cart page.

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

Jason ByrnesWebAssist

isn't the price in the ClockPrice column?


instead of binding the Price cart column to the ClockSize recordset column:

php:
$ATC_itemPrice = floatval("".$row_rsPriceLookup['ClockSize'] ."");// column binding




shouldn't you be using the ClockPrice?

php:
$ATC_itemPrice = floatval("".$row_rsPriceLookup['ClockPrice'] ."");// column binding
Sign in to reply to this post

toni272059

As I included in my previous post, I tried both ClockPrice and ClockSize. Both result in 0.00

Screen grab attached showing recordset details

Plus if it helps I have the site online in preview mode
products.php

Sign in to reply to this post

Jason ByrnesWebAssist

the filtering needs to be set use the Form Variable "eCart1_1_Size_Add", not a URL parameter.

Sign in to reply to this post

toni272059

....Thank You!

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