close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Product Options with eCart-Value for Color in cart is ProductOptionID not OptionName

Thread began 1/22/2012 11:10 am by greg_herr420504 | Last modified 1/24/2012 11:55 am by Jason Byrnes | 1713 views | 5 replies |

greg_herr420504

Product Options with eCart-Value for Color in cart is ProductOptionID not OptionName

Good Afternoon,

I've just finished setting up Product Options with eCart and was hoping for some help fixing something. I've searched through the threads, but unfortunately what I attempted from them did not work. Thanks in advance for any help you might provide - its is very much appreciated.

1) I'm using the standard database and an almost stock implementation - Size and Color Options
2) I was able to get Price & Color increment working by added a record set for rsColorLookup and adjusting the code a bit.
3) On my product details page both drop downs look and work fine, but when I get to the cart the value for color is the 'ProductOptionID' rather than 'OptionName'
4) I found a thread that I think indicated to do the following -> Open Product Details pages / Double Click eCart Add From Recordset / select Bindings / select color / uncheck 'updatable'.

When I do this and select 'ok' my list/menu item for 'color' disappears. Is there a work around directly in the code? Or am I missing something from that tread on how to do this properly?

Thanks again - I've attached my product detail page.

Greg

Attached Files
products_Detail.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

in design view, select the color select list.

in the property inspector, click the Dynamic button.

set both the Label and the Value setting to use the Option name column, you currently have the value set to use the Option ID column.

Sign in to reply to this post

greg_herr420504

Product Options with eCart-Value for Color in cart is ProductOptionID not OptionName

Good Evening Jason,

Thanks for the quick reply. I did that and it did fix the name... I thought to do that, but I was trying to match the set up to the 'size' list/menu. Also when I make this switch I lose my price increment. It displays the name rather than the id but for options that have a price increment its no longer included in the total. Thought maybe I was going crazy so I switched it back and get the price increment, but also the ID rather than the name. When I attempt to adjust the binding to match the 'size' list/menu, but with 'color' to the 'rsColorLookup' I created it kills the menu/list for color on selecting ok. I've included my page with the change you suggested that fixes the name value, but loses the price increment.

Really appreciate the help!

Greg

Attached Files
products_Detail.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the trick with product options that effect price is to not have the add to cart button create the select list, don't check the up-dateable option for the color.

if you look at the eCart options tutorial, it is broken down into 2 sections, options that don't effect price and options that do effect price.

in the tutorial, the color section does not effect price, and the size section does.

the size select list is created manually, a lookup recordset is created to lookup the price increment and size name, in the add to cart button behavior, the size and price increment columns are bound to the corresponding columns from the lookup recordset.

if the color will effect the price, it needs to be configured using the lookup recordset.

Sign in to reply to this post

greg_herr420504

Good Afternoon Jason,

Thanks for the reply. That's what I had been attempting to do, I think. After successfully setting everything up to work with the tutorial 'as is' I went back and created a recordset for rsColorLookup. Not having a good knowledge base on the coding I changed the record set slightly using rsSizeLookup as the base. Swapping out 'size' with 'color'. When I open the 'eCart Add From Record Set' and select 'color' then attempt to uncheck 'updatable' and bind it in the same way as 'size' is to 'sizePriceInc' it seems to go fine, but when I hit 'ok' to get back to dreamweaver my list/menu for color disappears completely. Maybe I'm just going in a faulty order or something, but trying to follow the directions for 'size' exactly to create this one.

Appreciate the continued support.

Here is what the recordsets looks like:

Name: rsColor

SQL: SELECT productoptions.OptionPriceincrement, productoptions.ProductOptionID, options.OptionName, options.OptionGroupID, optiongroups.OptionGroupName
FROM options INNER JOIN productoptions ON options.OptionID = productoptions.OptionID INNER JOIN optiongroups ON options.OptionGroupID = optiongroups.OptionGroupID
WHERE optiongroups.OptionGroupName = 'color' AND productoptions.ProductID = paramItem

Variables:
Name: paramItem
Type: Numeric
Default value: -1
Run-time Value: $row_WADAproducts['ProductID']


Name: rsColorLookup

SQL: SELECT productoptions.OptionPriceincrement, productoptions.ProductOptionID, options.OptionName, options.OptionGroupID, optiongroups.OptionGroupName
FROM options INNER JOIN productoptions ON options.OptionID = productoptions.OptionID INNER JOIN optiongroups ON options.OptionGroupID = optiongroups.OptionGroupID
WHERE optiongroups.OptionGroupName = 'color' AND productoptions.ProductOptionID = paramOption AND productoptions.ProductID = paramItem

Variables:
Name: paramOption
Type: Numeric
Default value: -1
Run-time Value: $_POST['maddenBMX_eCart1_1_color_Add']

Name: paramItem
Type: Numeric
Default value: -1
Run-time Value: $_POST['maddenBMX_eCart1_1_ID_Add']

Sign in to reply to this post

Jason ByrnesWebAssist

"but when I hit 'ok' to get back to dreamweaver my list/menu for color disappears completely."

yes, it will do that. Like i said, you nee to create the list manually, not have the add to cart button create it for you.

if you think back on following the tutorial, you had to create the list for the size manually. you need to create the list for the color manually as well since it will effect price.

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