|
@@ -28,32 +28,48 @@
|
|
|
</t>
|
|
|
</select>
|
|
|
</t>
|
|
|
+
|
|
|
+ <input id="attribute_list" type="hidden" t-att-value="attribute_value_ids"></input>
|
|
|
+ <input id="variant_list" type="hidden" t-att-value="variant_id.value_ids"></input>
|
|
|
+ <input id="product_curva" type="hidden" t-att-value="product.variant_item_ids"/>
|
|
|
+ <input id="product_curva_qty" type="hidden" t-att-value="product.curva"/>
|
|
|
+
|
|
|
<!-- Caso el cliente compre solo por curva, se despliega esta opcion -->
|
|
|
<t t-if="user_id.partner_id.website_sale_type == True">
|
|
|
<div class="container">
|
|
|
<div class="row">
|
|
|
<div class="col-md-12">
|
|
|
- <div class="panel panel-primary">
|
|
|
- <div class="panel-heading">
|
|
|
- <h3 class="panel-title" t-field="variant_id.attribute_id.name"></h3>
|
|
|
- </div>
|
|
|
+ <!-- Variante tipo color -->
|
|
|
+ <t t-if="variant_id.attribute_id.type == 'color'">
|
|
|
+ <h2 class="panel-title" t-field="variant_id.attribute_id.name"></h2>
|
|
|
+ <input id="variant_list_color" type="hidden" t-att-value="variant_id.value_ids"></input>
|
|
|
+ <ul class="list-inline">
|
|
|
+ <t t-set="inc" t-value="0"/>
|
|
|
+ <li t-foreach="variant_id.value_ids" t-as="value_id">
|
|
|
+ <label t-attf-style="background-color:#{value_id.color or value_id.name}" t-attf-class="css_attribute_color #{'active' if not inc else ''}">
|
|
|
+ <input type="radio" t-att-checked="'checked' if not inc else ''" t-att-name="'attribute_%s_%s' % (product.id, variant_id.attribute_id.id)" t-att-value="value_id.id" t-att-title="value_id.name" id="product_color"/>
|
|
|
+ </label>
|
|
|
+ <t t-set="inc" t-value="inc+1"/>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </t>
|
|
|
+ <t t-if="variant_id.attribute_id.type == 'radio'">
|
|
|
+ <h2 class="panel-title" t-field="variant_id.attribute_id.name"></h2>
|
|
|
<table class="table table-condenced text-center">
|
|
|
- <t t-if="variant_id.attribute_id.type == 'radio'">
|
|
|
- <ul class="list-unstyled">
|
|
|
- <t t-set="inc" t-value="0"/>
|
|
|
- <tr>
|
|
|
- <t t-foreach="variant_id.value_ids" t-as="value_id">
|
|
|
- <li class="form-group js_attribute_value">
|
|
|
- <td>
|
|
|
- <span t-field="value_id.name"/>
|
|
|
- </td>
|
|
|
- </li>
|
|
|
- <t t-set="inc" t-value="inc+1"/></t>
|
|
|
- </tr>
|
|
|
- </ul>
|
|
|
- </t>
|
|
|
+ <ul class="list-unstyled">
|
|
|
+ <t t-set="inc" t-value="0"/>
|
|
|
+ <tr>
|
|
|
+ <t t-foreach="variant_id.value_ids" t-as="value_id">
|
|
|
+ <li class="form-group js_attribute_value">
|
|
|
+ <td>
|
|
|
+ <span t-field="value_id.name"/>
|
|
|
+ </td>
|
|
|
+ </li>
|
|
|
+ <t t-set="inc" t-value="inc+1"/></t>
|
|
|
+ </tr>
|
|
|
+ </ul>
|
|
|
</table>
|
|
|
- </div>
|
|
|
+ </t>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -72,10 +88,6 @@
|
|
|
<table class="table table-condenced text-center">
|
|
|
<!-- Variante tipo radio -->
|
|
|
<t t-if="variant_id.attribute_id.type == 'radio'">
|
|
|
- <input id="attribute_list" type="hidden" t-att-value="attribute_value_ids"></input>
|
|
|
- <input id="variant_list" type="hidden" t-att-value="variant_id.value_ids"></input>
|
|
|
- <input id="product_curva" type="hidden" t-att-value="product.variant_item_ids"/>
|
|
|
- <input id="product_curva_qty" type="hidden" t-att-value="product.curva"/>
|
|
|
<ul class="list-unstyled">
|
|
|
<t t-set="inc" t-value="0"/>
|
|
|
<t t-foreach="variant_id.value_ids" t-as="value_id">
|
|
@@ -120,11 +132,11 @@
|
|
|
</div>
|
|
|
</t>
|
|
|
</li>
|
|
|
- <t t-if="user_id.partner_id.website_sale_type == True">
|
|
|
- <div class="container text-center">
|
|
|
- <button id="curva" class="btn btn-primary" href="">Comprar Curva</button>
|
|
|
- </div>
|
|
|
- </t>
|
|
|
+ </t>
|
|
|
+ <t t-if="user_id.partner_id.website_sale_type == True">
|
|
|
+ <div class="container text-center">
|
|
|
+ <button id="curva" class="btn" href="">Comprar Curva</button>
|
|
|
+ </div>
|
|
|
</t>
|
|
|
</xpath>
|
|
|
</template>
|