[fix] variant selector display
This commit is contained in:
parent
c85a37fe00
commit
25ef4ff373
@ -3,8 +3,8 @@ import frappe
|
|||||||
def execute():
|
def execute():
|
||||||
frappe.reload_doctype("File")
|
frappe.reload_doctype("File")
|
||||||
frappe.reload_doctype("Item")
|
frappe.reload_doctype("Item")
|
||||||
for item in frappe.get_all("Item", fields=("name", "website_image")):
|
for item in frappe.get_all("Item", fields=("name", "website_image", "thumbnail")):
|
||||||
if item.website_image:
|
if item.website_image and not item.thumbnail:
|
||||||
item_doc = frappe.get_doc("Item", item.name)
|
item_doc = frappe.get_doc("Item", item.name)
|
||||||
try:
|
try:
|
||||||
item_doc.make_thumbnail()
|
item_doc.make_thumbnail()
|
||||||
|
@ -26,10 +26,7 @@
|
|||||||
<p class="text-muted">
|
<p class="text-muted">
|
||||||
{{ _("Item Code") }}: <span itemprop="productID">{{ name }}</span></p>
|
{{ _("Item Code") }}: <span itemprop="productID">{{ name }}</span></p>
|
||||||
<br>
|
<br>
|
||||||
<div style="min-height: 100px; margin: 10px 0;">
|
<div class="item-attribute-selectors">
|
||||||
<h4 class="item-price" itemprop="price"></h4>
|
|
||||||
<div class="item-stock" itemprop="availablity"></div>
|
|
||||||
<div class="item-cart hide">
|
|
||||||
{% if has_variants %}
|
{% if has_variants %}
|
||||||
{% for d in attributes %}
|
{% for d in attributes %}
|
||||||
<div class="item-view-attribute"
|
<div class="item-view-attribute"
|
||||||
@ -48,7 +45,12 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</select>
|
</div>
|
||||||
|
<br>
|
||||||
|
<div style="min-height: 100px; margin: 10px 0;">
|
||||||
|
<h4 class="item-price" itemprop="price"></h4>
|
||||||
|
<div class="item-stock" itemprop="availablity"></div>
|
||||||
|
<div class="item-cart hide">
|
||||||
<div id="item-add-to-cart">
|
<div id="item-add-to-cart">
|
||||||
<button class="btn btn-primary btn-sm">
|
<button class="btn btn-primary btn-sm">
|
||||||
{{ _("Add to Cart") }}</button>
|
{{ _("Add to Cart") }}</button>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user