Associated products

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 years ago
I want the Associated products  in a grouped product to be clickable? how can I do this?
3 years ago
please help
3 years ago
You have a grouped product
https://demo.nopcommerce.com/nikon-d5500-dslr
And you can click on the associated products to display more info
You can see it here
https://v42demo.selectsystems.com.au/rental/rental-type-product
Basically you need to modify the Grouped Template or make a new template then change it to link to the Simple Product
@foreach (var variant in Model.AssociatedProducts)
{
    <div class="product-variant-line" data-productid="@variant.Id">
        @if (!string.IsNullOrWhiteSpace(variant.DefaultPictureModel.ImageUrl))
        {
            <div class="variant-picture">
                <a href="@Url.RouteUrl("Product", new { SeName = variant.SeName })" title="@variant.DefaultPictureModel.Title">
                    <img alt="@variant.DefaultPictureModel.AlternateText" src="@variant.DefaultPictureModel.ImageUrl"
                            title="@variant.DefaultPictureModel.Title" id="[email protected]" />
                </a>
            </div>
        }
        <div class="variant-overview">
            @if (!string.IsNullOrWhiteSpace(variant.Name))
            {
                <div class="variant-name">
                    <a href="@Url.RouteUrl("Product", new {SeName = variant.SeName})">@variant.Name</a>
                </div>
            }
            @if (!string.IsNullOrWhiteSpace(variant.ShortDescription))
            {
                <div class="variant-description">
                    @Html.Raw(variant.ShortDescription)
                </div>
            }
            @{
                var addToCartText = T("ShoppingCart.Rent").Text;
                <a href="@Url.RouteUrl("Product", new {SeName = variant.SeName})">
                    <input type="button" value="@(addToCartText)" class="button-1 add-to-cart-button" />
                </a>
            }
        </div>
    </div>
}
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.