Developer forum

Forum » Ecommerce - Standard features » RenderNavigation not showing eCommerce

RenderNavigation not showing eCommerce

Daniel Williams
Reply

Hi,

I'm running on 8.4, and I get can't get any eCommerce pages out in my savexml=true document.
- What am I doing wrong, or what am I missing?

This is my renderer:

@RenderNavigation(new {
    template = "breadcrumb.xslt",
    expandmode = "all",
    id = "breadcrumb",
    sitemapmode = "true",
    includemode = "all"
})


Here is some initial info:

  • http://d.pr/i/NpCl
  • http://d.pr/i/18cHS
  • http://d.pr/i/19nya

 


Replies

 
Morten Bengtson
Reply

Hi Daniel,

Make sure that you have set up ecom navigation on the page you want to be the parent of ecom groups in your navigation.

See http://manual.dynamicweb-cms.com/Default.aspx?ID=6707#29392

You should then be able to render a breadcrumb path (with your xslt template) by using this razor snippet...

@RenderNavigation(new { template = "breadcrumb.xslt", expandmode = "pathonly" })
 
Mikkel Toustrup Olsen
Reply

Hi Morten,

Do you know if its possible to parse a cshtml file as a navgiation template?. I am currently working on a project where we only have 1 ecom language in DW as we're importing products from Axapta - instead of importing them 9 times on different languages. We then handle the translation of the products, groups etc. via a custom build method. We face an issue when trying to translate the breadcrumb though. I can't call out custom method as its written in C# from and xslt template. Therefore I was wondering if the cshtml approach is possible?

 

 
Nicolai Høeg Pedersen
Reply

Cshtml is not possible for navigation templates.

Mikkel - you end spending a lot of time of making a lot of custom things - instead of having your products in those languages required. Ecommerce is made for handling languages - you bypass it, and face a lot of issues... Importing it 9 times would be a lot easier. Just my 2 cents.

 
Mikkel Toustrup Olsen
Reply

Unfortunately, the 9 times import is not an option as it is, however it would be easiest way to come by it - no point denying it. Though its a fact the ecom tables are dropped and recreated for each import, which would take a long time if that should be done 9 times to be honest.

I got it working by calling .NET code from withing the xslt template - I didn't know that was possible up untill today - you learn something new every day, right? ;-)

BR

Mikkel

 
Adrian Ursu
Reply
 
Adrian Ursu
Reply

Hi Mikkel,

Any information about the number of products? Number of ProductGroups? Or number of fields that have to be translated?

Maybe you can create the translated structure using ItemTypes and connect them to an eCom product with a Product type field.

This way you can take advantage of the Razor and the ItemRenderer. But if there is a large set of product and Groups, this will probably not work.

 
Mikkel Toustrup Olsen
Reply

Hi Adrian,

I got it working by calling some .NET code that translates a given product id to its respective country in the xslt template. My lack of knowledge didn't it was possible to call .NET code in xslt  - I learned that yesterday :-) Thanks for your answer though, appreciate it!

BR

Mikkel

 

You must be logged in to post in the forum