OpenCart Modules, Themes, Custom Development - OCWP · 2016. 2. 17. · if your OpenCart admin user...

27
Product Documentation February, 2016 OCWP WordPress in OpenCart © 2016, iSenseLabs isenselabs.com

Transcript of OpenCart Modules, Themes, Custom Development - OCWP · 2016. 2. 17. · if your OpenCart admin user...

Page 1: OpenCart Modules, Themes, Custom Development - OCWP · 2016. 2. 17. · if your OpenCart admin user is logged in and if they have access permissions to the route module/ocwp. Creating

Product Documentation

February, 2016

OCWP

WordPress in OpenCart

© 2016, iSenseLabs

isenselabs.com

Page 2: OpenCart Modules, Themes, Custom Development - OCWP · 2016. 2. 17. · if your OpenCart admin user is logged in and if they have access permissions to the route module/ocwp. Creating

OCWP Documentation

2 http://isenselabs.com

http://isenselabs.com/users/support

Table of Contents Table of Contents .................................................................................................................................................... 2

Chapter 1: Introduction........................................................................................................................................... 3

How to use this document ................................................................................................................................. 3

Chapter 2: Installation instructions and Licensing .................................................................................................. 4

Chapter 3: OCMod (Modification) changes ............................................................................................................ 5

Visibility of WordPress tables in Backup / Restore ............................................................................................ 5

Link to the WordPress admin panel ................................................................................................................... 5

Link to the WordPress front-end ........................................................................................................................ 5

Chapter 4: Linking OCWP with WordPress .............................................................................................................. 6

Scenario 1 – you have no existing WordPress blogs .......................................................................................... 6

Scenario 2 – you already have an existing WordPress blog ............................................................................... 8

Automatic administrator login ........................................................................................................................... 8

Creating a backup of the WordPress database .................................................................................................. 9

Chapter 5: The OCWP module dashboard ............................................................................................................ 10

Clear OCWP OpenCart cache button (top-right) .............................................................................................. 10

Dashboard > Main Settings .............................................................................................................................. 11

Dashboard > OCWP Modules ........................................................................................................................... 11

Dashboard > WordPress System ...................................................................................................................... 13

Manage your WordPress blog ..................................................................................................................... 13

Delete WordPress ........................................................................................................................................ 13

Dashboard > Error Log ...................................................................................................................................... 13

Dashboard > Help & Support............................................................................................................................ 13

Chapter 6: OCWP Sub-modules ............................................................................................................................ 15

Sub-module: Archives....................................................................................................................................... 15

Sub-module: Authors ....................................................................................................................................... 16

Sub-module: Categories ................................................................................................................................... 17

Categories in mobile view ........................................................................................................................... 21

Sub-module: Posts ............................................................................................................................................ 22

Chapter 7: Uninstalling OCWP .............................................................................................................................. 26

Deleting the WordPress installation ................................................................................................................. 26

Uninstalling OCWP ........................................................................................................................................... 26

Chapter 8: Getting support ................................................................................................................................... 27

Page 3: OpenCart Modules, Themes, Custom Development - OCWP · 2016. 2. 17. · if your OpenCart admin user is logged in and if they have access permissions to the route module/ocwp. Creating

OCWP Documentation

3 http://isenselabs.com

http://isenselabs.com/users/support

Chapter 1: Introduction

Welcome and thank you for your purchase of OCWP (OpenCart-WordPress) by iSenseLabs.

This document will teach you all you need to know about the OCWP extension.

How to use this document

The information you need is divided into chapters. In some sections you will notice the

following types of paragraphs which give you extra information:

We highly encourage all users to read and understand this documentation.

If you have any questions, the iSenseLabs support team is here to help. Feel free to contact us

in our support system:

http://isenselabs.com/users/support

Page 4: OpenCart Modules, Themes, Custom Development - OCWP · 2016. 2. 17. · if your OpenCart admin user is logged in and if they have access permissions to the route module/ocwp. Creating

OCWP Documentation

4 http://isenselabs.com

http://isenselabs.com/users/support

Chapter 2: Installation instructions and Licensing

These installation instructions assume that you have either a fresh or a customized installation

