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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Incremental price not showing on Product Details page

Thread began 2/22/2016 8:54 am by MagsW | Last modified 2/25/2016 1:59 pm by Ray Borduin | 423 views | 8 replies |

MagsW

Incremental price not showing on Product Details page

I've followed your tutorial on setting up Incremental Pricing and have gone through it several times, but the incremental amount isn't showing on the details page. I'm not sure if the issue is with the recordset or the code on the page.

I have two product categories, Books and CPD Courses. Books are available in two formats, download and paperback and Courses are available in day 1, day 2 or both day options. Paperback books are £4 more than downloads and a 'both day' course is £288 more. I've set up all these options as per the tutorial and I have two select lists on the details page, one for books and one for courses (using a Show If to only show the relevant select list).

I added the binding from the price increment recordset to the select list as per the tutorial, however it only displays "Download + £" or "Paperback + £" with no amount shown, therefore no incremental amount is carried through to the cart. Copy of the details page is attached.

Sign in to reply to this post

Ray BorduinWebAssist

I think the easiest solution is to add two more recordsets to capture the selected Format and Days. Filter those with the submitted list values so that they will return the result from the selected list option.

Then use those recordsets to add the appropriate increment to the cart.

Sign in to reply to this post

MagsW

OK, I solved one problem in that the price increment column hadn't been included in the recordset and so wasn't showing on the product details page. That's now fixed, however the price increment still isn't being passed to the cart page. I think there may be a bug in Dreamweaver as the problem seems to be when I try to update the Add to Cart behavior (second last step in the tutorial, "Add dynamic product options II"). When I follow the steps, it doesn't appear to do anything except add another option value, but as plain text rather than code. I already have this as my select menu:

<select name="VetProCart_1_Format_Add">
<option value="">Select a format..</option>
<?php
do {
?>
<option value="<?php echo $row_rsFormat['ProductOptionID']?>"><?php echo $row_rsFormat['OptionName']?> (+£<?php echo $row_rsFormat['OptionPriceIncrement']; ?>.00) </option>
<?php
} while ($row_rsFormat = mysql_fetch_assoc($rsFormat));
$rows = mysql_num_rows($rsFormat);
if($rows > 0) {
mysql_data_seek($rsFormat, 0);
$row_rsFormat = mysql_fetch_assoc($rsFormat);
}
?>
</select>

but when I update the eCart Add from Recordset Behavior as instructed in the tutorial, this is what it does:

<select name="VetProCart_1_Format_Add">
<option value="">Select a format..</option>
<?php
do {
?>
<option value="<?php echo $row_rsFormat['ProductOptionID']?>"><?php echo $row_rsFormat['OptionName']?> (+£<?php echo $row_rsFormat['OptionPriceIncrement']; ?>.00) </option>
<?php
} while ($row_rsFormat = mysql_fetch_assoc($rsFormat));
$rows = mysql_num_rows($rsFormat);
if($rows > 0) {
mysql_data_seek($rsFormat, 0);
$row_rsFormat = mysql_fetch_assoc($rsFormat);
}
?>
<OPTION value="<?php echo $row_rsFormatLookup['OptionName']; ?>" selected>&lt;?php echo $row_rsFormatLookup['OptionName']; ?&gt;</OPTION>
</select>

Note the extra OPTION (in caps, this is exactly the way Dreamweaver inserted it). I've tried removing that extra option, changing the recordset for the correct option to rsFormatLookup but nothing's working. Would you be able to take a look for me please? Access details in the PM field.

Sign in to reply to this post

Ray BorduinWebAssist

It looks like you haven't uploaded the file WA_eCart/VetProCart_PHP.php since adding the increment columns. It won't save those column values because they don't exist in the cart object that is uploaded.

Sign in to reply to this post

MagsW

D'oh! [facepalm] Working now, although I have a couple of weird things showing on the cart page which I'll try to fix myself but may need to come back to you with more, hopefully not stupid, questions!

Sign in to reply to this post

Ray BorduinWebAssist

While debugging, I added some code to the cart page to display the incremental price fields, so you will want to delete those.

Sign in to reply to this post

MagsW

Hi Ray, I now have the incremental pricing passing correctly to the cart - almost. I have two select lists on the page, one for format and one for days, with a Show If around each so that only the format dropdown shows for books and the days dropdown for courses. The format price increments pass OK, but the days incremental pricing doesn't. Would you mind taking a look for me? Page links/FTP details as before, the select list that's not passing the price increment can be seen at the link in the PM section.

Sign in to reply to this post

Ray BorduinWebAssist

You have the option value="" attribute set to the wrong recordset. Look on line 363 and update the value to the correct recordset.

Sign in to reply to this post

MagsW

Sorted, thanks!!

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