All articles

The shop in Website Kit: enabling, samples, price list

Published:

For sites with ERPNext and Webshop, the Website Kit settings page has the section "Shop and existing sites". Without these apps the section says that the shop needs ERPNext and Webshop.

Enable shop

The "Enable shop" button switches Webshop on for the company of the site:

  • company: the one already set in Webshop Settings, otherwise the default company of the site (a company must exist, so the setup wizard has to be finished);
  • price list: the one already set in Webshop Settings, otherwise an enabled selling price list in the currency of the company ("Standard Selling" first, otherwise the earliest created);
  • customer group: the one set earlier, otherwise "Individual" or "All Customer Groups";
  • for a shop that has just been switched on: show prices, 12 products per page and field filters with a filter by item group, but only where the field still holds the Webshop default;
  • the link "Shop" is added to the top menu.

Whatever you already chose is kept. Pressing it again changes nothing. A link that you later remove from the menu is not added again. The "Shop" menu entry is shown only while Webshop is on and at least one product is published, so an empty shop does not lead to an empty page.

The Shop and existing sites section: the product counts and the buttons to enable the shop, load and remove sample products

Sample products

The shop catalogue: a list of sample products with pictures and prices

"Load sample products" creates ten products with invented names (mug, tote bag, notebook, lamp, candle, scarf, bottle, clock, plant pot, cutting board), in Ukrainian or English according to the site language. For each one it creates the item, a price in the price list of the shop (or in the default selling price list when the shop has no price list set), a Website Item with a published card and an SVG picture that the app draws itself: nothing is downloaded from the internet.

  • They are non-stock items: they create no stock or accounting entries.
  • The action does not switch the shop on and does not change Webshop Settings.
  • Loading again does not duplicate samples that exist.
  • Every record carries a hidden sample marker, the item group and the unit are created in the site language (group "Sample" or "Зразки", unit "Nos" or "шт"); an existing group or unit is used and left alone, and one that the app creates is tagged and removed with the samples.

Remove sample products

"Remove sample products" (after a confirmation) deletes exactly the tagged records: Website Items, prices, items, the sample group and the sample picture files. Your own products and files are not touched, even when a file has a similar name. If a sample item is already used in a document, it is not deleted: the app names such items in its answer and keeps the item, its picture file and the group (its Website Item card and its price are deleted).

When no published product is left after the removal, the "Shop" link leaves the menu by itself.

Shop styling

The page of a sample product

While Webshop is on, the app adds one more stylesheet to the shop pages (1.7 KB compressed, measured by the developers of the app). Together with the kit tokens it makes the Webshop cards, filters, cart and login page follow the chosen theme; the layout stays with Webshop. The rules work with Webshop's own markup, and a Webshop release can change that markup.

What to know about the sample products

  • A visitor sees no "Add to Cart" button on a sample product. That is Webshop's rule: the button needs a price and either stock or the Webshop Settings option "Allow items not in stock"; the samples are non-stock on purpose. The app does not switch that option on: enable it in Webshop Settings to let visitors add the samples to the cart.
  • Webshop's search is a JavaScript call and a POST: a link such as /all-products?search=mug is ignored by Webshop.
  • Samples loaded by an earlier release keep an English group and unit: remove the samples and load them again.

Language of the shop

On the shop pages the language button of the header opens the same page in the other language, and the choice is kept in the browser, so the language stays in the catalogue, the cart and the login page. The Webshop strings that the app translates appear in Ukrainian; the others stay in English.

Scope of the app

Website Kit takes care of the look of the storefront, the sample products and the first Webshop settings; it contains no payment code.

More in the documentation and the articles: Website Kit features, How to install Website Kit and choose a theme.

© FOSS-ON-LINE LLC, EDRPOU 30291001. Office: 20 Darwin Street, building 3, 3rd floor, Kharkiv 61002, Ukraine. All rights reserved.