of OpenCart 2.0.1.0 or newer.

1) Unzip the downloaded ZIP file into a new folder.

2) Login to your OpenCart admin panel and go to Extensions > Extension Installer. Upload the

file ocwp.ocmod.zip, which is in the folder you created in Step 1.

3) Go to Extensions > Modules > OCWP and click the "Install" button.

4) Go to Extensions > Modifications and click the "Refresh" button on the top right.

5) Go to System > Users > User Groups and grant Access/Modify permissions for the following

routes: ocwp/archive, ocwp/author, ocwp/category, ocwp/post

6) OCWP is now installed. You can access it from Extensions > Modules > OCWP.

7) If you are using the OCWP module on a live server, make sure to insert your license key in

the Extensions > Modules > OCWP > Help & Support

Page 5: OpenCart Modules, Themes, Custom Development - OCWP · 2016. 2. 17. · if your OpenCart admin user is logged in and if they have access permissions to the route module/ocwp. Creating

OCWP Documentation

5 http://isenselabs.com

http://isenselabs.com/users/support

Chapter 3: OCMod (Modification) changes

OCWP ships with an OCMod modification file which adds a few new functionalities and

changes to your admin panel. This chapter is an overview of these changes.

The modification can be seen in Extensions > Modifications with the name “OCWP

Modifications” by iSenseLabs.

Visibility of WordPress tables in Backup / Restore

If your WordPress has a database table prefix which is different than your OpenCart table

prefix, by default it will not be visible in Tools > Backup / Restore. The OCWP modification

makes the WordPress tables visible, so you would be able to do a backup of your WordPress

blog from the OpenCart admin panel.

Link to the WordPress admin panel

The OCWP modification adds a new link to your OpenCart admin panel main menu:

“WordPress”. The link will be visible after you link OCWP with WordPress (explained later in

this document), and after you give your admin panel user access permissions for

module/ocwp.

Link to the WordPress front-end

OCWP gives you the option to add a link to your blog in the front-end main menu of your

OpenCart store. This can be done from Extensions > Modules > OCWP > Main Settings >

Display link to WordPress blog in front-end main menu.

Page 6: OpenCart Modules, Themes, Custom Development - OCWP · 2016. 2. 17. · if your OpenCart admin user is logged in and if they have access permissions to the route module/ocwp. Creating

OCWP Documentation

6 http://isenselabs.com

http://isenselabs.com/users/support

Chapter 4: Linking OCWP with WordPress

After you do your initial installation of OCWP and visit the module page in Extensions >

Modules > OCWP you will be greeted with the WordPress installation screen. OCWP will

automatically search for existing WordPress installations in your OpenCart root folder.

Depending on the results from this query, the welcome screen will look like one of two

possible ways.

Scenario 1 – you have no existing WordPress blogs

In this case you will see the following screen:

Page 7: OpenCart Modules, Themes, Custom Development - OCWP · 2016. 2. 17. · if your OpenCart admin user is logged in and if they have access permissions to the route module/ocwp. Creating

OCWP Documentation

7 http://isenselabs.com

http://isenselabs.com/users/support

The initial installation of WordPress cannot get simpler – you simply need to enter the name

of your WordPress blog, the URL, your admin credentials and click “Proceed”.

The installation input fields are the following:

Option name Option description

Site Title This will be the title and name of your WordPress installation.

Site URL

The URL of your blog. Default: http://<your-domain>/vendors/ocwp/wordpress

Admin Username The username of your WordPress admin user. Use alphanumeric characters and underscore.

Admin Password The password of your WordPress admin user. Use characters, symbols and numbers. Must be at least 6 characters long.

Admin E-Mail The e-mail of your WordPress admin user. Must be a valid e-mail.

Send E-Mail to <your-OC-email>

Select this box if you want OCWP to send an e-mail to <your-OC-email> with the configuration details you set here. Note: Keep this data safe from unwanted access.

If you wish to fine-tune your installation you can click the “Show Advanced Options” link. You

will be presented with the following options:

Option name Option description

Database Username Your database username. Defaults to your OpenCart database username.

Database Password Your database password. Defaults to your OpenCart database password.

Database Hostname Your database hostname. Defaults to your OpenCart databse hostname.

