|
@@ -1,5 +1,5 @@
|
|
|
# -*- coding: utf-8 -*-
|
|
|
-# Part of AppJetty. See LICENSE file for full copyright and licensing details.
|
|
|
+# Part of Biztech Consultancy. See LICENSE file for full copyright and licensing details.
|
|
|
|
|
|
import re
|
|
|
from openerp import http
|
|
@@ -160,7 +160,6 @@ class KingfisherProBrandSlider(website_sale):
|
|
|
page=page, category=category, brand=brand, search=search, **post)
|
|
|
sort_order = ""
|
|
|
cat_id = []
|
|
|
-
|
|
|
page_obj = pool.get('product.per.page.no')
|
|
|
page_id = page_obj.search(
|
|
|
cr, uid, [('set_default_check', '=', True)], context=context)
|
|
@@ -169,7 +168,6 @@ class KingfisherProBrandSlider(website_sale):
|
|
|
ppg = page_no.name
|
|
|
else:
|
|
|
ppg = main_shop.PPG
|
|
|
-
|
|
|
product = []
|
|
|
newproduct = []
|
|
|
|
|
@@ -284,6 +282,8 @@ class KingfisherProBrandSlider(website_sale):
|
|
|
('list_price', '<=', request.session.get('max1'))]
|
|
|
request.session["pricerange"] = str(
|
|
|
request.session['min1'])+"-To-"+str(request.session['max1'])
|
|
|
+ newproduct = product
|
|
|
+ domain += [('id', 'in', newproduct)]
|
|
|
|
|
|
if session.get('min1') and session['min1']:
|
|
|
result.qcontext['min1'] = session["min1"]
|
|
@@ -316,7 +316,6 @@ class KingfisherProBrandSlider(website_sale):
|
|
|
result.qcontext.update({'keep': keep})
|
|
|
result.qcontext.update({'search': search})
|
|
|
result.qcontext.update({'bins': table_compute().process(products)})
|
|
|
-
|
|
|
result.qcontext['brand'] = brand
|
|
|
result.qcontext['brand_obj'] = request.env['product.brands'].search([('id', '=', brand)])
|
|
|
|
|
@@ -328,7 +327,7 @@ class KingfisherProBrandSlider(website_sale):
|
|
|
product_id=product_id, line_id=line_id, add_qty=add_qty, set_qty=set_qty, display=display)
|
|
|
result.update({'kingfisher_pro.hover_total': request.website._render("kingfisher_pro.hover_total", {
|
|
|
'website_sale_order': request.website.sale_get_order()
|
|
|
- })
|
|
|
+ })
|
|
|
})
|
|
|
return result
|
|
|
|
|
@@ -370,7 +369,8 @@ class KingfisherProBrandSlider(website_sale):
|
|
|
request.session[remove] = ''
|
|
|
return True
|
|
|
|
|
|
- @http.route(['/shop/cart/update'], type='http', auth="public", methods=['POST'], website=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))
|