Author: hansbak
Date: Tue Jul 24 09:00:06 2012
New Revision: 1364942
URL:
http://svn.apache.org/viewvc?rev=1364942&view=revLog:
make the websiteId available in the tellafriend.ftl
Modified:
ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductEvents.java
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/tellafriend.ftl
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductEvents.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductEvents.java?rev=1364942&r1=1364941&r2=1364942&view=diff==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductEvents.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductEvents.java Tue Jul 24 09:00:06 2012
@@ -57,6 +57,7 @@ import org.ofbiz.product.store.ProductSt
import org.ofbiz.security.Security;
import org.ofbiz.service.GenericServiceException;
import org.ofbiz.service.LocalDispatcher;
+import org.ofbiz.webapp.website.WebSiteWorker;
/**
* Product Information Related Events
@@ -1018,6 +1019,10 @@ public class ProductEvents {
}
Map<String, Object> paramMap = UtilHttp.getParameterMap(request);
+ String websiteId = (String) paramMap.get("websiteId");
+ if (UtilValidate.isEmpty(websiteId)) {
+ websiteId = WebSiteWorker.getWebSiteId(request);
+ }
paramMap.put("locale", UtilHttp.getLocale(request));
paramMap.put("userLogin", session.getAttribute("userLogin"));
@@ -1030,6 +1035,7 @@ public class ProductEvents {
context.put("sendCc", productStoreEmail.get("ccAddress"));
context.put("sendBcc", productStoreEmail.get("bccAddress"));
context.put("subject", productStoreEmail.getString("subject"));
+ context.put("webSiteId", websiteId);
try {
dispatcher.runAsync("sendMailFromScreen", context);
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/tellafriend.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/tellafriend.ftl?rev=1364942&r1=1364941&r2=1364942&view=diff==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/tellafriend.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/tellafriend.ftl Tue Jul 24 09:00:06 2012
@@ -28,6 +28,7 @@ under the License.
<#else>
<#assign cancel = "Y">
</#if>
+ <input type="hidden" name="webSiteId" value="${context.webSiteId?if_exists}">
<#if !cancel?exists>
<table>
<tr>