Page 1 of 1

Display a Product Template based on a condition.

Posted: Wed Jul 29, 2009 8:57 am
by Mike718NY
Is it possible to display a Product Template based on a condition
in the BuyProductDialog.ascx web control?

For example, if I created a product template named "Personalized":

Code: Select all

            if (_Product.ManufacturerId == 3)
            {
              //  display "Personalized" product template
            }
Is this possible?

Re: Display a Product Template based on a condition.

Posted: Wed Jul 29, 2009 9:22 am
by ZLA
Your example doesn't make sense to me. Since templates are tied to a particular product, your example seems redundant. (If you are testing for product.manufacturer, you already know the product and therefore whether or not the product has a template.) Have I missed something?

Re: Display a Product Template based on a condition.

Posted: Wed Jul 29, 2009 9:31 am
by Mike718NY
>> Have I missed something?

Yes. I want to add additional processing with that product template.
It's for "Add Engraving", from my other post you replied too.

Re: Display a Product Template based on a condition.

Posted: Wed Jul 29, 2009 9:53 am
by ZLA
I understand. You want a condition for extra processing, not just to display a given template. I put my comments about the javascript issue into the other thread.