1. What this module does

The module turns your CMS pages into a simple blog. You write a post as an ordinary page in Design → Pages, switch Blog post on and add what a blog post needs: an image, a short excerpt, a publication date, an author, a "featured" switch, product categories and related products.

Posts then appear as cards — image, title, date and excerpt — on your home page and on the pages of the products they are about. The post page itself shows the image, the date and the author above the text and the related products below it, and tells search engines that the page is a blog post.

Regular pages such as your terms of sale stay as they are: only pages with Blog post switched on appear in the lists.

Works with PrestaShop 1.7.8, 8.x and 9.x (PHP 7.2.5 or newer), with the Classic and Hummingbird themes and with multistore.

2. Installation

  1. Download the module from My account → Order history at addonspresta.com.
  2. In your Back Office, open Modules → Module Manager and click Upload a module.
  3. Drop the ap_cms2blog_v1.0.1.zip file and wait for the confirmation.
  4. Click Configure on the module card and check the settings.

If you have shell access, you can also unpack the zip into modules/ and run php bin/console prestashop:module install ap_cms2blog from the shop folder.

3. How it works

The blog fields are added at the bottom of the CMS page form, in a section called Blog post. While Blog post is off, the other fields of the section stay hidden.

A post is shown in the lists when Blog post is on, the page is displayed, it belongs to the shop and its publication date is today or earlier. A post with a future date is scheduled: it joins the lists on that day. Its page can still be opened by its address, like any displayed CMS page.

On the home page the module shows featured posts first, then the newest ones. On a product page it shows the posts linked to that product first, then the posts linked to one of its categories (any category of the product, not only the main one).

Uploaded images are stored in the img/ap_cms2blog/ folder of your shop. The module keeps the image at most 2400 pixels wide, without the photo metadata (camera, GPS position), and makes two versions of it: a thumbnail cropped from the centre to the size you choose (for the cards) and a version at most 1200 pixels wide (for the post page).

The cards and the post page use the fonts, colours and headings of your theme. The module does not connect to addonspresta.com or any other server.

4. Features and settings

Blog fields of a page

Open Design → Pages, add a page or edit one, and scroll to the Blog post section.

  • Blog post — puts the page in the blog lists.
  • Post image — a JPG, PNG or WebP file of up to 8 MB and 25 megapixels. A wide picture works best: the thumbnail is cropped from the centre. Uploading a new image replaces the previous one. Delete the current image removes it.
  • Excerpt — a few sentences for the cards, written in the editor you know from the page content, in every language of your shop. A language left empty shows no excerpt.
  • Publication date — the date shown on the post. Today by default; a future date schedules the post.
  • Author — shown next to the date. A new page gets the name of the employee who writes it.
  • Featured — featured posts come first on the home page and on product pages.
  • Product categories — the post appears on the pages of the products from the ticked categories.
  • Related products — type at least two letters of a product name, its reference or its ID and pick the product from the list. The products appear under the post in the order you chose, and the post appears on their pages. The cross removes a product.

Configuration page

Open Modules → Module Manager → CMS Blog → Configure. The Help box at the top links to this manual and to the module page at addonspresta.com, in the language of your Back Office, and shows the support address and the module version.

Thumbnails

  • Thumbnail width and Thumbnail height — the size of the card images, from 50 to 2000 pixels (600 × 400 by default). When you change the size and save, every thumbnail is made again from the original images.

Post lists

  • Posts on the home page — how many posts the home page shows (3 by default). 0 hides the section.
  • Posts on product pages — below the product description, in a product tab called "Related articles", or not at all.
  • Number of posts on product pages — from 1 to 24 (3 by default).
  • Also posts of the product categories — when off, a product page shows only the posts linked to that product.

Post page

  • Image, date and author above the content — when off, the post page shows the text only.
  • Related products below the content — the products chosen in the post, as product cards of your theme. Products that are disabled or hidden from the catalogue are left out.

5. Multistore

The settings of the Post lists and Post page sections are saved for the shop or shop group selected in the Back Office header, so each shop can show a different number of posts or place them differently. The thumbnail size applies to all shops, because the images are shared. Only an employee who manages every shop can change it. In the All shops or group context only an employee who manages every shop of it can save.

The excerpt follows the page content: it is saved for the shops selected in the header when you save the page. The other blog fields (switches, date, author, image, categories, products) are the same in every shop. A post appears only in the shops the CMS page is assigned to. When you create a new shop and import the data of the module from an existing shop, the excerpts are copied too. One licence covers every shop of the installation.

6. Uninstall

Module Manager → CMS Blog → Uninstall removes the module's settings, its database tables and the img/ap_cms2blog/ folder. The blog fields and images of all posts are lost; the CMS pages themselves stay, as regular pages. To keep the data, use Disable instead.

7. FAQ and troubleshooting

My post does not appear on the home page. Check that Blog post is on, that the page is displayed and assigned to the shop, and that the publication date is not in the future. Then check Posts on the home page in the configuration: 0 hides the section. If your theme has no displayHome position, the home page section cannot be shown.

The post does not appear on a product page. The post must be linked to that product in Related products or to one of its categories in Product categories (with Also posts of the product categories on). Check that Posts on product pages is not set to Do not show.

The image is refused when I save the page. Use a JPG, PNG or WebP file of up to 8 MB and 25 megapixels (for example 6000 × 4000 pixels). WebP works only when your server's image library supports it; the list of accepted formats is shown under the field.

The thumbnails are cut in the wrong place. Thumbnails are cropped from the centre. Upload an image with the subject in the middle, or choose a thumbnail size with the same proportions as your images.

The excerpt is not saved and an error says the HTML is not allowed. The excerpt follows the same rules as the page content: no scripts and no javascript: links; iframes only when they are allowed in Shop Parameters → General. Remove the code that was pasted into the editor.

A text is still in English in my Polish or French shop. Open International → Translations → Installed module translations, select the module and your language, and check the translation. Translate the excerpts in the page form.

8. Updates and support

Updates are free for life: download new versions from My account → Order history at addonspresta.com and upload them like a new module. Your posts and settings are kept.

Support is included for 12 months from your order: write to mail@addonspresta.com or use the contact form at addonspresta.com (Monday to Friday, 10:00–16:00 CET; we usually answer within 2 business days). Please include your PrestaShop version, the module version and the steps that lead to the problem.

Back to User manuals

Loading...
Back to top