Author: hansbak
Date: Fri Jul 3 06:28:16 2009
New Revision: 790801
URL: http://svn.apache.org/viewvc?rev=790801&view=rev
Log:
Thanks to Scott we now use the indicator of the productstore to show/hide the
giftwrap options anywhere
Modified:
ofbiz/trunk/applications/order/config/order.properties
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutReview.groovy
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/OptionSettings.groovy
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/ShowCart.groovy
ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl
ofbiz/trunk/applications/order/webapp/ordermgr/entry/optionsettings.ftl
ofbiz/trunk/applications/order/webapp/ordermgr/entry/order/orderheaderinfo.ftl
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/cart/ShowCart.groovy
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/cart/showcart.ftl
Modified: ofbiz/trunk/applications/order/config/order.properties
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/config/order.properties?rev=790801&r1=790800&r2=790801&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/config/order.properties (original)
+++ ofbiz/trunk/applications/order/config/order.properties Fri Jul 3 06:28:16
2009
@@ -19,6 +19,3 @@
# Days Till Cancel Replacement Order
daysTillCancelReplacementOrder=30
-
-# Gift setting
-#orderPreference.giftEnable=N
Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutReview.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutReview.groovy?rev=790801&r1=790800&r2=790801&view=diff
==============================================================================
---
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutReview.groovy
(original)
+++
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutReview.groovy
Fri Jul 3 06:28:16 2009
@@ -32,6 +32,7 @@
cart = ShoppingCartEvents.getCartObject(request);
context.cart = cart;
context.currencyUomId = cart.getCurrency();
+context.productStore = ProductStoreWorker.getProductStore(request);
// nuke the event messages
request.removeAttribute("_EVENT_MESSAGE_");
Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/OptionSettings.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/OptionSettings.groovy?rev=790801&r1=790800&r2=790801&view=diff
==============================================================================
---
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/OptionSettings.groovy
(original)
+++
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/OptionSettings.groovy
Fri Jul 3 06:28:16 2009
@@ -26,8 +26,9 @@
cart = session.getAttribute("shoppingCart");
context.cart = cart;
-productStoreId = ProductStoreWorker.getProductStoreId(request);
-
+productStore = ProductStoreWorker.getProductStore(request);
+productStoreId = productStore.productStoreId;
+context.productStore = productStore;
// nuke the event messages
request.removeAttribute("_EVENT_MESSAGE_");
Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/ShowCart.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/ShowCart.groovy?rev=790801&r1=790800&r2=790801&view=diff
==============================================================================
---
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/ShowCart.groovy
(original)
+++
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/ShowCart.groovy
Fri Jul 3 06:28:16 2009
@@ -88,6 +88,7 @@
// get product inventory summary for each shopping cart item
productStore = delegator.findByPrimaryKeyCache("ProductStore", [productStoreId
: productStoreId]);
+context.productStore = productStore
productStoreFacilityId = null;
if (productStore) {
productStoreFacilityId = productStore.inventoryFacilityId;
Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl?rev=790801&r1=790800&r2=790801&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl
(original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl
Fri Jul 3 06:28:16 2009
@@ -39,7 +39,7 @@
<td colspan="2">
<div>
<b>${uiLabelMap.ProductProduct}</b>
- <#if giftEnable != "N">
+ <#if productStore.showCheckoutGiftOptions?if_exists != "N">
<select name="GWALL" onchange="javascript:gwAll(this);">
<option
value="">${uiLabelMap.OrderGiftWrapAllItems}</option>
<option value="NO^">${uiLabelMap.OrderNoGiftWrap}</option>
Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/entry/optionsettings.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/optionsettings.ftl?rev=790801&r1=790800&r2=790801&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/entry/optionsettings.ftl
(original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/optionsettings.ftl Fri
Jul 3 06:28:16 2009
@@ -127,7 +127,7 @@
<textarea cols="30" rows="3"
name="${shipGroupIndex?default("0")}_shipping_instructions">${cart.getShippingInstructions(shipGroupIndex)?if_exists}</textarea>
</td>
</tr>
- <#if giftEnable != "N">
+ <#if productStore.showCheckoutGiftOptions?if_exists != "N">
<tr>
<td colspan="2">
<#if cart.getOrderType() = "PURCHASE_ORDER">
Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/entry/order/orderheaderinfo.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/order/orderheaderinfo.ftl?rev=790801&r1=790800&r2=790801&view=diff
==============================================================================
---
ofbiz/trunk/applications/order/webapp/ordermgr/entry/order/orderheaderinfo.ftl
(original)
+++
ofbiz/trunk/applications/order/webapp/ordermgr/entry/order/orderheaderinfo.ftl
Fri Jul 3 06:28:16 2009
@@ -132,7 +132,7 @@
</tr>
</#if>
<tr><td colspan="7"><hr/></td></tr>
- <#if orderType != "PURCHASE_ORDER" && giftEnable != "N">
+ <#if orderType != "PURCHASE_ORDER" &&
productStore.showCheckoutGiftOptions?if_exists != "N">
<#-- gift settings -->
<tr>
<td align="right" valign="top" width="15%">
Modified:
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/cart/ShowCart.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/cart/ShowCart.groovy?rev=790801&r1=790800&r2=790801&view=diff
==============================================================================
---
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/cart/ShowCart.groovy
(original)
+++
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/cart/ShowCart.groovy
Fri Jul 3 06:28:16 2009
@@ -28,6 +28,8 @@
context.shoppingCartSize = shoppingCart?.size() ?: 0;
context.shoppingCart = shoppingCart;
+context.productStore = ProductStoreWorker.getProductStore(request);
+
if (parameters.add_product_id) { // check if a parameter is passed
add_product_id = parameters.add_product_id;
product = delegator.findByPrimaryKeyCache("Product", [productId :
add_product_id]);
Modified:
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/cart/showcart.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/cart/showcart.ftl?rev=790801&r1=790800&r2=790801&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/cart/showcart.ftl
(original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/cart/showcart.ftl Fri
Jul 3 06:28:16 2009
@@ -163,7 +163,7 @@
<tr>
<th></th>
<th scope="row">${uiLabelMap.OrderProduct}</th>
- <#if asslGiftWraps?has_content && giftEnable != "Y">
+ <#if asslGiftWraps?has_content &&
productStore.showCheckoutGiftOptions?if_exists != "N">>
<th scope="row">
<select class="selectBox" name="GWALL"
onchange="javascript:gwAll(this);">
<option
value="">${uiLabelMap.EcommerceGiftWrapAllItems}</option>