|
@@ -0,0 +1,155 @@
|
|
|
+<?xml version="1.0" encoding="utf-8"?>
|
|
|
+<openerp>
|
|
|
+ <data>
|
|
|
+ <template id="assets_frontend" inherit_id="website.assets_frontend" name="Shop">
|
|
|
+ <xpath expr="." position="inside">
|
|
|
+ <script type="text/javascript" src="/website_sale_multi_add/static/src/js/website_sale_multi_add.js"></script>
|
|
|
+ <!-- <link rel='stylesheet' href='/website_sale_stock_status/static/src/css/website_sale_stock_status.css'/> -->
|
|
|
+ </xpath>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template id="variant_form" inherit_id="website_sale.variants" name="variants">
|
|
|
+ <xpath expr="//t[@t-as='variant_id']" position="replace">
|
|
|
+ <t t-foreach="product.attribute_line_ids" t-as="variant_id">
|
|
|
+ <li t-if="len(variant_id.value_ids) > 1">
|
|
|
+ <t t-if="variant_id.attribute_id.type in ['select', 'hidden']">
|
|
|
+ <select class="form-control js_variant_change" t-att-name="'attribute-%s-%s' % (product.id, variant_id.attribute_id.id)">
|
|
|
+ <t t-foreach="variant_id.value_ids" t-as="value_id">
|
|
|
+ <option t-att-value="value_id.id">
|
|
|
+ <span t-field="value_id.name"/>
|
|
|
+ <span t-if="value_id.price_extra">
|
|
|
+ <t t-esc="value_id.price_extra > 0 and '+' or ''"/><span
|
|
|
+ t-field="value_id.price_extra"
|
|
|
+ style="white-space: nowrap;"
|
|
|
+ t-field-options="{ "widget": "monetary", "from_currency": "product.company_id.currency_id", "display_currency": "user_id.partner_id.property_product_pricelist.currency_id" }"/>
|
|
|
+ </span>
|
|
|
+ </option>
|
|
|
+ </t>
|
|
|
+ </select>
|
|
|
+ </t>
|
|
|
+
|
|
|
+ <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>
|
|
|
+ <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>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </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"/>
|
|
|
+ <t t-if="user_id.partner_id.website_sale_type == False">
|
|
|
+ <div class="container">
|
|
|
+ <div class="row text-left">
|
|
|
+ <div class="col-md-12">
|
|
|
+ <div class="pricing-table">
|
|
|
+ <div class="panel panel-dafault" style="border:none;">
|
|
|
+ <div class="panel-body panel-body-landing">
|
|
|
+ <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"/>
|
|
|
+ <t t-foreach="variant_id.value_ids" t-as="value_id">
|
|
|
+ <li class="form-group js_attribute_value">
|
|
|
+ <tr>
|
|
|
+ <td>
|
|
|
+ <span t-field="value_id.name"/>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <span class="badge" t-if="value_id.price_extra">
|
|
|
+ <t t-esc="value_id.price_extra > 0 and '+' or ''"/>
|
|
|
+ <span t-field="value_id.price_extra" t-field-options="{ "widget": "monetary", "from_currency": "product.company_id.currency_id", "display_currency": "user_id.partner_id.property_product_pricelist.currency_id" }"/></span>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <button t-att-id="'attribute_%s' % value_id.id" type="button" class="js_variant_change btn btn-primary" t-att-checked="'checked' if not inc else ''" t-att-name="'attribute-%s-%s' % (product.id, variant_id.attribute_id.id)" t-att-value="inc+1">Agregar al carro</button>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </li>
|
|
|
+ <t t-set="inc" t-value="inc+1"/></t>
|
|
|
+ </ul>
|
|
|
+ </t>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </t>
|
|
|
+ <t t-if="variant_id.attribute_id.type == 'color'">
|
|
|
+ <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" class="js_variant_change" 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"/>
|
|
|
+ </label>
|
|
|
+ <t t-set="inc" t-value="inc+1"/>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </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>
|
|
|
+ </xpath>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template id="product_form" inherit_id="website_sale.product" name="product">
|
|
|
+ <xpath expr="//a[@id='add_to_cart']" position="replace">
|
|
|
+ <!-- <t t-foreach="product.attribute_line_ids" t-as="variant_id">
|
|
|
+ <t t-if="len(variant_id.value_ids) > 1"> -->
|
|
|
+ <a id="add_to_cart" class="btn btn-primary btn-lg mt8 js_check_product a-submit" href="#" style="display:none;">Add to Cart</a>
|
|
|
+ <!-- </t>
|
|
|
+ </t> -->
|
|
|
+ </xpath>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template id="product_quantity_form" inherit_id="website_sale.product_quantity" name="product_quantity">
|
|
|
+ <xpath expr="//div[@class='css_quantity input-group oe_website_spinner']" position="replace">
|
|
|
+
|
|
|
+ <div class="css_quantity input-group oe_website_spinner" style="display:none;">
|
|
|
+ <span class="input-group-addon">
|
|
|
+ <a t-attf-href="#" class="mb8 js_add_cart_json">
|
|
|
+ <i class="fa fa-minus"/>
|
|
|
+ </a>
|
|
|
+ </span>
|
|
|
+ <input type="text" class="js_quantity form-control" data-min="1" name="add_qty" value="1"/>
|
|
|
+ <span class="input-group-addon">
|
|
|
+ <a t-attf-href="#" class="mb8 float_left js_add_cart_json">
|
|
|
+ <i class="fa fa-plus"/>
|
|
|
+ </a>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </xpath>
|
|
|
+ </template>
|
|
|
+ </data>
|
|
|
+</openerp>
|