feat: add alt value in product page

This commit is contained in:
Shivam Mishra 2020-08-07 14:38:40 +05:30
parent a0954e66a8
commit b1f8859121
2 changed files with 2 additions and 2 deletions

View File

@ -343,7 +343,7 @@ class Item(WebsiteGenerator):
if variant:
context.variant = frappe.get_doc("Item", variant)
for fieldname in ("website_image", "web_long_description", "description",
for fieldname in ("website_image", "website_image_alt", "web_long_description", "description",
"website_specifications"):
if context.variant.get(fieldname):
value = context.variant.get(fieldname)

View File

@ -23,7 +23,7 @@
})
</script>
{% else %}
{{ product_image(website_image or image or 'no-image.jpg') }}
{{ product_image(website_image or image or 'no-image.jpg', alt=website_image_alt or item_name) }}
{% endif %}
<!-- Simple image preview -->