I’d like to modify the product listing.
So far, I’ve found a template file which is being used to generate the products.
frappe-bench\apps\erpnext\erpnext\templates\includes\products_as_grid.html
{% from "erpnext/templates/includes/macros.html" import product_image_square %}
<a class="product-link" href="{{ route|abs_url }}">
<div class="col-sm-4 col-xs-4 product-image-wrapper">
<div class="product-image-img">
{{ product_image_square(thumbnail or website_image) }}
<div class="product-text" itemprop="name">{{ item_name }}</div>
{% if in_stock or not is_stock_item %}
<div style='color: green'>
<i class='fa fa-check'></i> {{ _("In stock") }}</div>
{% else %}
<div style='color: red'>
<i class='fa fa-close'></i> {{ _("Not in stock") }}</div>
{% endif %}
</div>
</div>
</a>
I tried to add a new line to also show the product price on the listing page.
<div class="product-price" itemprop="price">{{ price }}</div>
or
<div class="product-price" itemprop="standard_rate">{{ standard_rate }}</div>
but they don’t seem to work. All I get returned is:
{{ undefined value printed: parameter ‘standard_rate’ was not provided }}
Where should I add the extra field so it would get asked from the database during page creation?