Close

Icon or Link for Compare List

laloni
6 years ago
#13556 Quote
Avatar
  • 4
Hello

is it possible to put the icon for comparing products next to the icons for the shopping cart and the wishlist on the topright?


Best Regards,
Christine
hristo
6 years ago
#13572 Quote
Avatar
  • Moderator
  • 172
laloni wrote:
Hello

is it possible to put the icon for comparing products next to the icons for the shopping cart and the wishlist on the topright?


Best Regards,
Christine


Hello,

there's no such setting to add a link to compare products page in your header, but if you are familiar with css you can add it manually and then style it. The section ("header-actions") you have to edit is placed in the "Header.cshtml" file (Themes\Brooklyn\Views\Shared\) and it looks like this:

            <div class="header-actions">
                @if (wishlistEnabled)
                {
                    <a href="@Url.RouteUrl("Wishlist")" class="ico-wishlist">
                        <span class="wishlist-qty"></span>
                    </a>
                }
                @if (shoppingCartEnabled)
                {
                    <a href="@Url.RouteUrl("ShoppingCart")" class="ico-cart">
                        <span class="cart-qty">@T("ShoppingCart.HeaderQuantity", Model)</span>
                    </a>
                    @Html.Action("FlyoutShoppingCart", "ShoppingCart")
                }
            </div>

You can add your custom link (<a>...</a>) next to the existing links inside the "header-actions" wrapper and set its url to refer to compare products page. Also you can add a custom class name to it and use that to style the link to look like an icon. The css code needed can be put in your "styles.css" file or in the "custom head styles" panel in your theme's administration.
Regards,
Hristo Gospodinov
Nop-Templates.com
laloni
6 years ago
#13573 Quote
Avatar
  • 4
Hello Hriso,

works perfect!
Thank you very much!

Best regards,
Christine