Developer forum

Forum » Development » e-mail subject

e-mail subject


Reply

When the customer made a reservation the e-mail subject is “reservation made”, but if I do this,

Dynamicweb.Frontend.PageView pv = new Dynamicweb.Frontend.PageView(101);

                  pv.Load();

                   

                  DataRow row = pv.Content.getParagraphrow(101,101,"eCom_Cart");

                  XmlDocument settings = new XmlDocument();

                  settings.LoadXml(row["ParagraphModuleSettings"].ToString());

Dynamicweb.eCommerce.Frontend.Renderer render = new Dynamicweb.eCommerce.Frontend.Renderer(pv, row);

                  render.RenderOrder(o, template, true);


the email subject is the order ID instead “reservation made” (that’s what should be)

I don’t know what I’m doing wrong?

Replies

 
Nicolai Høeg Pedersen
Reply
DataRow row = pv.Content.getParagraphrow(101,101,"eCom_Cart");

Is both PageID and ParagraphID 101? I think that is the reason. If you have more than one cart on this page, it will take one or the other.

If a pargraphid is specified (first 101), it will take that paragraph from whatever page it resides. So if you are on page 101 and only have one cart on that page, you should do like this:
DataRow row = pv.Content.getParagraphrow(0,101,"eCom_Cart");

Another thing - you should not use the pageview constructor, but do like this:
Dynamicweb.Frontend.PageView pv = Pageview.GetPageviewByPageID(101);

 

You must be logged in to post in the forum