{#
This file is part of the ProductHide42 Plugin
Copyright (C) 2023 Diezon.
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% block javascript %}
<script>
$(function () {
{% if totalQuantity > 0 %}
{% for CartIndex,Cart in Carts %}
{% for CartItem in Cart.CartItems %}
{% set Product = CartItem.ProductClass.Product %}
{% if Product.hidden %}
var cartRowName = $('.ec-cartRow__name:has(a[href="{{ url('product_detail', {id : Product.id} ) }}"])');
cartRowName.prepend('{{ Product.name }}');
cartRowName.find('a').hide();
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
});
</script>
{% endblock javascript %}