Skip to content

Instantly share code, notes, and snippets.

@hertsch
Last active August 29, 2015 14:05
Show Gist options
  • Save hertsch/6218ac8afe8a513c6333 to your computer and use it in GitHub Desktop.
Save hertsch/6218ac8afe8a513c6333 to your computer and use it in GitHub Desktop.
kitCommand Help for the miniShop

##~~ miniShop ~~

With the kitCommand ~~ miniShop ~~ you can embed the kitFramework miniShop in any WYSIWYG section of your Content Management System.

Introduction

For a general help to the kitCommands, the usage and the general available parameters please refer the kitCommand help.

Parameters

Main parameters for the miniShop:

Parameters for use with the action[list] parameter:

Parameters for use with the action[article] parameter:

###action[]

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 by id[]. 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 the action[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.

###base[]

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.

###check_jquery[]

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] ~~ 

###comments[]

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.

###groups[]

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.

###id[]

You can specify a article ID:

~~ miniShop action[article] id[30] ~~

will show the detail view for the article with the ID 30.

###limit[]

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.

###load_css[]

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] ~~

###image_max_height[]

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.

###image_max_width[]

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.

###order_by[]

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 articles
  • order_by[article_price] - will order by the price of the articles
  • order_by[group_name] - will order by the article groups
  • order_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.

###order_direction[]

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 order
  • order_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.

###rating[]

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.

###thumbnail_max_height[]

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.

###thumbnail_max_width[]

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment