Brenden Kehren
-
3/1/2013 10:19:55 AM
RE:Ecommerce customers, link to custom table
You could add a new page to the ECommerce Customer module and allow the customer service person to view all comments for that customer and add more comments. I haven't tested this but it would be a good step in the right direction.
1. Agreed, a custom table seems like the way to go. Or even a table not marked as custom. Only benefit of a Custom Table is the ability to add/edit/delete content and schema from within the UI and perform searches within the data. If this isn't needed then just create a table in the database. 2. Create a new page called Customer_Comments.aspx in /CMSModules/Ecommerce/Pages/Tools/Customers/ that would inherit the CMSCustomersPage and have a cms:UniGrid on it to display the records entered in the custom table 3. On the newly created page, create a simple form that performs an insert to the custom table. (or create an "Edit" page do to that work) 4. Register the new page in the ECommerce module in the Site Manger>Development>Modules. Select ECommerce>Orders>Customers. 5. With Customers selected, click New Element and Enter Customer Comments for the Dislay name and Caption and enter the URL of ~/CMSModules/Ecommerce/Pages/Tools/Customers/Customer_Comments.aspx?customerId={%customerId%}&orderid={%orderid%} to your new page.
And just like that, you have the ability to view and add comments per site and customer! One thing I didn't add what the custom table schema, but I'm assuming you have that figured out that you'd need a site ID, and customer ID in there in order to bring up the records per site and customer. You can also reference the pages in the ~/CMSModules/Ecommerce/Pages/Tools/Customers/ directory to help you get some additional info, like how they get the customer ID or CustomerInfo object.
Best of luck.
|