Author: mrisaliti
Date: Sat Oct 24 19:01:07 2009
New Revision: 829433
URL:
http://svn.apache.org/viewvc?rev=829433&view=revLog:
Best Selling Products does not support product name internationalization (OFBIZ-3081)
Added:
ofbiz/trunk/applications/product/webapp/catalog/product/ProductForms.xml (with props)
Modified:
ofbiz/trunk/applications/product/config/ProductUiLabels.xml
ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/BestProducts.groovy
Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.xml?rev=829433&r1=829432&r2=829433&view=diff==============================================================================
--- ofbiz/trunk/applications/product/config/ProductUiLabels.xml (original)
+++ ofbiz/trunk/applications/product/config/ProductUiLabels.xml Sat Oct 24 19:01:07 2009
@@ -7930,7 +7930,7 @@
</property>
<property key="ProductBestSellingProductsOf">
<value xml:lang="en">Best Selling Products of</value>
- <value xml:lang="it">Miglior prodotti venduti il</value>
+ <value xml:lang="it">Migliori prodotti venduti il</value>
</property>
<property key="ProductBillingWeightUom">
<value xml:lang="de">Verrechnung Gewicht Einheit</value>
Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/BestProducts.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/BestProducts.groovy?rev=829433&r1=829432&r2=829433&view=diff==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/BestProducts.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/BestProducts.groovy Sat Oct 24 19:01:07 2009
@@ -20,7 +20,8 @@
import org.ofbiz.base.util.UtilDateTime;
import org.ofbiz.entity.condition.EntityCondition;
import org.ofbiz.entity.condition.EntityOperator;
-
+import org.ofbiz.product.product.ProductContentWrapper;
+
bestSellingProducts = [];
exprList = [];
exprList.add(EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, UtilDateTime.getDayStart(filterDate)));
@@ -57,6 +58,9 @@
if (inListFlag == false) {
orderItemDetail.productId = orderItem.productId;
+ product = delegator.findOne("Product", [productId : orderItem.productId], false);
+ contentWrapper = new ProductContentWrapper(product, request);
+ orderItemDetail.productName = contentWrapper.get("PRODUCT_NAME");
orderItemDetail.amount = amount;
orderItemDetail.qtyOrdered = qtyOrdered;
bestSellingProducts.add(orderItemDetail);