NopCommerce Designer
NopCommerce Designer
Contents
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. Overview Installing / Applying theme in nopCommerce Creating / Writing your own theme (using current / default theme) Understanding Layout / Design Customizing nopCommerce Themes Right To Left Theme Widgets Mobile Theme Tips and Tricks Contributing a Theme
2. 3. 4.
Go to the admin section (www.yourdomain.com/admin). Go to Configuration > Settings > General And Miscellaneous settings Select new theme from "Desktop Store theme" dropdown and SAVE. Now, go to public store. You should be able to see the new theme on your website.
1.
If using sourcecode: \Nop.Web\Themes\ If using web version: \[Project Root]\Themes\ Select any default / current theme
2. 3. 4. 5. 6.
Now, Right click on the theme > select COPY Now select "Theme" folder > right click > PASTE You will get something like "Copy of default/current theme" Rename it - whatever you like to be the name of your new theme For an instance, let's say: MyFirstTheme Now inside your New theme folder "MyFirstTheme" > open "theme.config" - Change the current / existing theme name with your new theme name "MyFirstTheme"
Like this:
7.
Now inside your new theme folder "MyFirstTheme" > View > Shared > open "Head.chtml" - Change the current / existing theme name with your new theme name "MyFirstTheme" Like this:
Now, inside your new theme folder "MyFirstTheme" > Content > Images add your new images in "images directory and start updating / customizing your style.css accord ing to your requirements. If you would like to test the changes > Go to Admin section > Apply your new theme > Save change and preview your public store.
All these 3 layouts are inherited from one main layout called: _Root.cshtml. The _Root.cshtml itself is inherited from _Root.Head.cshtml. _Root.Head.cshtml is the file you need to look into if you are linked css stylesheet and jquery files (you can add / link more .css and .js files here). The location of all these layouts in nopCommerce is as follows: nopCommerce root directory/Views/Shared/... . If you are using source code version then: \Presentation\Nop.Web\Views\Shared\...
Layout of _Root.cshtml
_ColumnsOne.cshtml
In this case, there is no change in the layout of the body, so the structure remains pretty much the same as _Root.cshtml:
_ColumnsTwo.cshtml
In this case, there are 2 columns in the body structure:
_ColumnsThree.cshml Layout
In this case, there are 3 columns in the body structure:
In order to upload your store logo in a nopCommerce website, there are basically 2 methods: First Method a. b. c. Go to nopCommerce root folder /Themes/YOUR THEME/Content/images/ Look for logo.gif image file Replace the logo.gif with your store logo and name it as logo.gif (with same width:310px and height:60px)
Second Method a. b. c. d. Save your store logo in this location : nopCommerce root folder/Themes/YOUR THEME/Content/images/ Go to nopCommerce root folder/Themes/YOUR THEME/Content/ Open style sheet: style.css Look for the css class "a.logo" and you will find this:
e. a.logo{background:url(images/logo.gif);display:block;width:310px;heig ht:60px;text-decoration:none;}
In the above mentioned css code: logo.gif is the name of the store logo image file f. g. Change logo.gif with YourLogo.gif/jpg/png (and specify the width and height of your new logo) Save changes to your style sheet (style.css) and preview your public store
Important: You might have to refresh the browser in order to see the changes (new store logo).
2. .master-wrapper-page{margin:30px auto 0;width:960px; 3. background: none repeat scroll 0 0 #FFF; 4. box-shadow: 0 0.5em 2em rgba(0, 0, 0, 0.1); 5. -moz-box-shadow: 0 0.5em 2em rgba(0, 0, 0, 0.1); 6. -webkit-box-shadow: 0 0.5em 2em rgba(0, 0, 0, 0.1);} 7. 8. .master-wrapper-content{float:left;width:930px;margin:15px 15px 0 15px;padding: 15px 0 0;text-align:left;background: none repeat scroll 0 0 #FFFFFF;}
9. If you would like to customize / make changes in the layout of _ColumnOne.cshtml. Please look for this css code in your style.css
Widgets
A widget is a stand-alone application that can be embedded into third party sites by any user on a page. It's a small application that can be installed and executed within a web page by an end user. (Wikipedia). In nopCommerce, a widget plugin allows you to embed 3rd party code / application in public store in certain areas (for example, head tag, after body tag, left column block and right column block). Currently, default nopCommerce installation allows the store admin to embed two widget plugins: 1. 2. Google Analytics Nivo Slider
To configure Google Analytics Widget, go to Administration > Content Management > Widgets, click on "Configure" against "Google Analytics" and add your Google Analytics code.
Nivo Slider
Nivo slider is a nice and clean jquery image slider for your website / homepage to display a number of images scrolling with unique transition effects. By default, nopCommerce comes with nivo slider integration as a widget (Enabled by default) which allows you to display number of images scrolling automatically on your homepage.
Mobile Theme
As mobile technology is growing, mobile friendly website are becoming an important aspect of online business in order to reach full market that includes all kinds of online customers i.e. who access the standard desktop website and who access the website using their mobile devices.
nopCommerce does support mobile devices and it comes with a user-friendly mobile theme. In order to enable and select the mobile theme on your nopCommerce website, please go to Administration > Configuration > Settings > General and Miscellaneous Settings and ensure that "Mobile devices supported" is enabled.
nopCommerce website on Mozilla Firefox browser, go to "Tools" > "Default User Agent" and select "iPhone 3.0". Now, refresh your website and you will see your nopCommerce mobile site.
2. 3. 4.
5. 6.
Contributing a Theme
nopCommerce is supported by a very active community. So, any kind of contribution is highly appreciated. You can now share your theme with other users by Extensions section of nopCommerce website. Just go to My account page, then "Your contributions and extensions" tab. Click "Upload a new extension" button in order to upload a new theme.