What is uCommerce?

uCommerce is an e-commerce offering fully integrated with Umbraco for building online stores. With uCommerce and Umbraco you create unique and powerful e-commerce webshops fully customized to your client's requirements.

uCommerce is completely integrated with the Umbraco membership system. Configure whether you want customers created during checkout for login to review ordering history and more.

  • Use the Umbraco membership to stay in touch with with past customers.
  • Create profiles for your customers automatically when they buy
  • Segment customers using groups
  • View customer profiles in back office
  • Store additional information about your customer on their profile such as sign ups for newsletters
  • Search for customer profiles
  • Maintain e-mail templates with rich text editing capabilities
  • Control who can maintain your store

So, how to adding new tab under uCommerce Admin sections in Umbraco 6.0.0? Steps for adding new tab in uCommerce section :

1. Add new user control for custom tab view


To add new tab first create new user control in your website, go to website in visual studio add new user control where you want as per your defined directory structure. It is good to place new user control under /usercontrols folder in Umbraco website.

So the virtual path for newly created user control will be “../../../usercontrols/TestTab.ascx”.
Inherit newly created user control from Ucommerce.Presentation.Web.Controls.ViewEnabledControl<T>
The generic parameter T must be type of view which you want to load your user control to appear on. Most commonly used views and their types are discussed below.

So if you are inheriting your user control from any of these views you can register for following events.
event EventHandler<EntityCommandEventArgs<T>> Saving;
event EventHandler<EntityCommandEventArgs<T>> Saved;

event EventHandler<EntityCommandEventArgs<T>> Deleting;
event EventHandler<EntityCommandEventArgs<T>> Deleted;

2. Insert New Row For Tab in Database

In uCommerce uCommerce_AdminTab refers to uCommerce_AdminPage for parent page container of your tab(usercontrol). So you have to add your usercontrol entry into uCommerce_AdminTab table and should give the AdminPageId from uCommerceAdminPage table to select on which view or page you going to add your new tab. See the visuals



As per the information in the above table you can insert an entry into uCommerce_AdminTab table for new tab. Build your solution and your new tab is ready under the view you have selected.

Hide/Show custom tab for particular section


As explained earlier your new tab will be visible for view you have selected, Consider an example where you want to do some functionality Completed Orders (uCommerce >> Orders >> Completed Orders) and if you have followed above steps your new tab will be visible for all remaining sections like New Orders, Requires Attention etc.
To hide or show your tab for particular section only, implement ISection interface in your user control and set the Show property as per your requirement.
For ex:


So this will show your custom user control for Completed Orders only.