Re: How to hide empty (no stock) products and empty (no stock) categories?
Well, I gave this some more thought. My first solution would be to run through each Product and check whether or not the quantityonhand is existent. So as for the productsummary screens, which are featured in the categories, I ran through the categorydetail.groovy page and added: [...] catResult = dispatcher.runSync(getProductCategoryAndLimitedMembers, andMap); //run through the products and sort out anything that isn't available productCategoryMembers = catResult.get(productCategoryMembers); for(int i = 0; iproductCategoryMembers.size(); i++){ quantity = dispatcher.runSync(getInventoryAvailableByFacility, [productId : productCategoryMembers[i].productId, facilityId : WebStoreWarehouse, useCache : true]).quantityOnHandTotal; //System.out.println(quantity); productCategoryMembers[i].put(quantity,quantity); } [...] I noticed that the quantity label is really not all that important (either that, or i didn't fully grasp the meaning ;) ), so I reused that mapping field to add the actual qualityathand to any GenericValue. I could then simply check within the ftl files whether or not quantity equals 0... But here's the thinker that really got to me: I personally don't think that this approach is either recommandable nor fast. This may work fine with a small quantity of products, but should really be a pain if that list increases... The categorylisting itself is actually a far bigger problem, since I would want to check for each category, whether or not any of their subcategories or the category itself has any products with a quantityathand != 0. So if I would do it in any way similar to the approach above, I would be stuck running through the categories, generating huge lists of products (this would have to be done on the fly also) and calling the above sequence over and over again - which again leads me to the conclusion, that anything like this approach is really dangerous with an increasing number of products... Of course there is a workaround using entitytables, that I could do. But it remains curious to me, that nobody ever wanted to achieve anything alike before me... Wouldn't you agree that it would be only userfriendly to add a check-mechanism to the categories, that removes the categories from the screen if no product is available? -- View this message in context: http://www.nabble.com/How-to-hide-empty-%28no-stock%29-products-and-empty-%28no-stock%29-categories--tp5758876p21701987.html Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: Can´t create order from quote
Hi Jacopo I have updated my ofbiz via svn but the problem still persists am I wrong in stating that the quote type ID you are referring to can either be ¨other; Product; Product Purchase; Proposal¨ if so this has been submitted with the quote but on creation of order it is removed and I am still presented with this error. regards Christopher Jacopo Cappellato-4 wrote: It seems that the Quote.quoteTypeId is null, that is causing a NPE exception. I have cleaned up the code in rev. 738050 (and this should prevent the exception from happening), but you may want to check why the type is empty in your record. Cheers, Jacopo On Jan 27, 2009, at 10:49 AM, ChristopherJ wrote: Hi all When a Quote is approved(accepted) and the create order link in the quote is selected I´m presented with the following error and can not continue with the order. 2009-01-27 11:48:16,228 (http-0.0.0.0-8443-5) [ ServiceDispatcher.java:500:ERROR] exception report -- Service [loadCartFromQuote] threw an unexpected exception/error Exception: org.ofbiz.service.GenericServiceException Message: Service [loadCartFromQuote] target threw an unexpected exception (null) cause - Exception: java.lang.NullPointerException Message: null stack trace --- java.lang.NullPointerException org .ofbiz .order .shoppingcart .ShoppingCartServices.loadCartFromQuote(ShoppingCartServices.java:555) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun .reflect .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun .reflect .DelegatingMethodAccessorImpl .invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org .ofbiz .service .engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:96) org .ofbiz .service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54) org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java: 384) org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java: 213) org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java: 149) org .ofbiz .order .shoppingcart .ShoppingCartEvents.loadCartFromQuote(ShoppingCartEvents.java:1253) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun .reflect .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun .reflect .DelegatingMethodAccessorImpl .invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java: 89) org.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java: 75) org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java: 461) org .ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java: 293) org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:204) javax.servlet.http.HttpServlet.service(HttpServlet.java:690) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org .apache .catalina .core .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 290) org .apache .catalina .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java: 259) org .apache .catalina .core .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 235) org .apache .catalina .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org .apache .catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 233) org .apache .catalina.core.StandardContextValve.invoke(StandardContextValve.java: 175) org .apache .catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) org .apache .catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) org .apache .catalina.core.StandardEngineValve.invoke(StandardEngineValve.java: 109) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java: 568) org .ofbiz .catalina .container .CrossSubdomainSessionValve.invoke(CrossSubdomainSessionValve.java:44) org .apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java: 286) org .apache.coyote.http11.Http11Processor.process(Http11Processor.java: 844) org.apache.coyote.http11.Http11Protocol $Http11ConnectionHandler.process(Http11Protocol.java:583) org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java: 447) java.lang.Thread.run(Thread.java:619) 2009-01-27 11:48:16,235 (http-0.0.0.0-8443-5) [ TransactionUtil.java:209:WARN ] [TransactionUtil.commit] Not committing transaction, status
What is the use of ProductFeatureIactn entity
Hello all, I was reviewing DemoProduct.xml of ecommerce. Can anybody tell me what is the use of ProductFeatureIactn entity. Thanks and Regards Amit Sharma
Re: What is the use of ProductFeatureIactn entity
Hello Amit, Generally ProductFeatureIactn entity provides the capability to store which features are incompatible with other features.And productFeatureIactnTypeId=FEATURE_IACTN_INCOMP shows that two features are incompatible.You can get more detail from page number 78 of data model book.You might be knowing this.May be you are asking some thing else related to this entity. Please let us know if this does not solve your problem. Regards Divesh. Hello all, I was reviewing DemoProduct.xml of ecommerce. Can anybody tell me what is the use of ProductFeatureIactn entity. Thanks and Regards Amit Sharma
Quote to order - manual adjustments amount not included in cart grand total
Hi, I am facing a problem while creating a order from a quote with a manual adjustment of shipping charges, the adjustment amount is not included in the cart grand total. Although manual adjustments are copied to order adjustment and added to cart adjustment (ShoppingCartService.java, lines 676-781), they are filtered out while calculating the maxAmount for OrderPaymentPreference when calling the cart.getOrderOtherAdjustmentTotal() method which in turns calls the OrderReadHelper.calcOrderAdjustments(List orderHeaderAdjustments, BigDecimal subTotal, boolean includeOther, boolean includeTax, boolean includeShipping). This method filters out the SHIPPING_CHARGES order adjustment as includeShipping parameter is always true. One way to solve the problem is to use the value of includeInShipping field from OrderAdjsutment entity in OrderHelper#filterOrderAdjustments(List adjustments, boolean includeOther, boolean includeTax, boolean includeShipping, boolean forTax, boolean forShipping) method and setting this to true in QuoteAdjustment entity. (quote adjustments are copied to order adjustment by loadCartFromQuote service). However, doing so wrongly shows the shipping charges twice in the Order view and also add the shipping charges to the total tax whereas the grand total remains correct. It would be great help if someone having better insight can look into it and suggest the best way of solving the problem. Thanks, Raj
Re: What is the use of ProductFeatureIactn entity
Thanks for reply divesh Yes ProductFeatureIactn entity provides the capability to store which features are incompatible with other features. and also it provide the dependency between the features if when we put productFeatureIactnTypeId=FEATURE_IACTN_DEPEND. But DemoProduct.xml has following record ProductFeatureIactn productFeatureId=9000 productFeatureIdTo=9002 productFeatureIactnTypeId=FEATURE_IACTN_INCOMP/ Means that feature 9000 (black) is incompatible with feature 9002 (3-Wheel). it means black feature is not able to create product with 3-Wheel feature in WG-9944 (virtual product) so that we can check it on ecommerce application but i m not getting the difference in product WG-9944 where both the features are applied. but Over here it is created product with this combination and also when we change the productFeatureIactnTypeId=FEATURE_IACTN_INCOMP to productFeatureIactnTypeId=FEATURE_IACTN_DEPEND so after this i am not getting the differences. please let me know am i thinking wrong and also how they are working. please correct me. Thanks and Regards Amit Sharma Divesh Dutta wrote: Hello Amit, Generally ProductFeatureIactn entity provides the capability to store which features are incompatible with other features.And productFeatureIactnTypeId=FEATURE_IACTN_INCOMP shows that two features are incompatible.You can get more detail from page number 78 of data model book.You might be knowing this.May be you are asking some thing else related to this entity. Please let us know if this does not solve your problem. Regards Divesh. Hello all, I was reviewing DemoProduct.xml of ecommerce. Can anybody tell me what is the use of ProductFeatureIactn entity. Thanks and Regards Amit Sharma
Re: How to hide empty (no stock) products and empty (no stock) categories?
Well, a tiny update on my side (just in case that anybody else is interested in a solution). I did get around with that problem by introducing view-entities: I added the following to a entitymodel.xml file of my own: !-- View Entities for Categories -- view-entity entity-name=ProductsAndInventory package-name=org.brandsparadise.products description Returns all Products and the coherent Inventory /description member-entity entity-alias=products entity-name=ProductAndCategoryMember / member-entity entity-alias=inv entity-name=InventoryItem / alias-all entity-alias=products group-by=true /alias-all alias entity-alias=inv name=quantityOnHandTotal function=sum/ alias entity-alias=inv name=availableToPromiseTotal function=sum/ view-link entity-alias=products rel-entity-alias=inv rel-optional=true key-map field-name=productId / /view-link relation type=one rel-entity-name=InventoryItem key-map field-name=productId/ /relation /view-entity !-- -- view-entity entity-name=CategoryAndInventory package-name=org.brandsparadise.products description Returns all Categories and the coherent Inventory of all products belonging to the category /description member-entity entity-alias=products entity-name=ProductsAndInventory / member-entity entity-alias=cat entity-name=ProductCategory / alias-all entity-alias=cat group-by=true /alias-all alias entity-alias=products name=quantityOnHandTotal function=sum/ alias entity-alias=products name=availableToPromiseTotal function=sum/ view-link entity-alias=cat rel-entity-alias=products rel-optional=true key-map field-name=productCategoryId / /view-link relation type=one rel-entity-name=ProductsAndInventory key-map field-name=productCategoryId/ /relation /view-entity This will give me two tables: one of all products with their available inventory and the other a list of all categories with all of their available products... this is good news, because I can now skip through these tables in the ftl file and simply remove any category or product that doesn't happen to have any products available... Of course, as always: feel free to give feedback! I am more than open for improvements, so ... uhh... cheers :) -- View this message in context: http://www.nabble.com/How-to-hide-empty-%28no-stock%29-products-and-empty-%28no-stock%29-categories--tp5758876p21706845.html Sent from the OFBiz - User mailing list archive at Nabble.com.
SFA Manager Application
I am running trunk 738606. Trying to Create New Account https://localhost:8443/sfa/control/NewAccounts In the Primary Phone Number section if you enter an extension it is ignored. I was able to verify that the ext was not actually saved by going to Party: tab and viewing the just created PartyGroup profile. https://localhost:8443/partymgr/control/viewprofile?partyId=1 and looking at the Primary Phone Number section in the Contact Information box. I actually stumbled across this issue while I was trying to use the createAccount service method from Java (/ofbiz/applications/marketing/script/org/ofbiz/sfa/account/AccountServices.xml#createAccount). I think a related issue may be that if I try to pass extensionCode on to the createAccount method I get the following exception [1], If I remove the parm from the passed map all seems to work ok. [1] 2009-01-28 13:32:32,567 (http-0.0.0.0-8443-3) [ ModelService.java:545:ERROR] [ModelService.validate] : {createAccount} : (IN) Required test error: org.ofbiz.service.ServiceValidationException: Unknown parameter found: [createAccount.extensionCode] 2009-01-28 13:32:32,583 (http-0.0.0.0-8443-3) [ ServiceDispatcher.java:368:ERROR] exception report -- Incoming context (in runSync : createAccount) does not match expected requirements Exception: org.ofbiz.service.ServiceValidationException Message: Unknown parameter found: [createAccount.extensionCode] stack trace --- org.ofbiz.service.ServiceValidationException: Unknown parameter found: [createAccount.extensionCode] org.ofbiz.service.ModelService.validate(ModelService.java:607) org.ofbiz.service.ModelService.validate(ModelService.java:543) org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:366) org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:213) org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:149) com.turtle.services.sfa.CustomerEvents.saveCustomer(CustomerEvents.java:91)
Re: Quote to order - manual adjustments amount not included in cart grand total
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 if you look at the resetGrandTotal https://demo.hotwaxmedia.com/webtools/control/ArtifactInfo?type=serviceuniqueId=resetGrandTotal there are a bunch of ECAS that might be useful Raj Saini sent the following on 1/28/2009 5:14 AM: Hi, I am facing a problem while creating a order from a quote with a manual adjustment of shipping charges, the adjustment amount is not included in the cart grand total. Although manual adjustments are copied to order adjustment and added to cart adjustment (ShoppingCartService.java, lines 676-781), they are filtered out while calculating the maxAmount for OrderPaymentPreference when calling the cart.getOrderOtherAdjustmentTotal() method which in turns calls the OrderReadHelper.calcOrderAdjustments(List orderHeaderAdjustments, BigDecimal subTotal, boolean includeOther, boolean includeTax, boolean includeShipping). This method filters out the SHIPPING_CHARGES order adjustment as includeShipping parameter is always true. One way to solve the problem is to use the value of includeInShipping field from OrderAdjsutment entity in OrderHelper#filterOrderAdjustments(List adjustments, boolean includeOther, boolean includeTax, boolean includeShipping, boolean forTax, boolean forShipping) method and setting this to true in QuoteAdjustment entity. (quote adjustments are copied to order adjustment by loadCartFromQuote service). However, doing so wrongly shows the shipping charges twice in the Order view and also add the shipping charges to the total tax whereas the grand total remains correct. It would be great help if someone having better insight can look into it and suggest the best way of solving the problem. Thanks, Raj -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJgMNbrP3NbaWWqE4RAtWJAKCkNYO0oDWbt45dJWt21Nxzy196FQCgn/dt +YHFrILpWWbaR3xuFa3KAwc= =p1Qz -END PGP SIGNATURE-
tracking codes
Hello, Has anyone experience with the use of tracking codes by affiliate websites in ofbiz 4.0 ? Do i need to put the TrackingCodeEvents.java file (from within the marketing component) in the EVENT tag in the ecommerce controller on every line in order to work? Or is it implemented anywhere that it however works without modifiying something? Regards, Heidi http://www.olagos.eu
Re: tracking codes
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 my understanding is that when someone checksout this is proccessed see CheckOutEvents.java //get the TrackingCodeOrder List List trackingCodeOrders = TrackingCodeEvents.makeTrackingCodeOrders(request); Heidi Dehaes sent the following on 1/28/2009 1:00 PM: Hello, Has anyone experience with the use of tracking codes by affiliate websites in ofbiz 4.0 ? Do i need to put the TrackingCodeEvents.java file (from within the marketing component) in the EVENT tag in the ecommerce controller on every line in order to work? Or is it implemented anywhere that it however works without modifiying something? Regards, Heidi http://www.olagos.eu -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJgNPirP3NbaWWqE4RAigbAJ4kmOYNuh0Q5dsMZFCDKAmx7GKsHgCeJx/a cdexz0oGQ5DbEPisZvDJm5A= =+jfV -END PGP SIGNATURE-
Re: Error on Party Fin.History Screen
Hi Sharan, thanks for reporting this. The method: InvoiceWorker.getInvoiceTotalBd() was removed some time in favor of InvoiceWorker.getInvoiceTotal( I found some more references and changed them too... Committed revision 738724. if this does not solve your problem, let us know. Regards, Hans On Wed, 2009-01-28 at 15:02 -0800, Sharan-F wrote: Hi I've been doing some testing on Billing Accounts on the Hotwax Demo and came across this error on the Fin.History submenu in Party Manager. I've included the steps I went through to get the error below. ERROR MESSAGE: org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: groovy.lang.MissingMethodException: No signature of method: static org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotalBd() is applicable for argument types: (org.ofbiz.entity.GenericValue, java.lang.Boolean) values: {[invoiceId:CI3, invoiceTypeId:SALES_INVOICE, partyIdFrom:Company, partyId:DemoCustomer, roleTypeId:null, statusId:INVOICE_READY, billingAccountId:9010, contactMechId:null, invoiceDate:2009-01-28 16:32:35.101, dueDate:null, paidDate:null, invoiceMessage:null, referenceNumber:null, description:null, currencyUomId:USD, recurrenceInfoId:null, parentTypeId:SALES_INVOICE, hasTable:N], false} (No signature of method: static org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotalBd() is applicable for argument types: (org.ofbiz.entity.GenericValue, java.lang.Boolean) values: {[invoiceId:CI3, invoiceTypeId:SALES_INVOICE, partyIdFrom:Company, partyId:DemoCustomer, roleTypeId:null, statusId:INVOICE_READY, billingAccountId:9010, contactMechId:null, invoiceDate:2009-01-28 16:32:35.101, dueDate:null, paidDate:null, invoiceMessage:null, referenceNumber:null, description:null, currencyUomId:USD, recurrenceInfoId:null, parentTypeId:SALES_INVOICE, hasTable:N], false}) These are the steps I followed to get the error. 1. I entered an order in the order entry menu of Order Manager using DemoCustomer (product used was WG-9943-B4) 2. I did a quick finalise order and selected the Billing account 9010 as the payment method and created the order (Order number is WSCO10004) 3. I checked the billing account and the new order appeared under the 'Orders' submenu 4. I then did a Quick Ship Entire Order for the order and generated the invoice (CI3) 5. I checked the billing account again and now the new invoice appeared under the 'Invoices' submenu. 6. I then took a look at the Fin.History menu on Party Manager for DemoCustomer and got the error message. Note: I've not applied any payments against the invoice yet – as this would be the case in a real life scenario where several invoices could be charged to billing account before any payment is received. Thanks Sharan -- http://www.antwebsystems.com : Quality OFBiz support for competitive rates