Skip to content

User Guide

7cart project edited this page Feb 26, 2019 · 7 revisions

7cart is designed for making things like on-line stores. To facilitate this the project uses the concept of nodes that possess or reference categories, attributes and attribute values. Let's break it down.

  • node (read as "product item", e.g. "Mercedes S500", "Military gray t-shirt") is an entity in database that makes up a list of products or whatever for users to view on site;
  • category (e.g. cars, clothing) is a standalone entity in database that nodes reference to as Many-to-Many;
  • attribute (read as "product feature" or "product characteristic", e.g. "all wheel drive","color") is a standalone entity in database that nodes reference to as Many-to-Many;
  • attribute_value (read as "product characteristic value" or "product metric value", e.g. "gray") is a standalone entity in database that nodes reference to as Many-to-Many, and references attributes as Many-to-One. This is a predefined value of a certain attribute.

At creation a node is empty and doesn't reference anything, that is, it doesn't have any attributes, categories or attribute values. To add, those shall be created first. For example, you want to create product item "Mercedes S500" in category "Cars", of black color and with "all wheel drive" feature. You could achieve it like this:

  1. create a new category "Cars"
  2. create a new attribute "color"
  3. create a new attribute value "black" of attribute "color"
  4. create a new attribute "features"
  5. create a new node with name "Mersedes S500", set category to "Cars", set color to "black", and fill "features" with "all wheel drive"

So a node gets an attribute when it is assigned the attribute value (that is, it does not pusses empty attributes).

The entities are created in their corresponding menus in the admin page http://127.0.0.1:8000/admin/

To access front-en navigate to http://127.0.0.1:4200

attribute defines data type for node attribute values:

  • number (or integer e.g. -1,0,1,2,3)
  • floating point number
  • text

attribute defines what attribute values a node will be keep: datum or a reference to a certain attribute_value (predefined value). It also defines will a node be keeping a single value for each attribute, or a set of values. These two settings, merged in one, give the following options an attribute may be set to take:

  • random value (like a text)
  • set of random values
  • predefined value
  • set of predefined values

So if you need to create a gray with black t-shirt, when creating the "color" attribute, set that to take a set of predefined values. Then, at node creation or edition, the "color" input will allow you to select multiple values (colors).

If you need the Mercedes have several unique features, set the "features" attribute to take a set of random values. Then, at node creation or edition, it will be possible to fill in multiple values for the "features" attribute.

An attribute can be either active or not. An active attribute may show up in the sidebar filter (e.g. may be filtered by). Other attributes do not show up in the filter, though present in node views.

Product filter

7cart has a built in node filtering feature. Filtering is done by node attributes for nodes in a certain category. It means:

  • filters imply search within current category (e.g. if you're in "Cars" category, only cars are filtered)
  • filters shown only for those attributes, that are found in nodes of current category (i.e. only filters that may return something. E.g. if "mileage" attribute exists, but non of the cars have specified value for it, user will not see the "mileage" filter)

A filter may allow to select attribute_value(s) or set a numerical range.

Checkbox filter is shown for an attribute with predefined values.

Checkbox filter

Range filter is shown only for numbers.

Range filter

The exact case when it appears is: an attribute is of

  • numerical type
  • accepts random values (non-predefined ones)
  • accepts a single value (not a set of)

Each filter works independently, BUT when multiple filters applied they narrow down the search (that is the output will satisfy all the applied filters: filter_1 AND filter_2 AND... filter_n). For example, if in "t-shirts" category you mark "gray" and "cotton", only gray cotton t-shirts will be shown.

When multiple options are selected in one filter, the search will be widened (that is the output will satisfy any of the options: option_1 OR option_2 OR... option_n). For example, if in "color" category you mark "gray" and "black", gray t-shirts and black t-shirts will be shown.

NOT IMPLEMENTED FEATURES (but we encourage you!)

When multiple options are selected in one filter, the search MAY be narrowed, that is the output would satisfy all of the options: option_1 AND option_2 AND... option_n) For example, if in "color" category you mark "gray" and "black", gray WITH black t-shirts will be shown.

User cart

Custom bundle integration API

Custom sidebare

Clone this wiki locally