I'm playing around with Merchello Bazaar and want to make other pages in the site like refund policy, terms and conditions etc.
I can do this by adding a new doctype and template in the normal Umbraco manner but than I don't have access to the basket if I want to have basket totals in the header of these new pages.
How do I get access to the basket or how do I change the template to inherit from one of the bazarr models which then does have access to the basket?
Or can you not do this using normal doctypes/templates and have to use MVC instead?
A bit confused on how to inherit the Bazaar theme for standard Umbraco templates; recreating certainly won't enable dynamic site management for page editors. Any suggestions?
Hey J.B. I think a better solution would be to create a Bazaar theme that uses partials from the standard Umbraco partials folder. As for adding additional properties to the Bazaar views, they are all IPublishedContent so just add properties to the respective document type.
If you then wanted to return a new model of some other type to your custom view you could handle Umbraco's PreRenderViewActionFilterAttribute.ActionExecuted event and build up the your custom model.
Add a new page (docType) to MerchelloBazaar
Hi,
I'm playing around with Merchello Bazaar and want to make other pages in the site like refund policy, terms and conditions etc.
I can do this by adding a new doctype and template in the normal Umbraco manner but than I don't have access to the basket if I want to have basket totals in the header of these new pages.
How do I get access to the basket or how do I change the template to inherit from one of the bazarr models which then does have access to the basket?
Or can you not do this using normal doctypes/templates and have to use MVC instead?
TIA Trevor
Hey Trevor,
You can have your view (or partial) inherit from Merchello.Web.Mvc.MerchelloTemplatePage or Merchello.Web.Mvc.MerchelloViewPage
These subclass the UmbracoTemplatePage and UmbracoViewPage
You now have access to the CurrentCustomer in your view:
So you could build a nav or whatever doing something like that.
Does that work for you?
Perfect...thats exactly what I was after! Thanks.
A bit confused on how to inherit the Bazaar theme for standard Umbraco templates; recreating certainly won't enable dynamic site management for page editors. Any suggestions?
Hey J.B. I think a better solution would be to create a Bazaar theme that uses partials from the standard Umbraco partials folder. As for adding additional properties to the Bazaar views, they are all IPublishedContent so just add properties to the respective document type.
If you then wanted to return a new model of some other type to your custom view you could handle Umbraco's PreRenderViewActionFilterAttribute.ActionExecuted event and build up the your custom model.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.