|
I was working on making custom ProductStoreEmailSettings in the Catalog and
I found that I couldn't get them to send the right email templates. For example, I am working on making a page where users can create new profiles, thus calling the createCustomerProfile event in the Ecommerce application (ecommerece/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml). The problem is, when I create a new customer profile, it does everything perfectly until the email is called to be sent out. The createCustomerProfile event calls a service in the Party application called sendCreatePartyEmailNotification (party/script/org/ofbiz/party/party/PartyServices.xml). Now in this code (minilang), from what I gather, it does the following: 1. Gets all the ProductStoreEmailSettings in the table who's emailType is "PARTY_REGIS_CONFIRM". 2. Grabs the first from the list and uses it's email settings to send the email. 3. Call the service to actually send the mail (sendMailFromScreen). My issue is with step 2. Why doesn't it also match the correct ProductStore rather than just grabbing the first one on the list? Before I make any code changes to the Party application, I just want to verify with any developers the reasons for designing it this way and if it will break any other application. Thanks in advanced. |
|
Administrator
|
Hi Fred,
Please use rather user ML for such questions, see why here : http://docs.ofbiz.org/x/yAk#MailingLists-DesignanddevelopmentList:dev@... I just had a quick look and this is even worse since a web store may also have multiple web sites associated. I guess it has been overlooked at the time it was done. I suggest to create a Jira issue, and even better with a patch... Thanks Jacques From: "Ancheta, Fred" <[hidden email]> >I was working on making custom ProductStoreEmailSettings in the Catalog and > I found that I couldn't get them to send the right email templates. For > example, I am working on making a page where users can create new profiles, > thus calling the createCustomerProfile event in the Ecommerce application > (ecommerece/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml). > > The problem is, when I create a new customer profile, it does everything > perfectly until the email is called to be sent out. The > createCustomerProfile event calls a service in the Party application called > sendCreatePartyEmailNotification > (party/script/org/ofbiz/party/party/PartyServices.xml). > > Now in this code (minilang), from what I gather, it does the following: > > 1. Gets all the ProductStoreEmailSettings in the table who's emailType is > "PARTY_REGIS_CONFIRM". 2. Grabs the first from the list and uses it's email > settings to send the email. 3. Call the service to actually send the mail > (sendMailFromScreen). > > My issue is with step 2. Why doesn't it also match the correct ProductStore > rather than just grabbing the first one on the list? Before I make any code > changes to the Party application, I just want to verify with any developers > the reasons for designing it this way and if it will break any other > application. > > Thanks in advanced. > |
|
In reply to this post by Ancheta, Fred
Hello Fred,
Good Catch & you are absolutely right on this. I am thinking the better approach to handle this case and will get back to you as soon as I have more idea / thoughts. Thanks! -- Regards Ashish Vijaywargiya HotWax Media Pvt. Ltd. http://www.hotwaxmedia.com Helping hand around the World ... USA | Italy | New Zealand | India Ancheta, Fred wrote: > I was working on making custom ProductStoreEmailSettings in the Catalog and > I found that I couldn't get them to send the right email templates. For > example, I am working on making a page where users can create new profiles, > thus calling the createCustomerProfile event in the Ecommerce application > (ecommerece/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml). > > The problem is, when I create a new customer profile, it does everything > perfectly until the email is called to be sent out. The > createCustomerProfile event calls a service in the Party application called > sendCreatePartyEmailNotification > (party/script/org/ofbiz/party/party/PartyServices.xml). > > Now in this code (minilang), from what I gather, it does the following: > > 1. Gets all the ProductStoreEmailSettings in the table who's emailType is > "PARTY_REGIS_CONFIRM". 2. Grabs the first from the list and uses it's email > settings to send the email. 3. Call the service to actually send the mail > (sendMailFromScreen). > > My issue is with step 2. Why doesn't it also match the correct ProductStore > rather than just grabbing the first one on the list? Before I make any code > changes to the Party application, I just want to verify with any developers > the reasons for designing it this way and if it will break any other > application. > > Thanks in advanced. > > |
| Free forum by Nabble | Edit this page |
