Omnibus Get the Omnibus module for PrestaShop
A free Omnibus module for PrestaShop that displays the lowest product price within 30 days of a price change. The module stores the price history of all products on the page, as long as they have been scanned after a price change, and also allows for scanning and deleting price history for products, as well as storing price history for variants. The module does not store prices for specific customer groups or countries. The module's functionality requires scanning a specific product or all products after a price change.
The module is free and was created for internal company use. The presented version is a test version, not a production version, so it should be used at your own risk. Please note that the lack of a module on the site or incorrect display of the price may result in a fine of up to 40,000 PLN.
Module functionalities:
- Displays the lowest product price within 30 days of a price change
- Displays the price change history on the backend
- Allows for scanning all products
- Allows for deleting price history for all products
- Stores price history for variants
- The module does not store prices for specific customer groups or countries
The module requires scanning a specific product or all products after a price change. This functionality is designed to facilitate control over price history. For example, if we add a product variant that has already been displayed on the store, meaning that a potential buyer might have seen it, but it was not at the price at which we were selling the product. The scanning function helps us save a specific price in the history of our product, leaving price matters under the control of the store administrator.
Installation of the Omnibus module for PrestaShop
The process of installing the Omnibus module for PrestaShop is simple and standard. To start the installation, download the Omnibus module package. Then, install it through the module manager on the store's backend. To place the hook in the desired location on the store, use the hook {hook h='displayCompsoulOmnibusPrice' product=$product}
.
To make the price scanning work correctly, it is necessary to select the "Update prices" option in the module's configuration panel. However, information about price changes will only be displayed for products on promotion.
- Download the Omnibus module package, available for download here
- Install the Omnibus module through the module manager in the back office of your store
- Place the hook in the desired location on the store. The hook template has been adapted to be placed in the
templates/catalog/_partials/product-flags.tpl
file. Detailed information about placing the hook can be found later in the post. - To enable correct price scanning, select the "Update prices" option in the module's configuration panel
- Information about price changes will only be displayed for products covered by the promotion
If you need help installing or configuring the Omnibus module, please contact us. We are ready to help with any issues.
Downloading the Omnibus module package
If you want to add the Omnibus module to your PrestaShop store, you must first download the package with the appropriate version of the module. Remember to make a backup of your store before installation. In case of any problems or if you want to report new features, please contact us.
Installing the Omnibus module
You can add the downloaded package with the Omnibus module to the administrative panel of your store. To do this, log in to the back office of your store, select the "Modules" tab in the left column menu, and then "Module Manager". In the upper right corner, click the "Upload module" button, and then place or select the module file: compsoulomnibus.zip.
After successfully installing the module, you will receive a message about successful installation, and then you can proceed to its configuration.
Hook
To display the omnibus product price in your store, you need to add {hook h='displayCompsoulOmnibusPrice' product=$product}
to the code in the selected location on the page. However, to display the price in the place intended for the product flags (the default module template has been adapted in this way), you need to modify the product flag template. An example of editing the flag template is as follows:
{block name='product_flags'}
<ul class="component-flags product-flags">
{foreach from=$product.flags item=flag}
<li class="flag-item flag-{$flag.type}">{$flag.label}</li>
{/foreach}
{if $product.has_discount}
{hook h='displayCompsoulOmnibusPrice' product=$product}
{/if}
</ul>
{/block}
The hook code {hook h='displayCompsoulOmnibusPrice' product=$product}
can be placed anywhere on the page, provided that we have access to the {$product}
variable. The default template for this hook can be found in the file compsoulomnibus/views/templates/hook/compsoul-omnibus-price.tpl
and looks like this:
{if isset($price) && $price > 0}
<li class="flag-item flag-omnibus">
{l s='Last price' d='Modules.Compsoulomnibus.Shop'}
{Product::convertAndFormatPrice($price)}
</li>
{/if}
The code can be easily customized to suit your needs, but it's important to remember that this module can operate in different places on your website, so the HTML code must be adjusted accordingly. The current code has been prepared for display in the product flag list.
Scanning Product Prices
If you want to ensure that the price history of your Omnibus product is correct, use the price scanning option in our module every time the price changes. When the price is scanned, it will be saved to the table, and if you make any changes, scan the product again, even if it's not on sale. We added this function because it's easy to give the product a price that you don't want to sell it for during product editing, which can lead to errors in displaying the Omnibus price. Even if the price change isn't due to a promotion, it's worth scanning the product to ensure that the price history is up to date.
You can activate the scanning function while editing the product in the "Pricing" tab by selecting the option to update Omnibus prices. However, remember to change the product price first, save it, reopen it, and then scan it.
If you want to save time and scan all products at once, use the module's configuration option. You can select it by editing our module. To go to the configuration, you must select the module from the list of module managers, then select the "configure" option and make the desired changes. However, it's important to note that some options are mutually exclusive. For example, selecting to add all prices and simultaneously remove all prices will result in their removal from your history.
Adding and Updating Omnibus Prices
The "Add Omnibus price" and "Update prices" options are used to add and update product prices. Both options have the same functionality, and you can use them interchangeably. Thanks to them, we can easily update and add current product prices to the history. Why is this option important? We decided to create it because when adding variants, the module saved the lowest prices as the prices when creating products. This made it impossible to immediately change the product price after generating variants. Manual scanning allows you to add the desired price to the price history. The entire price history can be observed while editing the product in the "Pricing" tab.
Time to clean up the database
The "Delete non-existent products" option removes from the module's database the history of products or variants that no longer exist. This is an important option for optimizing the database, which only removes non-existent products or variants.
Module testing
The "Module testing" option is used for internal unit testing and helps diagnose problems with the module. Our employee may ask you to perform tests to solve problems with the module.
Delete all prices
Deleting the history of all product prices is an option that has been discussed for a long time in the developers' room. This option is quite risky, as it removes the entire price history of products. A better solution is to use the local equivalent of this option, which is located in the "Pricing" tab when editing the product. This option was created for people who scanned product prices and made mistakes when entering the price. However, it should be remembered that if the product was displayed on the store at a lower price, regardless of whether it was on promotion or not, if it is currently on promotion, we must notify the buyer that the product was available at a lower price, in accordance with the Omnibus Act. Therefore, this option should be used with full awareness.
Testing Different Scenarios
If you want to see how your online store behaves in different situations, it's worth conducting tests. Below we present a few scenarios that you can use for testing.
Test 1: Changing the Product Price
The admin adds a product with a price of 200. Then, they discount it to 120 and on the same day set the price to 80. After correctly scanning the product, the expected result is three prices saved in the history.
Test 2: Changing the Price During a Promotion
The admin discounts a product from 100 to 80 on 01.01.2023 and scans the product. Then, on 05.01.2023, they remove the promotion and set the product price to 90, and after scanning the product, they save the price. On 10.10.2023, they set the price to 120, discount it to 100, and scan the product. The expected display for Omnibus price is: The price of 80 is displayed until 04.02.2023, then the price of 90 is displayed, which is valid until 09.02.2023. After that time, the price is changed to 100.
Test 3: Frequent Price Changes
The admin changes the product price five times a day, every two hours on 01.01.2023. At 12:00, the price is 100, at 14:00 it is changed to 110, at 16:00 to 120, at 18:00 to 130, and at 20:00 to 140. Then, the admin sets the price to 200, discounts it to 180. The expected Omnibus price is 100 until 31.01.2023, 12:00, then every two hours, the price should be displayed for 10 PLN higher. After each change, the product should be scanned, and its price should be added to the history.
Conducting tests allows for a precise check of how your online store behaves in different situations. Thanks to this, potential errors can be caught and the store's operation can be improved.
Thank you
In summary, the free Omnibus module for PrestaShop allows you to display the lowest scanned price of a product on your online store within the last 30 days from the price change. The module stores the price history of all products as long as they have been scanned after the price change. It should be noted that the module is a trial version and its use is at your own risk. It is also recommended to scan products every time their price is changed on the store. Before installing the module, it is advisable to back up the store, and after installing the module, scan all prices. The information is displayed only for products that are on promotion. If you encounter any issues with the module or have any questions, it is worth contacting us.