Explorar el Código

modificaciones en color menu y carro

Edgar Ortigoza hace 8 años
padre
commit
3c5f2ecb74

+ 14 - 0
controllers/main.py

@@ -338,3 +338,17 @@ class KingfisherProBrandSlider(website_sale):
             elif remove == "tag":
                 request.session[remove] = ''
                 return True
+
+
+    @http.route(['/shop/cart/update'], type='http', auth="public", methods=['POST'], website=True)
+    def cart_update(self, product_id, add_qty=1, set_qty=0, **kw):
+        cr, uid, context = request.cr, request.uid, request.context
+        request.website.sale_get_order(force_create=1)._cart_update(product_id=int(product_id), add_qty=float(add_qty), set_qty=float(set_qty))
+        #return request.redirect("/shop/cart")
+        prod_obj = request.registry.get('product.product')
+        product = prod_obj.browse(cr,uid,int(product_id),context=context)
+        tpl_obj = request.registry('product.template')
+        tpl_ids = tpl_obj.search(cr,uid, [('id', '=', product.product_tmpl_id.id)],context=context);
+        template = tpl_obj.browse(cr,uid,tpl_ids, context=context)
+    
+        return request.redirect('/shop/product/%s' % slug(template))

+ 1 - 1
static/src/less/custom_theme.less

@@ -9,7 +9,7 @@
 
 /*Color*/
 @header-bg:			#fff;
-@theme:				#c38647;
+@theme:				#000000;
 @light-color:		#ffffff;
 @dark-color:		#393939;;
 @body-color:		#393939;

+ 1 - 1
static/src/less/options/colors/colors.less

@@ -4,7 +4,7 @@
 
 /*Color*/
 @header-bg:			#fff;
-@theme:				#c38647;
+@theme:				#000000;
 @light-color:		#ffffff;
 @dark-color:		#393939;
 @body-color:		#393939;

+ 1 - 1
static/src/less/web.less

