2021-03-22 10:47:59 +00:00
|
|
|
{% set width_class = "expand" if not slides else "" %}
|
2021-07-13 18:16:24 +00:00
|
|
|
{% set cart_settings = shopping_cart.cart_settings %}
|
|
|
|
{% set product_info = shopping_cart.product_info %}
|
|
|
|
{% set price_info = product_info.get('price') or {} %}
|
|
|
|
|
2021-03-22 10:47:59 +00:00
|
|
|
<div class="col-md-7 product-details {{ width_class }}">
|
2021-07-13 18:16:24 +00:00
|
|
|
<div class="d-flex">
|
|
|
|
<!-- title -->
|
|
|
|
<div class="product-title col-11" itemprop="name">
|
|
|
|
{{ doc.web_item_name }}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Wishlist -->
|
|
|
|
{% if cart_settings.enable_wishlist %}
|
|
|
|
<div class="like-action-item-fp like-action {{ 'like-action-wished' if wished else ''}} ml-2"
|
2021-08-09 15:30:31 +00:00
|
|
|
data-item-code="{{ doc.item_code }}">
|
2021-07-13 18:16:24 +00:00
|
|
|
<svg class="icon sm">
|
|
|
|
<use class="{{ 'wished' if wished else 'not-wished' }} wish-icon" href="#icon-heart"></use>
|
|
|
|
</svg>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<p class="product-code">
|
|
|
|
<span class="product-item-group">
|
|
|
|
{{ _(doc.item_group) }}
|
|
|
|
</span>
|
|
|
|
<span class="product-item-code">
|
|
|
|
{{ _("Item Code") }}:
|
|
|
|
</span>
|
|
|
|
<span itemprop="productID">{{ doc.item_code }}</span>
|
|
|
|
</p>
|
|
|
|
{% if has_variants %}
|
|
|
|
<!-- configure template -->
|
|
|
|
{% include "templates/generators/item/item_configure.html" %}
|
|
|
|
{% else %}
|
|
|
|
<!-- add variant to cart -->
|
|
|
|
{% include "templates/generators/item/item_add_to_cart.html" %}
|
|
|
|
{% endif %}
|
|
|
|
<!-- description -->
|
|
|
|
<div class="product-description" itemprop="description">
|
|
|
|
{% if frappe.utils.strip_html(doc.web_long_description or '') %}
|
|
|
|
{{ doc.web_long_description | safe }}
|
|
|
|
{% elif frappe.utils.strip_html(doc.description or '') %}
|
|
|
|
{{ doc.description | safe }}
|
|
|
|
{% else %}
|
|
|
|
{{ "" }}
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2019-03-19 06:18:32 +00:00
|
|
|
</div>
|
2021-07-13 18:16:24 +00:00
|
|
|
|
|
|
|
{% block base_scripts %}
|
|
|
|
<!-- js should be loaded in body! -->
|
|
|
|
<script type="text/javascript" src="/assets/frappe/js/lib/jquery/jquery.min.js"></script>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
<script>
|
|
|
|
$('.page_content').on('click', '.like-action-item-fp', (e) => {
|
|
|
|
// Bind action on wishlist button
|
|
|
|
const $btn = $(e.currentTarget);
|
2021-09-01 09:27:50 +00:00
|
|
|
erpnext.e_commerce.wishlist.wishlist_action($btn);
|
2021-07-13 18:16:24 +00:00
|
|
|
});
|
|
|
|
</script>
|