Database Prefix Your database prefix. Must be different than your OpenCart prefix. Must contain alphanumeric characters. Underscore is also allowed.

Database Name Your database name. Defaults to your OpenCart database name.

Page 8: OpenCart Modules, Themes, Custom Development - OCWP · 2016. 2. 17. · if your OpenCart admin user is logged in and if they have access permissions to the route module/ocwp. Creating

OCWP Documentation

8 http://isenselabs.com

http://isenselabs.com/users/support

Scenario 2 – you already have an existing WordPress blog

In this case you are greeted with the following screen:

As you can see, OCWP has already traversed your OpenCart root folder and it has listed all

existing WordPress installations. All you need to do is select the installation which you need

to link and click “Proceed”.

If you do not already have a blog installed in the path vendors/ocwp/wordpress/ OCWP will

also give you the option to set up a fresh new WordPress installation. However, if you already

have an installed WordPress in the folder vendors/ocwp/wordpress/ then OCWP will give you

the option to link to this existing installation.

Automatic administrator login

During the linking of OCWP with a WordPress installation, a new plugin is installed in your

WordPress:

Page 9: OpenCart Modules, Themes, Custom Development - OCWP · 2016. 2. 17. · if your OpenCart admin user is logged in and if they have access permissions to the route module/ocwp. Creating

OCWP Documentation

9 http://isenselabs.com

http://isenselabs.com/users/support

This new WordPress plugin allows you to automatically login into the WordPress admin panel

if your OpenCart admin user is logged in and if they have access permissions to the route

module/ocwp.

Creating a backup of the WordPress database

OCWP allows you to create backups of your WordPress database directly from your OpenCart

admin panel. Follow these steps:

1. Go to Tools > Backup/Restore

2. Select the following tables and click on the “Backup” icon on the top right:

{wp_table_prefix}commentmeta

{wp_table_prefix}comments

{wp_table_prefix}links

{wp_table_prefix}options

{wp_table_prefix}postmeta

{wp_table_prefix}posts

{wp_table_prefix}term_relationships

{wp_table_prefix}term_taxonomy

{wp_table_prefix}terms

{wp_table_prefix}usermeta

{wp_table_prefix}users

The generated .SQL file can be used to restore your WordPress database. You can

either insert it into PHPMyAdmin, or the OpenCart Backup/Restore form.

Page 10: OpenCart Modules, Themes, Custom Development - OCWP · 2016. 2. 17. · if your OpenCart admin user is logged in and if they have access permissions to the route module/ocwp. Creating

OCWP Documentation

10 http://isenselabs.com

http://isenselabs.com/users/support

Chapter 5: The OCWP module dashboard

After you have successfully linked your OCWP with a WordPress blog (explained in the

previous chapter), you can access the OCWP module in Extensions > Modules > OCWP [Edit].

You will see the following dashboard:

Let’s go through all settings and buttons to see what they do.

Clear OCWP OpenCart cache button (top-right)

The “Clear cache” button on the top right is used to clean your OCWP cache. Use this button

after you edit content in your WordPress blog in order to make this new content visible in the

OCWP modules.

Page 11: OpenCart Modules, Themes, Custom Development - OCWP · 2016. 2. 17. · if your OpenCart admin user is logged in and if they have access permissions to the route module/ocwp. Creating

OCWP Documentation

11 http://isenselabs.com

http://isenselabs.com/users/support

Dashboard > Main Settings

This tab contains settings which affect the whole OCWP system. They are the following:

Setting name Setting description

Automatically clean OCWP OpenCart

cache when clicking Save in OCWP

modules

Enabled/Disabled – Determines whether the OCWP OpenCart cache will be automatically cleared whenever you edit an OCWP sub-module (explained later in this document).

Display link to WordPress blog in

front-end main menu

Yes/No – Determines whether to show a link to the WordPress blog in the main menu of your OpenCart front-end.

Front-end main menu link name

The link name to your WordPress blog. This field is language-specific. Default value: WordPress

WordPress link position in front-end

main menu

This value will not regard the Sort Order value you set for each menu item. Instead, the position you specify here will be regarded “on top of” the Sort Order of your menu items.

