Hi
Is there a way of listing products in existing home node that using Umbraco.Web.Mvc.UmbracoTemplatePage. My Marchello is now located in App_Plugins.
Or is there any way of adding collections/products as a subitems on the categories?
-Tor
Sure thing. Probably the easiest way to get started tinkering is to use Merchello.Web.Mvc.MerchelloTemplatePage which itself inherits from Umbraco.Web.Mvc.UmbracoTemplatePage but also exposes to additional properties:
Merchello - reference to an instantiated MerchelloHelper
CurrentCustomer - which is the customer looking at the view your are presenting.
Thanks for the answer but i cant figure out how to add e.x featured products into my excisting home template. I would love to have the featured product as a macro. Here is what i mean:
My Bazaar is now in the App_Plugins folder and my page is in the Views folder, is this maybe i cant use it on my excisting page?
I think your getting confused by the typed Bazaar models.
You can do the same thing the Bazaar is doing directly through Umbraco (in fact that is all the Bazaar is doing).
On your home page DocumentType (ContentType) you can add a property named "featuredProducts". Associated with that property add the DataType named "Merchello Product List View", which is defined during the Bazaar install or create another data type if you want using the same property editor.
Once done, if you go to your home page in the back office you will see a product list view with a "Gear" icon.
If you click that, you can select the Featured Product Collection (or any other product collection you may have created).
In your view to get the products:
var products = Model.Content.GetPropertyValue<IEnumerable<IProductContent>>("featuredProducts");
This will return the same list that is used in the typed model on the Store.
Hi again Rusty and tnx for help but i cant get the product to my homepage, i can see it in backend but i cant figure it out on the front, i get the Object reference not set to an instance of an object, i have this code `@{var products = Model.Content.GetPropertyValue<>
List Merchello featured products on existing home node
Hi Is there a way of listing products in existing home node that using Umbraco.Web.Mvc.UmbracoTemplatePage. My Marchello is now located in App_Plugins. Or is there any way of adding collections/products as a subitems on the categories? -Tor
Hi Tor,
Sure thing. Probably the easiest way to get started tinkering is to use
Merchello.Web.Mvc.MerchelloTemplatePage
which itself inherits fromUmbraco.Web.Mvc.UmbracoTemplatePage
but also exposes to additional properties:MerchelloHelper
Check out the docs https://merchello.readme.io/docs/merchellohelper for more information on the MerchelloHelper.
You might also have a glimpse at the Merchello.Bazaar solution ( https://github.com/Merchello/Merchello/tree/merchello-dev/src ) to have a look how that starter is coded.
Hi Rusty
Thanks for the answer but i cant figure out how to add e.x featured products into my excisting home template. I would love to have the featured product as a macro. Here is what i mean: My Bazaar is now in the App_Plugins folder and my page is in the Views folder, is this maybe i cant use it on my excisting page?
I cant find FeaturedProducts.
What am i doing wrong?
-Tor
I think your getting confused by the typed Bazaar models.
You can do the same thing the Bazaar is doing directly through Umbraco (in fact that is all the Bazaar is doing).
On your home page DocumentType (ContentType) you can add a property named "featuredProducts". Associated with that property add the DataType named "Merchello Product List View", which is defined during the Bazaar install or create another data type if you want using the same property editor.
Once done, if you go to your home page in the back office you will see a product list view with a "Gear" icon.
If you click that, you can select the Featured Product Collection (or any other product collection you may have created).
In your view to get the products:
This will return the same list that is used in the typed model on the Store.
Hi again Rusty and tnx for help but i cant get the product to my homepage, i can see it in backend but i cant figure it out on the front, i get the Object reference not set to an instance of an object, i have this code `@{var products = Model.Content.GetPropertyValue<>
Im sorry for bothering you with this but....:)
Hey Tor,
Have you extended your products with a document type? IProductContent requires a document type be attached to the product in the back office.
You will be able to see if a product can render by looking at the check box in the list view property editor.
You should also look at https://merchello.readme.io/docs/product-content-types to make sure you have the document type associated correctly.
Can you post a screen shot of your home page back office content tab where you have the Merchello Product List View property editor?
Hi Again Rusty Where can i extend my product with a doc type? And what cind of doc type?
I have the checkboxes but i cant click on them
I also get this error in settings on my home node when open it:
Again thank you so much -Tor
The error you are seeing was reported here http://issues.merchello.com/youtrack/issue/M-996 and will be fixed in the 2.0.0 release.
In order to see the Product Content Types you need to be in the Merchello section on the product listing page: https://merchello.readme.io/docs/back-office-sections
is working on a reply...