Ver Fonte

modificado: views/theme.xml
Descuento en el precio y Restringir a usuario comprar sin registro

root há 8 anos atrás
pai
commit
e17ae6cc54
1 ficheiros alterados com 10 adições e 5 exclusões
  1. 10 5
      views/theme.xml

+ 10 - 5
views/theme.xml

@@ -622,10 +622,14 @@
                                     </t>
                                 </t>
                                 <p class="css_not_available_msg bg-danger" style="padding: 15px;" t-if="len(product.product_variant_ids) &gt; 1">Producto no Disponible</p>
-                                <div class="add-to-cart">
+                                <div class="add-to-cart" t-if="website.user_id != user_id">
                                     <a class="btn cart-btn btn-lg js_check_product a-submit" href="#" id="add_to_cart">
                                         <i class="fa fa-shopping-cart"/>Agregar al Carro</a>
                                 </div>
+                                <div class="add-to-cart" t-if="website.user_id == user_id">
+                                    <a class="btn cart-btn btn-lg js_check_product a-submit" href="/web/login" id="add_to_cart_login">
+                                        <i class="fa fa-shopping-cart"/>Registrate para Comprar</a>
+                                </div>
                             </div>
                         </form>
                     </div>
@@ -818,11 +822,11 @@
                             <a itemprop="name" t-att-href="keep('/shop/product/%s' % slug(product), page=(pager['page']['num'] if pager['page']['num']&gt;1 else None))" t-field="product.name"/>
                         </p>
                         <p class="price">
-                            <span class="price" itemprop="offers" itemscope="itemscope" itemtype="http://schema.org/Offer" t-if="product.product_variant_ids" t-esc="str('{p:0,.0f}'.format(p=product.price).replace(',','.' ) + ' ₲s.')" >
+                            <span class="price" itemprop="offers" itemscope="itemscope" itemtype="http://schema.org/Offer" t-if="product.product_variant_ids" >
                                 <b>
                                     <t t-if="(compute_currency(product.lst_price) - product.price) &gt; 0.1">
-                                        <del class="text-danger" style="white-space: nowrap;" t-field="product.lst_price" t-field-options='{"widget": "monetary", "from_currency": "product.company_id.currency_id", "display_currency": "user_id.partner_id.property_product_pricelist.currency_id" }'/>&amp;nbsp;</t>
-                                    <span style="white-space: nowrap;" t-field="product.price" t-field-options='{"widget": "monetary", "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"}'/>
+                                        <del class="text-danger" style="white-space: nowrap;" t-field="product.lst_price" t-field-options='{"widget": "monetary", "from_currency": "product.company_id.currency_id", "display_currency": "user_id.partner_id.property_product_pricelist.currency_id" }' t-esc="str('{p:0,.0f}'.format(p=product.lst_price).replace(',','.' ) + ' ₲s.')"/>&amp;nbsp;</t>
+                                    <span style="white-space: nowrap;" t-field="product.price" t-field-options='{"widget": "monetary", "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"}' t-esc="str('{p:0,.0f}'.format(p=product.price).replace(',','.' ) + ' ₲s.')"/>
                                     <span itemprop="price" style="display:none;" t-esc="product.price"/>
                                     <span itemprop="priceCurrency" style="display:none;" t-esc="user_id.partner_id.property_product_pricelist.currency_id.name"/>
                                 </b>
@@ -1026,7 +1030,8 @@
                     <div class="shopping-cart">
                         <input name="product_id" t-att-value="product.product_variant_ids[0].id" type="hidden"/>
                         <t t-if="len(product.product_variant_ids) == 1">
-                            <a class="a-submit">
+                            <a t-att-href="keep('/shop/product/%s' % slug(product), page=(pager['page']['num'] if pager['page']['num']&gt;1 else None))">
+                            <!-- <a class="a-submit"> -->
                                 <!--<img alt="Shopping-cart" src="/kingfisher_pro/static/src/img/cart2.png" title="Shopping Cart"/>--><h5 style="color:#ffffff;">¡COMPRAR AHORA!</h5>
                             </a>
                         </t>