Maciej Wiśniowski avatar Maciej Wiśniowski committed 3dea6e4

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:request }})
                                     {% 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:request}})
                             {% endif %}
                         </div>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.