E-commerce customisations

Posted by Community Admin on 05-Aug-2018 11:46

E-commerce customisations

All Replies

Posted by Community Admin on 07-Nov-2012 00:00

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.

Posted by Community Admin on 12-Nov-2012 00:00

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;
        
    

2)
You can override the AddToCartWidget class but hiding the product completely would be the ideal solution (see #1). However, you may want to do this anyway in the case of someone getting to the product by using its URL directly.

3)
For this you can either use an offline payment processor or create a custom one that just does authorization. Then use the post purchase hook to send email to a manager.

4)
We don't yet have the idea of "rejecting" an order, but you can delete it which will cause the Order Status Changed event to fire which you can subscribe to and send out your email.

I hope you find this information useful. Please let us know if you need additional information.

All the best,
Randy Hodge
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 31-Aug-2016 00:00

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.

This thread is closed