Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jonas Eriksson 930 posts 1825 karma points
    Aug 20, 2014 @ 12:36
    Jonas Eriksson
    2

    Not picking up existing members as customers

    I installed Merchello 1.3 into a fresh Umbraco 7.1.4 and added a sample customer. After that I read the manual and found that Merchello can pick up umbraco members as customers. So I tried that by adding a Customer MemberType and then a sample Customer member. But that one did not show up in Merchello/Customers. Where did I go wrong?

    Oh, btw - huge thanks for creating Merchello and making it Open Source!

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Aug 20, 2014 @ 23:08
    Rusty Swayne
    100

    Hi Jonas,

    The customer gets created when it's needed - so once you've logged into a page that uses the Merchello CustomerContext - like a page that inherits from MerchelloTemplatePage. I will add it to my list to look at actually triggering Customer creation based on the MemberService.Created event. Not sure why we did not think of that before!

    Thanks!

  • Jonas Eriksson 930 posts 1825 karma points
    Aug 21, 2014 @ 16:22
    Jonas Eriksson
    0

    Cool, I guess that will be enough for most cases though. 

    Now I got the members to be picked up as customers - but without names and emails unfortunately, I got them as empty lines in the customer page. And when I checked in the merchCustomer table they got blanks in those fields (loginName was correctly added though). Entered the names manually and restarted - then I saw them in the customer page. 

     

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Aug 21, 2014 @ 17:40
    Rusty Swayne
    0

    I noticed that one too. We're fixing it to default to the loginName if the first name and last names are not present.

  • Jonas Eriksson 930 posts 1825 karma points
    Aug 21, 2014 @ 18:08
    Jonas Eriksson
    0

    Ah, I see, I do not have those fields, thought it should've taken the member name. Still wondering why it did not get my email field though?

    Sounds like a good sln with the defulat to loginName, or perhaps simply add loginName to the grid? Could be useful if you have customers with the same name and need a quick way to separate them visually before opening their details.

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Aug 21, 2014 @ 19:22
    Rusty Swayne
    0

    Hi Jonas,

    I added the event handler yesterday in the 1.4.0-lists branch of the repository that creates a customer and uses the Username and Email => LoginName and Email.

    I've gone back and forth with the FirstName and LastName fields as they do get used on Invoices and Shipments for example. Also, since Umbraco members do not define these we face a bit of a conundrum in the sense that one of things we decided is a rule in Merchello is not to force the developer to add any fields to content types, rely on any dependencies that Umbraco does not otherwise already use or require use and Merchello specific templates on the front end.

    The customer view in Merchello should allow for the email address to be clicked to edit the customer as well. However, that may have been patched after the 1.3.0 release. Adding loginName to the grid is a good idea - I'll add that as a task for 1.4.0.

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Aug 21, 2014 @ 19:26
  • Simon 691 posts 1066 karma points
    Jul 30, 2015 @ 12:05
    Simon
    0

    Hi Rusty,

    First: I have custom properties in Memer Type Customer, in umbraco, as First Name and Last Name. How can they be reflected also in Metchello list of customers, since they are not being filled; only the email.

    One more thing: and the addresses, how can I can I enable users to create addresses from their Edit profile section? Currently, I have the edit profile default snippet of the Umbraco.

    Thank you.

    kind Regards.

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Jul 30, 2015 @ 13:02
    Rusty Swayne
    0

    Hi Simon,

    For the first and last name you could use an event handler on Umbraco's MemberService.Saved event.

    Here's how I did it in the Bazaar starter:

    https://github.com/Merchello/Merchello/blob/1.10.0/src/Merchello.Bazaar/UmbracoEventHandler.cs

    For the addresses, you would use the Merchello ICustomer rather than the member. Assuming you are using the default CustomerContext in Merchello:

       var customerContext = new CustomerContext(UmbracoContext);
    
    
       if(!customerContext.CurrentCustomer.IsAnonymous) 
       {
              var customer = (ICustomer)customerContext.CurrentCustomer;
    
              // this will have the address collection and some extensions associated to deal with the customer's set of addresses.
    
             // customer.Addresses;
             // customer.CreateCustomerAddress( ...
       }
    

    Here is how I did that in the Bazaar build:

    https://github.com/Merchello/Merchello/blob/1.10.0/src/Merchello.Bazaar/Controllers/Surface/AccountOperationsController.cs

    Let me know how it goes =)

  • Simon 691 posts 1066 karma points
    Jul 30, 2015 @ 13:06
    Simon
    0

    Ok Thanks.

    what is the Bazaar, please? Sorry, but I am new to Merchello and trying to incorporate it with a site.

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Jul 30, 2015 @ 13:14
    Rusty Swayne
    0

    The Bazaar is a starter kit with a basic store implementation.

    There are two packages:

    • Merchello.Bazaar.CombinedInstall - this will install both Merchello and the store front
    • Merchello.Bazaar.StoreOnly - this installed only the store front but you need to have installed Merchello previously (so you can uninstall the front end without uninstalling Merchello)

    The source code to the Bazaar is open and available in the main Merchello repository - Merchello.Bazaar.sln

  • Simon 691 posts 1066 karma points
    Jul 30, 2015 @ 13:16
    Simon
    1

    thank you.

    I will install the Store only then.

    thank you.

  • Simon 691 posts 1066 karma points
    Jul 30, 2015 @ 13:34
    Simon
    0

    Hi Rusty,

    How can I edit the Account page for example, regarding HTML etc...and all the other pages that Bazaar installed/?

    thank you.

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Jul 30, 2015 @ 13:43
    Rusty Swayne
    0

    Hi Simon

    The Bazaar has a themes engine similar to Articulate. If you go to the

    App_Plugins/Merchello.Bazaar/Themes folder, copy one of the sub folders to a new child with a new name.

    ex. copy the "Sandstone" folder and name it "MyTheme"

    /App_Plugins/Merchello.Bazaar/Thems/MyTheme.

    Then go to the root Store node in the content, click the themes tab and select your theme.

    You can change the views in those folders however you like. I wrote a post last week http://uditty.com/articles/archive/using-common-site-views-with-theme-based-packages/ which discusses using these sorts of themes.

  • Simon 691 posts 1066 karma points
    Aug 03, 2015 @ 07:35
    Simon
    0

    Hi Rusty,

    How can I make all the theme views etc... using the master layout which I had before in the View folder?

    kind regards.

  • Simon 691 posts 1066 karma points
    Aug 03, 2015 @ 07:41
    Simon
    0

    In other words, how can I combine the existing website, the pages that I had etc.. with the Bazaar store, please?

    thank you.

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Aug 03, 2015 @ 16:14
  • Simon 691 posts 1066 karma points
    Aug 04, 2015 @ 10:12
    Simon
    0

    It is quite complicated :/

    Are there an easy way round how can I change the master page of the Bazaar views to my master page that I had before in Umbraco, before I installed merchello?

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Aug 04, 2015 @ 15:11
    Rusty Swayne
    0

    @Simon

    If your Master view uses IPublishedContent it should work.

  • Simon 691 posts 1066 karma points
    Aug 05, 2015 @ 07:06
    Simon
    0

    Hi Rusty,

    My current master page is inherting from

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage
    

    But now, I want it to be the masterpage for both pages of merhcello, and even the other pages that I had before, which also inherts from UmbracoTemplatePage.

    If I change the Masterpage to inherit from @inherits Umbraco.Web.Mvc.UmbracoViewPage<MasterModel>, merchello pages will work, but the other pages will not work.

    How can I manage it to work for both uses please?

    thank you.

    kind regards.

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Aug 05, 2015 @ 15:46
    Rusty Swayne
    0

    Hi Simon

    I just did a quick test to see if IPublishedContent works, and it does.

    I created a view through Umbraco named Base.cshtml and then changed UmbracoTemplatePage to UmbracoViewPage<IPublishedContent>

     @inherits Umbraco.Web.Mvc.UmbracoViewPage<IPublishedContent>
     @{
         Layout = null;
        }
    
      <html>
        <head>
              <title>@Model.Name</title>
         </head>    
         <body>
             @RenderBody()
         </body>
     </html>
    

    Then in my Bazaar theme I ripped out a bunch of stuff in the Master.cshtml so it looks like

    @inherits Umbraco.Web.Mvc.UmbracoViewPage<MasterModel>
    @using Merchello.Bazaar
    @using Merchello.Bazaar.Models.ViewModels
    @{
         Layout = "../../../../../Views/Base.cshtml";
     }
    
    @Html.ThemedPartial(Model, "NavBar")
    <div class="container">
        @RenderBody()
    </div>
    @RenderSection("AdditionalScripts", false)
    

    and it works aside from the JS I did not wire up.

    In you base theme you will need to include JQuery and /App_Plugins/Merchello.Bazaar/Assets/js/merchello.bazaar.js

Please Sign in or register to post replies

Write your reply to:

Draft