Dashboard > OCWP Modules

This section allows you to create different OCWP modules. All of them are created as sub-

modules of OCWP, which makes them visible in Extensions > Modules under the main OCWP

module. You can position each sub-module in your OpenCart front end from the System >

Design > Layouts page. After you click the “+” button, a sub-module is automatically created

and you are redirected to the module edit page. Modify your sub-module settings and click

the “Save” icon on the top right.

For more information about the different types of modules, see Chapter 6: OCWP Sub-

modules in this documentation.

You will notice that the sub-module has an ID in the module name – this will allow you to

locate the sub-module more easily in System > Design > Layouts (in case you have more than

1 sub-module of the same type).

To make things even easier for you, you can rename your OCWP module by clicking on the

“Pencil” icon next to the module name:

Page 12: OpenCart Modules, Themes, Custom Development - OCWP · 2016. 2. 17. · if your OpenCart admin user is logged in and if they have access permissions to the route module/ocwp. Creating

OCWP Documentation

12 http://isenselabs.com

http://isenselabs.com/users/support

Here is an example where we have created 2 Posts sub-modules, seen in Extensions >

Modules.

The same 2 sub-modules are visible in the System > Design > Layouts page:

Page 13: OpenCart Modules, Themes, Custom Development - OCWP · 2016. 2. 17. · if your OpenCart admin user is logged in and if they have access permissions to the route module/ocwp. Creating

OCWP Documentation

13 http://isenselabs.com

http://isenselabs.com/users/support

Dashboard > WordPress System

This section gives a few options to manage the WordPress system which is linked to your

OpenCart.

Manage your WordPress blog

There are two links for your WordPress installation:

1. Go To WordPress Front – redirects you to your WordPress blog front page

2. Go To Admin Panel – redirects you to your WordPress admin panel within OpenCart –

note that you will be automatically logged in if you are already logged into the

OpenCart admin panel

Delete WordPress

Provides you with an option to delete your WordPress installation. If you accidentally click the

button, you will be prompted with an alert box just in case.

Dashboard > Error Log

This section lists all of the errors which appear in your WordPress system. You can use it for

debugging purposes. You also have the option to clear the log.

Note: The log by default displays the first 1000 errors. If you want to see the rest, you should

manually open up the OCWP error log file.

Dashboard > Help & Support

This section lets you activate your OCWP module. This is necessary if you need to have access

to Premium Support by iSenseLabs and also access to the latest versions of OCWP. If you are

using OCWP on a test installation, which is not LIVE, feel free to use it without entering a

license.

Page 14: OpenCart Modules, Themes, Custom Development - OCWP · 2016. 2. 17. · if your OpenCart admin user is logged in and if they have access permissions to the route module/ocwp. Creating

OCWP Documentation

14 http://isenselabs.com

http://isenselabs.com/users/support

There are also quick links for the iSenseLabs community forums, the iSenseLabs ticket system,

and the iSenseLabs pre-sale contact e-mail for all sales-related questions.

Page 15: OpenCart Modules, Themes, Custom Development - OCWP · 2016. 2. 17. · if your OpenCart admin user is logged in and if they have access permissions to the route module/ocwp. Creating

OCWP Documentation

15 http://isenselabs.com

http://isenselabs.com/users/support

Chapter 6: OCWP Sub-modules

Sub-module: Archives

The Archives sub-module lists the archive dates from your WordPress blog. Each date

navigates you to the corresponding archive page in WordPress.

Here is how the sub-module looks like in the admin panel:

The following options are provided:

Option name Option description

Status Enabled/Disabled – the status of the sub-module. If you disable it, it will not be visible on the OpenCart front-end.

Module title Language-specific title of the widget, which appears in the OpenCart front-end.

Limit dates The maximum number of archive dates which will be shown in the module. Set to 0 to show all dates from the archive. Default: 5

Display the number of posts for each

archive entry

Yes/No – whether the number of posts should be shown next to the archive date.

Here is how the sub-module looks like in the OpenCart front:

Page 16: OpenCart Modules, Themes, Custom Development - OCWP · 2016. 2. 17. · if your OpenCart admin user is logged in and if they have access permissions to the route module/ocwp. Creating

