Child pages
  • Custom Static Blocks - Magento 2
Skip to end of metadata
Go to start of metadata

Icon

FireFox user notice:

Please use different web-browser for viewing this document.

Sorry for the incoivenenice.

Custom Static Blocks - Magento 2

 


Installing Custom Static Blocks

To install the extension follow the instructions below:

1. Backup your web directory and store database;

2. Download Custom Static Blocks installation package;

 3. Upload contents of the Custom Static Blocks installation package to your store root directory;

 4. Navigate to your store root folder in the SSH console of your server:

cd path_to_the_store_root_folder

run:

php -f bin/magento module:enable Aheadworks_Csblock

then:

php -f bin/magento setup:upgrade

after:

php -f bin/magento setup:static-content:deploy

5. Flush store cache; log out from the backend and log in again.

Icon

Make sure the installation is done from under the FTP administrator account. Otherwise make sure to set 775 permissions to the store root directory after the extension is deployed.

 

 


Getting around

The extension introduces its section under Content > Custom Static Blocks by aheadWorks > Manage Blocks


Manage Blocks screen is the management center of the extension. Here store administrator can:

  • Create new blocks;
  • Enable/disable/delete existing blocks;
  • Click the block to proceed to the block editing page.

Here store administrator can also adjust the Manage Blocks screen look and feel according to requirements:

  •  button allows adding/disabling the blocks grid columns, some may be excessive and some relevant to your current tasks;
  •  button allows looking for the custom blocks matching a set of attributes;
  •  button allows saving perfect custom blocks grid look you found to quickly load it whenever required.

That is all for the Custom Static Blocks store backend pages. The extension does not have general settings as all the blocks are configured separately.

 


Creating a custom static block

Click button at the Manage Blocks screen to create first custom block.

General

At the General section of the new static block page administrator is suggested to define where and how the block will be displayed. The screen offers the following settings:

  • Name - the name of the static block for internal identification purposes;
  • Status - the status of the block:enabled/disabled;
  • Customer Groups - the customer groups the block will be displayed to;
  • Where to Display - on what page types the block will be displayed:
    • Home Page;
    • Product Pages;
    • Catalog Pages;
    • Shopping Cart;
    • Checkout.
  • Position - the position on the page where the block will be displayed:
    • Sidebar top;
    • Sidebar bottom;
    • Content top;
    • Page bottom;
    • Menu Top;
    • Menu Bottom.
  • Conditions - lets store administrator define the conditions on which the static block will be displayed (e.g.: product attributes, category). The setting is Where to Display dependent.

This covers the placement aspects of the Custom Static Blocks.

Content

Once done with the General section click Content in the navigation menu to your left:

 

At the Content section of the new static block page administator is suggested to define the static block's content.

The content is defined by the CMS blocks available at your store. Before adding a static block's content make sure you have created appropriate CMS block under Content > Elements > Blocks.

  • To add new content option to the static block click button - it will add a new line of content;
  • In the content line specify the Store View for the CMS block you want it displayed at;
  • Select appropriate CMS block in the Static Block dropdown (if required the CMS block can be edited on spot);
  • Click one more time if you want to add another CMS block.
Icon

If two or more CMS blocks added to the static block's content the CMS blocks will ALL be displayed simultaneously ( one after another in the order they have been added to the Content).

Providing Store View setting is adjusted properly this can prove useful for managing a single static block when dealing with store views of different language.

For example:

Lets say you have two store views: English and German.

You can add two CMS blocks with the content in proper language and set English store view for the first one and German store view for the second one.

Thus you can share the same General and Scheduling options for both CMS blocks without creating several Custom Static Blocks.

Schedule

The final step of configuring the Custom Static Block is the Schedule section.


Here administrator is suggested if the block should be scheduled to display at a set time, or leave the fields blank to manually manage the block activity.

The section is spilt into two sections: Display Block - defines from when and how long the block should be active, and Schedule Patter - defines on what schedule the block be displayed during the Display Block period.

For example:

  • In the Display Block section you have configured block to be displayed from January 1st to January 30th.
  • In the Schedule Patterns you have selected From Monday to Friday;
  • In the From/To Time you have set 8:00 - 13:00.

On such conditions the block will be displayed from January 1st to January 30th on the business week only: Monday, Tuesday, Wednesday, Thursday, Friday. From 8:00 to 13:00.

Such scheduling settings may prove useful if you are intended on running a particular sales campaign to get more customers on business days.

That covers the Custom Static Blocks settings. You may now want to create some static blocks to test the best possible display options.

 


You can always find the latest version of the software, full documentation, demos, screenshots and reviews at http://ecommerce.aheadworks.com
License agreement: http://ecommerce.aheadworks.com/LICENSE-M1.txt
Contact Us: http://ecommerce.aheadworks.com/contacts/
Copyright © 2016 aheadWorks Co. http://www.aheadworks.com

  • No labels