+1-888-365-2779
Try Now
More in this section

Forums / Ecommerce / E-commerce customisations

E-commerce customisations

3 posts, 0 answered
  1. Rick
    Rick avatar
    14 posts
    Registered:
    02 Feb 2012
    07 Nov 2012
    Link to this post
    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.
  2. Randy Hodge
    Randy Hodge avatar
    96 posts
    Registered:
    03 Nov 2014
    12 Nov 2012
    Link to this post
    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
  3. John
    John avatar
    0 posts
    Registered:
    10 Sep 2013
    31 Aug
    Link to this post

    I created this class exactly as it is (except I called it ProductListCustom). Registered in the backend ( according to instruction in  page http://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.

3 posts, 0 answered