first commit
This commit is contained in:
143
modules/gm_omniprice/CHANGELOG
Normal file
143
modules/gm_omniprice/CHANGELOG
Normal file
@@ -0,0 +1,143 @@
|
||||
## [1.1.6] - 2023-01-23
|
||||
|
||||
### Fixed
|
||||
|
||||
- Cleaning product attributes from price history and cache
|
||||
|
||||
## [1.1.5] - 2023-01-19
|
||||
|
||||
### Added
|
||||
|
||||
- Cleaning deleted product attributes from price history and cache
|
||||
|
||||
### Fixed
|
||||
|
||||
- Warnings when getting shop id's
|
||||
|
||||
## [1.1.4] - 2023-01-17
|
||||
|
||||
### Changed
|
||||
|
||||
- Database queries to optimize performance
|
||||
|
||||
## [1.1.3] - 2023-01-15
|
||||
|
||||
### Added
|
||||
|
||||
- information about discounts for individual combinations
|
||||
|
||||
- automatic configuration upon installation
|
||||
|
||||
## [1.1.2] - 2023-01-12
|
||||
|
||||
### Changed
|
||||
|
||||
- Default colors
|
||||
|
||||
### Added
|
||||
|
||||
- cleanup: deleting prices for ignored or deleted groups from old history
|
||||
|
||||
## [1.1.1] - 2023-01-11
|
||||
|
||||
### Added
|
||||
|
||||
- Cleanup script improvements
|
||||
|
||||
- Additional debugging features for frontend and CRON task
|
||||
|
||||
- Number of stored prices in the information panel
|
||||
|
||||
- Number of active countries in the information panel
|
||||
|
||||
### Fixed
|
||||
|
||||
- Deleting today's history on CRON reset
|
||||
|
||||
## [1.1.0] - 2023-01-10
|
||||
|
||||
### Added
|
||||
|
||||
- Feature to display information even if the price history is not ready
|
||||
|
||||
## [1.0.17] - 2023-01-09
|
||||
|
||||
### Added
|
||||
|
||||
- Support for stores with removed combination data from product page URL
|
||||
|
||||
### Fixed
|
||||
|
||||
- Removing lowest price in case of changing discounted combination from one to another
|
||||
|
||||
## [1.0.16] - 2023-01-08
|
||||
|
||||
### Fixed
|
||||
|
||||
- Bug fixes related to ThirtyBees and multistore support
|
||||
|
||||
## [1.0.15] - 2023-01-07
|
||||
|
||||
### Added
|
||||
|
||||
- Additional paremeter, allowing to reset the price gathering CRON task
|
||||
|
||||
## [1.0.14] - 2023-01-05
|
||||
|
||||
### Added
|
||||
|
||||
- Information panel
|
||||
|
||||
### Changed
|
||||
|
||||
- Processing only active shops for multistore
|
||||
|
||||
## [1.0.13] - 2023-01-03
|
||||
|
||||
### Added
|
||||
|
||||
- Configurable colors
|
||||
|
||||
## [1.0.12] - 2023-01-03
|
||||
|
||||
### Added
|
||||
|
||||
- Support for global specific price rules
|
||||
|
||||
### Fixed
|
||||
|
||||
- Preview of product price history on product page in back office for PrestaShop 1.6
|
||||
|
||||
## [1.0.11] - 2023-01-02
|
||||
|
||||
### Fixed
|
||||
|
||||
- Preview of product price history on product page in back office for new installations
|
||||
|
||||
## [1.0.10] - 2023-01-01
|
||||
|
||||
### Added
|
||||
|
||||
- Preview of product price history on product page in back office
|
||||
|
||||
## [1.0.9] - 2022-12-30
|
||||
|
||||
### Added
|
||||
|
||||
- Support for versions not passing full product to the hook correctly
|
||||
|
||||
## [1.0.8] - 2022-12-21
|
||||
|
||||
### Added
|
||||
|
||||
- CRON task preview formatting
|
||||
|
||||
### Changed
|
||||
|
||||
- A message 'All products indexed' instead of a just empty table to indicate that all is done for today
|
||||
|
||||
## [1.0.7] - 2022-12-20
|
||||
|
||||
###Added
|
||||
|
||||
- additional parameter to preview module appearance on the product page
|
||||
12
modules/gm_omniprice/cleanup.php
Normal file
12
modules/gm_omniprice/cleanup.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
require_once('../../config/config.inc.php');
|
||||
|
||||
$omni = Module::getInstanceByName('gm_omniprice');
|
||||
$token = Tools::getValue('token');
|
||||
$comparedToken = Tools::getAdminToken('gm_omniprice');
|
||||
if ($token != $comparedToken) {
|
||||
die('invalid token');
|
||||
}
|
||||
$omni->cleanUp(true);
|
||||
echo 'FINISH<br/>';
|
||||
12
modules/gm_omniprice/config_pl.xml
Normal file
12
modules/gm_omniprice/config_pl.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>gm_omniprice</name>
|
||||
<displayName><![CDATA[OmniPrice - zgodność cen z dyrektywą Omnibus]]></displayName>
|
||||
<version><![CDATA[1.1.6]]></version>
|
||||
<description><![CDATA[Wyświetla informację o najniższej cenie przed promocją]]></description>
|
||||
<author><![CDATA[GreenMouseStudio.com]]></author>
|
||||
<tab><![CDATA[front_office_features]]></tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
<need_instance>0</need_instance>
|
||||
<limited_countries></limited_countries>
|
||||
</module>
|
||||
37
modules/gm_omniprice/cron.php
Normal file
37
modules/gm_omniprice/cron.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
$start = microtime(true);
|
||||
require('template.php');
|
||||
require_once('../../config/config.inc.php');
|
||||
|
||||
$omni = Module::getInstanceByName('gm_omniprice');
|
||||
$token = Tools::getValue('token');
|
||||
$comparedToken = Tools::getAdminToken('gm_omniprice');
|
||||
if ($token != $comparedToken) {
|
||||
die('invalid token');
|
||||
}
|
||||
if (Tools::isSubmit('reset')) {
|
||||
$omni->resetIndex();
|
||||
echo 'RESET</br>';
|
||||
}
|
||||
$productId = null;
|
||||
if (Tools::isSubmit('pid')) {
|
||||
$productId = (int) Tools::getValue('pid');
|
||||
$omni->removeProductFromTodaysIndex($productId);
|
||||
$omni->removeProductFromTodaysHistory($productId);
|
||||
}
|
||||
$omni->savePrices(true, $productId);
|
||||
echo 'FINISH<br/>';
|
||||
if (Tools::isSubmit('debug')) {
|
||||
echo 'DEBUG:<br/>';
|
||||
$debug = Db::getInstance()->executeS('SELECT * FROM `' . _DB_PREFIX_ . 'gm_omniprice_history` WHERE `id_product` = ' . $productId);
|
||||
if ($debug) {
|
||||
echo $omni->displayTable($debug, array_keys($debug[0]));
|
||||
}
|
||||
$debug = Db::getInstance()->executeS('SELECT * FROM `' . _DB_PREFIX_ . 'gm_omniprice_cache` WHERE `id_product` = ' . $productId);
|
||||
if ($debug) {
|
||||
echo $omni->displayTable($debug, array_keys($debug[0]));
|
||||
}
|
||||
}
|
||||
$timeElapsedSeconds = microtime(true) - $start;
|
||||
echo round($timeElapsedSeconds, 4) . ' s<br/>';
|
||||
1674
modules/gm_omniprice/gm_omniprice.php
Normal file
1674
modules/gm_omniprice/gm_omniprice.php
Normal file
File diff suppressed because it is too large
Load Diff
35
modules/gm_omniprice/index.php
Normal file
35
modules/gm_omniprice/index.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2030 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
BIN
modules/gm_omniprice/logo.png
Normal file
BIN
modules/gm_omniprice/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.4 KiB |
62
modules/gm_omniprice/template.php
Normal file
62
modules/gm_omniprice/template.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
body {
|
||||
font-family: monospace;
|
||||
font-size: 12px;
|
||||
}
|
||||
.alert {
|
||||
position: relative;
|
||||
padding: 0.75rem 1.25rem;
|
||||
margin-bottom: 1rem;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
.alert-success {
|
||||
color: #155724;
|
||||
background-color: #d4edda;
|
||||
border-color: #c3e6cb;
|
||||
}
|
||||
table {
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
font-size: 0.75rem;
|
||||
border: none!important;
|
||||
background: none;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
table td, table th {
|
||||
padding: 0.375rem 0.75rem;
|
||||
vertical-align: middle;
|
||||
border: none;
|
||||
}
|
||||
table th {
|
||||
vertical-align: middle;
|
||||
background-color: #333;
|
||||
color: #fff;
|
||||
font-weight: 700;
|
||||
}
|
||||
table tr:nth-of-type(odd) {
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
table tr:hover {
|
||||
color: #212529;
|
||||
background-color: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.alert {
|
||||
position: relative;
|
||||
padding: 0.75rem 1.25rem;
|
||||
margin-bottom: 1rem;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
.alert-success {
|
||||
color: #155724;
|
||||
background-color: #d4edda;
|
||||
border-color: #c3e6cb;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="main">
|
||||
69
modules/gm_omniprice/translations/pl.php
Normal file
69
modules/gm_omniprice/translations/pl.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_90a0c7b2104a67d391df6f2db66300e3'] = 'OmniPrice - zgodność cen z dyrektywą Omnibus';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_2f2aaa2e0f7ba09de9a5f449ba5f45af'] = 'Wyświetla informację o najniższej cenie przed promocją';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_c888438d14855d7d96a2724ee9c306bd'] = 'Zapisano ustawienia';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_f4f70727dc34561dfde1a3c529b6205c'] = 'Ustawienia';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_1901606ea069a83dc7beea17881ef95a'] = 'Okres';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_b1e1f9076cca4dd59d55975e7a318f38'] = 'Liczba dni przed promocją podlegająca analizie';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_62fefba7aea0bdb51b8935c165195610'] = 'Ignoruj kraje';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_93cba07454f06a4a960172bbd6e2a435'] = 'Tak';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Nie';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_dc4143a87bf30fc020b5285c0943567c'] = 'Analizuj ceny tylko dla domyślnego kraju, klienci z innych krajów będą widzieli ceny dla domyślnego kraju';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_b7b08b9fdd4d8d7a01eaf832777db241'] = 'Ignoruj kombinacje';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_a9a3387e6b5111e07b969cfa06d68586'] = 'Analizuj ceny tylko dla domyślnej kombinacji produktu, zalecane jeżeli kombinacje nie mają wpływu na cenę';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_09c12c14a8bdcb5579a6163a4ce736e8'] = 'Ignorowane grupy';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_c8885049351230f4d9e65f2997e2de57'] = 'Ignoruj wybrane grupy, klienci z tych grup będą widzieli cenę dla grupy domyślnej (Klient), zalecane jeżeli nie są używane rabaty grupowe';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_1300769d8d72fc8218b40772f1c25efc'] = 'Pakiet produktow';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_419e727dd8d9ac44fd248de2eda589b4'] = 'Liczba produktów przetwarzana podczas pojedynczego przebiegu zadania CRON';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_e09109328229ca6967e3ea981ee158dd'] = 'Reindeksuj podczas zapisu produktu';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_bd0b2b3a1ded97ddd1d70591f1af8960'] = 'Reindeksuje produkt w momencie jego zapisu ';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_368d9ac76af05f714092bc808a426bfc'] = 'Kolor tła';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_5f111ae4c490902059da2004cbc8b424'] = 'Kolor tekstu';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_d6a3bb2945a3fa2ac63739ec31c00060'] = 'Kolor ceny';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_ad1338e53c6bec090eaab52628716805'] = 'Pokaż komunikat nawet gdy za mało historii';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_0a7291f2167ca2f321c44157ded8e2f8'] = 'Dla przecenionych produktów, dla których brak informacji o poprzednich cenach, pokazuje jedyną zapamiętaną cenę promocyjną jako najniższą cenę historyczną';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_c9cc8cce247e49bae79f15173ce97354'] = 'Zapisz';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_29d52349ac08e64641ca944b5089945c'] = 'ID domyslnego sklepu:';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_1033eb0896e0e3ccde90fe8ea13c1fb2'] = 'ID domyslnego kraju:';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_f770b9c02b33fe4e7246f96b12887a01'] = 'ID domyslnej grupy:';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_97a3473f848ca730a12ddd300fa36d38'] = 'ID domyslnej waluty:';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_212713efb37cd2f521ee584f1dbb5f0b'] = 'ID sklepu:';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_36f12776fd15f301a8b51336b49a7043'] = 'Wszystkie produkty zaindeksowane';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_f2f4e21b8a93962f211c50a54d20653d'] = 'To jeszcze nie koniec, uruchom mnie ponownie';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_97f08a40f22a625d0cbfe03db3349108'] = 'ID produktu';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_b9a7a7f4250389169ecdbe30bf388e62'] = 'ID kombinacji';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_28a382bd262d1e28a94c3ef716364f45'] = 'ID kraju';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_e3bd5374568ecf9da8cf9603b469ea1f'] = 'ID waluty';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_38a915ac6509a0c3af497a3ad669e247'] = 'ID grupy';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_3601146c4e948c32b6424d2c0a7f0118'] = 'Cena';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_51aa40e214d39cada27aec2074df80d9'] = 'Poprzednia cena';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_50ead5491751f11a8f21884a66532f20'] = 'Na przecenie';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_004bf6c9a40003140292e97330236c53'] = 'Akcja';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_13f5e3a5ca5014256ec30d986f6365fb'] = 'Najnizsza cena';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_7b44391e916811603c318ffd2caaf1b1'] = 'Bez zmian';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_c017b7425d07d95d17494f3ed6830de9'] = 'Gromadzenie historii cen';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_fe25cfca4b1b64ab36d337972864b82e'] = 'Czyszczenie starej historii cen';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_a82be0f551b8708bc08eb33cd9ded0cf'] = 'Informacje';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_c245f6a0334e2490637a2fefc91f84ce'] = 'Grupy bez klientów:';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_8b550b54d30d109322b24fd570f14c08'] = 'Grupy z rabatami grupowymi:';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_85ddea2392785df2fb727165e63e7266'] = 'Grupy z cenami specyficznymi:';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_c855e004485babe5c373301a3efe35c3'] = 'Grupy z regułami cenowymi katalogu:';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_b23c2990245b2f2e9547f28992096e35'] = 'Produkty posiadają kombinacje z wpływem na cenę:';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_9e003b5f5cd7e7715720a6621894b655'] = 'Pojedyncze kombinacje posiadają rabaty:';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_8d355f74fb73e3c11bb9239e54cde7a7'] = 'Liczba aktywnych krajów:';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_a2c5b5f105f1e71608e3c9d9dee9f2a4'] = 'Liczba aktywnych walut:';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_2b3720269ac2364ac58c8769ba8c9c25'] = 'Liczba cen zgromadzonych w historii:';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_6adf97f83acf6453d4a6a4b1070f3754'] = 'Brak';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_114d3c884cee5cdb580d88fd277e847b'] = 'ta cena może zostać skasowana';
|
||||
$_MODULE['<{gm_omniprice}prestashop>gm_omniprice_fa19e91aa306519181f7b8a19743b5f1'] = 'ta cena jest ciągle potrzebna';
|
||||
$_MODULE['<{gm_omniprice}prestashop>price_7a6e48674dee5dd4a09f41e487d2c896'] = 'Najniższa cena w okresie %d dni przed promocją:';
|
||||
$_MODULE['<{gm_omniprice}prestashop>tab_11ac0a790117ce9772284501afb324e5'] = 'Produkt zaindeksowany dzisiaj:';
|
||||
$_MODULE['<{gm_omniprice}prestashop>tab_93cba07454f06a4a960172bbd6e2a435'] = 'Tak';
|
||||
$_MODULE['<{gm_omniprice}prestashop>tab_bafd7322c6e97d25b6299b5d6fe8920b'] = 'Nie';
|
||||
$_MODULE['<{gm_omniprice}prestashop>tab_0968b8dc12087a20de5b608d6617b925'] = 'Dla uproszczenia, poniższa tabela pokazuje historię zmian cen dla domyślnej waluty, kraju, grupy klienta oraz atrybutu.';
|
||||
$_MODULE['<{gm_omniprice}prestashop>tab_44749712dbec183e983dcd78a7736c41'] = 'Data';
|
||||
$_MODULE['<{gm_omniprice}prestashop>tab_3601146c4e948c32b6424d2c0a7f0118'] = 'Cena';
|
||||
$_MODULE['<{gm_omniprice}prestashop>tab_626a54d37d402d449d6d7541911e0952'] = 'Promocja';
|
||||
9
modules/gm_omniprice/upgrade/upgrade-1.0.10.php
Normal file
9
modules/gm_omniprice/upgrade/upgrade-1.0.10.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
function upgrade_module_1_0_10($object) {
|
||||
return ($object->registerHook('displayAdminProductsExtra'));
|
||||
}
|
||||
9
modules/gm_omniprice/upgrade/upgrade-1.0.11.php
Normal file
9
modules/gm_omniprice/upgrade/upgrade-1.0.11.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
function upgrade_module_1_0_11($object) {
|
||||
return ($object->registerHook('displayAdminProductsExtra'));
|
||||
}
|
||||
12
modules/gm_omniprice/upgrade/upgrade-1.0.13.php
Normal file
12
modules/gm_omniprice/upgrade/upgrade-1.0.13.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
function upgrade_module_1_0_13($object)
|
||||
{
|
||||
Configuration::updateValue('GM_OMNIPRICE_TEXT_COLOR', '#FFFFFF');
|
||||
Configuration::updateValue('GM_OMNIPRICE_PRICE_COLOR', '#FFFFFF');
|
||||
Configuration::updateValue('GM_OMNIPRICE_BG_COLOR', '#666666');
|
||||
return true;
|
||||
}
|
||||
10
modules/gm_omniprice/upgrade/upgrade-1.1.0.php
Normal file
10
modules/gm_omniprice/upgrade/upgrade-1.1.0.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
function upgrade_module_1_1_0($object)
|
||||
{
|
||||
Configuration::updateValue('GM_OMNIPRICE_SHOW_IF_NO_HISTORY', false);
|
||||
return true;
|
||||
}
|
||||
5
modules/gm_omniprice/views/css/gm_omniprice.css
Normal file
5
modules/gm_omniprice/views/css/gm_omniprice.css
Normal file
@@ -0,0 +1,5 @@
|
||||
.gm_omniprice {
|
||||
margin-top: 5px;
|
||||
display: inline-block;
|
||||
padding: 5px;
|
||||
}
|
||||
35
modules/gm_omniprice/views/css/index.php
Normal file
35
modules/gm_omniprice/views/css/index.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2030 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
35
modules/gm_omniprice/views/index.php
Normal file
35
modules/gm_omniprice/views/index.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2030 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
14
modules/gm_omniprice/views/js/gm_omniprice.js
Normal file
14
modules/gm_omniprice/views/js/gm_omniprice.js
Normal file
@@ -0,0 +1,14 @@
|
||||
window.displayDiscountsOverride = window.displayDiscounts;
|
||||
window.displayDiscounts = function (attributeId) {
|
||||
window.displayDiscountsOverride();
|
||||
var currentAttrPrice = window.gm_omniprice_attr_prices[attributeId];
|
||||
if (!currentAttrPrice) {
|
||||
currentAttrPrice = window.gm_omniprice_attr_prices[0];
|
||||
}
|
||||
if (currentAttrPrice) {
|
||||
$('#buy_block .gm_omniprice').show();
|
||||
$('#buy_block .gm_omniprice_lowest').text(currentAttrPrice);
|
||||
} else {
|
||||
$('#buy_block .gm_omniprice').hide();
|
||||
}
|
||||
};
|
||||
35
modules/gm_omniprice/views/js/index.php
Normal file
35
modules/gm_omniprice/views/js/index.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2030 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
35
modules/gm_omniprice/views/templates/hook/index.php
Normal file
35
modules/gm_omniprice/views/templates/hook/index.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2030 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
4
modules/gm_omniprice/views/templates/hook/price.tpl
Normal file
4
modules/gm_omniprice/views/templates/hook/price.tpl
Normal file
@@ -0,0 +1,4 @@
|
||||
<span class="gm_omniprice" style="color:{$gm_omniprice_color}; background-color: {$gm_omniprice_background};">
|
||||
{l s='Lowest price within %d days before promotion:' sprintf=[$gm_omniprice_days] mod='gm_omniprice'}
|
||||
<span class="gm_omniprice_lowest" style="color:{$gm_omniprice_price_color};">{$gm_omniprice_lowest}</span>
|
||||
</span>
|
||||
20
modules/gm_omniprice/views/templates/hook/tab.tpl
Normal file
20
modules/gm_omniprice/views/templates/hook/tab.tpl
Normal file
@@ -0,0 +1,20 @@
|
||||
<div class="panel">
|
||||
<p>{l s='Product indexed today:' mod='gm_omniprice'} {if $indexedToday}{l s='Yes' mod='gm_omniprice'}{else}{l s='No' mod='gm_omniprice'}{/if}</p>
|
||||
<p>{l s='For simplicity, this table shows price change history for default currency, country, customer group and product attribute.' mod='gm_omniprice'}</p>
|
||||
<table class="table table-hover" id="orderProducts">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="fixed-width-md"><span class="title_box">{l s='Date' mod='gm_omniprice'}</span></th>
|
||||
<th class="fixed-width-md"><span class="title_box">{l s='Price' mod='gm_omniprice'}</span></th>
|
||||
<th class="fixed-width-md"><span class="title_box">{l s='Promotion' mod='gm_omniprice'}</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{foreach from=$historyData item=historyItem}
|
||||
<tr>
|
||||
<td>{$historyItem.date}</td>
|
||||
<td>{$historyItem.price_tin}</td>
|
||||
<td>{if $historyItem.is_specific_price == '1'}{l s='Yes' mod='gm_omniprice'}{/if}{if $historyItem.is_specific_price == '0'}{l s='No' mod='gm_omniprice'}{/if}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
35
modules/gm_omniprice/views/templates/index.php
Normal file
35
modules/gm_omniprice/views/templates/index.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2030 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
Reference in New Issue
Block a user