Developer forum

Forum » Rapido » BOM Configuration

BOM Configuration

Martin Grønbekk Moen
Martin Grønbekk Moen
Reply

We would very much like to get the functionality of BOM configuration into the Rapido framework.
At the moment, BOM configuration is not part of the default template, so you can not configure a product and add to cart usinf default Rapido.
Would be helpful if that was supported.

By the way, I cant really see any code examples using BOM configuration related to DW9 at all.


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Martin

Duely noted - we might include in 3.2.

The BOM implementation has not changed radically since it was introduced in DW6, so you can use the same approach as always. Here is a Razor example.

@if (GetLoop("BOMProducts").Count > 0){
                                    <div class="col-md-12 col-xs-12" id="includingproducts">
                                        <hr></hr>
                                        <h3 class="section-title">@Translate("Including products", "Including products")</h3>

                                        @foreach (LoopItem bomproduct in GetLoop("BOMProducts")){
                                            var bomimage = bomproduct.GetString("Ecom:Product.ImageSmall.Clean");

                                            <ul>
                                                <li class="bomlist"><a href="@bomproduct.GetString("Ecom:Product.Link.Clean.PID")">
                                                    <img src="/Admin/Public/GetImage.ashx?width=50&image=@bomimage&Compression=99" alt="">
                                                    <text>&nbsp;&nbsp;&nbsp;</text>@bomproduct.GetString("Ecom:Product.Name")
                                                </a></li>
                                            </ul>
                                        }

                                        <table cellspacing="0" cellpadding="0" border="0">
                                        
                                        @foreach (LoopItem bomconfig in GetLoop("BOMConfigurators")){
                                            <tr>
                                                  <td>
                                                    <b>@bomconfig.GetString("Ecom:Product.Configurator.Name")</b><br>
                                                    <select name="@bomconfig.GetString("Ecom:Product.Configurator.ID")">   
                                                        @foreach (LoopItem configproduct in GetLoop("ConfiguratorProducts")){
                                                               <option value="@configproduct.GetString("Ecom:Product.ID")" @configproduct.GetString("Ecom:Product.Configurator.Selected") > @configproduct.GetString("Ecom:Product.Name") ( @configproduct.GetString("Ecom:Product.ActualPrice")" ) </option>
                                                        }
                                                    </select>
                                                  </td>
                                            </tr>    
                                        }
                                        </table>
                                    </div>
                                }

Also find attached a full product template that includes bom and variants.

BR Nicolai

Votes for this answer: 2

 

You must be logged in to post in the forum