@@ -2727,7 +2727,7 @@ header a.navbar-brand img {
 		&:hover {
 			.mega-dropdown-menu {
 				display: block;
-				top: 70%;
+				top: 60%;
 
 				@media (max-width:767px) {
 					display: none;

+ 15 - 15
views/snippets.xml

@@ -247,7 +247,7 @@
                                 <div class="view">
                                     <div class="shopping-cart">
                                         <a href="#">
-                                            <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡LO QUIERO!</h5>
+                                            <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡COMPRAR AHORA!</h5>
                                         </a>
                                     </div>
                                 </div>
@@ -524,7 +524,7 @@
                                                         <div class="view">
                                                             <div class="shopping-cart">
                                                                 <a t-attf-href="/shop/product/#{ slug(product) }">
-                                                                    <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡LO QUIERO!</h5>
+                                                                    <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡COMPRAR AHORA!</h5>
                                                                 </a>
                                                             </div>
                                                         </div>
@@ -575,7 +575,7 @@
                                                         <div class="view">
                                                             <div class="shopping-cart">
                                                                 <a t-attf-href="/shop/product/#{ slug(product) }">
-                                                                    <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡LO QUIERO!</h5>
+                                                                    <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡COMPRAR AHORA!</h5>
                                                                 </a>
                                                             </div>
                                                         </div>
@@ -622,7 +622,7 @@
                                                         <div class="view">
                                                             <div class="shopping-cart">
                                                                 <a t-attf-href="/shop/product/#{ slug(product) }">
-                                                                    <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡LO QUIERO!</h5>
+                                                                    <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡COMPRAR AHORA!</h5>
                                                                 </a>
                                                             </div>
                                                         </div>
@@ -666,7 +666,7 @@
                                                         <div class="view">
                                                             <div class="shopping-cart">
                                                                 <a t-attf-href="/shop/product/#{ slug(product) }">
-                                                                    <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡LO QUIERO!</h5>
+                                                                    <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡COMPRAR AHORA!</h5>
                                                                 </a>
                                                             </div>
                                                         </div>
@@ -710,7 +710,7 @@
                                                         <div class="view">
                                                             <div class="shopping-cart">
                                                                 <a t-attf-href="/shop/product/#{ slug(product) }">
-                                                                    <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡LO QUIERO!</h5>
+                                                                    <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡COMPRAR AHORA!</h5>
                                                                 </a>
                                                             </div>
                                                         </div>
@@ -757,7 +757,7 @@
                                                         <div class="view">
                                                             <div class="shopping-cart">
                                                                 <a t-attf-href="/shop/product/#{ slug(product) }">
-                                                                    <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡LO QUIERO!</h5>
+                                                                    <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡COMPRAR AHORA!</h5>
                                                                 </a>
                                                             </div>
                                                         </div>
@@ -801,7 +801,7 @@
                                                         <div class="view">
                                                             <div class="shopping-cart">
                                                                 <a t-attf-href="/shop/product/#{ slug(product) }">
-                                                                    <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡LO QUIERO!</h5>
+                                                                    <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡COMPRAR AHORA!</h5>
                                                                 </a>
                                                             </div>
                                                         </div>
@@ -845,7 +845,7 @@
                                                         <div class="view">
                                                             <div class="shopping-cart">
                                                                 <a t-attf-href="/shop/product/#{ slug(product) }">
-                                                                    <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡LO QUIERO!</h5>
+                                                                    <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡COMPRAR AHORA!</h5>
                                                                 </a>
                                                             </div>
                                                         </div>
@@ -889,7 +889,7 @@
                                                         <div class="view">
                                                             <div class="shopping-cart">
                                                                 <a t-attf-href="/shop/product/#{ slug(product) }">
-                                                                    <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡LO QUIERO!</h5>
+                                                                    <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡COMPRAR AHORA!</h5>
                                                                 </a>
                                                             </div>
                                                         </div>
@@ -936,7 +936,7 @@
                                                         <div class="view">
                                                             <div class="shopping-cart">
                                                                 <a t-attf-href="/shop/product/#{ slug(product) }">
-                                                                    <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡LO QUIERO!</h5>
+                                                                    <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡COMPRAR AHORA!</h5>
                                                                 </a>
                                                             </div>
                                                         </div>
@@ -980,7 +980,7 @@
                                                         <div class="view">
                                                             <div class="shopping-cart">
                                                                 <a t-attf-href="/shop/product/#{ slug(product) }">
-                                                                    <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡LO QUIERO!</h5>
+                                                                    <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡COMPRAR AHORA!</h5>
                                                                 </a>
                                                             </div>
                                                         </div>
@@ -1024,7 +1024,7 @@
                                                         <div class="view">
                                                             <div class="shopping-cart">
                                                                 <a t-attf-href="/shop/product/#{ slug(product) }">
-                                                                    <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡LO QUIERO!</h5>
+                                                                    <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡COMPRAR AHORA!</h5>
                                                                 </a>
                                                             </div>
                                                         </div>
@@ -1068,7 +1068,7 @@
                                                         <div class="view">
                                                             <div class="shopping-cart">
                                                                 <a t-attf-href="/shop/product/#{ slug(product) }">
-                                                                    <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡LO QUIERO!</h5>
+                                                                    <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡COMPRAR AHORA!</h5>
                                                                 </a>
                                                             </div>
                                                         </div>
@@ -1112,7 +1112,7 @@
                                                         <div class="view">
                                                             <div class="shopping-cart">
                                                                 <a t-attf-href="/shop/product/#{ slug(product) }">
-                                                                    <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡LO QUIERO!</h5>
+                                                                    <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡COMPRAR AHORA!</h5>
                                                                 </a>
                                                             </div>
                                                         </div>

+ 14 - 14
views/theme.xml

@@ -56,7 +56,7 @@
                                         <t t-esc="line.product_id.name"/>
                                     </a>
                                 </p>
-                                <p>
+                                <p >
                                     <span class="king_pro_cart_quantity" t-esc="int(line.product_uom_qty)"/> x 
                                     <span t-field="line.price_unit" t-field-options='{"widget": "monetary", "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"}'/>
                                     <span class="price">
@@ -70,7 +70,7 @@
                         <p class="">
                             <div class="row" id="order_total">
                                   <span class="col-xs-6 text-right h4">Subtotal :</span>
-                                  <span class="col-xs-6 text-left h4" style="white-space: nowrap;">
+                                  <span class="col-xs-6 text-left h4" style="white-space: nowrap;" >
                                       <span t-field="website.sale_get_order().amount_total" style="white-space: nowrap;" t-field-options='{
                                               "widget": "monetary",
                                               "from_currency": "website.sale_get_order().pricelist_id.currency_id",
@@ -636,18 +636,18 @@
         <xpath expr="//div[@itemprop='description']" position="attributes">
             <attribute name="style">display:none;</attribute>
         </xpath>
-        <xpath expr="//div[@itemprop='description']" position="before">
+        <xpath expr="//div[@itemprop='description']" position="after">
             <div class="container" id="website_description">
                 <div class="pd-more-info">
                     <!-- Nav tabs -->
                     <ul id="description_reviews_tabs" class="nav nav-tabs" role="tablist">
-                        <li role="presentation" class="active">
+                        <li role="presentation" >
                             <a href="#description" aria-controls="more_info" role="tab" data-toggle="tab">Descripción</a>
                         </li>
                     </ul>
 
                     <div id="description_reviews_tabs_contents" class="tab-content">
-                        <div role="tabpanel" class="tab-pane active" id="description">
+                        <div role="tabpanel" class="tab-pane" id="description">
                             <div itemprop="description" t-field="product.website_description" class="oe_structure mt16" id="product_full_description"/>
                             <div class="oe_structure"/>
                         </div>
@@ -691,14 +691,14 @@
     <!-- Discussion inherited to display in tabs -->
     <template id="website_sale.product_comment" inherit_id="kingfisher_pro.kingfisher_pro_product_details" active="True" customize_show="True" name="Discussion">
         <!-- Will add review tab -->
-        <xpath expr="//div[@id='website_description']/div/ul/li" position="after">
-            <li role="presentation">
+        <xpath expr="//div[@id='website_description']/div/ul/li" position="before">
+            <li role="presentation" class="active">
                 <a href="#reviews" aria-controls="reviews" role="tab" data-toggle="tab">Evaluaciones <t t-if="len(product.website_message_ids)" ><span class="review_label">(<t t-esc="len(product.website_message_ids)"/>)</span></t></a>
             </li>
         </xpath>
         <!-- Will add review tab contents -->
-        <xpath expr="//div[@id='website_description']//div[@id='description']" position="after">
-            <div role="tabpanel" class="tab-pane" id="reviews">
+        <xpath expr="//div[@id='website_description']//div[@id='description']" position="before">
+            <div role="tabpanel" class="tab-pane active" id="reviews">
                 <section class="container">
                     <div class="row col-md-10 col-md-offset-1">
                         <div class="text-muted">
@@ -775,7 +775,7 @@
                                 <div class="view">
                                     <div class="shopping-cart">
                                         <a t-attf-href="/shop/product/#{ slug(product) }">
-                                            <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡LO QUIERO!</h5>
+                                            <!-- <img src="/kingfisher_pro/static/src/img/cart2.png" alt="Shopping-cart" title="Shopping Cart" /> --><h5 style="color:#ffffff;">¡COMPRAR AHORA!</h5>
                                         </a>
                                     </div>
                                 </div>
@@ -787,7 +787,7 @@
                                     </a>
                                 </p>
                                 <p class="price">
-                                    <span class="price">
+                                    <span class="price" t-esc="str('{p:0,.0f}'.format(p=product.price).replace(',','.'))">
                                         <span t-field="product.lst_price"
                                               t-field-options='{
                                                  "widget": "monetary",
@@ -818,7 +818,7 @@
                             <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">
+                            <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.')" >
                                 <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>
@@ -1027,12 +1027,12 @@
                         <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">
-                                <!--<img alt="Shopping-cart" src="/kingfisher_pro/static/src/img/cart2.png" title="Shopping Cart"/>--><h5 style="color:#ffffff;">¡LO QUIERO!</h5>
+                                <!--<img alt="Shopping-cart" src="/kingfisher_pro/static/src/img/cart2.png" title="Shopping Cart"/>--><h5 style="color:#ffffff;">¡COMPRAR AHORA!</h5>
                             </a>
                         </t>
                         <t t-if="len(product.product_variant_ids) &gt; 1">
                             <a t-att-href="keep('/shop/product/%s' % slug(product), page=(pager['page']['num'] if pager['page']['num']&gt;1 else None))">
-                                <!-- <img alt="Shopping-cart" src="/kingfisher_pro/static/src/img/cart2.png" title="Shopping Cart"/> --><h5 style="color:#ffffff;">¡LO QUIERO!</h5>
+                                <!-- <img alt="Shopping-cart" src="/kingfisher_pro/static/src/img/cart2.png" title="Shopping Cart"/> --><h5 style="color:#ffffff;">¡COMPRAR AHORA!</h5>
                             </a>
                         </t>
                     </div>