Skip to content

Commit

Permalink
product_list: attempt to fix cache showing state in another warehouse
Browse files Browse the repository at this point in the history
  • Loading branch information
Aiq0 committed Jan 16, 2025
1 parent 3974075 commit ff36633
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sortiment/store/templates/store/_products_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% if products %}
<div class="grid grid-cols-1 md:grid-cols-3 lg:grid-cols-6 gap-4 p-6">
{% for p in products %}
{% cache 3600 "product_detail" p.product.id p.global_quantity %}
{% cache 3600 "product_detail" p.product.id p.local_quantity p.global_quantity %}
<a class="hover:bg-gray-50 dark:hover:bg-gray-800 p-2 rounded-lg cursor-pointer {% if not p.product.is_unlimited and p.local_quantity <= 0 %} opacity-30 grayscale hover:opacity-100 {% endif %}" role="button" href="{% url 'store:cart_add' p.product.id %}" data-turbo-method="post" data-turbo-frame="turbo-cart" {% if forloop.first %}data-barcode-target="firstProduct"{% endif %}
{% if request.GET.query == p.product.barcode %}data-exact-match="1"{% endif %}>
{% include "store/_item_image.html" with product=p.product %}
Expand Down

0 comments on commit ff36633

Please sign in to comment.