svn commit: r1297007 - in /ofbiz/trunk: applications/product/src/org/ofbiz/product/category/OfbizCatalogAltUrlTransform.java specialpurpose/ecommerce/widget/EmailOrderScreens.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1297007 - in /ofbiz/trunk: applications/product/src/org/ofbiz/product/category/OfbizCatalogAltUrlTransform.java specialpurpose/ecommerce/widget/EmailOrderScreens.xml

hansbak-2
Author: hansbak
Date: Mon Mar  5 11:16:35 2012
New Revision: 1297007

URL: http://svn.apache.org/viewvc?rev=1297007&view=rev
Log:
reverting 1295029 on request from jacopo

Modified:
    ofbiz/trunk/applications/product/src/org/ofbiz/product/category/OfbizCatalogAltUrlTransform.java
    ofbiz/trunk/specialpurpose/ecommerce/widget/EmailOrderScreens.xml

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/category/OfbizCatalogAltUrlTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/OfbizCatalogAltUrlTransform.java?rev=1297007&r1=1297006&r2=1297007&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/category/OfbizCatalogAltUrlTransform.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/category/OfbizCatalogAltUrlTransform.java Mon Mar  5 11:16:35 2012
@@ -102,7 +102,6 @@ public class OfbizCatalogAltUrlTransform
                     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");
@@ -128,19 +127,14 @@ public class OfbizCatalogAltUrlTransform
                         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 {

Modified: ofbiz/trunk/specialpurpose/ecommerce/widget/EmailOrderScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/widget/EmailOrderScreens.xml?rev=1297007&r1=1297006&r2=1297007&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/widget/EmailOrderScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/widget/EmailOrderScreens.xml Mon Mar  5 11:16:35 2012
@@ -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>
@@ -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>