[IMP] website_sale : improve suggested products frontend

- "Suggested alternatives" is renamed  by "Suggested Products"
- "Suggested products"  is renamed  by "Suggested Accessories"
- Display all Accessory Products rather than the first 3 ones
This commit is contained in:
Srushti Patel
2016-08-11 14:56:47 +02:00
committed by David Monjoie
parent d60b85bd22
commit ac7331c71a
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -121,7 +121,7 @@ class SaleOrder(models.Model):
for order in self:
accessory_products = order.website_order_line.mapped('product_id.accessory_product_ids').filtered(lambda product: product.website_published)
accessory_products -= order.website_order_line.mapped('product_id')
return random.sample(accessory_products, min(len(accessory_products), 3))
return random.sample(accessory_products, len(accessory_products))
class Website(models.Model):
+2 -2
View File
@@ -415,7 +415,7 @@
<template id="recommended_products" inherit_id="website_sale.product" customize_show="True" name="Suggested Products">
<xpath expr="//div[@id='product_full_description']" position="after">
<div class="container mt32" t-if="product.alternative_product_ids">
<h3>Suggested alternatives:</h3>
<h3>Suggested Products:</h3>
<div class="row mt16" style="">
<t t-foreach="product.alternative_product_ids" t-as="alt_product">
<div class="col-md-2 thumbnail" style="width: 170px; height:130px; float:left; display:inline; margin-right: 10px; overflow:hidden;">
@@ -878,7 +878,7 @@
</colgroup>
<thead>
<tr>
<th colspan="4">Suggested products:</th>
<th colspan="4">Suggested Accessories:</th>
</tr>
</thead>
<tbody>