Our client would like to send a brochure to first time customers. Is there a way to easily see if the customer has made any past orders from the back end?
Our client would like to send a brochure to first time customers. Is there a way to easily see if the customer has made any past orders from the back end?
Look for the smily faces on the View/Manage order page in the admin site. They get one for each successful order, so one smily = their first order.![]()
Perfect! Thanks a bunch.
It turns out this isn't quite what our customer is looking for. They would like the number of orders to show up on the receipt so that the warehouse knows to send a brochure. Would the notification.receipt.xml.config file need to be edited to make this happen? Has anyone done something like this before?
If you have the source code, you can add this method under the AspDotNetStorefrontCore.XSLTExtensionBase:
Then insert the highlighted parts on the notification.receipt.xml.config:Code:public virtual string GetOrderHistory(string sCustomerID) { InputValidator IV = new InputValidator("GetOrderHistory"); int customerID = IV.ValidateInt("CustomerID",sCustomerID); int Timeline = DB.GetSqlN("select count(ordernumber) N from orders where customerid = " + customerID); return Timeline.ToString(); }
and that's it...Code:<table id="tblOrderHeader" width="100%" > <tr> <td class="tdOrderHeaderLabel"> <span id="lblOrderHistory"> <!--Order History--> <xsl:value-of select="'Order History'" disable-output-escaping="yes" /> </span> </td> <td class="tdOrderHeaderValue"> <span id="lblOrderHistory"> <xsl:value-of select="aspdnsf:GetOrderHistory($OrderInfo/CustomerID)" /> </span> </td> </tr> <tr> <td class="tdOrderHeaderLabel"> <span id="lblOrderNumber"> <!--Order Number--> <xsl:value-of select="aspdnsf:StringResource('notification.betareceipt.xml.config.29')" disable-output-escaping="yes" /> </span> </td> <td class="tdOrderHeaderValue"> <span id="lblOrderNumber"> <xsl:value-of select="$OrderInfo/OrderNumber" /> </span> </td> </tr> <tr>![]()
Is there a way to run any reports to see a number or percentage of customers who have placed more than one order?
We have around 70000 customers and counting the smiley faces may make me feel I was in an 80's rave
Cheers
Well, under the {root}/{AdminDir}/orderframe.aspx.cs, simply comment out the following lines:
and add these lines as a replacement:Code:if (NumOrders > 0) { Response.Write("<tr><td align=\"right\" valign=\"top\">Order History: </td><td align=\"left\" valign=\"top\">"); Response.Write("<a target=\"content\" href=\"cst_history.aspx?customerid=" + DB.RSFieldInt(rs2, "CustomerID").ToString() + "\">"); for (int i = 1; i <= NumOrders; i++) { Response.Write("<img src=\"" + AppLogic.LocateImageURL("skins/skin_" + SkinID.ToString() + "/images/smile.gif") + "\" border=\"0\" align=\"absmiddle\">"); if (i % 25 == 0) { Response.Write("<br/>"); } } Response.Write("</td></tr>\n"); }
This would replace the smileys with a numerical count of order history...Code:if (NumOrders > 0) { Response.Write("<tr><td align=\"right\" valign=\"top\">Order History: </td><td align=\"left\" valign=\"top\">"); Response.Write("<a target=\"content\" href=\"cst_history.aspx?customerid=" + DB.RSFieldInt(rs2, "CustomerID").ToString() + "\">"); Response.Write("<b>"+ NumOrders.ToString()+"</b>"); Response.Write("</td></tr>\n"); }![]()