1. Refactoring form objects and database objects to use inheritance and abstract base class for consistency and reduced redundancy.\n2. Contact us page button links updated to resolve error of missing link causing page refresh instead of expected functionality.

This commit is contained in:
2024-09-10 12:09:50 +01:00
parent c9dda91dc9
commit 6b730bf8e7
709 changed files with 5158 additions and 1512 deletions

View File

@@ -0,0 +1,70 @@
{% if is_blank_row %}
<tr class="{{ model.FLAG_ROW_NEW }}" {{ model.ATTR_ID_PERMUTATION }}>
<td class="{{ model.FLAG_PRODUCT_CATEGORY }}">
<select class="{{ model.FLAG_PRODUCT_CATEGORY}}" {{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }}>
{% for cat in model.category_list.categories %}
<option value="{{ cat.id_category }}">{{ cat.name }}</option>
{% endfor %}
</select>
</td>
<td class="{{ model.FLAG_PRODUCT }}">
<select class="{{ model.FLAG_PRODUCT }}" {{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }}></select>
</td>
<td class="{{ model.FLAG_VARIATIONS }}">
<textarea class="{{ model.FLAG_VARIATIONS }}" {{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }}></textarea>
</td>
<td class="{{ model.FLAG_QUANTITY_STOCK }}">
<input class="{{ model.FLAG_QUANTITY_STOCK }}" type="number" min="0" value="0" {{ model.ATTR_VALUE_CURRENT }}="0" {{ model.ATTR_VALUE_PREVIOUS }}>
</td>
<td class="{{ model.FLAG_QUANTITY_MIN }}">
<input class="{{ model.FLAG_QUANTITY_MIN }}" type="number" min="0" value="0" {{ model.ATTR_VALUE_CURRENT }}="0" {{ model.ATTR_VALUE_PREVIOUS }}>
</td>
<td class="{{ model.FLAG_QUANTITY_MAX }}">
<input class="{{ model.FLAG_QUANTITY_MAX }}" type="number" min="0" value="0" {{ model.ATTR_VALUE_CURRENT }}="0" {{ model.ATTR_VALUE_PREVIOUS }}>
</td>
<td class="{{ model.FLAG_COST_LOCAL_VAT_INCL }}">
</td>
<!-- <td><strong>{ { permutation.output_currency() }}</strong>{ { permutation.get_price_local() }}</td> -->
<td class="{{ model.FLAG_DETAIL }}">
<a>Detail</a>
</td>
</tr>
{% else %}
<tr {{ model.ATTR_ID_PERMUTATION }}="{{ permutation.id_permutation }}">
<td class="{{ model.FLAG_PRODUCT_CATEGORY }}">
<select class="{{ model.FLAG_PRODUCT_CATEGORY }}" {{ model.ATTR_VALUE_CURRENT }}="{{ category.id_category }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ category.id_category }}"> <!-- {{ model.ATTR_ID_CATEGORY }}="{{ category.id_category }}" -->
{% for c in model.category_list.categories %}
<option value="{{ c.id_category }}" {% if c.id_category == category.id_category %}{% endif %}>{{ c.name }}</option>
{% endfor %}
</select>
</td>
<td class="{{ model.FLAG_PRODUCT }}">
<select class="{{ model.FLAG_PRODUCT }}" {{ model.ATTR_VALUE_CURRENT }}="{{ product.id_product }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ product.id_product }}"> <!-- {{ model.ATTR_ID_PRODUCT }}="{{ product.id_product }} -->
{% for p in model.category_list.categories[model.category_list.get_index_category_from_id(category.id_category)].products %}
<option value="{{ p.id_product }}" {% if p.id_product == product.id_product %}{% endif %}>{{ p.name }}</option>
{% endfor %}
</select>
</td>
<td class="{{ model.FLAG_VARIATIONS }}">
{% set block_id = 'Textarea_Product_Permutation_Variations' %}
{% include 'layouts/_shared_store.html' %}
</td>
<td class="{{ model.FLAG_QUANTITY_STOCK }}">
<input class="{{ model.FLAG_QUANTITY_STOCK }}" type="number" min="0" value="{{ permutation.quantity_stock }}" {{ model.ATTR_VALUE_CURRENT }}="{{ permutation.quantity_stock }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ permutation.quantity_stock }}">
</td>
<td class="{{ model.FLAG_QUANTITY_MIN }}">
<input class="{{ model.FLAG_QUANTITY_MIN }}" type="number" min="0" value="{{ permutation.quantity_min }}" {{ model.ATTR_VALUE_CURRENT }}="{{ permutation.quantity_min }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ permutation.quantity_min }}">
</td>
<td class="{{ model.FLAG_QUANTITY_MAX }}">
<input class="{{ model.FLAG_QUANTITY_MAX }}" type="number" min="0" value="{{ permutation.quantity_max }}" {{ model.ATTR_VALUE_CURRENT }}="{{ permutation.quantity_max }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ permutation.quantity_max }}">
</td>
<td class="{{ model.FLAG_COST_LOCAL_VAT_INCL }}">
<strong>{{ permutation.output_currency() }}</strong>{{ permutation.cost_local }}
</td>
<!-- <td><strong>{{ permutation.output_currency() }}</strong>{ { permutation.get_price_local() }}</td> -->
<td class="{{ model.FLAG_DETAIL }}">
<a>Detail</a>
</td>
</tr>
{% endif %}