pls help implementing payment description token

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 年 前
Hi all, i've been searching all day for an answer but im not able to find it.
im not very practice with .net language so maybye this questiong sounds stupid to u.

i need to add in the email that is sent from the store when someone makes an order, the description of the payment selected. (the textarea that is in some of the payment method configuration)

i've already figured out how to add a token, and i've add a token with a test value to it just to check if it works

tokens.Add(new Token("Order.PaymentMethodDescription", "test"));

now i need to replace that word "test" with the actual value of the descirption text of the payment.
i know is stored in the setting table, but im dumb and dont know how to retrive it here.

pls any help?
7 年 前
If you are referring to the payment info text, then it would be in Settings.  E.g.

Name  Value
checkmoneyorderpaymentsettings.descriptiontext  <p>Mail Personal or Business Check, Cashier's Check or money order to:</p><p><br /><b>NOP SOLUTIONS</b> <br /><b>your address here,</b> <br /><b>New York, NY 10001 </b> <br /><b>USA</b></p><p>Notice that if you pay by Personal or Business Check, your order may be held for up to 10 days after we receive your check to allow enough time for the check to clear.  If you want us to ship faster upon receipt of your payment, then we recommend your send a money order or Cashier's check.</p><p>P.S. You can edit this text from admin panel.</p>


You can use

  _settingService.GetSettingByKey<String>("checkmoneyorderpaymentsettings.descriptiontext")
7 年 前
first of all thx for the answer

i have tried the _settingservice but it gives me the error that the name settingservice does not exist in the context when i compile the solution

i have tried something like this

tokens.Add(new Token("Order.PaymentMethodDescription", _settingService.GetSettingByKey(paymentMethodName + "setting.descriptiontext")));

since is more than one method payment im intersted in. im not sure in the "setting.descriptiontext" but it stops before on _settinService so i dont know how to move on.

i assume that i must "declare" this settinService somewhere else? did a bunch of tries but cant figure it out
7 年 前
any idea?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.