When looking for a PrestaShop WordPress plugin, your search would most likely begin in the WordPress plugin directory. At this time, finding one PrestaShop WordPress plugin that can easily integrate PrestaShop with WordPress is quite a challenge. Of the few plugins available, they either involve paying for a PrestaShop module or making changes to WordPress template files. Fortunately, there are alternatives that will allow you to feature PrestaShop products in your WordPress site. This tutorial guides you through using a combination of two WordPress plugins to easily display products from your PrestaShop store on your WordPress site:
- PHP Code Widget - This plugin allows us to insert PHP code into a widget in our WordPress sidebar.
- WordPress-PrestaShop Cross Sales - This PrestaShop WordPress plugin allows us to use some PHP code to display products from our PrestaShop store. The instructions for this plugin state to edit your template files, but we're going to use an easier way to insert this code into our WordPress site.
- Begin by installing and activating both plugins.
- First we will configure the PrestaShop CS plugin to work with our PrestaShop store. Select PS Database Config under PrestaShop CS from your WordPress dashboard menu.
- The database settings to enter here will be the same settings you used when you installed PrestaShop. If you have any trouble remembering the settings needed to connect this PrestaShop WordPress plugin, they can be found in your settings.inc.php file in the config folder inside of your PrestaShop directory (e.g. yourdomain.com/config/settings.inc.php). You can use the cPanel File Manger to view that file if needed. Click Update Database Options to save the database settings in the PrestaShop WordPress plugin.
- Next, select PrestaShop Settings under PrestaShop CS in your WordPress dashboard menu.
- Enter in your PrestaShop Store Settings in the fields provided and click the Update Options button:
||The URL of your PrestaShop website followed by a forward slash (/)
|Product iamge folder
||The default product image folder path is img/p so the full URL will be similar to: http://yourdomain.com/img/p
|Product image size
||Choose what size you want the product thumbnails to be when displayed in WordPress.
|PrestaShop default language
||Be sure to set this to match your PrestaShop default language (PrestasShop back office > Tools > Launguages > Language options).
|Select product from
||Whole database will show a random selection from all of your PrestaShop products. One category will display an additional field where you can input the ID of the category you want to display products from.
|Category name (if one category selected from field above)
||Be sure to input the category ID (not the name) into this field. You can view category IDs under the Catalog tab in your PrestaShop back office.
- Our next step is to input some code into our PHP widget so we can use the PrestaShop WordPress plugin to display our products in our WordPress sidebar. From the dashboard menu, select Appearance > Widgets.
- On the Widgets page, drag the PHP Code widget into your sidebar area.
- Put in the title you want to appear in the sidebar above your products and insert the following code in the text area of the widget:
- Click the Save button on the PHP Code widget.
Congratulations! You've just added your products into your blog by using a PrestaShop WordPress plugin along with the PHP code widget plugin. This is a great example of how sometimes you can use combinations of modules and/or plugins to accomplish something if you can't find a single plugin or module that works for you. You can visit any page on your WordPress site that has a sidebar to see your PrestaShop products on your WordPress site: