Author: hansbak
Date: Wed Mar 3 06:26:56 2010 New Revision: 918333 URL: http://svn.apache.org/viewvc?rev=918333&view=rev Log: Ebaystore update: - screen for seller setting email templates in ebay and automatically to send mail functions. - Used ProductStoreEmailSetting link to productStore and add template data in Content->DataResource->ElectronicText (Use ContentRole For specify each ebay account) - Used service sendEmailFromScreen to send email. Added: ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/email/ ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/email/GetProductStoreEmailTemplate.groovy ofbiz/trunk/specialpurpose/ebaystore/widget/EbayEmailScreens.xml Modified: ofbiz/trunk/specialpurpose/ebaystore/config/EbayStoreUiLabels.xml ofbiz/trunk/specialpurpose/ebaystore/data/DemoEbayStoreData.xml ofbiz/trunk/specialpurpose/ebaystore/data/EbayStoreTypeData.xml ofbiz/trunk/specialpurpose/ebaystore/script/org/ofbiz/ebaystore/EbayStoreEvents.xml ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/controller.xml ofbiz/trunk/specialpurpose/ebaystore/widget/EbaySellingManagerForms.xml ofbiz/trunk/specialpurpose/ebaystore/widget/EbaySellingManagerScreens.xml Modified: ofbiz/trunk/specialpurpose/ebaystore/config/EbayStoreUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/config/EbayStoreUiLabels.xml?rev=918333&r1=918332&r2=918333&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ebaystore/config/EbayStoreUiLabels.xml (original) +++ ofbiz/trunk/specialpurpose/ebaystore/config/EbayStoreUiLabels.xml Wed Mar 3 06:26:56 2010 @@ -260,4 +260,10 @@ <property key="EbayEditEmailTemplate"> <value xml:lang="en">Edit Email Template</value> </property> + <property key="EbayIncludePayNowButtonAndAcceptPaymentMethods"> + <value xml:lang="en">Include the Pay Now button and accepted payment methods</value> + </property> + <property key="EbayIncludeMyDefaultCrossPromotionInThisEmail"> + <value xml:lang="en">Include my default cross-promotion in this email</value> + </property> </resource> \ No newline at end of file Modified: ofbiz/trunk/specialpurpose/ebaystore/data/DemoEbayStoreData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/data/DemoEbayStoreData.xml?rev=918333&r1=918332&r2=918333&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ebaystore/data/DemoEbayStoreData.xml (original) +++ ofbiz/trunk/specialpurpose/ebaystore/data/DemoEbayStoreData.xml Wed Mar 3 06:26:56 2010 @@ -24,6 +24,7 @@ <Person partyId="DemoEbayAccount" firstName="Demo ebay account" lastName="USA"/> <PartyRole partyId="DemoEbayAccount" roleTypeId="EBAY_ACCOUNT"/> <PartyRole partyId="DemoEbayAccount" roleTypeId="VENDOR"/> + <PartyRole partyId="DemoEbayAccount" roleTypeId="OWNER"/> <UserLogin userLoginId="esandbox10543" partyId="DemoEbayAccount" currentPassword="{SHA}bbf272ce445e1c48d94096afdba6a7888c1df1fe"/> <ProductStore productStoreId="90100" storeName="OFBiz Ebay Store-USA" companyName="Apache Ofbiz" title="Test esandbox10543 store" subtitle="Part of the Open For Business Family of Open Source Software" payTopartyId="DemoEbayAccount" daysToCancelNonPay="30" prorateShipping="Y" prorateTaxes="Y" @@ -45,4 +46,43 @@ <token><![CDATA[AgAAAA**AQAAAA**aAAAAA**PC5MSw**nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6wJnY+lCZiGoA2dj6x9nY+seQ**0jgBAA**AAMAAA**YxqcpdWbgFwYg1G+3AhOonR2/yllz3IJ5VoJyU75texuETwabGgsN4f6OfeBGWejUx10heCKG7wcM4JI+Fqk8Zg64L51JL3/Vm7dYo8VHd8wfixWIdMmhheYFwOdBtxcTb93NLeJa6uxvBJYrSS7O0RcQ3KPhOVJvt7KfVT009o2/02tuX7vbMoHV+Meszli4eVAnB9Fbt6ag2nq46+2/AzMIO4rZE23ozLfh6c4W+QkD6BcaFzLmhVE+7Ni9y7y26QHfUUdjBOEF6ewLpZJsSIoQZC9y4J/yF15Ann9NiamtmFj5IeX4uNIKegEt8EwFSqtpxjgVngcAmMaM8/hk9uQVnFKHTjhK3koUrT7zu/+tk2twJfGF9odb+/5uTVJZ8Lywl/LwEdadv2wjpTdQqHF2bV84cSRhOKrlsYr9xFqgqNDpnmCFXkQKGhycWzMzxcBmiRT5VXJfBjbTGGdmfAf7TVcoU/4C3F3kvzEJhcxU9WbMvj58TmW+VvYS7oy4kOyTiyr3alkz/+HJYGIuttnkzqsIVIPaSXyyuFNWQmQL+0GlJ1n7EoKCevuVsTYgayQEN39TPeXg8ADmf5Pf19BlPxRFNkKvANxE0k3ac+whUwpkfBgx6lApOcwKQMXioi7NrN3MROL/1qrO2+N5sl4kr9nbuvEk9mPDJnmNdB7lzgoESo+se3ZmY9KJ6v08uQ02N1/SjHtmeiojayaR/DqeJiFSoAnU4winzA5GQGNjzEHUpSf1Kj+IZudhT9r]]></token> <customXml><![CDATA[<custom-xml><Currency>USD</Currency><UseTaxTable>false</UseTaxTable><DispatchTimeMax>3</DispatchTimeMax><ReturnPolicy><ReturnsAcceptedOption>ReturnsNotAccepted</ReturnsAcceptedOption></ReturnPolicy><ShippingDetails><ShippingType>Flat</ShippingType><ShippingServiceOptions><ShippingService>UPS2ndDay</ShippingService><ShippingServicePriority>1</ShippingServicePriority><ShippingServiceCost>5</ShippingServiceCost><ShippingServiceAdditionalCost>2</ShippingServiceAdditionalCost><ShippingSurcharge>1</ShippingSurcharge></ShippingServiceOptions></ShippingDetails></custom-xml>]]></customXml> </EbayConfig> + + <!-- Automatic Preferences --> + <DataResource dataResourceId="EBAY_WIN_BUYER_NOTI" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FTL"/> + <ElectronicText dataResourceId="EBAY_WIN_BUYER_NOTI"> + <textData><![CDATA[ + <span style="color: rgb(255, 51, 0);"> + Demo : Automatically send a Winning Buyer Notification email to your winning buyer(s) after item has sold. + </span>]]> + </textData> + </ElectronicText> + <Content contentId="EBAY_WIN_BUYER_NOTI" contentTypeId="DOCUMENT" dataResourceId="EBAY_WIN_BUYER_NOTI" ownerContentId="EBAY_WIN_BUYER_NOTI" statusId="CTNT_IN_PROGRESS"/> + <ContentRole contentId="EBAY_WIN_BUYER_NOTI" partyId="DemoEbayAccount" roleTypeId="OWNER" fromDate="2010-01-01 00:00:00.000"/> + + <DataResource dataResourceId="EBAY_PAY_RECIEVED" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FTL"/> + <ElectronicText dataResourceId="EBAY_PAY_RECIEVED"> + <textData><![CDATA[ + <span style="color: rgb(255, 51, 0);"> + Demo : Automatically send Payment Received email when payment has been received. + </span>]]> + </textData> + </ElectronicText> + <Content contentId="EBAY_PAY_RECIEVED" contentTypeId="DOCUMENT" dataResourceId="EBAY_PAY_RECIEVED" ownerContentId="EBAY_PAY_RECIEVED" statusId="CTNT_IN_PROGRESS"/> + <ContentRole contentId="EBAY_PAY_RECIEVED" partyId="DemoEbayAccount" roleTypeId="OWNER" fromDate="2010-01-01 00:00:00.000"/> + + <DataResource dataResourceId="EBAY_FEEBACK_REMIN" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FTL"/> + <ElectronicText dataResourceId="EBAY_FEEBACK_REMIN"> + <textData><![CDATA[ + <span style="color: rgb(255, 51, 0);"> + Demo : Automatically send a Feedback Reminder email if feedback has not been received. Please choose how many days after shipping you want this email sent. + </span>]]> + </textData> + </ElectronicText> + <Content contentId="EBAY_FEEBACK_REMIN" contentTypeId="DOCUMENT" dataResourceId="EBAY_FEEBACK_REMIN" ownerContentId="EBAY_FEEBACK_REMIN" statusId="CTNT_IN_PROGRESS"/> + <ContentRole contentId="EBAY_FEEBACK_REMIN" partyId="DemoEbayAccount" roleTypeId="OWNER" fromDate="2010-01-01 00:00:00.000"/> + + <ProductStoreEmailSetting productStoreId="90100" emailType="EBAY_WIN_BUYER_NOTI" bccAddress="[hidden email]" bodyScreenLocation="component://ebaystore/widget/EbayEmailScreens.xml#WinnigBuyerNotification" fromAddress="[hidden email]" subject="OFBiz Demo - Winnig Buyer Notification #${buyerUserId}" xslfoAttachScreenLocation=""/> + <ProductStoreEmailSetting productStoreId="90100" emailType="EBAY_PAY_RECIEVED" bccAddress="[hidden email]" bodyScreenLocation="component://ebaystore/widget/EbayEmailScreens.xml#PaymentRecieved" fromAddress="[hidden email]" subject="OFBiz Demo - PaymentRecieved #${buyerUserId}" xslfoAttachScreenLocation=""/> + <ProductStoreEmailSetting productStoreId="90100" emailType="EBAY_FEEBACK_REMIN" bccAddress="[hidden email]" bodyScreenLocation="component://ebaystore/widget/EbayEmailScreens.xml#FeedbackReminder" fromAddress="[hidden email]" subject="OFBiz Demo - Feedback Reminder #${buyerUserId}" xslfoAttachScreenLocation=""/> + </entity-engine-xml> Modified: ofbiz/trunk/specialpurpose/ebaystore/data/EbayStoreTypeData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/data/EbayStoreTypeData.xml?rev=918333&r1=918332&r2=918333&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ebaystore/data/EbayStoreTypeData.xml (original) +++ ofbiz/trunk/specialpurpose/ebaystore/data/EbayStoreTypeData.xml Wed Mar 3 06:26:56 2010 @@ -26,7 +26,8 @@ <Enumeration description="ebay inventory reserve" enumCode="EBAY_INV" enumId="EBAY_INV_RES" sequenceId="01" enumTypeId="EBAY_INV_RESERVE"/> <EnumerationType description="Ebay setting auto preferences" enumTypeId="EBAY_AUTO_PREF" hasTable="N" parentTypeId=""/> - + + <!-- Automation Preference --> <Enumeration enumId="EBAY_AUTO_DISPUTE1" description="Automatic Dispute not complete" enumTypeId="EBAY_AUTO_PREF"/> <Enumeration enumId="EBAY_AUTO_DISPUTE2" description="Automatic Dispute not pay" enumTypeId="EBAY_AUTO_PREF"/> <Enumeration enumId="EBAY_AUTO_RELISTING" description="Automatic Relisting" enumTypeId="EBAY_AUTO_PREF"/> @@ -34,6 +35,15 @@ <Enumeration enumId="EBAY_AUTO_FB_RMD" description="Automatic send reminder email if feedback has not been received after day? shipping" enumTypeId="EBAY_AUTO_PREF"/> <Enumeration enumId="EBAY_AUTO_COMB_ORD" description="Automatic combine order" enumTypeId="EBAY_AUTO_PREF"/> <Enumeration enumId="EBAY_AUTO_PR_EMAIL" description="Automatic send payment received email when has not been received" enumTypeId="EBAY_AUTO_PREF"/> - + + <!-- Automation email --> + <Enumeration enumId="EBAY_WIN_BUYER_NOTI" description="Automatically send a Winning Buyer Notification email to your winning buyer(s) after item has sold." enumTypeId="PRDS_EMAIL"/> + <Enumeration enumId="EBAY_PAY_RECIEVED" description="Automatically send Payment Received email when payment has been received." enumTypeId="PRDS_EMAIL"/> + <Enumeration enumId="EBAY_FEEBACK_REMIN" description="Automatically send a Feedback Reminder email if feedback has not been received. Please choose how many days after shipping you want this email sent." enumTypeId="PRDS_EMAIL"/> + <!-- Content main for specify Enumeration --> + <Content contentId="EBAY_WIN_BUYER_NOTI" contentTypeId="TEMPLATE" description="Automatically send a Winning Buyer Notification email to your winning buyer(s) after item has sold."/> + <Content contentId="EBAY_PAY_RECIEVED" contentTypeId="TEMPLATE" description="Automatically send Payment Received email when payment has been received."/> + <Content contentId="EBAY_FEEBACK_REMIN" contentTypeId="TEMPLATE" description="Automatically send a Feedback Reminder email if feedback has not been received. Please choose how many days after shipping you want this email sent"/> + <ProductType productTypeId="EBAY_ITEM" description="Product From eBay"/> </entity-engine-xml> Modified: ofbiz/trunk/specialpurpose/ebaystore/script/org/ofbiz/ebaystore/EbayStoreEvents.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/script/org/ofbiz/ebaystore/EbayStoreEvents.xml?rev=918333&r1=918332&r2=918333&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ebaystore/script/org/ofbiz/ebaystore/EbayStoreEvents.xml (original) +++ ofbiz/trunk/specialpurpose/ebaystore/script/org/ofbiz/ebaystore/EbayStoreEvents.xml Wed Mar 3 06:26:56 2010 @@ -155,4 +155,53 @@ </if-empty> <field-to-request field="parameters.productStoreId" request-name="productStoreId"/> </simple-method> + <simple-method method-name="createEmailTemplate" short-description="Create Email Template"> + <!-- create content --> + <set field="parameters.dataTemplateTypeId" value="FTL"/> + <set-service-fields service-name="createElectronicText" to-map="newElectronicText" map="parameters"/> + <call-service service-name="createElectronicText" in-map-name="newElectronicText"> + <result-to-field result-name="dataResourceId" field="parameters.dataResourceId"/> + </call-service> + + <set field="parameters.roleTypeId" value="OWNER"/> + <set field="parameters.contentTypeId" value="DOCUMENT"/> + <set field="parameters.ownerContentId" from-field="parameters.emailType"/> + <set-service-fields service-name="createContent" to-map="newContent" map="parameters"/> + <call-service service-name="createContent" in-map-name="newContent" > + <result-to-field result-name="contentId"/> + </call-service> + + <!-- create ProductStoreEmailSetting --> + <if-not-empty field="parameters.includePayment"> + <set field="parameters.subject" value="${parameters.subject} INCLUDE_PAYMENT"/> + </if-not-empty> + <if-not-empty field="parameters.includeCrossPromotions"> + <set field="parameters.subject" value="${parameters.includeCrossPromotions} INCLUDE_CROSS_PROMOTIONS"/> + </if-not-empty> + <set-service-fields service-name="createProductStoreEmailSetting" to-map="newEmailSetting" map="parameters"/> + <call-service service-name="createProductStoreEmailSetting" in-map-name="newEmailSetting" > + <result-to-field result-name="contentId"/> + </call-service> + + </simple-method> + <simple-method method-name="updateEmailTemplate" short-description="Create Email Template"> + <!-- update content --> + <set-service-fields service-name="updateElectronicText" to-map="updateElectronicText" map="parameters"/> + <call-service service-name="updateElectronicText" in-map-name="updateElectronicText"> + <result-to-field result-name="dataResourceId" field="parameters.dataResourceId"/> + </call-service> + + <!-- update ProductStoreEmailSetting --> + <!--if-not-empty field="parameters.includePayment"> + <set field="parameters.subject" value="${parameters.subject} INCLUDE_PAYMENT"/> + </if-not-empty> + <if-not-empty field="parameters.includeCrossPromotions"> + <set field="parameters.subject" value="${parameters.subject} INCLUDE_CROSS_PROMOTIONS"/> + </if-not-empty--> + <set-service-fields service-name="updateProductStoreEmailSetting" to-map="updateEmailSetting" map="parameters"/> + <call-service service-name="updateProductStoreEmailSetting" in-map-name="updateEmailSetting" > + <result-to-field result-name="contentId"/> + </call-service> + + </simple-method> </simple-methods> \ No newline at end of file Added: ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/email/GetProductStoreEmailTemplate.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/email/GetProductStoreEmailTemplate.groovy?rev=918333&view=auto ============================================================================== --- ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/email/GetProductStoreEmailTemplate.groovy (added) +++ ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/actions/email/GetProductStoreEmailTemplate.groovy Wed Mar 3 06:26:56 2010 @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import org.ofbiz.base.util.*; + +contentId = null; +contentRoles = delegator.findByAnd("ContentRole", UtilMisc.toMap("partyId", partyId, "roleTypeId", "OWNER")); +if (contentRoles.size() != 0) { + contentRoles.each { contentRole-> + contents = delegator.findByAnd("Content", UtilMisc.toMap("contentId", contentRole.getString("contentId"), "ownerContentId", emailType)); + if (contents.size() != 0) { + if (emailType.equals(contents.get(0).getString("ownerContentId"))) { + contentId = contents.get(0).getString("contentId"); + } + } + } +} +context.contentId = contentId; \ No newline at end of file Modified: ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/controller.xml?rev=918333&r1=918332&r2=918333&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/controller.xml (original) +++ ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/controller.xml Wed Mar 3 06:26:56 2010 @@ -147,6 +147,28 @@ <response name="success" type="view" value="AutomationPreferences"/> <response name="error" type="view" value="AutomationPreferences"/> </request-map> + <request-map uri="editEmailTemplate"> + <security https="true" auth="true"/> + <response name="success" type="view" value="editEmailTemplate"/> + </request-map> + <request-map uri="createEmailTemplate"> + <security https="true" auth="true"/> + <event type="simple" invoke="createEmailTemplate" path="component://ebaystore/script/org/ofbiz/ebaystore/EbayStoreEvents.xml"/> + <response name="success" type="view" value="AutomationPreferences"/> + <response name="error" type="view" value="editEmailTemplate"/> + </request-map> + <request-map uri="updateEmailTemplate"> + <security https="true" auth="true"/> + <event type="simple" invoke="updateEmailTemplate" path="component://ebaystore/script/org/ofbiz/ebaystore/EbayStoreEvents.xml"/> + <response name="success" type="view" value="AutomationPreferences"/> + <response name="error" type="view" value="editEmailTemplate"/> + </request-map> + <request-map uri="updateEmailTemplate"> + <security https="true" auth="true"/> + <event type="simple" invoke="updateEmailTemplate" path="component://ebaystore/script/org/ofbiz/ebaystore/EbayStoreEvents.xml"/> + <response name="success" type="view" value="AutomationPreferences"/> + <response name="error" type="view" value="editEmailTemplate"/> + </request-map> <request-map uri="autoSendPaymentReceivedEmail"> <security auth="true" https="true"/> <event type="simple" path="component://ebaystore/script/org/ofbiz/ebaystore/EbayStoreEvents.xml" invoke="autoSendPaymentReceivedEmail"/> @@ -294,6 +316,8 @@ <view-map name="AutomationPreferences" type="screen" page="component://ebaystore/widget/EbaySellingManagerScreens.xml#EbayAutomationPreferences"/> <!-- block out of stock --> <view-map name="blockItemOutOfStock" type="screen" page="component://ebaystore/widget/EbayStoreScreens.xml#blockItemOutOfStock"/> + <!-- Selling Manager --> + <view-map name="editEmailTemplate" type="screen" page="component://ebaystore/widget/EbaySellingManagerScreens.xml#EditEmailTemplate"/> <!-- store Inventory --> <view-map name="ebayStoreInventory" type="screen" page="component://ebaystore/widget/EbaySellingManagerScreens.xml#ebayStoreInventory"/> <view-map name="ebayLoadStoreInventory" type="screen" page="component://ebaystore/widget/EbaySellingManagerScreens.xml#ebayLoadStoreInventory"/> Added: ofbiz/trunk/specialpurpose/ebaystore/widget/EbayEmailScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/widget/EbayEmailScreens.xml?rev=918333&view=auto ============================================================================== --- ofbiz/trunk/specialpurpose/ebaystore/widget/EbayEmailScreens.xml (added) +++ ofbiz/trunk/specialpurpose/ebaystore/widget/EbayEmailScreens.xml Wed Mar 3 06:26:56 2010 @@ -0,0 +1,106 @@ +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + --> + +<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd"> + <screen name="EbayEmailTemplate"> + <section> + <actions> + <service service-name="getEbayStoreUser" result-map="result"> + <field-map field-name="productStoreId" from-field="parameters.productStoreId"/> + </service> + <service service-name="getEbayUser" result-map="ebayUser"> + <field-map field-name="productStoreId" from-field="parameters.productStoreId"/> + </service> + <set field="userLoginId" from-field="result.userLoginId"/> + <set field="emailType" from-field="parameters.emailType"/> + <entity-one value-field="emailSetting" entity-name="ProductStoreEmailSetting"> + <field-map field-name="productStoreId" from-field="parameters.productStoreId"/> + <field-map field-name="emailType" from-field="emailType"/> + </entity-one> + <set field="subject" from-field="emailSetting.subject"/> + <set field="bodyScreenLocation" value="component://ebaystore/widget/EbayEmailScreens.xml#EbayEmailTemplate"/> + <set field="fromAddress" from-field="ebayUser.email"/> + <entity-one value-field="userLoginCheck" entity-name="UserLogin"> + <field-map field-name="userLoginId" from-field="userLoginId"/> + </entity-one> + <set field="partyId" from-field="userLoginCheck.partyId"/> + <script location="component://ebaystore/webapp/ebaystore/WEB-INF/actions/email/GetProductStoreEmailTemplate.groovy"/> + <entity-one value-field="templateContent" entity-name="Content"/> + <get-related-one value-field="templateContent" relation-name="DataResource" to-value-field="templateDataResource"/> + <get-related-one value-field="templateDataResource" relation-name="ElectronicText" to-value-field="templateData"/> + <set field="textData" from-field="templateData.textData"/> + <set field="dataResourceId" from-field="templateData.dataResourceId"/> + <script location="component://ebaystore/webapp/ebaystore/WEB-INF/actions/email/GetEmailOptions.groovy"/> + <!-- set all parameters --> + <set field="emailType" from-field="parameters.emailType"/> + <set field="buyerUserId" from-field="parameters.buyerUserId" default-value="None"/> + <set field="buyerName" from-field="parameters.buyerName" default-value="None"/> + <set field="buyerFirstName" from-field="parameters.buyerFirstName" default-value="None"/> + <set field="buyerLastName" from-field="parameters.buyerLastName" default-value="None"/> + <set field="buyerStreet1" from-field="parameters.buyerStreet1" default-value="None"/> + <set field="buyerStreet2" from-field="parameters.itemId" default-value="None"/> + <set field="buyerCity" from-field="parameters.buyerCity" default-value="None"/> + <set field="buyerState" from-field="parameters.buyerState" default-value="None"/> + <set field="buyerZipCode" from-field="parameters.buyerZipCode" default-value="None"/> + <set field="buyerCountry" from-field="parameters.buyerCountry" default-value="None"/> + <set field="itemTitle" from-field="parameters.itemTitle" default-value="None"/> + <set field="linkToListing" from-field="parameters.Quantity" default-value="None"/> + <set field="favoriteslist" from-field="parameters.favoriteslist" default-value="None"/> + <set field="feedbackLink" from-field="parameters.feedbackLink" default-value="None"/> + <set field="closingDateTime" from-field="parameters.closingDateTime" default-value="None"/> + <set field="totalPrice" from-field="parameters.totalPrice" default-value="None"/> + <set field="closingPrice" from-field="parameters.closingPrice" default-value="None"/> + <set field="SHFee" from-field="parameters.SHFee" default-value="None"/> + <set field="insuranceCost" from-field="parameters.insuranceCost" default-value="None"/> + <set field="insuranceOption" from-field="parameters.insuranceOption" default-value="None"/> + <set field="tax" from-field="parameters.tax" default-value="None"/> + <set field="taxState" from-field="parameters.taxState" default-value="None"/> + <set field="paymentAcceped" from-field="parameters.paymentAcceped" default-value="None"/> + <set field="paymentInstructions" from-field="parameters.paymentInstructions" default-value="None"/> + <set field="sellerUserId" from-field="parameters.sellerUserId" default-value="None"/> + <set field="sellerName" from-field="parameters.sellerName" default-value="None"/> + <set field="sellerFirstName" from-field="parameters.sellerFirstName" default-value="None"/> + <set field="sellerLastName" from-field="parameters.sellerLastName" default-value="None"/> + <set field="sellerStreet1" from-field="parameters.sellerStreet1" default-value="None"/> + <set field="sellerStreet2" from-field="parameters.sellerStreet2" default-value="None"/> + <set field="sellerCity" from-field="parameters.sellerCity" default-value="None"/> + <set field="sellerState" from-field="parameters.sellerState" default-value="None"/> + <set field="sellerZipCode" from-field="parameters.sellerZipCode" default-value="None"/> + <set field="sellerCountry" from-field="parameters.sellerCountry" default-value="None"/> + <set field="sellerEmail" from-field="parameters.sellerEmail" default-value="None"/> + <set field="sellerPhone" from-field="parameters.sellerPhone" default-value="None"/> + <set field="salesRecordNumber" from-field="parameters.salesRecordNumber" default-value="None"/> + <set field="shippedDate" from-field="parameters.shippedDate" default-value="None"/> + <set field="transactionTable" from-field="parameters.transactionTable" default-value="None"/> + <set field="checkoutLink" from-field="parameters.checkoutLink" default-value="None"/> + <set field="shippingCalculator" from-field="parameters.shippingCalculator" default-value="None"/> + <set field="trackShipmentLink" from-field="parameters.trackShipmentLink" default-value="None"/> + <set field="shippingOptions" from-field="parameters.shippingOptions" default-value="None"/> + <set field="notesToBuyer" from-field="parameters.notesToBuyer" default-value="None"/> + <set field="DiscountsOrCharges" from-field="parameters.DiscountsOrCharges" default-value="None"/> + <set field="refundAmount" from-field="parameters.refundAmount" default-value="None"/> + <set field="variationDetails" from-field="parameters.variationDetails" default-value="None"/> + </actions> + <widgets> + <content content-id="${contentId}"/> + </widgets> + </section> + </screen> +</screens> \ No newline at end of file Modified: ofbiz/trunk/specialpurpose/ebaystore/widget/EbaySellingManagerForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/widget/EbaySellingManagerForms.xml?rev=918333&r1=918332&r2=918333&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ebaystore/widget/EbaySellingManagerForms.xml (original) +++ ofbiz/trunk/specialpurpose/ebaystore/widget/EbaySellingManagerForms.xml Wed Mar 3 06:26:56 2010 @@ -302,8 +302,9 @@ <field name="afterDays" title="${uiLabelMap.EbayAfter}" position="1" tooltip="${uiLabelMap.CommonDays} ${uiLabelMap.EbayIsSendCopyEmailTooltip}" ><text default-value="5" size="5" maxlength="2"></text></field> <field name="isSendCopyEmailToSeller" position="1" title="${uiLabelMap.EbayIsSendCopyEmailToSeller}"><check></check></field> <field name="emailTemplate" title="Email" tooltip="Edit Feedback Reminder email template"> - <hyperlink target="#" description="Edit Email Template"> + <hyperlink target="editEmailTemplate" description="Edit Email Template"> <parameter param-name="productStoreId" from-field="parameters.productStoreId"/> + <parameter param-name="emailType" value="EBAY_WIN_BUYER_NOTI"/> </hyperlink> </field> <field name="submitButton" title="${uiLabelMap.CommonApply}"><submit button-type="button"/></field> @@ -323,8 +324,9 @@ <field name="isAutoSendPayReceivedEmail" tooltip="${uiLabelMap.EbayAutoPaymentReceviedEmail}" position="1" title="${uiLabelMap.EbayIsAutoSendEmail}"><check></check></field> <field name="isSendCopyEmailToSeller" position="1" title="${uiLabelMap.EbayIsSendCopyEmailToSeller}"><check></check></field> <field name="emailTemplate" title="Email" tooltip="Edit Payment received email template"> - <hyperlink target="#" description="${uiLabelMap.EbayEditEmailTemplate}"> + <hyperlink target="editEmailTemplate" description="${uiLabelMap.EbayEditEmailTemplate}"> <parameter param-name="productStoreId" from-field="parameters.productStoreId"/> + <parameter param-name="emailType" value="EBAY_PAY_RECIEVED"/> </hyperlink> </field> <field name="submitButton" title="${uiLabelMap.CommonApply}"><submit button-type="button"/></field> @@ -344,4 +346,89 @@ <field name="condition2" title="Allow no more than" tooltip-style="h3" tooltip="items per order"><text size="3" default-value="${ebayPrefCombine.condition2}" maxlength="2"></text></field> <field name="submitButton" title="${uiLabelMap.CommonSave}"><submit button-type="button"/></field> </form> + <form name="EditEmailTemplate" type="single" target="createEmailTemplate" + header-row-style="header-row" default-table-style="basic-table"> + <actions> + <set field="includePayment" value="${groovy: + includePayment = "N"; + if (subject != null && subject.contains("INCLUDE_PAYMENT")) includePayment = "Y"; + if (subject != null && subject.contains("INCLUDE_PAYMENT")) subject = subject.replace("INCLUDE_PAYMENT", ""); + return includePayment; + }" type="String"/> + <set field="includeCrossPromotions" value="${groovy: + includeCrossPromotions = "N"; + if (subject != null && subject.contains("INCLUDE_CROSS_PROMOTIONS")) includeCrossPromotions = "Y"; + if (subject != null && subject.contains("INCLUDE_CROSS_PROMOTIONS")) subject = subject.replace("INCLUDE_CROSS_PROMOTIONS", ""); + return includeCrossPromotions; + }" type="String"/> + </actions> + <alt-target use-when="emailSetting!=null" target="updateEmailTemplate"/> + <field name="productStoreId"><hidden value="${parameters.productStoreId}"/></field> + <field name="partyId"><hidden value="${partyId}"/></field> + <field name="bodyScreenLocation"><hidden value="${bodyScreenLocation}"/></field> + <field name="emailType"><hidden value="${emailType}"/></field> + <field name="fromAddress"><hidden value="${fromAddress}"/></field> + <field name="dataResourceId"><hidden value="${dataResourceId}"/></field> + <field name="emailDetail" title="${uiLabelMap.CommonEmptyHeader}" widget-area-style="h2"><display description="${uiLabelMap.EbayEmailDetail}"/></field> + <field name="autoText" action="doSelect(this.id)" event="onchange" > + <drop-down allow-empty="true"> + <option key="$\{buyerUserId}" description="Buyer User ID"/> + <option key="$\{buyerName}" description="Buyer name"/> + <option key="$\{buyerFirstName}" description="Buyer First name"/> + <option key="$\{buyerLastName}" description="Buyer Last name"/> + <option key="$\{buyerStreet1}" description="Buyer street 1"/> + <option key="$\{buyerStreet2}" description="Buyer street 2"/> + <option key="$\{buyerCity}" description="Buyer City"/> + <option key="$\{buyerState}" description="Buyer State"/> + <option key="$\{buyerZipCode}" description="Buyer zip code"/> + <option key="$\{buyerCountry}" description="Buyer Country"/> + <option key="$\{itemId}" description="Item Number"/> + <option key="$\{itemTitle}" description="Item Title"/> + <option key="$\{linkToListing}" description="Link to listing"/> + <option key="$\{Quantity}" description="Quantity"/> + <option key="$\{favoriteslist}" description="Favorites list"/> + <option key="$\{feedbackLink}" description="Feedback link"/> + <option key="$\{closingDateTime}" description="Closing Date/Time"/> + <option key="$\{totalPrice}" description="Total price"/> + <option key="$\{closingPrice}" description="Closing price"/> + <option key="$\{SHFee}" description="S&H fee"/> + <option key="$\{insuranceCost}" description="Insurance cost"/> + <option key="$\{insuranceOption}" description="Insurance option"/> + <option key="$\{tax}" description="Tax"/> + <option key="$\{taxState}" description="Tax State"/> + <option key="$\{paymentAcceped}" description="Payment accepted"/> + <option key="$\{paymentInstructions}" description="Payment instructions"/> + <option key="$\{sellerUserId}" description="Seller User ID"/> + <option key="$\{sellerName}" description="Seller name"/> + <option key="$\{sellerFirstName}" description="Seller First name"/> + <option key="$\{sellerLastName}" description="Seller Last name"/> + <option key="$\{sellerStreet1}" description="Seller street 1"/> + <option key="$\{sellerStreet2}" description="Seller street 2"/> + <option key="$\{sellerCity}" description="Seller city"/> + <option key="$\{sellerState}" description="Seller state"/> + <option key="$\{sellerZipCode}" description="Seller zip code"/> + <option key="$\{sellerCountry}" description="Seller country"/> + <option key="$\{sellerEmail}" description="Seller email"/> + <option key="$\{sellerPhone}" description="Seller phone"/> + <option key="$\{salesRecordNumber}" description="Sales record number"/> + <option key="$\{shippedDate}" description="Shipped date"/> + <option key="$\{transactionTable}" description="Transaction table"/> + <option key="$\{checkoutLink}" description="Checkout link"/> + <option key="$\{shippingCalculator}" description="Shipping Calculator"/> + <option key="$\{trackShipmentLink}" description="Track shipment link"/> + <option key="$\{shippingOptions}" description="Shipping Options"/> + <option key="$\{notesToBuyer}" description="Notes to buyer"/> + <option key="$\{DiscountsOrCharges}" description="Discounts or Charges"/> + <option key="$\{refundAmount}" description="Refund Amount"/> + <option key="$\{variationDetails}" description="Variation details"/> + </drop-down> + </field> + <field name="subject"><text/></field> + <field name="textData" title="${uiLabelMap.CommonMessage}"><textarea visual-editor-enable="true" rows="20" cols="120" default-value="${textData}"/></field> + <!--field name="paymentInfo" title="${uiLabelMap.CommonEmptyHeader}" widget-area-style="h2"><display description="${uiLabelMap.EbayPaymentInformation}"/></field> + <field name="includePayment" title="${uiLabelMap.CommonEmptyHeader}" tooltip="${uiLabelMap.EbayIncludePayNowButtonAndAcceptPaymentMethods}" tooltip-style="h3"><check/></field> + <field name="crossPromotions" title="${uiLabelMap.CommonEmptyHeader}" widget-area-style="h2"><display description="${uiLabelMap.EbayCrossPromotions}"/></field> + <field name="includeCrossPromotions" title="${uiLabelMap.CommonEmptyHeader}" tooltip="${uiLabelMap.EbayIncludeMyDefaultCrossPromotionInThisEmail}" tooltip-style="h3"><check/></field--> + <field name="submitButton"><submit/></field> + </form> </forms> \ No newline at end of file Modified: ofbiz/trunk/specialpurpose/ebaystore/widget/EbaySellingManagerScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/widget/EbaySellingManagerScreens.xml?rev=918333&r1=918332&r2=918333&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ebaystore/widget/EbaySellingManagerScreens.xml (original) +++ ofbiz/trunk/specialpurpose/ebaystore/widget/EbaySellingManagerScreens.xml Wed Mar 3 06:26:56 2010 @@ -390,4 +390,46 @@ </widgets> </section> </screen> + <screen name="EditEmailTemplate"> + <section> + <actions> + <set field="headerItem" value="ebayStore"/> + <set field="sellingManagerItem" value="automationPreferences"/> + <service service-name="getEbayStoreUser" result-map="result"> + <field-map field-name="productStoreId" from-field="parameters.productStoreId"/> + </service> + <service service-name="getEbayUser" result-map="ebayUser"> + <field-map field-name="productStoreId" from-field="parameters.productStoreId"/> + </service> + <set field="userLoginId" from-field="result.userLoginId"/> + <set field="emailType" from-field="parameters.emailType"/> + <entity-one value-field="emailSetting" entity-name="ProductStoreEmailSetting"> + <field-map field-name="productStoreId" from-field="parameters.productStoreId"/> + <field-map field-name="emailType" from-field="emailType"/> + </entity-one> + <set field="subject" from-field="emailSetting.subject"/> + <set field="bodyScreenLocation" value="component://ebaystore/widget/EbayEmailScreens.xml#EbayEmailTemplate"/> + <set field="fromAddress" from-field="ebayUser.email"/> + <entity-one value-field="userLoginCheck" entity-name="UserLogin"> + <field-map field-name="userLoginId" from-field="userLoginId"/> + </entity-one> + <set field="partyId" from-field="userLoginCheck.partyId"/> + <script location="component://ebaystore/webapp/ebaystore/WEB-INF/actions/email/GetProductStoreEmailTemplate.groovy"/> + <entity-one value-field="templateContent" entity-name="Content"/> + <get-related-one value-field="templateContent" relation-name="DataResource" to-value-field="templateDataResource"/> + <get-related-one value-field="templateDataResource" relation-name="ElectronicText" to-value-field="templateData"/> + <set field="textData" from-field="templateData.textData"/> + <set field="dataResourceId" from-field="templateData.dataResourceId"/> + </actions> + <widgets> + <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <screenlet title="${uiLabelMap.EbayEditEmailTemplate}"> + <include-form name="EditEmailTemplate" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/> + </screenlet> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> </screens> \ No newline at end of file |
Free forum by Nabble | Edit this page |