[ 
https://issues.apache.org/jira/browse/OFBIZ-3000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Frederick Ancheta updated OFBIZ-3000:
-------------------------------------

    Attachment: JIRA-Issue3000.patch

I've attached a patch with the following changes:

applications/party/servicedef/services.xml

-added a IN parameter called productStoreId to be passed to 
sendCreateEmailNotification
-this parameter is OPTIONAL

applications/party/script/org/ofbiz/party/party/PartyServices.xml

-with productStoreId being passed, we check if it is empty
-if no productStoreId is provided, it will log a warning and send no email

applications/party/webapp/partymgr/party/PartyForms.xml

-see NewUser form
-added a new select (dropdown) field for user to choose which Product Store to 
create the customer for
-this way, the user who is creating the customer has control over which 
productStoreId is passed to sendCreateEmailNotification

applications/party/script/org/ofbiz/party/user/UserEvents.xml

-see createUser event, this is called when NewUser form is submitted
-this now takes the productStoreId from the NewUser form to pass on to 
sendCreateEmailNotification
-if no productStoreId is created, no email is sent

Please let me know if this will break anything else.  For now, this works with 
the current implementation we have over here at our company.  Thanks so much 
for your help.

> sendCreatePartyEmailNotification
> --------------------------------
>
>                 Key: OFBIZ-3000
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3000
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: SVN trunk
>         Environment: Mac OS X
> Macbook Pro
> Eclipse IDE
>            Reporter: Frederick Ancheta
>            Assignee: Ashish Vijaywargiya
>            Priority: Minor
>         Attachments: JIRA-Issue3000.patch
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to