How to enable the cart and the "Add to cart" button

← Back

Add the ready-made field "Add to cart button" to an object, place the cart informer in the menu and specify the cart page address in it.

  1. Check that the item has a price: in the price matrix or via the "Cost" / "Price" property with a number. It's better to set the "Unit of measurement" for the price property to "₽".
  2. Open the item's page on the site, click "Add field" and in the "Field type" list, under the "Ready-made fields" group, select "Add to cart button". Save. This is a regular button: you can rename it, drag it, and delete it.
  3. Create a cart page — a section with the forms module and the "Items in cart" field. For details, see the article on checkout.
  4. Add a menu item with the informer_cart module. In its "Module settings" window, fill in the "Cart page address", e.g. /korzina, and optionally the "Button text": you can replace the 🛒 icon, add a word to it, or remove it — then only the number of items will remain on the button.

Clicking "Add to cart" again for the same item increases the quantity. Different variants of the same item (e.g., different paper) are separate lines with their own price. The price added to the cart is the one that was on the page at the moment of clicking.

The cart is stored in the visitor's browser session: it is not visible from another device, and it empties after the session ends. In the section preview template, the price and button are output by the <:PRICE:> and <:CART_BUTTON:> tags.

If it didn't work

  • I click "Add to cart" — nothing happens. On the item page, the button for an administrator is an editing tool and does not add to the cart. Test from another browser or after logging out.
  • The cart shows a price of 0 ₽. The price is set by a property without a number or with the unit "pcs.". Set the price in the matrix or as a number in the "Cost" property with the unit "₽", then remove the item from the cart and add it again.
  • The cart button shows a number without a link. The "Cart page address" is not filled in the informer settings.
Did the article help?

See also

Tips for working with the builder

The "Help" section is made for those who are building a website on "Pervaya Liniya" for the first time. It contains answers to common questions: how to create a website, what to write in the fields, how to edit texts and photos, how to connect your own domain, and how to set up sections. The materials will help you figure things out without contacting support.

The builder is simple: you fill in the fields on the creation page, and then edit the content directly on the finished website. If something does not work or is unclear, check the relevant help item. The instructions are written in plain language and describe every step.

In Help you will find answers to questions:

  • how to come up with a website address and what to do if the name is taken;
  • how to change the title, description, and other texts on the page;
  • how to add products, services, or request forms;
  • how to connect your own domain instead of an address on firstline.com.ua;
  • how to set up sections and modules for your business needs.

If you cannot find the answer you need, use the feedback form — we will help you figure it out. The section is updated so that you can always find current information about working with the builder.