Commits

Maciej Wiśniowski committed 2ccc2c8

improved and fixed display of configurable properties

Comments (0)

Files changed (3)

lfstheme/templates/lfs/cart/cart_inline.html

                             {% for property in cart_item.obj.get_properties %}
                                 <div>
                                     {{ property.title }}: {{ property.value }} {{ property.unit|safe }}
-                                    {% if property.display_price %}
+                                    {% if property.is_select_field and property.display_price %}
                                         ({{ property.price|currency }})
                                     {% endif %}
                                 </div>

lfstheme/templates/lfs/catalog/products/product_inline.html

                             {{ property.title }}:
                         </td>
                         <td class="right">
-                            <input class="right product-input-field" type="input" size="6" name="property-{{ property.id }}" value = "{{ property.value }}" />
+                            {% if property.obj.is_text_field %}
+                                <input class="product-input-field text-field" type="input" size="15" maxlength="100" name="property-{{ property.id }}" value="{{ property.value }}" />
+                            {% else %}
+                                <input class="right product-input-field number-field" type="input" size="6" maxlength="9" name="property-{{ property.id }}" value="{{ property.value }}" />
+                            {% endif %}
                         </td>
                         <td>
                             {{ property.unit }}

lfstheme/templates/lfs/checkout/checkout_cart_inline.html

                     {% for property in cart_item.obj.get_properties %}
                         <div>
                             {{ property.title }}: {{ property.value }} {{ property.unit|safe }}
-                            {% if property.display_price %}
+                            {% if property.is_select_field and property.display_price %}
                                 ({{ property.price|currency }})
                             {% endif %}
                         </div>