Commit Graph
26 Commits
Author SHA1 Message Date
Nicolas Malin a3c1177bc8 Improved: Migrate product promotion condition and action rule on SOA
(OFBIZ-10370)

Currently promotion rule engine works with :
    entities ProductPromoCond et ProductPromoAction
    java linear function ProductPromoWorker.checkCondition() (ProductPromoWorker:910) and ProductPromoWorker.performAction (ProductPromoWorker:1423)
    Enumeration list to indicate on java function what piece of code to activate the control or action

The problem with this structure is when you want to create a new case of condition or action, you need to modify the framework code base.

We convert the 2 big java leaner function to service representation with one service by case. To realize it we introduce a relation with CustomMethod :
  ProductPromoRule --> ProductPromoCond   -> CustomMethod
                    -> ProductPromoAction -> CustomMethod
Each functions's case are converted to service with a related CustomMethod.
With this pattern now you can write your own condition rule and action rule on your plugin and link it on the promo engine

For backward compatibility purpose, current "PPIP" enumeration entries receive in enumCode data the new corresponding customMethodId reference, to ensure that old data works fine with the new engine
on EntityData
 <CustomMethod customMethodId="PPC_PRODUCT_AMOUNT" customMethodTypeId="PRODUCT_PROMO_COND" customMethodName="productPromoCondProductAmount" description="Product amount"/>
 <Enumeration enumId="PPIP_PRODUCT_AMOUNT" enumCode="PPC_PRODUCT_AMOUNT"/><!--link enumeration with customMethod for backward compatibility-->
on Java
 //for backward compatibility resolve customMethodId from enumCode
 GenericValue condEnum = EntityQuery.use(delegator).from("Enumeration").where("enumId", inputParamEnumId).cache().queryOne();
 if (condEnum != null) {
     customMethod = EntityQuery.use(delegator).from("CustomMethod").where("customMethodId", condEnum.get("enumCode")).cache().queryOne();
     if (customMethod == null) {
         Debug.logWarning("The oldest enumeration " + inputParamEnumId + " for promo " + productPromoCond.getPkShortValueString() + " haven't the new customMethod to use, please check your data or load seed data", module);
         return false;
     }
     serviceName = customMethod.getString("customMethodName");
 }

Many thanks to Ziri Khalifa and Leila Mekika for their helping work

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1831783 13f79535-47bb-0310-9956-ffa450edef68
2018-05-17 14:03:46 +00:00
Arun Patidar 918d9fa451 Implemented: Added CRUD services for ApplicationSandbox, CartAbandonedLine, PaymentGatewayConfig, PaymentGatewaySagePay, PaymentGatewayAuthorizeNet and PaymentGatewayClearCommerce entities.
(OFBIZ-8970) (OFBIZ-8993)(OFBIZ-9081)(OFBIZ-9082)(OFBIZ-9087)(OFBIZ-9091)

Thanks: Amit Gadaley, Rohit Koushal and Rishi Solanki for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1768266 13f79535-47bb-0310-9956-ffa450edef68
2016-11-05 18:24:21 +00:00
Deepak Dixit 834691742b (OFBIZ-6274) Renamed OFBiz artefacts from org.ofbiz.* to org.apache.ofbiz.*.Thanks to Taher for working on it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1752920 13f79535-47bb-0310-9956-ffa450edef68
2016-07-16 10:30:49 +00:00
Deepak Dixit 04772389fb (OFBIZ-4954) Applied patch from jira issue OFBIZ-4954
============================================================
Order item quantity cancel issue.

