I just committed some changes in the ProductPrice table and the way calculateProductPrice works (rev 5638). In the past we had an over-use of the productPriceTypeId and have come up with a need to use some of those other price types, but along with the price calculation and such. The solution is to introduce the concept of the ProductPricePurpose, so we have a new table for that and a new field on the ProductPrice entity for the productPricePurposeId. Previous calculated prices are now considered to have the PURCHASE purpose, and for the calculateProductPrice service if you don't pass in the purpose you want it defaults to PURCHASE. Some previous ProductPriceTypes are no longer used as such and are now ProductPricePurposes, namely RECURRING_CHARGE, USAGE_CHARGE, and COMPONENT_PRICE. The real driving force behind this change is a need to support price calculation for RECURRING_CHARGE and COMPONENT_PRICE, and other custom or future price purposes. NOTE: this did require a primary key change for the ProductPrice table, the calculateProductPrice service will still support a null productPricePurposeId so that after an upgrade the whole system won't be useless, but that table or the pk on that table should be rebuilt right away for this change. All ProductPrice seed data has been updated to support this change. DOUBLE NOTE: if you are using COMPONENT_PRICE type prices you'll need to change those prices (or create equivalent new ones) such that the productPricePurposeId=COMPONENT_PRICE and the productPriceTypeId=DEFAULT_PRICE. -David _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
ProductPrice of GZ-KIT and GZ-BASKET products have not been updated that
prevent loading of DemoProduct.xml file during run-install (svn 5562). Peter Le samedi 03 septembre 2005 à 13:28 +0100, David E. Jones a écrit : > I just committed some changes in the ProductPrice table and the way > calculateProductPrice works (rev 5638). > > In the past we had an over-use of the productPriceTypeId and have > come up with a need to use some of those other price types, but along > with the price calculation and such. The solution is to introduce the > concept of the ProductPricePurpose, so we have a new table for that > and a new field on the ProductPrice entity for the > productPricePurposeId. > > Previous calculated prices are now considered to have the PURCHASE > purpose, and for the calculateProductPrice service if you don't pass > in the purpose you want it defaults to PURCHASE. Some previous > ProductPriceTypes are no longer used as such and are now > ProductPricePurposes, namely RECURRING_CHARGE, USAGE_CHARGE, and > COMPONENT_PRICE. The real driving force behind this change is a need > to support price calculation for RECURRING_CHARGE and > COMPONENT_PRICE, and other custom or future price purposes. > > NOTE: this did require a primary key change for the ProductPrice > table, the calculateProductPrice service will still support a null > productPricePurposeId so that after an upgrade the whole system won't > be useless, but that table or the pk on that table should be rebuilt > right away for this change. All ProductPrice seed data has been > updated to support this change. > _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users demo-product-price.patch (2K) Download Attachment |
Thanks Peter, those are now updated in SVN. Looks like they were added after the ProductPricePurpose changes went in, but probably tested one a code base before that was done... I guess the old group development pattern for diff/merge based repositories needs some attention: 1. finish your changes, 2. update from the repository, 3. test your new changes, 4. commit -David On Sep 7, 2005, at 7:30 AM, Peter Goron wrote: > ProductPrice of GZ-KIT and GZ-BASKET products have not been updated > that > prevent loading of DemoProduct.xml file during run-install (svn 5562). > > Peter > > Le samedi 03 septembre 2005 à 13:28 +0100, David E. Jones a écrit : > >> I just committed some changes in the ProductPrice table and the way >> calculateProductPrice works (rev 5638). >> >> In the past we had an over-use of the productPriceTypeId and have >> come up with a need to use some of those other price types, but along >> with the price calculation and such. The solution is to introduce the >> concept of the ProductPricePurpose, so we have a new table for that >> and a new field on the ProductPrice entity for the >> productPricePurposeId. >> >> Previous calculated prices are now considered to have the PURCHASE >> purpose, and for the calculateProductPrice service if you don't pass >> in the purpose you want it defaults to PURCHASE. Some previous >> ProductPriceTypes are no longer used as such and are now >> ProductPricePurposes, namely RECURRING_CHARGE, USAGE_CHARGE, and >> COMPONENT_PRICE. The real driving force behind this change is a need >> to support price calculation for RECURRING_CHARGE and >> COMPONENT_PRICE, and other custom or future price purposes. >> >> NOTE: this did require a primary key change for the ProductPrice >> table, the calculateProductPrice service will still support a null >> productPricePurposeId so that after an upgrade the whole system won't >> be useless, but that table or the pk on that table should be rebuilt >> right away for this change. All ProductPrice seed data has been >> updated to support this change. >> >> > > > <demo-product-price.patch> > > _______________________________________________ > Users mailing list > [hidden email] > http://lists.ofbiz.org/mailman/listinfo/users _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
Free forum by Nabble | Edit this page |