Giter Site home page Giter Site logo

ecommerce's Introduction

Mr CMS

Mr CMS is an ASP.NET MVC 5 C# open source content management framework

Mr CMS wraps up a lot of the time consuming aspects of website creation. Mr CMS is a framework for developers create bespoke website whilst at the same time giving content editors an easy to use CMS.

Apps

Apps in Mr CMS contain all the functionality your website requires. For example, you might want a Blog App which contains page definitions for a list of blogs and a blog page itself.

Mr CMS comes with 3 basic apps, 'Core', 'Articles' and 'Galleries'. The CoreApp contains basic concepts such as login and registration. It also has some basic page types such as 'TextPage' which can be used as a base page type for other pages.

Ultimately though, you can throw these three apps out and start building your own if you want.

Creating your first Mr CMS App

The first step in creating an app is to create a folder in the Apps folder. For example, 'Blog'. In here create a file called BlogApp.cs.

public class BlogApp : MrCMSApp
{
    public override string AppName
    {
        get { return "Blog"; }
    }

    public override string Version
    {
        get { return "0.1"; }
    }

	protected override void RegisterServices(IKernel kernel)
    {
        
   }

    protected override void RegisterApp(MrCMSAppRegistrationContext context)
    {
    }
}

This registers your App with Mr CMS. Note that your App definition must inherit from MrCMSApp.

Next create a folder called 'Apps\BlogApp\Pages' and create a file called Blog.cs

public class Blog : Webpage
{
	[DisplayName("Featured Image")]
    public virtual string FeatureImage { get; set; }

    [AllowHtml]
    [StringLength(160, ErrorMessage = "Abstract cannot be longer than 500 characters.")]
    public virtual string Abstract { get; set; }
}

Note in this instance we are inheriting from Webpage. This tells Mr CMS that this page can be added to the CMS. Webpage has a lot of properties which are shared across all webpages, such as Page Tile and Meta Description. It also has BodyContent for the main body of text of any webpage.

Finally create a folder called Views\Pages and within that folder add a page to display the Blog.

<article>
	<div class="row">
		<div class="col-md-12">
			<h1 class="margin-top-0">@Editable(Model, p => p.Name, false)</h1>
			<a href="/@Model.Parent.UrlSegment" class="btn btn-default">Back</a>
			@Model.CreatedOn.Day @Model.CreatedOn.ToString("MMMMM") @Model.CreatedOn.Year
			<br />
			@if (!String.IsNullOrEmpty(Model.FeatureImage))
			{
				<a href="/@Model.LiveUrlSegment" class="margin-top-0">@RenderImage(Model.FeatureImage)</a>
			}
			@Editable(Model, page => page.BodyContent, true)
		</div>
	</div>
</article>

Note here we use @Editable - this allows inline editing of content. Passing in True/False argument will enable or disable HTML editing.

Finally you need to add a page in Apps\BlogApp\Areas\Admin\Views\Webpage\ to add the additional editable fields we defined earlier.

<div class="form-group">
	@Html.LabelFor(model => model.FeatureImage, "Article Image") <br />
	@Html.TextBoxFor(model => model.FeatureImage, new { data_type = "media-selector" })
</div>
<div class="form-group">
	@Html.LabelFor(model => model.Abstract)
	@Html.TextAreaFor(model => model.Abstract, new { @rows = "2", @class = "form-control" })
</div>

This is the page Mr CMS uses to edit your custom page fields.

At this point you now have a new page type which can be added to Mr CMS. You can have a lot more control over your pages and how they act by using DocumentMetadataMap<> - this class allows you to specify page behaviour, for example if you have custom Controller you'd like to use rather than the standard Mr CMS one you can specify that here.

The Mr CMS ECommerce App listed on GitHub has a lot more functionality to it that just a simple page, so if you'd like to see how more complicated apps are built check this project out.