If user partially received an order and then cancel order item, system cancel all the order item quantity.System does not check for shipped/received order item quantity.
Expected behavior: Only remaining order item quantity should be cancelled and order item should marked as complete with partial received/shipped quantity.
============================================================


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1721093 13f79535-47bb-0310-9956-ffa450edef68
2015-12-21 05:38:43 +00:00
Andrew Zeneski 88817e1192 added order party Id override when loading cart from a shopping list
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1038278 13f79535-47bb-0310-9956-ffa450edef68
2010-11-23 18:58:42 +00:00
Adam Heath 53dd5cc4eb interfaceProductPromoAction.cartItemModifyException needs to be
optional.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@936099 13f79535-47bb-0310-9956-ffa450edef68
2010-04-20 22:46:05 +00:00
Adam Heath 14a87c21c6 Fix type of actionResultInfo on interfaceProductPromoAction.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@934613 13f79535-47bb-0310-9956-ffa450edef68
2010-04-15 22:01:56 +00:00
Adam Heath ab933d2be7 Add new features, the ability to have promo conditions and actions both
as services, so that installations can do whatever kind of checking and
promotions that they want, without any modifications to ofbiz.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@932108 13f79535-47bb-0310-9956-ffa450edef68
2010-04-08 20:47:56 +00:00
Adam Heath c5c0fe29ce Add a feature to loadCartFromOrder to allow it to include promo items
into the cart, as they are read from the database.  This is useful when
the cart will eventually be used in a read-only type fashion, as the
cart will look identical to what it was before the order was created.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@930324 13f79535-47bb-0310-9956-ffa450edef68
2010-04-02 16:49:41 +00:00
Jacques Le Roux b9c3ddef08 2d part and end of an effort to remove trailing spaces
[ \t]+$ => "" (empty)
Should be easier to review when committing changes with trailing spaces removed automatically by anyedit or such tool (please refer to http://docs.ofbiz.org/x/mg)

Of course this effort to remove trailing spaces has no functional implications.

Actually, I was doing a 1st commit and as it's long to upload, I got conflicts with r763135
In the meantime I did some refactoring also in *.java and *.groovy files :
){ => ) {
if( => if (
while( => while (
}else => } else
else{ => else {
switch( => switch (
try{ => try {
}catch => } catch
catch( => catch (
}finally{ => } finally {

So these changes are also in this commit, should not be a problem anyway.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@763175 13f79535-47bb-0310-9956-ffa450edef68
2009-04-08 10:54:51 +00:00
Jacques Le Roux 572b7683e0 All tabs to 4 spaces in *.groovy, *.java, *.xml : less problems in future with that aspect...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@737003 13f79535-47bb-0310-9956-ffa450edef68
2009-01-23 11:08:47 +00:00
David E. Jones 874f02e9da Manual merge of typecheckcleanup200810 branch as of rev 731346 in that branch, resolved all conflicts; with this BigDecimal is not the native type for many entity fields and is used for many calculations; some work is still needed in certain areas of the project but this covers the most critical ones; thanks especially to Scott for his work on this
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@731851 13f79535-47bb-0310-9956-ffa450edef68
2009-01-06 07:13:36 +00:00
Vikas Mayur b2a40a0be5 In shopping cart and summary, Discount is calculated as Sum of Order Adjustments. Patch from Brajesh Patel
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@676589 13f79535-47bb-0310-9956-ffa450edef68
2008-07-14 13:52:20 +00:00
Vikas Mayur 60beb82a67 Now Shopping Cart is working in One page Checkout.
Continued effort from Brajesh Patel, Sumit Pandit, Rishi Solanki and Santosh Malviya .....

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@673593 13f79535-47bb-0310-9956-ffa450edef68
2008-07-03 05:50:33 +00:00
Jacopo Cappellato ed67245ac0 Following discussion on the dev list, reverted commit done by Si Chen with rev. 646132: transactions ARE important for reading as well as writing, and should pretty much always be used.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@651193 13f79535-47bb-0310-9956-ffa450edef68
2008-04-24 08:13:52 +00:00
Si Chen ac1d8b5c73 turning off transactions for loading of cart from quote, since there does not seem to be any data being stored, and having a transaction consumes resources unnecessarily and could cause it to fail if there are many items on a quote
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@646132 13f79535-47bb-0310-9956-ffa450edef68
2008-04-08 23:21:14 +00:00
Anil Patel 01e6e01001 missed few files from previous commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@601255 13f79535-47bb-0310-9956-ffa450edef68
2007-12-05 08:49:11 +00:00
Timothy Ruppert 9e83eb06f1 Added service to get the cart-based index of the first cart item for a particular productId
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@567507 13f79535-47bb-0310-9956-ffa450edef68
2007-08-19 23:21:20 +00:00
Anil Patel 81d9782287 added currency formatted out values to getShoppingCartData. Lets thing to worry on client side.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@565935 13f79535-47bb-0310-9956-ffa450edef68
2007-08-14 21:53:59 +00:00
Anil Patel 99dc1dcde1 adding service to return shoppingCart data.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@565651 13f79535-47bb-0310-9956-ffa450edef68
2007-08-14 08:05:12 +00:00
David E. Jones 7d70c41c12 Did a big search/replace to change all xsd file refs from www.ofbiz.org to ofbiz.apache.org
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@539504 13f79535-47bb-0310-9956-ffa450edef68
2007-05-18 15:47:14 +00:00
Jacopo Cappellato f28e46cbe4 Fixed bug that was preventing the cancellation of an order item if the the ATP of the item was 0 or if the discontinuation date was passed.
Fixed by adding two optional parameters to the loadCartFromOrder (and to the ShoppingCart* methods as well) to skip the checks for inventory and discontinuation date while loading the cart in memory.
This should also help to fix OFBIZ-501.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@517183 13f79535-47bb-0310-9956-ffa450edef68
2007-03-12 11:38:10 +00:00
Jacques Le Roux dad67935f7 A (large) patch from Scott Gray "Update ASL header" (https://issues.apache.org/jira/browse/OFBIZ-637).
I put also some svn:ignore for shark build and lib diretories and assetmaint/build 

I did some by hand lately, too much to remember. They were files with old header but without copyright. A 1st attempt I suppose, will have to check this after this commit.

I add some problems to commit this patch in one piece because it's so huge (specially with Eclipse I had to turn to Tortoise) !

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@499486 13f79535-47bb-0310-9956-ffa450edef68
2007-01-24 17:15:54 +00:00
Jacopo Cappellato 33c0910c88 Added optional input parameter to the cart service that assigns items to ship groups to make optional the removal of empty groups.
git-svn-id: https://svn.apache.org/repos/asf/incubator/ofbiz/trunk@433199 13f79535-47bb-0310-9956-ffa450edef68
2006-08-21 08:51:11 +00:00
Jacopo Cappellato dc9c759053 License change from MIT to ASL2.0 for the files of the order component.
Thanks to Ashish Vijaywargiya for the patch (Apache OFBIZ-87).


git-svn-id: https://svn.apache.org/repos/asf/incubator/ofbiz/trunk@422819 13f79535-47bb-0310-9956-ffa450edef68
2006-07-17 19:47:26 +00:00
David E. Jones 94fe6d1cda Initial OFBiz import from revision 7923 of the old svn.ofbiz.org SVN repository.
git-svn-id: https://svn.apache.org/repos/asf/incubator/ofbiz/trunk@418498 13f79535-47bb-0310-9956-ffa450edef68
2006-07-01 19:05:20 +00:00