Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Remove availability from products_from_collections view

Mira Szewczyke4acb274282f
diff --git a/saleor/product/views.py b/saleor/product/views.py
index 3fa625f5c9..5d15738aad 100644
--- a/saleor/product/views.py
+++ b/saleor/product/views.py
@@ -142,13 +142,10 @@ def category_index(request, path, category_id):
def products_from_collections(request, product_id):
- related_products = Product.objects.prefetch_related(
+ products = Product.objects.prefetch_related(
'collections', 'images').filter(
collections__products__id=product_id).exclude(
id=product_id).distinct()[:6]
- products = products_with_availability(related_products,
- discounts=request.discounts,
- local_currency=request.currency)
ctx = {'products': products}
return TemplateResponse(request, 'product/_product_collections.html', ctx)
>>>>>>> Partial view with related products to display on product details page
diff --git a/templates/product/_product_collections.html b/templates/product/_product_collections.html
index 08b77f5d6b..d2f0a1415a 100644
--- a/templates/product/_product_collections.html
+++ b/templates/product/_product_collections.html
@@ -6,7 +6,7 @@
<h2>See also</h2>
<hr>
<div class="row">
- {% for product, availability in products %}
+ {% for product in products %}
<div class="col-6 col-md-4 col-lg-2 product-list" itemscope itemtype="https://schema.org/Product">
<a itemprop="url" href="{{ product.get_absolute_url }}">
<div class="text-center">