Developer forum

Forum » Rapido » Alligning products in stadard Wrap eCom

Alligning products in stadard Wrap eCom

Hans Ravnsfjall
Reply

Hello

I am workin on a wrap website - http://hallo.net.dynamicweb-cms.com/hallo-fo - where the customer wants to products that are shown are equally sized, or at least is bottom- aligned ( see attached picture ) . It's also nicer when things are equal to each other and they are aligned.

 

I realize that it may put demands on choice of pictures and it can be troublesome in a responsive design - but it should be possible . Can you make this in standardwrap future? Have a tip for how I could make it to satisfy this customer ?

 

 

2015-04-23_10-08-48.png

Replies

 
Karsten Thuen
Reply

Hi 

I dont know yet if we would implement this as the default design for the product lists. But here is a simple way to change it in the template. 

First locate the list template file in the Dwsimple folder: eCom -> ProductList -> Includes -> ProductListRender.cshtml And the replace the existing code block with this, or replace the lines marked with blue.

               <div class="listproductright">
                    <a href="@GroupLink" title="@Name">
                        <figure style="" class="productfigure">
                            <img alt="" src="/Admin/Public/Getimage.ashx?width=300&amp;height=200&amp;compression=85&amp;Crop=7&amp;image=@Image" class="img-responsive img-center">
                           </figure>
                       </a>
                </div>
               <div class="extracolumn">
                    <h2 class="product-title"><a href="@GroupLink">@WrapMethods.Truncate(product.GetString(@Name, 20)</a></h2>
                    <div style="shortproductdescription">
                        <p>@WrapMethods.Truncate(product.GetString("Ecom:Product.ShortDescription"), 30)</p>
                    </div>
                    <div style="display: none !important" class="longproductdescription">
                        <p class="pull-left" style="text-align: left !important">@WrapMethods.Truncate(product.GetString("Ecom:Product.ShortDescription"), 180)</p>
                    </div>
                </div>

 

The key is to get the image to crop equaly andmake the text to fit with a shorter length.

 

You must be logged in to post in the forum