OCWP Documentation

16 http://isenselabs.com

http://isenselabs.com/users/support

Sub-module: Authors

The Authors sub-module lists the authors who have at least 1 post in your WordPress blog.

Each link navigates you to the corresponding author page in WordPress.

Here is how the sub-module looks like in the admin panel:

The following options are provided:

Page 17: OpenCart Modules, Themes, Custom Development - OCWP · 2016. 2. 17. · if your OpenCart admin user is logged in and if they have access permissions to the route module/ocwp. Creating

OCWP Documentation

17 http://isenselabs.com

http://isenselabs.com/users/support

Option name Option description

Status Enabled/Disabled – the status of the sub-module. If you disable it, it will not be visible on the OpenCart front-end.

Module title Language-specific title of the widget, which appears in the OpenCart front-end.

Limit authors The maximum number of authors which will be shown in the module. Default: 5

Display number of author posts

Yes/No – whether the number of posts should be shown next to the author name.

Here is how the sub-module looks like in the OpenCart front:

Sub-module: Categories

The sub-module lists the categories in your WordPress blog. Each link navigates you to the

corresponding category page in WordPress.

Here is how the sub-module looks like in the admin panel:

Page 18: OpenCart Modules, Themes, Custom Development - OCWP · 2016. 2. 17. · if your OpenCart admin user is logged in and if they have access permissions to the route module/ocwp. Creating

OCWP Documentation

18 http://isenselabs.com

http://isenselabs.com/users/support

The following options are provided:

Option name Option description

Status Enabled/Disabled – the status of the sub-module. If you disable it, it will not be visible on the OpenCart front-end.

Module title Language-specific title of the widget, which appears in the OpenCart front-end.

Display number of posts in the categories

Yes/No – whether the number of posts should be shown next to the category name.

Display sub-categories

Yes/No – if set to “Yes”, show the sub-categories as well

Orientation Vertical/Horizontal – Useful, since you might want to place the WordPress categories in different places in OpenCart – either in the top/bottom position or the left/right position.

Style

Four kinds of styles to choose from:

1) Style #1 – navigation, using theme main color. This is a nested pop-up navigation menu. Here is how it looks and behaves for the vertical and horizontal orientation:

Page 19: OpenCart Modules, Themes, Custom Development - OCWP · 2016. 2. 17. · if your OpenCart admin user is logged in and if they have access permissions to the route module/ocwp. Creating

OCWP Documentation

19 http://isenselabs.com

http://isenselabs.com/users/support

2) Style #2 – navigation, using theme secondary color. This is a nested pop-up navigation menu. Here is how it looks and behaves for the vertical and horizontal orientation:

Page 20: OpenCart Modules, Themes, Custom Development - OCWP · 2016. 2. 17. · if your OpenCart admin user is logged in and if they have access permissions to the route module/ocwp. Creating

OCWP Documentation

20 http://isenselabs.com

http://isenselabs.com/users/support

3) Style #3 – category listing, using theme main color. No nesting here, all categories are displayed as a list. Here is how it looks and behaves for the vertical and horizontal orientation:

4) Style #4 – category listing, using theme secondary color. No nesting here, all categories are displayed as a list. Here is how it looks and behaves for the vertical and horizontal orientation:

Page 21: OpenCart Modules, Themes, Custom Development - OCWP · 2016. 2. 17. · if your OpenCart admin user is logged in and if they have access permissions to the route module/ocwp. Creating

OCWP Documentation

21 http://isenselabs.com

http://isenselabs.com/users/support

Categories in mobile view

In the table above you notice that the categories will look different depending on the

combination of “Orientation” and “Style”. Note that the above examples are a showcase

only for the Desktop view.

For the Mobile view, the rules are a bit different.

First of all, if you assign the Categories to a Column Left or Column Right position, it will not

get displayed whenever your users are browsing the website in mobile view. This is standard

behavior for the standard OpenCart theme. If you are using a custom theme, the Column

Left and Column Right might be visible.

If you assign the Categories to the Content Top or Content Bottom position, regardless of the

value of the “Orientation” option, the categories will show up like this:

