Dynamic Product Templates

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
cgreathouse
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 21
Joined: Tue Mar 03, 2009 10:49 am

Dynamic Product Templates

Post by cgreathouse » Tue Mar 31, 2009 10:05 am

Hello

Is it possible to make Product Templates dynamic? Here's what I'm trying to do...

I have a template that has 3 radio options and 5 text boxes. Depending on what radio option is selected, some of the text boxes will be visible and some will be hidden.

Example:

Selected Visible

Radio1 Text1, Text2, Text5
Radio2 Text2, Text4, Text5
Radio3 Text1, Text3, Text4

Is that possible to do? If this can be done through changing some source, can you point me at what files/functions that would need to be changed?

Thanks!

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Dynamic Product Templates

Post by mazhar » Tue Mar 31, 2009 10:22 am

Well If this show/hide setup is same for all products then you may try to customize

Code: Select all

BuildProductChoices(Product product, PlaceHolder phChoices)
method of App_Code/ProductHelper.cs file. If this is not the case means each product may have its own show/hide setup then following posts may be helpful
viewtopic.php?f=42&t=7746&p=32975
viewtopic.php?f=42&t=7808

cgreathouse
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 21
Joined: Tue Mar 03, 2009 10:49 am

Re: Dynamic Product Templates

Post by cgreathouse » Tue Mar 31, 2009 10:38 am

Thanks!

I think modifying BuildProductChoices is what I need. After looking at the source, it's not obvious to me what I need to do to get the text boxes to toggle between being visible and hidden based on the radio option selected.

Do you have any code snippets that demonstrates how to do this?

Thanks!

cgreathouse
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 21
Joined: Tue Mar 03, 2009 10:49 am

Re: Dynamic Product Templates

Post by cgreathouse » Wed Apr 01, 2009 6:25 am

Does anybody know how to do this? If this isn't possible I could try having another page that has the text boxes. That would make the flow of adding an item to the cart not as nice though.

Post Reply