Automatic formation of price lists for Simpla Cms Simpla CMS
Dynamically forms a price list depending on the settings of the Simpla cms price list
Description of the new functions:
- Additions in the administrative part of the possibility of working with dynamic price lists
- Ability to create and edit price lists
- the ability to link categories to the price list
- the ability to display the names of variants (are output by comma)
- the ability to display in the price-list of properties of goods (which are in the filter)
- realize the possibility of inserting the price list at any place on the site (site template, text fields (pages, products, blog pages, product categories ...)
If you receive the Permission denied code, add the IndexAdmin.php file to the /simpla folder
after the line
'ManagerAdmin' => 'managers', or license
'ControlPricesAdmin' => 'managers',
'ControlPriceAdmin' => 'managers'
Dynamically forms a price list depending on the settings of the price list.
To integrate the add-in, update the database structure and replace the parts of the code in the following files. The changes are marked with comments "control_price". The modified files are located in the "Update" folder in the archive with the instruction. New files are in the New folder, they need to be copied.
List of new files:
List of modified files:
Changes in the database
The table s_control_prices_categories, s_control_prices is added.
Executable script for making changes: control_price.sql
Solution and description of the work performed
To solve this task, a module of price lists was written (view in the administrative part (see screen 1).
The main page of the module contains a list of previously created price lists (1), and also allows the creation of new price lists (2). Also here you can set the price list activity. If the price list is active it is displayed at the place of the label, if it is not active, it will only replace the label with an empty space (that there would not be a need to delete the labels (temporary hiding)), as well as a massive change in visibility.
Editing (creating a price list)
When editing or creating a new price list, the user displays a form with the price list settings.
The name of the price list is the name of the price-list
Categories - categories from which you need to display products
Short code - the code to be inserted in the output location of the price list
Show option names - is responsible for displaying the name of the variant
Show properties - it is responsible for displaying the properties of the goods that participate in the filtering (the "properties" tab of the "catalog" module)
Appearance - displays how the filter will be displayed on the site (list of columns) (! Changes only when saving the price list)
Description of the price-list - is responsible for the output description before the price-list
Insert price list
Appearance of the output on the site
To create a price list, you must:
1. Go to the page of the module "Price-list"
2. Click on the button to create a new price list
3. Fill in the fields and configure the price list (if necessary, add the necessary properties to the filtering (module "directory" tab "Properties"))
4. Save the price list and get a short code
5. Insert the short code into the required output location of the price list.
Also, if necessary, you can turn off the visibility of the price of the sheet, which will result in the replacement of the short code with empty data, which in turn makes it possible to hide temporarily price lists.