Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-3500 Umbrella issue for components dependency
  3. OFBIZ-9419

Remove ProductStoreWorker dependencies on ecommerce email screen forms

Details

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Implemented
    • None
    • None
    • None
    • None
    • Bug Crush Event - 21/2/2015

    Description

      The ProductStoreWorker has dependencies on ecommerce as shown in below code snippet. This whole logic must be removed properly.

      Also, we need to implement a minimal email screen just to be able to test email functionality with a minimal template.

          private static Map<String, String> defaultProductStoreEmailScreenLocation = new HashMap<String, String>();
      
          static {
              defaultProductStoreEmailScreenLocation.put("PRDS_ODR_CONFIRM", "component://ecommerce/widget/EmailOrderScreens.xml#OrderConfirmNotice");
              defaultProductStoreEmailScreenLocation.put("PRDS_ODR_COMPLETE", "component://ecommerce/widget/EmailOrderScreens.xml#OrderCompleteNotice");
              defaultProductStoreEmailScreenLocation.put("PRDS_ODR_BACKORDER", "component://ecommerce/widget/EmailOrderScreens.xml#BackorderNotice");
              defaultProductStoreEmailScreenLocation.put("PRDS_ODR_CHANGE", "component://ecommerce/widget/EmailOrderScreens.xml#OrderChangeNotice");
      
              defaultProductStoreEmailScreenLocation.put("PRDS_ODR_PAYRETRY", "component://ecommerce/widget/EmailOrderScreens.xml#PaymentRetryNotice");
      
              defaultProductStoreEmailScreenLocation.put("PRDS_RTN_ACCEPT", "component://ecommerce/widget/EmailReturnScreens.xml#ReturnAccept");
              defaultProductStoreEmailScreenLocation.put("PRDS_RTN_COMPLETE", "component://ecommerce/widget/EmailReturnScreens.xml#ReturnComplete");
              defaultProductStoreEmailScreenLocation.put("PRDS_RTN_CANCEL", "component://ecommerce/widget/EmailReturnScreens.xml#ReturnCancel");
      
              defaultProductStoreEmailScreenLocation.put("PRDS_GC_PURCHASE", "component://ecommerce/widget/EmailGiftCardScreens.xml#GiftCardPurchase");
              defaultProductStoreEmailScreenLocation.put("PRDS_GC_RELOAD", "component://ecommerce/widget/EmailGiftCardScreens.xml#GiftCardReload");
      
              defaultProductStoreEmailScreenLocation.put("PRDS_QUO_CONFIRM", "component://order/widget/ordermgr/QuoteScreens.xml#ViewQuoteSimple");
      
              defaultProductStoreEmailScreenLocation.put("PRDS_PWD_RETRIEVE", "component://securityext/widget/EmailSecurityScreens.xml#PasswordEmail");
      
              defaultProductStoreEmailScreenLocation.put("PRDS_TELL_FRIEND", "component://ecommerce/widget/EmailProductScreens.xml#TellFriend");
      
              defaultProductStoreEmailScreenLocation.put("PRDS_CUST_REGISTER", "component://securityext/widget/EmailSecurityScreens.xml#PasswordEmail");
          }
      

      Attachments

        1. OFBIZ-9419.patch
          9 kB
          Akash Jain

        Activity

          akash.jain Akash Jain added a comment - - edited

          If ProductStoreEmailSetting data setup properly and added bodyScreenLocation correctly then there is no need of ProductStoreWorker.getDefaultProductStoreEmailScreenLocation method which used a Map to get screen location (hardcoded). Also, there are total 36 rows of ProductStoreEmailSetting table and put only 14 hardcoded screen location into Map.

          I think we are good to remove ProductStoreWorker.getDefaultProductStoreEmailScreenLocation method, attached patch for the same.

          If we want to go with ProductStoreWorker.getDefaultProductStoreEmailScreenLocation method then should to handle it properly, like,
          – create SystemProperty data for all emailTypes to get screen location instead of hardcoded them
          – take care of it for all 36 emailTypes instead 14 emailTypes only

          I will remove ProductStoreWorker.getDefaultProductStoreEmailScreenLocation method as attached patch soon, thanks!

          akash.jain Akash Jain added a comment - - edited If ProductStoreEmailSetting data setup properly and added bodyScreenLocation correctly then there is no need of ProductStoreWorker.getDefaultProductStoreEmailScreenLocation method which used a Map to get screen location (hardcoded). Also, there are total 36 rows of ProductStoreEmailSetting table and put only 14 hardcoded screen location into Map. I think we are good to remove ProductStoreWorker.getDefaultProductStoreEmailScreenLocation method, attached patch for the same. If we want to go with ProductStoreWorker.getDefaultProductStoreEmailScreenLocation method then should to handle it properly, like, – create SystemProperty data for all emailTypes to get screen location instead of hardcoded them – take care of it for all 36 emailTypes instead 14 emailTypes only I will remove ProductStoreWorker.getDefaultProductStoreEmailScreenLocation method as attached patch soon, thanks!

          Commit 868c487e7fe3653689e2c7c46105287e02e39be9 in ofbiz-framework's branch refs/heads/trunk from Akash Jain
          [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=868c487 ]

          Improved: Remove ProductStoreWorker dependencies on ecommerce email screen forms (OFBIZ-9419)

          Thanks, Taher Alkhateeb for report.

          jira-bot ASF subversion and git services added a comment - Commit 868c487e7fe3653689e2c7c46105287e02e39be9 in ofbiz-framework's branch refs/heads/trunk from Akash Jain [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=868c487 ] Improved: Remove ProductStoreWorker dependencies on ecommerce email screen forms ( OFBIZ-9419 ) Thanks, Taher Alkhateeb for report.

          People

            akash.jain Akash Jain
            taher Taher Alkhateeb
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: