Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Custom Field in Ecommerce email invoice View modes: 
User avatar
Member
Member
James Darlow - 5/23/2011 1:14:18 AM
   
Custom Field in Ecommerce email invoice
Hey people!

So basically:

1. I have created a custom field in the order system table (DateforOrder)
2. The value is stored from user filling in form at the shoppingpayment.ascx
3. The field is being saved in to Order Table (as a custom fields)
4. Now I want to get the value of the field into the invoice email template.
I have tried {%Order.DateforOrder%}
And have now attempted to use a custom macro to get the data from the field.

Here is my code:
case "dateorder":

int orderID = Convert.ToInt32(Request.QueryString["OrderId"]);
OrderInfo order = OrderInfoProvider.GetOrderInfo(orderID);

string hello = order.GetValue("DateforOrder").ToString();

result = hello;


break;
Still no result, and I have tried searching the forums and found nothing but the reference to custom macros(Appendix A) which is how I got the above but it is still not working. Please help me, as I have spent all day trying to do this !

User avatar
Kentico Support
Kentico Support
kentico_radekm - 5/23/2011 5:08:04 AM
   
RE:Custom Field in Ecommerce email invoice
Hello.

We are solving this issue via e-mails and I provided complete code and screenshot of result showing that it works, when you follow my approach. Could you please try to follow my last e-mail (I replied today) and check, whether proper value is saved in COM_Order table? Also, please keep this issue in one ticket only, so we can post a final solution here, instead of having this issue opened on a different placed at the same time. Thank you.

Best Regards,
Radek Macalik

User avatar
Member
Member
James Darlow - 5/24/2011 6:23:27 PM
   
RE:Custom Field in Ecommerce email invoice
I have followed as you had said, and it is being stored in the Order table. I have provided screen shots in the email. When resolved I will post the code here :)

Thankyou for all your help I greatly appreciate it!

User avatar
Member
Member
lgarzon-coj - 6/14/2011 6:34:25 AM
   
RE:Custom Field in Ecommerce email invoice
Could you please post the code?

Thanks.