Add related products to detail page
This commit is contained in:
@@ -294,6 +294,23 @@
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (relatedProducts().length > 0) {
|
||||
<section class="related-products" aria-labelledby="novo-related-products-title">
|
||||
<h2 id="novo-related-products-title">{{ 'itemDetail.relatedProducts' | translate }}</h2>
|
||||
<div class="related-products-grid">
|
||||
@for (related of relatedProducts(); track related.itemID) {
|
||||
<app-product-card
|
||||
[item]="related"
|
||||
[title]="relatedItemName(related)"
|
||||
[addToCartLabel]="'itemDetail.addToCart' | translate"
|
||||
appearance="compact"
|
||||
(addToCart)="addRelatedToCart($event.itemID, $event.event)"
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
</section>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
} @else {
|
||||
@@ -634,6 +651,23 @@
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (relatedProducts().length > 0) {
|
||||
<section class="related-products" aria-labelledby="dx-related-products-title">
|
||||
<h2 id="dx-related-products-title">{{ 'itemDetail.relatedProducts' | translate }}</h2>
|
||||
<div class="related-products-grid">
|
||||
@for (related of relatedProducts(); track related.itemID) {
|
||||
<app-product-card
|
||||
[item]="related"
|
||||
[title]="relatedItemName(related)"
|
||||
[addToCartLabel]="'itemDetail.addToCart' | translate"
|
||||
appearance="compact"
|
||||
(addToCart)="addRelatedToCart($event.itemID, $event.event)"
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
</section>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
Reference in New Issue
Block a user