mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 19:29:10 +00:00
fix(product-listing): fix variant selection in website
This commit is contained in:
@@ -43,8 +43,6 @@
|
||||
<br>
|
||||
<div class="item-attribute-selectors">
|
||||
{% if has_variants and attributes %}
|
||||
{{ attributes }}
|
||||
{#
|
||||
|
||||
{% for d in attributes %}
|
||||
{% if attribute_values[d.attribute] -%}
|
||||
@@ -69,7 +67,6 @@
|
||||
{%- endif %}
|
||||
{% endfor %}
|
||||
|
||||
#}
|
||||
{% endif %}
|
||||
</div>
|
||||
<br>
|
||||
|
||||
@@ -1,16 +1,6 @@
|
||||
{% extends "templates/web.html" %}
|
||||
|
||||
{% block header %}<h1>{{ _("Products") }}</h1>{% endblock %}
|
||||
{% block breadcrumbs %}
|
||||
<div class="page-breadcrumbs" data-html-block="breadcrumbs">
|
||||
<ul class="breadcrumb">
|
||||
<li>
|
||||
<span class="fa fa-angle-left"></span>
|
||||
<a href="/me">{{ _("My Account") }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block header %}<h1>{{ name }}</h1>{% endblock %}
|
||||
|
||||
{% block page_content %}
|
||||
<div class="item-group-content" itemscope itemtype="http://schema.org/Product">
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
<a class="product-link product-list-link" href="{{ route|abs_url }}">
|
||||
<div class='row'>
|
||||
<div class='col-xs-3 col-sm-2 product-image-wrapper'>
|
||||
{{ product_image_square(thumbnail or website_image) }}
|
||||
{{ product_image_square(thumbnail or website_image or image) }}
|
||||
</div>
|
||||
<div class='col-xs-9 col-sm-10 text-left'>
|
||||
<div class="product-text strong">{{ item_name }}</div>
|
||||
<div class="product-text strong">{{ item_name or name }}</div>
|
||||
{% set website_description = website_description or description %}
|
||||
{% if website_description != item_name %}
|
||||
<div class="text-muted">{{ website_description or description }}</div>
|
||||
{% elif item_code != item_name %}
|
||||
{% elif item_code and item_code != item_name %}
|
||||
<div class="text-muted">{{ _('Item Code') }}: {{ item_code }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -24,8 +24,9 @@ def get_product_list(search=None, start=0, limit=12):
|
||||
I.has_batch_no
|
||||
from `tabItem` I
|
||||
left join tabBin S on I.item_code = S.item_code and I.website_warehouse = S.warehouse
|
||||
where (I.show_in_website = 1 or I.show_variant_in_website = 1)
|
||||
where (I.show_in_website = 1)
|
||||
and I.disabled = 0
|
||||
and (I.variant_of is null or I.variant_of='')
|
||||
and (I.end_of_life is null or I.end_of_life='0000-00-00' or I.end_of_life > %(today)s)"""
|
||||
|
||||
# search term condition
|
||||
|
||||
Reference in New Issue
Block a user