calculateProductPrice with RECURRING_PRICE

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

calculateProductPrice with RECURRING_PRICE

Eric DE MAULDE
Hi,

Into ShoppingCartItem.java on line 1198 :

// no try to do a recurring price calculation; not all products have recurring prices so may be null
Map recurringPriceContext = FastMap.newInstance();
recurringPriceContext.putAll(priceContext);
recurringPriceContext.put("productPricePurposeId", "RECURRING_CHARGE");
Map recurringPriceResult = dispatcher.runSync("calculateProductPrice", recurringPriceContext);

productPricePurposeId is replaced by "RECURRING_CHARGE"
So, if my product doesn't have a RECURRING_PRICE price, its calculated price is 0 or null

When I add a product into the cart, I have an error into TaxAuthorityServices because the price is null

2009-08-04 10:32:22,709 (http-0.0.0.0-8080-1) [TaxAuthorityServices.java:313:WARN ] In TaxAuthority Product Rate no records were found for condition:((productStoreId = '9000' OR productStoreId IS NULL) AND ((taxAuthPartyId = '_NA_' AND taxAuthGeoId = '_NA_') OR (taxAuthPartyId = '10011' AND taxAuthGeoId = 'FRA')) AND (productCategoryId IS NULL OR productCategoryId IN ('ch-AGATHE-40', 'search', 'view', 'purchase', 'tva', 'che')) AND (minItemPrice IS NULL OR minItemPrice <= '0') AND (minPurchase IS NULL OR minPurchase <= '0'))
2009-08-04 10:32:22,711 (http-0.0.0.0-8080-1) [TaxAuthorityServices.java:105:WARN ] Could not find any Tax Authories Rate Rules for store with ID [9000], productId [AGATHE-40-CHEVET], basePrice [0], amount [0], for tax calculation; the store settings may need to be corrected.

But this error doesn't appear on demo server : http://demo.ofbiz.org

 How can we modify the line : recurringPriceContext.put("productPricePurposeId", "RECURRING_CHARGE");

Thanks

Eric