With the kitCommand ~~ miniShop ~~
you can embed the kitFramework miniShop in any WYSIWYG section of your Content Management System.
For a general help to the kitCommands, the usage and the general available parameters please refer the kitCommand help.
Main parameters for the miniShop:
Parameters for use with the action[list]
parameter:
base[]
groups[]
limit[]
order_by[]
order_direction[]
rating[]
thumbnail_max_height[]
thumbnail_max_width[]
Parameters for use with the action[article]
parameter:
The action[]
parameter tells the miniShop the action to perform:
action[list]
- this will show a list of articles and is the centerpiece of the miniShop kitCommand - all other actions can be automatically performed by the miniShop itself.action[article]
- this will show an article, identified byid[]
. You will only need this parameter if you want to embed a specific article in any WYSIWYG section, a News, Topics or flexContent article. In all other cases theaction[article]
parameter will be set dynamically by the miniShop itself.
Sample:
~~ miniShop action[list] ~~
will show all articles of your shop in descending order of the publishing date (newest article at the top, oldest at the bottom of the list)
~~ miniShop action[article] id[23] ~~
will show the article with the ID
23 with all detail information, images, prices, rating and comments.
Using the base configuration you can define multiple shops which support different languages, currencies, taxes or group of articles. Use the parameter base[]
to select a specific base configuration. If you have defined more than one base configuration you must specify a base or at minimum one article group (using the parameter groups[]
).
Sample
~~ miniShop action[list] base[default] ~~
will show only articles which are assigned to the base configuration DEFAULT
.
By default the miniShop will check if the needed jQuery libraries are already loaded and otherwise autoload the libraries defined in the configuration config.minishop.json
(use the ConfigurationEditor to view and change this file). If you want to suppress the autoloading, use:
~~ miniShop action[list] check_jquery[false] ~~
You can enable a commenting function for the articles in detail view, use:
~~ miniShop action[article] id[12] comments[true] ~~
to switch the comments for the article with the ID
12 on.
You can use this parameter also in combination with action[list]
, if the detail view for a article is fired the parameter will automatically take effect.
In miniShop you can define different article groups, you can select them for action[list]
using the parameter groups[]
, which allow you to select one or more article groups. The specified article groups must belong to the same base configuration (see also base[]
).
Sample:
~~ miniShop action[list] groups[shoes] ~~
will only show articles of the group SHOES
.
~~ miniShop action[list] groups[shoes,socks] ~~
will show all articles from the groups SHOES
and SOCKS
. Separate the groups by comma.
You can specify a article ID
:
~~ miniShop action[article] id[30] ~~
will show the detail view for the article with the ID
30.
If you want to limit the items, shown in the article list, use the parameter limi[]
:
~~ miniShop action[list] limit[10] ~~
will show only 10 articles.
By default the miniShop will automatically load all needed CSS files into the <head>
section of the current page. If you want to suppress the autoloading, use:
~~ miniShop action[list] load_css[false] ~~
You can specify the maximum height of the image in the article detail view. The default value is 200
pixel:
~~ miniShop action[list] image_max_height[250] ~~
will set the maximum height to 250
pixel.
You can use this parameter also in combination with action[list]
, if the detail view for a article is fired the parameter will automatically take effect.
You can specify the maximum width of the image in the article detail view. The default value is 200
pixel:
~~ miniShop action[list] image_max_width[300] ~~
will set the maximum width to 300
pixel.
You can use this parameter also in combination with action[list]
, if the detail view for a article is fired the parameter will automatically take effect.
By default the article list will be sorted in descending order by the publishing date of the article, so the newest article will be on top and the oldest at the bottom of the list. Useful order_by[]
values are:
order_by[article_name]
- will order by the name of the articlesorder_by[article_price]
- will order by the price of the articlesorder_by[group_name]
- will order by the article groupsorder_by[publish_date]
- (default) will order by the publish date of the articles
use the parameter order_direction[]
to specify the direction (ascending or descending).
Sample:
~~ miniShop action[list] order_by[article_price] order_direction[desc] ~~
will sort the list in descending order by the article price - the most expensive article at the top, the cheapest at the bottom.
By default the article list will be sorted in a descending order. Use the parameter order_direction[]
to change the sorting direction:
order_direction[asc]
- will sort the items in ascending orderorder_direction[desc]
will sort the items in descending order
Sample:
~~ miniShop action[list] order_by[article_price] order_direction[desc] ~~
will sort the list in descending order by the article price - the most expensive article at the top, the cheapest at the bottom.
By default the miniShop will show a rating with one up to five stars, which enable your customers to rate each article. To switch off the rating, use:
~~ miniShop action[list] rating[false] ~~
Switching off the rating will effect both, the article list and the article detail view.
You can specify the maximum height of the thumbnail images in the article list. The default value is 150
pixel:
~~ miniShop action[list] thumbnail_max_height[250] ~~
will set the maximum height to 250
pixel.
You can specify the maximum width of the thumbnail images in the article list. The default value is 150
pixel:
~~ miniShop action[list] thumbnail_max_width[300] ~~
will set the maximum width to 300
pixel.