Skip to content
  1. Extras
  2. miniShop2
  3. Interface
  4. Settings

Settings

Settings of miniShop2 are presented in separate site section, accessible from a menu.

All tables store settings of column width and position. Multiply row highlighting may be used throughout tables by Ctrl ⌘ Cmd or Shift.

Delivery

You may create different delivery methods with custom logic, stated in settings custom class. Such class is optional. You are free to indicate none and, in such a case there will be no special order processing.

Payment method is tied to a delivery method in editing window.

Payment

Payment methods are tied to orders and should implement their own logic. They usually send user to third-party service to pay for the order.

To indicate a class- payment processing is not necessary.

Order statuses

There are several mandatory statuses of an order :

  • new
  • paid
  • sent
  • canceled"

They may be tuned but cannot be deleted, because they are necessary for the shop operation. You may indicate your own statuses for extended order processing logic in own class.

The status may be final. This means that it cannot be switched to another one. For example, "sent" and "canceled".

The status may be fixed, i.e. forbids switching to earlier statuses (order is set by dragging). For example,"paid" cannot be switched to a "new".

Every status may sent its own letters to customer and store managers, indicated in system setting ms2_email_manager.

The chunks indicated in the status are used for writing letters. All of them are processed by pdoTools, so Fenom may be used for inheritance of one common letter template.

Manufacturers

You may set the manufacturers of goods in this section. They will then be selected in item characteristics.

Different properties and links to site resource may be indicated to every manufacturer, for example , for displaying his personal page.

This is a simple tool permitting to group goods according any attribute.

There are four available types of link:

  • One to one - two-ways equal link of goods.
  • One to many - the link between one item and several others. Affiliated goods are not linked with each other, only with parent.
  • Many to one - the same as preceding, but in the opposite way - affiliated item is linked with general. This type may be excess,but let it be for symmetry.
  • Many to many - the most interesting link type - equivalent multilateral link of several items. When adding new item to the group, it is linked with all group members.

For example, this link is needed for indicating goods differed by one parameter. Or all the items of this group may participate in any promotion (and it is simple to display links to another offers on the item page).

Storage

To add a new record you should select pre-established link and item to apply it.

The table msProductLink with only 3 columns presents the items links at the database level:

  • link - is link id in the table msLinkcreated above, in settings
  • master - is primary item id
  • slave - is descendent item id

Let us understand which records are created for different link types.

One to one - the item with id = 10 is added to the item with id = 15, 2 records in database are created:

master = 10, slave = 15
master = 15, slave = 10

One to many - 3 items with different id are added to the item with id = 10. We get the following records:

master = 10, slave = 15
master = 10, slave = 16
master = 10, slave = 17

Many to one - 3 items with different id are added to the item with id = 10. We get the following records:

master = 21, slave = 10
master = 22, slave = 10
master = 23, slave = 10

Many to many - and, finally, 3 items with different id are added to the item with id = 10.

master = 10, slave = 31
master = 10, slave = 32
master = 10, slave = 33
master = 31, slave = 10
master = 31, slave = 32
master = 31, slave = 33
master = 32, slave = 10
master = 32, slave = 31
master = 32, slave = 33
master = 33, slave = 10
master = 33, slave = 31
master = 33, slave = 32

All items of the group are linked together.

Sample

It is simple: create snippet and select id of the group items, indicating link and master ( for link many to one - slave instead of master).

php
$q = $modx->newQuery('msProductLink', array(
  'link' => 1,
  'master' => 10
));
$q->select('slave');

if ($q->prepare() && $q->stmt->execute()) {
  $ids = $q->stmt->fetchAll(PDO::FETCH_COLUMN);
  print_r($ids);
}

When id of linked goods are derived, you can do what you want with them. You are restricted only by your imagination.

Examples

Different colors ( several copies of goods with their own photos and prices)

Recommended goods (are displayed in the cart when placing the order)

Sets of goods (are displayed the references to other goods of the set in the card)

Goods options

To create new characteristic press the button "Create" and fill the appeared window:

  • Key - identifier of characteristic in the system, determining its frontend placeholder. Required to fill.
  • Name - displayed characteristic title.
  • Description
  • Unit
  • Group - category in MODX system, will be displayed in tab on item option page
  • Property type - determines valid format for the value

The created characteristics may be filtered by the goods category tree in the left page side. When creating characteristic you also may spot it to according goods category with the help of the tree in the left.

The created characteristics are displayed on item page in corresponding tab.

To display the goods options the snippet msProducts should be used.