Developer forum

Forum » Templates » Razor BOM
Rune Skovbo
Reply

Hi people

Using this:

                   @{ 
                    
                        foreach (var BOMConfigurator in GetLoop("BOMConfigurators"))
                        {
                            <div class="header">@BOMConfigurator.GetValue("Ecom:Product.Configurator.Name")</div>
                            
                            @BOMConfigurator.TemplateTags()

                            foreach (var ConfiguratorProduct in GetLoop("ConfiguratorProducts"))
                            {
                                @ConfiguratorProduct.TemplateTags()
                            }
                            
                        }
                    }

Im trying to get each of my BOM product. I get the BOM groups just fine, but I don't get enything from within the second loop.

If I use template tags i get the products just fine, so it must be a razor issue.

In other words: My  @ConfiguratorProduct.TemplateTags() renders nothing.

 

Please help :-)

/Rune


Replies

 
Thomas Schroll
Reply
This post has been marked as an answer

Hi Rune

Try

foreach (var ConfiguratorProduct in BOMConfigurator.GetLoop("ConfiguratorProducts"))

Regards Thomas

Votes for this answer: 1
 
Rune Skovbo
Reply

You are a god amongst men!

Thanks :-)

/Rune

 

You must be logged in to post in the forum