E-commerce customisations
Hello,
I've been playing around with the Sitefinity e-commerce module for the first time, and I would like to get some information about four issues I have. I'm using the latest Sitefinity release with the professional license.
1)
Our client would like to have some products only available to certain roles (for instance Managers). So when you log in and you have the role as Manager you would get to see some extra products that normal customer won't see, or have the ability to order that product whereas other customers won't be able to. Is it possible to make something like this?
2)
On the product details page there is a widget called 'AddToCartWidget' is it possible to edit this widget? Perhaps I could add a little check which role the user is applied to and allow or disallow the product to be added to the shopping cart according to the role (which would be a way to solve question 1).
3)
Is there a way to add a custom workflow with E-commerce? The only (limited) options I see is about publishing pages and other things. Would our client would like for instance is when a user places a order, a mail will be send out to a manager for acceptance.
I know I could redirect the confirmation to another page with a custom made widget which sends some extra e-mails but perhaps there is a better way to do this.
4)
Is there a way to reject a placed order and notify the customer about this (with a reason)? The only option I can find is to delete the order but I don't think the user would get a notification about it and the order will be deleted instead of having a new status (rejected).
Thanks for the answers!
Rick.
Hello Rick,
1)
For this you would extend the Product List widget as discussed in this blog post.
Basically, you will create a class that inherits from the ProductsMasterView class and override the GetDataSource method.
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Web;
using
Telerik.Sitefinity.Modules.Ecommerce.Catalog.Web.UI.Views;
using
Telerik.Sitefinity.Ecommerce.Catalog.Model;
using
Telerik.Sitefinity.Model;
namespace
SitefinityWebApp
public
class
ProductsMasterViewCustom : ProductsMasterView
protected
override
IList<Product> GetDataSource()
IList<Product> prodList =
base
.GetDataSource();
// if user is not in Manager role
// remove products from list
return
prodList;
I created this class exactly as it is (except I called it ProductListCustom). Registered in the backend ( according to instruction in page docs.sitefinity.com/register-a-new-widget-in-the-backend ) as follows:
Control CLR Type or Virtual Path: SitefinityWebApp.CustomClasses.ProductListCustom, SitefinityWebApp
Name: CustomisedProductList
Title: Customised Product List
Please note: nothing in Controller CLR type as the instructions did not mention that field.
When I added the new custom widget to a page I get error message: Error parsing the template.
Can you say what I have missed?
Thanks.