Skip to content

Commit

Permalink
reverting 1295029 on request from jacopo
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1297007 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
hansbak committed Mar 5, 2012
1 parent d8d2c4a commit 22f11d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ public void close() throws IOException {
String productCategoryId = getStringArg(args, "productCategoryId");
String productId = getStringArg(args, "productId");
String url = "";
String CONTROL_MOUNT_POINT = "control";

Object prefix = env.getVariable("urlPrefix");
String viewSize = getStringArg(args, "viewSize");
Expand All @@ -128,19 +127,14 @@ public void close() throws IOException {
Delegator delegator = FreeMarkerWorker.getWrappedObject("delegator", env);
LocalDispatcher dispatcher = FreeMarkerWorker.getWrappedObject("dispatcher", env);
Locale locale = (Locale) args.get("locale");
String prefixUrl = prefix.toString();
// remove control path from the prefix URL
if(prefixUrl.contains(CONTROL_MOUNT_POINT)){
prefixUrl = prefixUrl.replaceAll("/"+CONTROL_MOUNT_POINT, "");
}
if (UtilValidate.isNotEmpty(productId)) {
GenericValue product = delegator.findOne("Product", UtilMisc.toMap("productId", productId), false);
ProductContentWrapper wrapper = new ProductContentWrapper(dispatcher, product, locale, "text/html");
url = CatalogUrlFilter.makeProductUrl(delegator, wrapper, null, prefixUrl, previousCategoryId, productCategoryId, productId);
url = CatalogUrlFilter.makeProductUrl(delegator, wrapper, null, ((StringModel) prefix).getAsString(), previousCategoryId, productCategoryId, productId);
} else {
GenericValue productCategory = delegator.findOne("ProductCategory", UtilMisc.toMap("productCategoryId", productCategoryId), false);
CategoryContentWrapper wrapper = new CategoryContentWrapper(dispatcher, productCategory, locale, "text/html");
url = CatalogUrlFilter.makeCategoryUrl(delegator, wrapper, null, prefixUrl, previousCategoryId, productCategoryId, productId, viewSize, viewIndex, viewSort, searchString);
url = CatalogUrlFilter.makeCategoryUrl(delegator, wrapper, null, ((StringModel) prefix).getAsString(), previousCategoryId, productCategoryId, productId, viewSize, viewIndex, viewSort, searchString);
}
out.write(url.toString());
} else {
Expand Down
4 changes: 2 additions & 2 deletions specialpurpose/ecommerce/widget/EmailOrderScreens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ under the License.
<property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
<set field="title" value="${uiLabelMap.PageTitleOrderConfirmationNotice}"/>
<set field="baseEcommerceSecureUrl" value="${baseSecureUrl}/ecommerce/control"/>
<set field="baseEcommerceSecureUrl" value="${baseSecureUrl}/ecommerce"/>
<set field="allowAnonymousView" value="Y"/> <!-- this field will instruction OrderStatus.groovy to allow an anonymous order to be viewed by anybody, so the email confirmation screen will work -->
<script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/OrderStatus.groovy"/>
</actions>
Expand All @@ -105,7 +105,7 @@ under the License.
<property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true"/>
<set field="title" value="${uiLabelMap.PageTitleOrderCompleteNotice}"/>
<set field="baseEcommerceSecureUrl" value="${baseSecureUrl}/ecommerce/control"/>
<set field="baseEcommerceSecureUrl" value="${baseSecureUrl}/ecommerce/control/"/>
<script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/OrderStatus.groovy"/>
</actions>
<widgets>
Expand Down

0 comments on commit 22f11d3

Please sign in to comment.