[ 
https://issues.apache.org/jira/browse/OFBIZ-3000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12762872#action_12762872
 ] 

Ashish Vijaywargiya commented on OFBIZ-3000:
--------------------------------------------

Hello Fred,

Ok - This should be pretty simple.
The sendCreatePartyEmailNotification is being called from two places one is 
Partymgr component & Other one is Ecommerce component.
We can pass productStoreId from these two component in the following way.

1) For ecommerce component each webapp is/should be associated with Website 
record and Website should be associated with ProductStore 
(Website.productStoreId).

2) For Partymgr component you can create DemoData for WebSite entity and put it 
in file having reader name "demo". For example you can keep demo data in 
PartyDemoData.xml. For now you can safely associate WebSite record in Partymgr 
component with ProductStore = "9000".

3) In the service definition you can add productStoreId as an optional field 
and can provide conditional check before checking record in 
ProductStoreEmailSetting entity.

HTH!

--
Ashish

> 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
>
> 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