Feature list

  • Unlimited document types
  • Lucene based search architecture - easily create search indexes for super fast content filtering and searching of '000's of items.
  • Layouts & Layout areas give complete control over widgets on each page
  • Bulk media upload and management
  • Azure or file based media storage
  • Inline content editing
  • Error logging
  • Task management
  • SEO - Control over meta details
  • URL History table - keep track of URL changes. When a URL changes create 301 redirect to new location
  • URL History - add URLs at will to create redirects or if importing from another system add in the original URLs here
  • Form builder - create forms on the fly and collect their data
  • Enforce user login to page
  • SSL per page
  • User management & roles
  • Document version control
  • Complete control of page meta data - I.E when creating a page type (e.g BlogPage) control what type of pages can be added below it, say weather the page can maintain url hierarchy, say how many children should show in the page tree in item (if there are 000's of pages you might only show the top 5 pages) and lots more
  • Content managed into apps
  • Themes - override standard views
  • Multi-site capability - run multiple domains through one set of files & admin system
  • ACL
  • Webpage import and export
  • Site duplication button to duplicate a website quickly
  • Azure support

Release History

1.0 - TBC 2019

  • Feature: Upgrade to .NET Core
  • Feature: Bootstrap 4 integration in admin / Core app
  • Feature: Notifications (Web Push)
  • Feature: Admin LTE admin base for more responsive experience

0.6 - January 2019

  • Feature: Restore Cloudflare IP
  • Feature: Tracking Scripts (top of body). Ability to add scripts below (e.g Google AdTag manager iFrame)
  • Feature: Add test email functionality
  • Feature: Raygun implementation for centralised logging
  • Feature/SEO: Self referencing canonical or over-ride on SEO and properties tab
  • Feature: Move and Merge Webpages
  • Performance: Full page caching. Ability to output cache a full webpage.
  • Fix: Lucene write lock when cache cleared and index is being written to.
  • Security: Record logins
  • Security: Email Alerts for login
  • Security: Monitor the scripts per page (header/footer). Alert on change.
  • Security: Two factor authentication via email
  • Security: File types now configured in web.config
  • Note: Now targets .NET 4.7

0.5.1 - September 2016

  • Swapped out old Azure caching for Redis cache
  • Brought in the concept of a staging URL and staging Robots.txt - this allows us to use Azure Deployment Slots
  • Message queue now allows attachments
  • The Mr CMS admin logo can now be swapped out through System Settings - Site Settings
  • Removed Self Execute Tasks which uses HostingEnvironment.QueueBackgroundWorkItem due to unreliability of execution. Instead use external task system to poll the task executor URL.
  • Files are moved off disk for use with Azure websites scaling and deployment slots
  • Settings are migrated back to the database. Note: Remove unused .json files from App_Data/Settings. Settings will auto migrate but issues may occur if unused .json files are in the directory
  • Message templates moved back to database
  • Connection string now in ConnectionStrings.Config
  • Sitemaps now output to disk and are scheduled for rebuild via tasks
  • Favicons can be rendered at different sizes using @Html.RenderFavicon(size: new Size(16, 16))
  • Better media management and uploading notifications
  • Azure probe settings for using traffic manager
  • Added more ACL rules for core functionality
  • Performance: Nhibernate configured for non-eager loading of entities to improve database performance
  • Performance: Limited URL lengths to 450 to allow for indexes to be applied in SQL Server
  • Performance: Whitespace filter now compiled
  • Fixed: Daylight savings date/time issue
  • Fixed: Empty writes to the universal search index
  • Fixed: Issue with the close icon on the inline widget editing
  • Fixed: 404s were returning 404 status but with a blank response. Fixed to return 404 HTML see Views/Error/FileNotFound.cshtml
  • Breaking Change: Localised scripts now rendered separately to other scripts using @{ @Html.RenderLocalisedScripts();}
  • Breaking Change: Rewrite of the task execution system so that tasks are system wide rather than site specific. Tasks can now be enabled or disabled. This is a breaking change and tasks should be updated to disable site filters for any multisite websites.
  • Breaking Change: Mail settings are set at the system level rather than site level. Mail settings will need to be reconfigured
  • Breaking Change: System settings now stored in mrcms.config - the new location for hosting specific settings
  • Breaking Change: Remove Azure Directory for Lucene (We are slowly moving away from Lucene and looking at other solutions which work better with cloud based hosting and scaling)

ecommerce's People

Contributors

andrewdking avatar gemol avatar gmstr avatar mdirashid avatar myozarni avatar will-bill avatar yandawl avatar youabeach avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ecommerce's Issues

Dialect does not support DbType.Double Parameter name: typecode

Hello everybody,

by installation with mysql I get an ArgumentException with this Stacktrace:
at NHibernate.Dialect.TypeNames.Get(DbType typecode)
at NHibernate.Dialect.TypeNames.Get(DbType typecode, Int32 size, Int32 precision, Int32 scale)
at NHibernate.Dialect.MySQLDialect.GetCastTypeName(SqlType sqlType)
at NHibernate.Criterion.AvgProjection.ToSqlString(ICriteria criteria, Int32 loc, ICriteriaQuery criteriaQuery, IDictionary2 enabledFilters) at NHibernate.Loader.Criteria.CriteriaQueryTranslator.GetSelect(IDictionary2 enabledFilters)
at NHibernate.Loader.Criteria.CriteriaJoinWalker..ctor(IOuterJoinLoadable persister, CriteriaQueryTranslator translator, ISessionFactoryImplementor factory, ICriteria criteria, String rootEntityName, IDictionary2 enabledFilters) at NHibernate.Loader.Criteria.CriteriaLoader..ctor(IOuterJoinLoadable persister, ISessionFactoryImplementor factory, CriteriaImpl rootCriteria, String rootEntityName, IDictionary2 enabledFilters)
at NHibernate.Impl.MultiCriteriaImpl.CreateCriteriaLoaders()
at NHibernate.Impl.MultiCriteriaImpl.List()
at NHibernate.Impl.FutureCriteriaBatch.GetResultsFrom(IMultiCriteria multiApproach)
at NHibernate.Impl.FutureBatch2.GetResults() at NHibernate.Impl.FutureBatch2.get_Results()
at NHibernate.Impl.FutureBatch2.GetCurrentResult[TResult](Int32 currentIndex) at NHibernate.Impl.FutureBatch2.<>c__DisplayClass11.<GetFutureValue>b__0() at NHibernate.Impl.FutureValue1.get_Value()
at MrCMS.Web.Areas.Admin.Services.Batching.BatchRunUIService.GetCompletionStatus(BatchRun batchRun) in C:\Users\Richard\Documents\Visual Studio 2015\Projects\ECommerce\MrCMS.Web\Areas\Admin\Services\Batching\BatchRunUIService.cs:line 86
at MrCMS.Web.Areas.Admin.Events.UpdateBatchRunResult.Execute(OnUpdatedArgs`1 args) in C:\Users\Richard\Documents\Visual Studio 2015\Projects\ECommerce\MrCMS.Web\Areas\Admin\Events\UpdateBatchRunResult.cs:line 24

Recurring billing for subscription based products

Hello,

I want to sell a monthly subscriptions for various services and would like to manage this through MrCMS Ecommerce.

Do you have anything in the pipeline for recurring billing for subscription based products?

Thanks

Chris

Admin bar with ACL enabled

The default base ecommerce layout view (_BaseEcommerceLayout.cshtml) uses the following code to determine if the admin bar should be shown:

@if (CurrentRequestData.CurrentUserIsAdmin && SiteSettings<SiteSettings>().EnableInlineEditing)
    {
        Html.RenderAction("InPageEditor", "InPageAdmin", new { id = Model.Id, area = "Admin" });
    }

The problem with this is that it doesn't appear to pickup the ACL rules. To fix this, in my themes I now do the following:

@using MrCMS.ACL.Rules
...
@if (CurrentRequestData.CurrentUser != null && CurrentRequestData.CurrentUser.CanAccess<AdminBarACL>("Show") && SiteSettings<SiteSettings>().EnableInlineEditing)

    {
        Html.RenderAction("InPageEditor", "InPageAdmin", new { id = Model.Id, area = "Admin" });
    }

I copied this code from the core base layout view (_BaseLayout.cshtml).

Chris

Braintree account - 3D Secure issue

I ran into a problem with Braintree and the default Braintree sandbox account. Because the default account wasn't 3DS enabled (I did request one that was) I kept getting the following message:

Merchant account not 3D Secure enabled

I fixed this by putting in a check for if 3DS is required and now call a tokenizeCard method instead of check3DSecure if 3DS is not required.

Braintree support offered a couple of suggestions like specifying the merchant ID in the setup or making the 3DS account default but I think this change handles the "3D Secure Required?" option in MrCMS.

I will create a pull request for your consideration.

Thanks

Chris

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.