BV Commerce Forum
»
BV Commerce Support
»
Development
»
How to make and select product page template also conditionally select
Rank: Member
Joined: 6/2/2004(UTC) Posts: 24
|
Does anyone know how to do any of the following: <UL> * make a new product page template and set the site to use the new template
* make a new product page template and conditionally choose between templates </UL> Thanks!
|
|
|
|
Rank: Member
Joined: 4/10/2006(UTC) Posts: 462
|
A product page template is simply created by making a Product.aspx page and adding it into its own directory under the bvmodules/producttemplates directory.
How to set it the new template as the default is something that I am also looking to do that I have yet to find an answer for. Each product has a product property that lets you choose what template you would like to use, so you can "conditionally" choose between templates on a product by product basis. |
Netriplex Corporation<br /> |
|
|
|
Rank: Member
Joined: 6/2/2004(UTC) Posts: 24
|
Thanks. It would be great if the conditional processing choosing the product page could be done inside a separate plugin.
|
|
|
|
Rank: Member
Joined: 4/10/2006(UTC) Posts: 462
|
If you are talking about making a certain template display on a certain set of conditions. I'm not sure how this is any easier than just setting it up in the product admin, but the great part of bvc5 is you can basically do anything if you have a developer license. Just change the logic in the BuildPhysicalUrlForProduct function in the Core and you rewrite your URLs out to any template you want on any condition/methodology you want. |
Netriplex Corporation<br /> |
|
|
|
Rank: Member
Joined: 6/2/2004(UTC) Posts: 24
|
I would like to make the changes outside of the bvc5 code to allow for later Service Packs. That's why I was hoping to accomplish this with a plugin and separate product page template as opposed to changing the base code.
|
|
|
|
Rank: Member
Joined: 4/10/2006(UTC) Posts: 462
|
Haven't really looked into doing it, so I'm not 100% sure its possible, but I guess you could technically create a Product Template that handled the redirect rather than doing it in the core. Then you'd just set all your products to use that one template and that template would decide where to go.
A better way to handle the situation, if you don't want to modify the core, which if you own a developer's copy wouldn't be very hard to apply your code update to each successive sp release would be to write your own http handler to handle the URL rewriting and modifying the web.config to use your handler instead of the one in the bvc core. |
Netriplex Corporation<br /> |
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.