Page 22: OpenCart Modules, Themes, Custom Development - OCWP · 2016. 2. 17. · if your OpenCart admin user is logged in and if they have access permissions to the route module/ocwp. Creating

OCWP Documentation

22 http://isenselabs.com

http://isenselabs.com/users/support

As you can see, depending on the style, the categories will be displayed as a listing only for

the Mobile view. The Desktop view is explained in detail in the table above.

Sub-module: Posts

The Posts sub-module lists a number of posts in your WordPress blog. Each link navigates

you to the corresponding post page in WordPress.

Here is how the sub-module looks like in the admin panel:

Page 23: OpenCart Modules, Themes, Custom Development - OCWP · 2016. 2. 17. · if your OpenCart admin user is logged in and if they have access permissions to the route module/ocwp. Creating

OCWP Documentation

23 http://isenselabs.com

http://isenselabs.com/users/support

The following options are provided:

Option name Option description

Status Enabled/Disabled – the status of the sub-module. If you disable it, it will not be visible on the OpenCart front-end.

Post type Latest/Featured/Sticky – the type of posts which will be listed in the sub-module.

Page 24: OpenCart Modules, Themes, Custom Development - OCWP · 2016. 2. 17. · if your OpenCart admin user is logged in and if they have access permissions to the route module/ocwp. Creating

OCWP Documentation

24 http://isenselabs.com

http://isenselabs.com/users/support

Module title Language-specific title of the widget, which appears in the OpenCart front-end.

Layout

Choose the number of columns in which the posts will be displayed. If you will position the Posts module in Column Left or Column Right, use the layout “1 column(s)”. For Content Top or Content Bottom, you can use 2-4 columns.

Limit posts The maximum number of posts which will be visible in the OpenCart front-end. Set to 0 to show all posts. Default value: 2

Page 25: OpenCart Modules, Themes, Custom Development - OCWP · 2016. 2. 17. · if your OpenCart admin user is logged in and if they have access permissions to the route module/ocwp. Creating

OCWP Documentation

25 http://isenselabs.com

http://isenselabs.com/users/support

Limit post title The maximum number of characters which will be shown for each post title. Set to 0 to show all post title characters.

Display post featured images

Yes/No – Whether to show the featured images when listing the posts on the front-end.

Image width The width of the post images. Written as a whole number (integer).

Image height The height of the post images. Written as a whole number (integer).

Display post authors Yes/No – Whether to show the authors of the posts below the titles.

Display post excerpts

Yes/No – Whether to show the excerpts of the posts below the titles.

Display post date Yes/No – Whether to show the date of publishing of the posts above the title.

Here is how the sub-module looks like in the OpenCart front:

Page 26: OpenCart Modules, Themes, Custom Development - OCWP · 2016. 2. 17. · if your OpenCart admin user is logged in and if they have access permissions to the route module/ocwp. Creating

OCWP Documentation

26 http://isenselabs.com

http://isenselabs.com/users/support

Chapter 7: Uninstalling OCWP

Deleting the WordPress installation

This process describes how to delete your WordPress installation.

1. Navigate to Extensions > Modules > OCWP > WordPress System

2. Click the button “Delete WordPress” and confirm

3. WordPress will be deleted and you will be automatically redirected to the OCWP

WordPress installation page

Uninstalling OCWP

This process describes how to delete your OCWP and its corresponding modules from your

system.

1. Navigate to Extensions > Modules and click the “Uninstall” icon next to the OCWP

module.

2. Navigate to Extensions > Modifications and remove the modification “OCWP

Modifications”. Click the “Refresh” button on the top right.

Page 27: OpenCart Modules, Themes, Custom Development - OCWP · 2016. 2. 17. · if your OpenCart admin user is logged in and if they have access permissions to the route module/ocwp. Creating

OCWP Documentation

27 http://isenselabs.com

http://isenselabs.com/users/support

Chapter 8: Getting support

If you have a valid iSenseLabs license for the OCWP module, this means you have access to

the iSenseLabs support system on the following address:

http://isenselabs.com/users/support

If you have any questions, comments or recommendations, feel free to open up a support

ticket in our system. A support specialist will assist you as soon as possible.

Thank you for using our product!