From 5cf071717097f773a36dce094c8bfcb00595dc8e Mon Sep 17 00:00:00 2001 From: Jacek Pyziak Date: Thu, 27 Feb 2025 12:52:18 +0100 Subject: [PATCH] first commit --- .htaccess | 158 ++ .vscode/ftp-kr.diff.gm_omniprice.php | 2510 ++++++++++++++++++ .vscode/ftp-kr.json | 14 + .vscode/ftp-kr.sync.cache.json | 3672 ++++++++++++++++++++++++++ .vscode/settings.json | 14 + .vscode/sftp.json | 12 + 6 files changed, 6380 insertions(+) create mode 100644 .htaccess create mode 100644 .vscode/ftp-kr.diff.gm_omniprice.php create mode 100644 .vscode/ftp-kr.json create mode 100644 .vscode/ftp-kr.sync.cache.json create mode 100644 .vscode/settings.json create mode 100644 .vscode/sftp.json diff --git a/.htaccess b/.htaccess new file mode 100644 index 00000000..069d43ed --- /dev/null +++ b/.htaccess @@ -0,0 +1,158 @@ +#x13webp module start +#Domain: lulandia.pl +RewriteRule . - [E=REWRITEBASE:/] +RewriteRule ^api(?:/(.*))?$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] + +# Images +RewriteCond %{HTTP_HOST} ^lulandia.pl$ +RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.webp$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.webp [L] +RewriteCond %{HTTP_HOST} ^lulandia.pl$ +RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.webp$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.webp [L] +RewriteCond %{HTTP_HOST} ^lulandia.pl$ +RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.webp$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.webp [L] +RewriteCond %{HTTP_HOST} ^lulandia.pl$ +RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.webp$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.webp [L] +RewriteCond %{HTTP_HOST} ^lulandia.pl$ +RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.webp$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.webp [L] +RewriteCond %{HTTP_HOST} ^lulandia.pl$ +RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.webp$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.webp [L] +RewriteCond %{HTTP_HOST} ^lulandia.pl$ +RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.webp$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.webp [L] +RewriteCond %{HTTP_HOST} ^lulandia.pl$ +RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.webp$ %{ENV:REWRITEBASE}img/c/$1$2$3.webp [L] +RewriteCond %{HTTP_HOST} ^lulandia.pl$ +RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.webp$ %{ENV:REWRITEBASE}img/c/$1$2.webp [L] +# AlphaImageLoader for IE and fancybox +RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L] +#x13webp redirections start + +SetEnvIf Request_URI "\.(jpe?g|png)$" REQUEST_image + + +RewriteEngine On +RewriteCond %{HTTP_ACCEPT} image/webp +RewriteCond %{REQUEST_FILENAME} (.*)\.(jpe?g|png)$ +RewriteCond %1\.webp -f +RewriteRule (.+)\.(jpe?g|png)$ $1.webp [T=image/webp,E=accept:1] + + +RewriteEngine On +RewriteCond %{HTTP_ACCEPT} image/webp +RewriteCond %{DOCUMENT_ROOT}/$1.webp -f +RewriteRule (.+)\.(jpe?g|png)$ $1.webp [T=image/webp] + + +Header append Vary Accept env=REDIRECT_accept + + +AddType image/webp .webp + +#x13webp redirections end + +#x13webp module end +# ~~startcookiesplus~~ Cookies Plus module - Do not remove this comment + +RewriteRule .* - [E=Cache-Vary:cookiesplus] + +# ~~endcookiesplus~~ Cookies Plus module - Do not remove this comment + + + + +# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again +# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution +# http://www.prestashop.com - http://www.prestashop.com/forums + + + +SetEnv HTTP_MOD_REWRITE On + + +RewriteEngine on + +#Domain: lulandia.pl +RewriteRule . - [E=REWRITEBASE:/] +RewriteRule ^api$ api/ [L] + +RewriteRule ^api/(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] + +# Images +RewriteCond %{HTTP_HOST} ^lulandia.pl$ +RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L] +RewriteCond %{HTTP_HOST} ^lulandia.pl$ +RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L] +RewriteCond %{HTTP_HOST} ^lulandia.pl$ +RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L] +RewriteCond %{HTTP_HOST} ^lulandia.pl$ +RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L] +RewriteCond %{HTTP_HOST} ^lulandia.pl$ +RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L] +RewriteCond %{HTTP_HOST} ^lulandia.pl$ +RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L] +RewriteCond %{HTTP_HOST} ^lulandia.pl$ +RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L] +RewriteCond %{HTTP_HOST} ^lulandia.pl$ +RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L] +RewriteCond %{HTTP_HOST} ^lulandia.pl$ +RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L] +RewriteCond %{HTTP_HOST} ^lulandia.pl$ +RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L] +# AlphaImageLoader for IE and fancybox +RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L] + +# Dispatcher +RewriteCond %{REQUEST_FILENAME} -s [OR] +RewriteCond %{REQUEST_FILENAME} -l [OR] +RewriteCond %{REQUEST_FILENAME} -d +RewriteRule ^.*$ - [NC,L] +RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L] + + +AddType application/vnd.ms-fontobject .eot +AddType font/ttf .ttf +AddType font/otf .otf +AddType application/font-woff .woff +AddType font/woff2 .woff2 + + + Header set Access-Control-Allow-Origin "*" + + + + + ExpiresActive On + ExpiresByType image/gif "access plus 1 month" + ExpiresByType image/jpeg "access plus 1 month" + ExpiresByType image/png "access plus 1 month" + ExpiresByType text/css "access plus 1 week" + ExpiresByType text/javascript "access plus 1 week" + ExpiresByType application/javascript "access plus 1 week" + ExpiresByType application/x-javascript "access plus 1 week" + ExpiresByType image/x-icon "access plus 1 year" + ExpiresByType image/svg+xml "access plus 1 year" + ExpiresByType image/vnd.microsoft.icon "access plus 1 year" + ExpiresByType application/font-woff "access plus 1 year" + ExpiresByType application/x-font-woff "access plus 1 year" + ExpiresByType font/woff2 "access plus 1 year" + ExpiresByType application/vnd.ms-fontobject "access plus 1 year" + ExpiresByType font/opentype "access plus 1 year" + ExpiresByType font/ttf "access plus 1 year" + ExpiresByType font/otf "access plus 1 year" + ExpiresByType application/x-font-ttf "access plus 1 year" + ExpiresByType application/x-font-otf "access plus 1 year" + + + + Header unset Etag + +FileETag none + + + AddOutputFilterByType DEFLATE text/html text/css text/javascript application/javascript application/x-javascript font/ttf application/x-font-ttf font/otf application/x-font-otf font/opentype image/svg+xml + + + +#If rewrite mod isn't enabled +ErrorDocument 404 /index.php?controller=404 + +# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again \ No newline at end of file diff --git a/.vscode/ftp-kr.diff.gm_omniprice.php b/.vscode/ftp-kr.diff.gm_omniprice.php new file mode 100644 index 00000000..11a7c8bf --- /dev/null +++ b/.vscode/ftp-kr.diff.gm_omniprice.php @@ -0,0 +1,2510 @@ +name = 'gm_omniprice'; + $this->prefix = strtoupper($this->name); + $this->tab = 'front_office_features'; + $this->version = '1.2.11'; + $this->author = 'GreenMouseStudio.com'; + $this->need_instance = 0; + $this->bootstrap = true; + + parent::__construct(); + + $this->displayName = $this->l('OmniPrice - Omnibus Directive price compliancy'); + $this->description = $this->l('Displays lowest price before current promotion for discounted products'); + + $this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_); + $this->getConfiguration(); + } + + public function getConfiguration() + { + $this->ignoredGroups = explode(',', Configuration::get($this->prefix . '_GROUPS')); + $this->daysBack = Configuration::get($this->prefix . '_DAYS'); + $this->batchSize = Configuration::get($this->prefix . '_BATCH'); + $this->ignoreCountries = Configuration::get($this->prefix . '_IGNORE_COUNTRIES'); + $this->ignoreNonEuCountries = Configuration::get($this->prefix . '_IGNORE_NON_EU'); + $this->ignoreCombinations = Configuration::get($this->prefix . '_IGNORE_COMBINATIONS'); + $this->reindexOnSave = Configuration::get($this->prefix . '_REINDEX'); + $this->textColor = Configuration::get($this->prefix . '_TEXT_COLOR'); + $this->priceColor = Configuration::get($this->prefix . '_PRICE_COLOR'); + $this->backgroundColor = Configuration::get($this->prefix . '_BG_COLOR'); + $this->showIfNotEnoughHistoricalData = Configuration::get($this->prefix . '_SHOW_IF_NO_HISTORY'); + $this->showRealDiscount = Configuration::get($this->prefix . '_SHOW_REAL_DISCOUNT'); + $this->indexInactive = Configuration::get($this->prefix . '_INDEX_INACTIVE'); + $this->skipBelowCost = Configuration::get($this->prefix . '_SKIP_BELOW_COST'); + + $this->defaultShopId = (int) Configuration::get('PS_SHOP_DEFAULT'); + $this->defaultCountryId = (int) Configuration::get('PS_COUNTRY_DEFAULT'); + $this->defaultGroupId = (int) Configuration::get('PS_CUSTOMER_GROUP'); + $this->defaultCurrencyId = (int) Configuration::get('PS_CURRENCY_DEFAULT'); + $this->today = date('Y-m-d'); + $this->yesterday = date('Y-m-d', strtotime("-1 days")); + } + + public function install() + { + if ( + parent::install() && $this->installDb() && + $this->registerHook('displayProductPriceBlock') && + $this->registerHook('displayAdminProductsExtra') && + $this->registerHook('actionProductUpdate') && + $this->registerHook('actionObjectSpecificPriceAddAfter') && + $this->registerHook('actionObjectSpecificPriceUpdateAfter') && + $this->registerHook('actionObjectSpecificPriceDeleteAfter') + ) + { + Configuration::updateValue($this->prefix . '_DAYS', 30); + Configuration::updateValue($this->prefix . '_BATCH', 100); + Configuration::updateValue($this->prefix . '_IGNORE_COUNTRIES', true); + Configuration::updateValue($this->prefix . '_IGNORE_NON_EU', true); + Configuration::updateValue($this->prefix . '_REINDEX', true); + Configuration::updateValue($this->prefix . '_SHOW_IF_NO_HISTORY', false); + Configuration::updateValue($this->prefix . '_SHOW_REAL_DISCOUNT', false); + Configuration::updateValue($this->prefix . '_INDEX_INACTIVE', false); + Configuration::updateValue($this->prefix . '_SKIP_BELOW_COST', false); + Configuration::updateValue($this->prefix . '_TEXT_COLOR', '#666666'); + Configuration::updateValue($this->prefix . '_PRICE_COLOR', '#666666'); + Configuration::updateValue($this->prefix . '_BG_COLOR', '#FFFFFF'); + if (Tools::version_compare(_PS_VERSION_, '1.7.0.0', '<')) + { + $this->registerHook('displayHeader'); + } + else + { + $this->registerHook('actionFrontControllerSetMedia'); + } + $this->autoConfig(); + return true; + } + return false; + } + + public function autoConfig() + { + $combinationsHaveDiscountsOrImpacts = $this->getCombinationsDiscountsInfo() || $this->getCombinationsPriceImpactsInfo(); + Configuration::updateValue($this->prefix . '_IGNORE_COMBINATIONS', !$combinationsHaveDiscountsOrImpacts); + if (!defined('_TB_VERSION_')) + { //TB has a nasty bug here + $groupsToSafelyIgnore = $this->findGroupsToSafelyIgnore(); + Configuration::updateValue($this->prefix . '_GROUPS', implode(',', $groupsToSafelyIgnore)); + } + } + + public function installDb() + { + return Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'gm_omniprice_history` ( + `date` DATE NOT NULL, + `id_shop` INT(10) UNSIGNED NOT NULL, + `id_product` INT(10) UNSIGNED NOT NULL, + `id_product_attribute` INT(10) UNSIGNED NOT NULL, + `id_currency` INT(10) UNSIGNED NOT NULL, + `id_country` INT(10) UNSIGNED NOT NULL, + `id_group` INT(10) UNSIGNED NOT NULL, + `price_tex` DECIMAL(20,6), + `price_tin` DECIMAL(20,6), + `is_specific_price` TINYINT(1), + INDEX (`date`, `id_shop`, `id_product`), + INDEX (`date`, `id_product`) + ) ENGINE = ' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=UTF8;') && + Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'gm_omniprice_cache` ( + `id_shop` INT(10) UNSIGNED NOT NULL, + `id_product` INT(10) UNSIGNED NOT NULL, + `id_product_attribute` INT(10) UNSIGNED NOT NULL, + `id_currency` INT(10) UNSIGNED NOT NULL, + `id_country` INT(10) UNSIGNED NOT NULL, + `id_group` INT(10) UNSIGNED NOT NULL, + `price_tex` DECIMAL(20,6), + `price_tin` DECIMAL(20,6), + `date` DATE NOT NULL, + INDEX (`id_shop`, `id_product`, `id_product_attribute`, `id_currency`, `id_country`, `id_group`, `date`) + ) ENGINE = ' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=UTF8;') && + Db::getInstance()->execute(' + CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'gm_omniprice_index` ( + `date` DATE NOT NULL, + `id_shop` INT(10) UNSIGNED NOT NULL, + `id_product` INT(10) UNSIGNED NOT NULL, + INDEX (`date`, `id_shop`) + ) ENGINE = ' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=UTF8;'); + } + + public function uninstall() + { + if (!parent::uninstall()) + { + return false; + } + + if ( + !$this->uninstallDB() || + !Configuration::deleteByName($this->prefix . '_GROUPS') || + !Configuration::deleteByName($this->prefix . '_DAYS') || + !Configuration::deleteByName($this->prefix . '_BATCH') || + !Configuration::deleteByName($this->prefix . '_BG_COLOR') || + !Configuration::deleteByName($this->prefix . '_TEXT_COLOR') || + !Configuration::deleteByName($this->prefix . '_PRICE_COLOR') || + !Configuration::deleteByName($this->prefix . '_IGNORE_COUNTRIES') || + !Configuration::deleteByName($this->prefix . '_IGNORE_NON_EU') || + !Configuration::deleteByName($this->prefix . '_IGNORE_COMBINATIONS') || + !Configuration::deleteByName($this->prefix . '_TEXT_COLOR') || + !Configuration::deleteByName($this->prefix . '_PRICE_COLOR') || + !Configuration::deleteByName($this->prefix . '_BG_COLOR') || + !Configuration::deleteByName($this->prefix . '_SHOW_IF_NO_HISTORY') || + !Configuration::deleteByName($this->prefix . '_SHOW_REAL_DISCOUNT') || + !Configuration::deleteByName($this->prefix . '_INDEX_INACTIVE') || + !Configuration::deleteByName($this->prefix . '_REINDEX') + ) + { + return false; + } + return true; + } + + protected function uninstallDb() + { + $res = Db::getInstance()->execute('DROP TABLE IF EXISTS `' . _DB_PREFIX_ . 'gm_omniprice_history`'); + $res &= Db::getInstance()->execute('DROP TABLE IF EXISTS `' . _DB_PREFIX_ . 'gm_omniprice_cache`'); + $res &= Db::getInstance()->execute('DROP TABLE IF EXISTS `' . _DB_PREFIX_ . 'gm_omniprice_index`'); + return $res; + } + + public function getContent() + { + $content = ''; + $content .= $this->postProcess(); + $content .= $this->displayGreenMouseModulesPanel(); + $content .= $this->displayForm(); + $content .= $this->displayInfo(); + $content .= $this->displayInformationPanel(); + return $content; + } + + protected function postProcess() + { + $output = ''; + if (Tools::isSubmit('submit' . $this->name)) + { + $this->ignoredGroups = Tools::getValue('groupBox'); + if (!is_array($this->ignoredGroups)) + { + $this->ignoredGroups = []; + } + $groupsString = implode(',', $this->ignoredGroups); + Configuration::updateValue($this->prefix . '_GROUPS', $groupsString); + + $this->daysBack = Tools::getValue($this->prefix . '_DAYS'); + Configuration::updateValue($this->prefix . '_DAYS', $this->daysBack); + + $this->batchSize = Tools::getValue($this->prefix . '_BATCH'); + Configuration::updateValue($this->prefix . '_BATCH', $this->batchSize); + + $this->ignoreCountries = Tools::getValue($this->prefix . '_IGNORE_COUNTRIES'); + Configuration::updateValue($this->prefix . '_IGNORE_COUNTRIES', $this->ignoreCountries); + + $this->ignoreNonEuCountries = Tools::getValue($this->prefix . '_IGNORE_NON_EU'); + Configuration::updateValue($this->prefix . '_IGNORE_NON_EU', $this->ignoreNonEuCountries); + + $this->ignoreCombinations = Tools::getValue($this->prefix . '_IGNORE_COMBINATIONS'); + Configuration::updateValue($this->prefix . '_IGNORE_COMBINATIONS', $this->ignoreCombinations); + + $this->reindexOnSave = Tools::getValue($this->prefix . '_REINDEX'); + Configuration::updateValue($this->prefix . '_REINDEX', $this->reindexOnSave); + + $this->textColor = Tools::getValue($this->prefix . '_TEXT_COLOR'); + Configuration::updateValue($this->prefix . '_TEXT_COLOR', $this->textColor); + + $this->priceColor = Tools::getValue($this->prefix . '_PRICE_COLOR'); + Configuration::updateValue($this->prefix . '_PRICE_COLOR', $this->priceColor); + + $this->backgroundColor = Tools::getValue($this->prefix . '_BG_COLOR'); + Configuration::updateValue($this->prefix . '_BG_COLOR', $this->backgroundColor); + + $this->showIfNotEnoughHistoricalData = Tools::getValue($this->prefix . '_SHOW_IF_NO_HISTORY'); + Configuration::updateValue($this->prefix . '_SHOW_IF_NO_HISTORY', $this->showIfNotEnoughHistoricalData); + + $this->showRealDiscount = Tools::getValue($this->prefix . '_SHOW_REAL_DISCOUNT'); + Configuration::updateValue($this->prefix . '_SHOW_REAL_DISCOUNT', $this->showRealDiscount); + + $this->indexInactive = Tools::getValue($this->prefix . '_INDEX_INACTIVE'); + Configuration::updateValue($this->prefix . '_INDEX_INACTIVE', $this->indexInactive); + + $this->skipBelowCost = Tools::getValue($this->prefix . '_SKIP_BELOW_COST'); + Configuration::updateValue($this->prefix . '_SKIP_BELOW_COST', $this->skipBelowCost); + + $output .= $this->displayConfirmation($this->l('Settings updated')); + } + return $output; + } + + public function displayForm() + { + $helper = new HelperForm(); + $groups = Group::getGroups($this->context->language->id); + $inputs = array( + array( + 'type' => 'text', + 'label' => $this->l('Period'), + 'desc' => $this->l('Number of days before promotion start to analyze'), + 'name' => $this->prefix . '_DAYS', + 'class' => 'fixed-width-md', + ), + array( + 'type' => 'switch', + 'label' => $this->l('Ignore countries'), + 'name' => $this->prefix . '_IGNORE_COUNTRIES', + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Yes') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('No') + ) + ), + 'hint' => $this->l('Analyze prices only for the default country, customers from other countries will see prices of the default country'), + 'desc' => $this->l('Analyze prices only for the default country, customers from other countries will see prices of the default country') + ), + array( + 'type' => 'switch', + 'label' => $this->l('Ignore non EU countries'), + 'name' => $this->prefix . '_IGNORE_NON_EU', + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Yes') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('No') + ) + ), + 'hint' => $this->l('Skip non EU countries totally, customers from non EU countries will not see any message about previous price'), + 'desc' => $this->l('Skip non EU countries totally, customers from non EU countries will not see any message about previous price') + ), + array( + 'type' => 'switch', + 'label' => $this->l('Ignore combinations'), + 'name' => $this->prefix . '_IGNORE_COMBINATIONS', + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Yes') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('No') + ) + ), + 'hint' => $this->l('Analyze prices only for the default combination, recommended if combinations don\'t have price impacts'), + 'desc' => $this->l('Analyze prices only for the default combination, recommended if combinations don\'t have price impacts') + ), + array( + 'type' => 'group', + 'label' => $this->l('Ignored groups'), + 'name' => 'groupBox', + 'values' => $groups, + 'hint' => $this->l('Ignore selected groups, customers from ignored groups will see prices for the default group (Customer), recommended if no group discounts in use'), + 'desc' => $this->l('Ignore selected groups, customers from ignored groups will see prices for the default group (Customer), recommended if no group discounts in use') + ), + array( + 'type' => 'text', + 'label' => $this->l('Batch size'), + 'desc' => $this->l('Number of products to process in a single CRON task run'), + 'name' => $this->prefix . '_BATCH', + 'class' => 'fixed-width-md', + ), + array( + 'type' => 'switch', + 'label' => $this->l('Reindex on product save'), + 'name' => $this->prefix . '_REINDEX', + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Yes') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('No') + ) + ), + 'hint' => $this->l('Reindex product on save'), + 'desc' => $this->l('Reindex product on save') + ), + array( + 'type' => 'color', + 'label' => $this->l('Background color'), + 'name' => $this->prefix . '_BG_COLOR', + ), + array( + 'type' => 'color', + 'label' => $this->l('Text color'), + 'name' => $this->prefix . '_TEXT_COLOR', + ), + array( + 'type' => 'color', + 'label' => $this->l('Price color'), + 'name' => $this->prefix . '_PRICE_COLOR', + ), + array( + 'type' => 'switch', + 'label' => $this->l('Show label even if not enough history'), + 'name' => $this->prefix . '_SHOW_IF_NO_HISTORY', + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Yes') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('No') + ) + ), + 'hint' => $this->l('For discounted products, if previous price is unknown, shows the current discounted price as the lowest one'), + 'desc' => $this->l('For discounted products, if previous price is unknown, shows the current discounted price as the lowest one') + ), + array( + 'type' => 'switch', + 'label' => $this->l('Index inactive products'), + 'name' => $this->prefix . '_INDEX_INACTIVE', + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Yes') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('No') + ) + ), + 'hint' => $this->l('Store price history even if the product is not active'), + 'desc' => $this->l('Store price history even if the product is not active'), + ), + ); + if (Tools::version_compare(_PS_VERSION_, '1.7.0.0', '>=')) + { + $inputs[] = array( + 'type' => 'switch', + 'label' => $this->l('Show real discount from the previous price'), + 'name' => $this->prefix . '_SHOW_REAL_DISCOUNT', + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Yes') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('No') + ) + ), + 'hint' => $this->l('Display price change percentage after the lowest previous price'), + 'desc' => $this->l('Display price change percentage after the lowest previous price') + ); + } + $inputs[] = array( + 'type' => 'switch', + 'label' => $this->l('Skip products sold below cost price'), + 'name' => $this->prefix . '_SKIP_BELOW_COST', + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Yes') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('No') + ) + ), + ); + $fieldsForm = array( + 'form' => array( + 'legend' => array( + 'title' => $this->l('Settings'), + 'icon' => 'icon-cogs' + ), + 'input' => $inputs, + 'submit' => array( + 'title' => $this->l('Save') + ) + ), + ); + + $helper->show_toolbar = true; + $helper->toolbar_scroll = true; + $helper->table = $this->table; + $helper->default_form_language = (int) Configuration::get('PS_LANG_DEFAULT'); + $helper->module = $this; + $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0; + $helper->identifier = $this->identifier; + $helper->submit_action = 'submit' . $this->name; + $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name; + $helper->token = Tools::getAdminTokenLite('AdminModules'); + foreach ($groups as $group) + { + $helper->fields_value['groupBox_' . $group['id_group']] = in_array($group['id_group'], $this->ignoredGroups); + } + $helper->fields_value[$this->prefix . '_DAYS'] = $this->daysBack; + $helper->fields_value[$this->prefix . '_BATCH'] = $this->batchSize; + $helper->fields_value[$this->prefix . '_IGNORE_COUNTRIES'] = $this->ignoreCountries; + $helper->fields_value[$this->prefix . '_IGNORE_NON_EU'] = $this->ignoreNonEuCountries; + $helper->fields_value[$this->prefix . '_IGNORE_COMBINATIONS'] = $this->ignoreCombinations; + $helper->fields_value[$this->prefix . '_REINDEX'] = $this->reindexOnSave; + $helper->fields_value[$this->prefix . '_TEXT_COLOR'] = $this->textColor; + $helper->fields_value[$this->prefix . '_PRICE_COLOR'] = $this->priceColor; + $helper->fields_value[$this->prefix . '_BG_COLOR'] = $this->backgroundColor; + $helper->fields_value[$this->prefix . '_SHOW_REAL_DISCOUNT'] = $this->showRealDiscount; + $helper->fields_value[$this->prefix . '_INDEX_INACTIVE'] = $this->indexInactive; + $helper->fields_value[$this->prefix . '_SKIP_BELOW_COST'] = $this->skipBelowCost; + $helper->fields_value[$this->prefix . '_SHOW_IF_NO_HISTORY'] = $this->showIfNotEnoughHistoricalData; + + return $helper->generateForm(array($fieldsForm)); + } + + public function savePrices($verbose = false, $productId = null) + { + $this->clearIndex($this->yesterday); + $output = ''; + $usetax = true; + if (Tax::excludeTaxeOption()) + { + $usetax = false; + } + $basicPrices = []; + $stateId = 0; + $zipcode = ''; + + $output .= $this->today . '
'; + $output .= $this->l('Batch size') . ': ' . $this->batchSize . '
'; + $output .= $this->l('Default country ID:') . ' ' . $this->defaultCountryId . '
'; + $output .= $this->l('Default group ID:') . ' ' . $this->defaultGroupId . '
'; + + $shopIds = $this->getShopsIds(); + $useReduction = true; + if (Tools::isSubmit('init')) + { + $useReduction = false; + } + if ($this->skipBelowCost) + { + $rates = $this->getConversionRates(); + $costPriceMap = $this->getCostPriceMap(); + } + $specificPriceOutput = null; + foreach ($shopIds as $shopId) + { + $currencyIds = $this->getCurrencyIds($shopId); + $countryIds = $this->getCountryIds($shopId); + $groupIds = $this->getGroupIds($shopId); + $lastCurrencyId = end($currencyIds); + $lastCountryId = end($countryIds); + $lastGroupId = end($groupIds); + $attributesMap = $this->getProductAttributeMap($shopId); + if (!$productId) + { + $productIds = $this->getProductIds($shopId); + } + else + { + if (!$this->indexInactive && !$this->productIsActive($productId, $shopId)) + { + continue; + } + $productIds = [$productId]; + } + $output .= '

' . $this->l('Shop ID:') . ' ' . $shopId . '

'; + if (count($productIds) < 1) + { + $output .= '

' . $this->l('All products indexed') . '

'; + continue; + } + else + { + $output .= '

' . $this->l('Not finished yet, please run me again') . '

'; + } + $output .= '' + . '' + . '' + . '' + . '' + . '' + . '' + . '' + . '' + . '' + . '' + . '' + . ''; + $counter = 0; + foreach ($currencyIds as $currencyId) + { + foreach ($countryIds as $countryId) + { + foreach ($groupIds as $groupId) + { + $discountedIds = $this->getDiscountedProductIds($shopId, $currencyId, $countryId, $groupId); + foreach ($productIds as $productId) + { + $attributeId = 0; + $basicKey = $shopId . '-' . $productId . '-' . $attributeId . '-' . $currencyId . '-' . $countryId . '-' . $groupId; + $priceTin = Product::priceCalculation( + $shopId, + $productId, + $attributeId, + $countryId, + $stateId, + $zipcode, + $currencyId, + $groupId, + 1, //quantity + $usetax, + 6, //decimals + false, //only_reduc + $useReduction, //use_reduc + true, //with_ecotax + $specificPriceOutput, + true //use_group_reduction + ); + $priceTin = sprintf("%.6f", $priceTin); + $basicPrices[$basicKey] = $priceTin; + $priceTex = $priceTin; + if ($usetax) + { + $priceTex = Product::priceCalculation( + $shopId, + $productId, + $attributeId, + $countryId, + $stateId, + $zipcode, + $currencyId, + $groupId, + 1, //quantity + false, //no tax + 6, //decimals + false, //only_reduc + $useReduction, //use_reduc + true, //with_ecotax + $specificPriceOutput, + true //use_group_reduction + ); + } + $previously = $this->getPreviousPrice($shopId, $productId, $currencyId, $countryId, $groupId, $attributeId); + if ($previously) + { + $previousPrice = (float) $previously['price_tin']; + $previousDiscount = (bool) $previously['is_specific_price']; + } + else + { + $previousPrice = 0; + $previousDiscount = false; + } + if (Tools::isSubmit('init')) + { + $onDiscount = false; + } + else + { + if (Module::isEnabled('groupinc')) + { + $onDiscount = $this->checkIfProductIsDiscounted($discountedIds, $productId, $attributeId) || (is_array($specificPriceOutput) && (count($specificPriceOutput) > 1)); //groupinc module support + } + else + { + $onDiscount = $this->checkIfProductIsDiscounted($discountedIds, $productId, $attributeId); + } + } + $onDiscountText = ($onDiscount ? $this->l('Yes') : $this->l('No')); + //check if product is sold below cost price + if ($this->skipBelowCost) + { + if ($this->checkIfProductIsSoldBelowCost( + $priceTex, + $costPriceMap, + $rates, + $shopId, + $productId, + $attributeId, + $currencyId + )) + { + $onDiscount = false; + $onDiscountText = $this->l('Below cost'); + } + } + $output .= '' + . '' + . '' + . '' + . '' + . '' + . '' + . '' + . '' + . ''; + $priceIsCorrect = ($priceTin > 0); + $priceChanged = (abs($previousPrice - $priceTin) > 0.01); + $discountChanged = ($previousDiscount != $onDiscount); + if (Tools::isSubmit('cache')) + { + $discountChanged = true; + } + if ($priceIsCorrect && ($priceChanged || $discountChanged)) + { + $output .= ''; + $this->savePrice( + $this->today, + $shopId, + $productId, + $currencyId, + $countryId, + $groupId, + $attributeId, + $priceTex, + $priceTin, + $onDiscount + ); + //calculate lowest price and add it to the cache + if ($onDiscount) + { + $lowestPrices = $this->getLowestPrice($shopId, $productId, $currencyId, $countryId, $groupId, $attributeId); + if ($lowestPrices) + { + $output .= ''; + $this->saveLowestPrice( + $shopId, + $productId, + $currencyId, + $countryId, + $groupId, + $attributeId, + $lowestPrices['price_tex'], + $lowestPrices['price_tin'], + $lowestPrices['date'] + ); + } + else + { + $output .= ''; + } + } + else + { + $output .= ''; + } + } + else + { + $output .= ''; + $output .= ''; + } + if (!$onDiscount) + { + $this->deleteLowestPrice($shopId, $productId, $currencyId, $countryId, $groupId, $attributeId); + } + $output .= ''; + //attributes + if (array_key_exists($productId, $attributesMap)) + { + foreach ($attributesMap[$productId] as $attributeId) + { + $priceTin = Product::priceCalculation( + $shopId, + $productId, + $attributeId, + $countryId, + $stateId, + $zipcode, + $currencyId, + $groupId, + 1, //quantity + $usetax, + 6, //decimals + false, //only_reduc + $useReduction, //use_reduc + true, //with_ecotax + $specificPriceOutput, + true //use_group_reduction + ); + $priceTin = sprintf("%.6f", $priceTin); + $priceTex = $priceTin; + if ($usetax) + { + $priceTex = Product::priceCalculation( + $shopId, + $productId, + $attributeId, + $countryId, + $stateId, + $zipcode, + $currencyId, + $groupId, + 1, //quantity + false, //no tax + 6, //decimals + false, //only_reduc + $useReduction, //use_reduc + true, //with_ecotax + $specificPriceOutput, + true //use_group_reduction + ); + } + if (abs($priceTin - $basicPrices[$basicKey]) > 0.01) + { + $previously = $this->getPreviousPrice($shopId, $productId, $currencyId, $countryId, $groupId, $attributeId); + if ($previously) + { + $previousPrice = (float) $previously['price_tin']; + $previousDiscount = (bool) $previously['is_specific_price']; + } + else + { + $previousPrice = 0; + $previousDiscount = false; + } + if (Tools::isSubmit('init')) + { + $onDiscount = false; + } + else + { + if (Module::isEnabled('groupinc')) + { + $onDiscount = $this->checkIfProductIsDiscounted($discountedIds, $productId, $attributeId) || (is_array($specificPriceOutput) && (count($specificPriceOutput) > 1)); //groupinc module support + } + else + { + $onDiscount = $this->checkIfProductIsDiscounted($discountedIds, $productId, $attributeId); + } + } + $onDiscountText = ($onDiscount ? $this->l('Yes') : $this->l('No')); + if ($this->skipBelowCost) + { + if ($this->checkIfProductIsSoldBelowCost( + $priceTex, + $costPriceMap, + $rates, + $shopId, + $productId, + $attributeId, + $currencyId + )) + { + $onDiscount = false; + $onDiscountText = $this->l('Below cost'); + } + } + $output .= '' + . '' + . '' + . '' + . '' + . '' + . '' + . '' + . '' + . ''; + $priceIsCorrect = ($priceTin > 0); + $priceChanged = (abs($previousPrice - $priceTin) > 0.01); + $discountChanged = ($previousDiscount != $onDiscount); + if (Tools::isSubmit('cache')) + { + $discountChanged = true; + } + if ($priceIsCorrect && ($priceChanged || $discountChanged)) + { + $output .= ''; + $this->savePrice( + $this->today, + $shopId, + $productId, + $currencyId, + $countryId, + $groupId, + $attributeId, + $priceTex, + $priceTin, + $onDiscount + ); + if ($onDiscount) + { + $lowestPrices = $this->getLowestPrice( + $shopId, + $productId, + $currencyId, + $countryId, + $groupId, + $attributeId + ); + if ($lowestPrices) + { + $output .= ''; + $this->saveLowestPrice( + $shopId, + $productId, + $currencyId, + $countryId, + $groupId, + $attributeId, + $lowestPrices['price_tex'], + $lowestPrices['price_tin'], + $lowestPrices['date'] + ); + } + else + { + $output .= ''; + } + } + else + { + $output .= ''; + } + } + else + { + $output .= ''; + $output .= ''; + } + if (!$onDiscount) + { + $this->deleteLowestPrice($shopId, $productId, $currencyId, $countryId, $groupId, $attributeId); + } + } + else + { + //skip analyzing attribute if price is the same as basic + //delete if the attribute is not on discount + $onDiscount = $this->checkIfProductIsDiscounted($discountedIds, $productId, $attributeId); + if (!$onDiscount) + { + $this->deleteLowestPrice($shopId, $productId, $currencyId, $countryId, $groupId, $attributeId); + } + } + } + } + if ($currencyId == $lastCurrencyId && $groupId == $lastGroupId && $countryId == $lastCountryId) + { + $this->addProductToIndex($shopId, $productId, $this->today); + } + } + } + } + } + $output .= '
' . $this->l('Product ID') . '' . $this->l('Attribute ID') . '' . $this->l('Country ID') . '' . $this->l('Currency ID') . '' . $this->l('Group ID') . '' . $this->l('Price') . '' . $this->l('Previous price') . '' . $this->l('Is discounted') . '' . $this->l('Action') . '' . $this->l('Lowest price') . '
' . ++$counter . '' . $productId . '' . $attributeId . '' . $countryId . '' . $currencyId . '' . $groupId . '' . $priceTin . ' (' . $priceTex . ') ' . $previousPrice . '' . $onDiscountText . '' . $this->l('Save') . '' . $lowestPrices['price_tin'] . ' (' . $lowestPrices['price_tex'] . ')' . $this->l('Unknown') . '' . $this->l('Not applicable') . '' . $this->l('No change') . '' . $this->l('No change') . '
' . ++$counter . '' . $productId . '' . $attributeId . '' . $countryId . '' . $currencyId . '' . $groupId . '' . $priceTin . ' (' . $priceTex . ') ' . $previousPrice . '' . $onDiscountText . '' . $this->l('Save') . '' . $lowestPrices['price_tin'] . ' (' . $lowestPrices['price_tex'] . ')' . $this->l('Unknown') . '' . $this->l('Not applicable') . '' . $this->l('No change') . '' . $this->l('No change') . '
'; + } + if ($verbose) + { + echo $output; + } + return true; + } + + public function getLowestPrice($shopId, $productId, $currencyId, $countryId, $groupId, $attributeId, $daysOffset = 0) + { + $lowestPriceTin = INF; + $lowestPriceTex = INF; + $lowestDate = '0000-00-00'; + for ($d = 1; $d <= $this->daysBack; $d++) + { + $days = $d + $daysOffset; + $date = date('Y-m-d', strtotime("-$days days")); + $row = Db::getInstance()->getRow( + 'SELECT `price_tin`, `price_tex` ' + . ' FROM `' . _DB_PREFIX_ . 'gm_omniprice_history` ' + . ' WHERE `id_shop` = ' . $shopId + . ' AND `id_product` = ' . $productId + . ' AND `id_product_attribute` = ' . $attributeId + . ' AND `id_currency` = ' . $currencyId + . ' AND `id_group` = ' . $groupId + . ' AND `id_country` = ' . $countryId + . ' AND `date` <= \'' . $date . '\'' + . ' ORDER BY `date` DESC' + ); + if ($attributeId != 0 && $row == false) + { + $attributeId = 0; + $row = Db::getInstance()->getRow( + 'SELECT `price_tin`, `price_tex` ' + . ' FROM `' . _DB_PREFIX_ . 'gm_omniprice_history` ' + . ' WHERE `id_shop` = ' . $shopId + . ' AND `id_product` = ' . $productId + . ' AND `id_product_attribute` = ' . $attributeId + . ' AND `id_currency` = ' . $currencyId + . ' AND `id_group` = ' . $groupId + . ' AND `id_country` = ' . $countryId + . ' AND `date` <= \'' . $date . '\'' + . ' ORDER BY `date` DESC' + ); + } + if ($row) + { + $priceTin = $row['price_tin']; + if ($priceTin < $lowestPriceTin) + { + $lowestPriceTin = $priceTin; + } + $priceTex = $row['price_tex']; + if ($priceTex < $lowestPriceTex) + { + $lowestPriceTex = $priceTex; + $lowestDate = $date; + } + } + else + { + break; + } + } + if ($lowestPriceTex < INF) + { + return [ + 'price_tin' => $lowestPriceTin, + 'price_tex' => $lowestPriceTex, + 'date' => $lowestDate + ]; + } + else + { + return false; + } + } + + public function checkIfProductIsDiscounted($discountedIds, $productId, $attributeId) + { + if (Tools::isSubmit('init')) + { + return false; + } + foreach ($discountedIds as $item) + { + if (($item['id_product'] == $productId) && ($item['id_product_attribute'] == $attributeId)) + { + return true; + } + if (($item['id_product'] == $productId) && ($item['id_product_attribute'] == 0)) + { + return true; + } + } + return false; + } + + public function clearIndex($date) + { + return Db::getInstance()->delete('gm_omniprice_index', '`date` <= \'' . $date . '\''); + } + + public function addProductToIndex($shopId, $productId, $date) + { + Db::getInstance()->insert( + 'gm_omniprice_index', + [ + 'date' => $date, + 'id_shop' => $shopId, + 'id_product' => $productId + ] + ); + } + + public function getPreviousPrice($shopId, $productId, $currencyId, $countryId, $groupId, $attributeId) + { + return Db::getInstance()->getRow('SELECT `price_tin`, `is_specific_price` FROM `' . _DB_PREFIX_ . 'gm_omniprice_history`' + . ' WHERE `id_shop` = ' . $shopId . ' AND `id_product` = ' . $productId + . ' AND `id_currency` = ' . $currencyId . ' AND `id_country` = ' . $countryId + . ' AND `id_group` = ' . $groupId . ' AND `id_product_attribute` = ' . $attributeId + . ' AND `date` < \'' . $this->today . '\'' + . ' ORDER BY `date` DESC'); + } + + public function saveLowestPrice($shopId, $productId, $currencyId, $countryId, $groupId, $attributeId, $priceTex, $priceTin, $date) + { + $this->deleteLowestPrice($shopId, $productId, $currencyId, $countryId, $groupId, $attributeId); + return Db::getInstance()->insert( + 'gm_omniprice_cache', + [ + 'id_shop' => $shopId, + 'id_product' => $productId, + 'id_currency' => $currencyId, + 'id_country' => $countryId, + 'id_group' => $groupId, + 'id_product_attribute' => $attributeId, + 'price_tex' => $priceTex, + 'price_tin' => $priceTin, + 'date' => $date + ] + ); + } + + public function deleteLowestPrice($shopId, $productId, $currencyId, $countryId, $groupId, $attributeId) + { + return Db::getInstance()->delete( + 'gm_omniprice_cache', + '`id_shop` = ' . $shopId + . ' AND `id_product` = ' . $productId + . ' AND `id_currency` = ' . $currencyId + . ' AND `id_country` = ' . $countryId + . ' AND `id_group` = ' . $groupId + . ' AND `id_product_attribute` = ' . $attributeId + ); + } + + public function savePrice($date, $shopId, $productId, $currencyId, $countryId, $groupId, $attributeId, $priceTex, $priceTin, $onDiscount = false) + { + if (Tools::isSubmit('cache')) + { + $this->deleteTodaysPrice($shopId, $productId, $currencyId, $countryId, $groupId, $attributeId); + } + Db::getInstance()->insert( + 'gm_omniprice_history', + [ + 'date' => $date, + 'id_shop' => $shopId, + 'id_product' => $productId, + 'id_currency' => $currencyId, + 'id_country' => $countryId, + 'id_group' => $groupId, + 'id_product_attribute' => $attributeId, + 'price_tex' => $priceTex, + 'price_tin' => $priceTin, + 'is_specific_price' => $onDiscount + ] + ); + } + + public function deleteTodaysPrice($shopId, $productId, $currencyId, $countryId, $groupId, $attributeId) + { + return Db::getInstance()->delete( + 'gm_omniprice_history', + '`id_shop` = ' . $shopId + . ' AND `id_product` = ' . $productId + . ' AND `id_currency` = ' . $currencyId + . ' AND `id_country` = ' . $countryId + . ' AND `id_group` = ' . $groupId + . ' AND `id_product_attribute` = ' . $attributeId + . ' AND `date` = \'' . $this->today . '\'' + ); + } + + public function getGroupIds($shopId) + { + $ids = [$this->defaultGroupId]; + if (!Group::isFeatureActive()) + { + return $ids; + } + $query = 'SELECT `gs`.`id_group` + FROM `' . _DB_PREFIX_ . 'group_shop` `gs` + WHERE `gs`.`id_shop` = ' . $shopId; + $res = Db::getInstance()->executeS($query); + if ($res) + { + foreach ($res as $row) + { + if (($row['id_group'] != $this->defaultGroupId) && !in_array($row['id_group'], $this->ignoredGroups)) + { + $ids[] = (int) $row['id_group']; + } + } + } + return $ids; + } + + public function getCountryIds($shopId) + { + $ids = [$this->defaultCountryId]; + if (Shop::isFeatureActive()) + { + $ids = [Configuration::get('PS_COUNTRY_DEFAULT', null, null, $shopId)]; + } + if (!$this->ignoreCountries) + { + $query = 'SELECT `cs`.`id_country` + FROM `' . _DB_PREFIX_ . 'country_shop` `cs` + LEFT JOIN `' . _DB_PREFIX_ . 'country` `c` ON (`cs`.`id_country` = `c`.`id_country`) + WHERE `cs`.`id_shop` = ' . $shopId + . ' AND `c`.`active` = 1'; + $res = Db::getInstance()->executeS($query); + if ($res) + { + foreach ($res as $row) + { + if (!in_array($row['id_country'], $ids)) + { + if ($this->ignoreNonEuCountries) + { + $country = new Country($row['id_country']); + if (in_array($country->iso_code, $this->euCountries)) + { + $ids[] = (int) $row['id_country']; + } + } + else + { + $ids[] = (int) $row['id_country']; + } + } + } + } + } + return $ids; + } + + public function getCurrencyIds($shopId) + { + $ids = []; + $query = 'SELECT `cs`.`id_currency` + FROM `' . _DB_PREFIX_ . 'currency` c + LEFT JOIN `' . _DB_PREFIX_ . 'currency_shop` cs ON (cs.`id_currency` = c.`id_currency`) + WHERE cs.`id_shop` = ' . (int) $shopId + . ' AND c.`active` = 1'; + $currencies = Db::getInstance()->executeS($query); + foreach ($currencies as $currency) + { + $ids[] = (int) $currency['id_currency']; + } + return $ids; + } + + public function getProductIds($shopId) + { + $productIds = []; + $query = 'SELECT `ps`.`id_product` ' + . ' FROM `' . _DB_PREFIX_ . 'product_shop` `ps`' + . ' WHERE `ps`.`id_product` NOT IN ' + . ' (SELECT `id_product` FROM `' . _DB_PREFIX_ . 'gm_omniprice_index`' + . ' WHERE `id_shop` = ' . $shopId . ' AND `date` = \'' . $this->today . '\')' + . ($this->indexInactive ? ' ' : ' AND `ps`.`active` = 1 ') + . ' AND `ps`.`id_shop` = ' . $shopId . ' ' + . ' ORDER BY `ps`.`id_product` ASC LIMIT ' . $this->batchSize; + + $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + if ($res) + { + foreach ($res as $row) + { + $productIds[] = (int) $row['id_product']; + } + } + return $productIds; + } + + public function getProductAttributeMap($shopId) + { + $map = []; + if (!$this->ignoreCombinations) + { + $query = 'SELECT `id_product`, `id_product_attribute` ' + . ' FROM `' . _DB_PREFIX_ . 'product_attribute_shop` ' + . ' WHERE `id_shop` = ' . $shopId; + $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); + if ($res) + { + foreach ($res as $row) + { + $map[(int) $row['id_product']][] = (int) $row['id_product_attribute']; + } + } + } + return $map; + } + + public function getShopsIds() + { + $list = []; + $sql = 'SELECT `id_shop` FROM `' . _DB_PREFIX_ . 'shop` + WHERE `active` = 1 AND `deleted` = 0'; + $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql); + if ($res) + { + foreach ($res as $row) + { + $list[] = (int) $row['id_shop']; + } + } + return $list; + } + + public function hookDisplayProductPriceBlock($hookParams) + { + if (($hookParams['type'] == 'after_price') && + ((isset($hookParams['product']->id)) || (isset($hookParams['product']['id_product'])) || Tools::isSubmit('id_product')) + ) + { + if (isset($hookParams['product']->id)) + { + $productId = (int) $hookParams['product']->id; + } + else if (isset($hookParams['product']['id_product'])) + { + $productId = (int) $hookParams['product']['id_product']; + } + else + { + $productId = (int) Tools::getValue('id_product'); + } + $showRealDiscount = $this->showRealDiscount; + if (Tools::isSubmit('omnipricetest')) + { + $lowestCachedPrice = [ + 'formatted' => Tools::getValue('omnipricetest'), + 'raw' => 1 + ]; + $showRealDiscount = false; + } + else + { + $params = $this->getCurrentParams($productId); + if (Tools::isSubmit('omnidebug')) + { + var_export($params); + echo $this->context->country->iso_code; + } + if ($this->ignoreNonEuCountries) + { + if (!in_array($this->context->country->iso_code, $this->euCountries)) + { + return false; + } + } + $lowestCachedPrice = $this->getLowestCachedPrice($params); + } + $realDiscount = ''; + if ($showRealDiscount && $lowestCachedPrice && isset($hookParams['product']['price_amount'])) + { + $currentPrice = $hookParams['product']['price_amount']; + $previousPrice = $lowestCachedPrice['raw']; + $realDiscount = $this->calculateRealDisount($currentPrice, $previousPrice); + } + if (!$lowestCachedPrice) + { + //may have a promotion for an individual combination + if (Tools::version_compare(_PS_VERSION_, '1.7.0.0', '<') && $this->hasAttributePrices($productId)) + { + $lowestCachedPrice = [ + 'formatted' => '---', + 'raw' => '0' + ]; + } + } + if ($lowestCachedPrice) + { + $this->context->smarty->assign( + [ + 'gm_omniprice_lowest' => $lowestCachedPrice['formatted'], + 'gm_omniprice_lowest_raw' => $lowestCachedPrice['raw'], + 'gm_omniprice_days' => $this->daysBack, + 'gm_omniprice_color' => $this->textColor, + 'gm_omniprice_price_color' => $this->priceColor, + 'gm_omniprice_background' => $this->backgroundColor, + 'gm_omniprice_show_real_discount' => $showRealDiscount, + 'gm_omniprice_real_discount' => $realDiscount + ] + ); + return $this->display(__FILE__, 'price.tpl'); + } + } + } + + public function calculateRealDisount($currentPrice, $previousPrice) + { + if (!$currentPrice || !$previousPrice) + { + return false; + } + $realDiscount = '0%'; + if ($currentPrice < $previousPrice) + { + $discount = round((1 - $currentPrice / $previousPrice) * 100); + $realDiscount = '-' . $discount . '%'; + } + if ($currentPrice > $previousPrice) + { + $discount = round(($currentPrice / $previousPrice - 1) * 100); + $realDiscount = '+' . $discount . '%'; + } + return $realDiscount; + } + + public function getLowestCachedPrice($params) + { + $displayMethod = Group::getPriceDisplayMethod($params['id_group']); + if ($displayMethod) + { + $field = '`price_tex`'; + } + else + { + $field = '`price_tin`'; + } + $price = Db::getInstance()->getValue( + 'SELECT ' . $field + . ' FROM `' . _DB_PREFIX_ . 'gm_omniprice_cache`' + . ' WHERE `id_shop` = ' . $params['id_shop'] + . ' AND `id_product` = ' . $params['id_product'] + . ' AND `id_currency` = ' . $params['id_currency'] + . ' AND `id_country` = ' . $params['id_country'] + . ' AND `id_group` = ' . $params['id_group'] + . ' AND `id_product_attribute` = ' . $params['id_product_attribute'] + ); + + if ($price) + { + return [ + 'formatted' => $this->getFormattedPrice(round($price)), + 'raw' => $price + ]; + } + // else if ($params['id_product_attribute'] != 0) + // { + // $price = Db::getInstance()->getValue( + // 'SELECT ' . $field + // . ' FROM `' . _DB_PREFIX_ . 'gm_omniprice_cache`' + // . ' WHERE `id_shop` = ' . $params['id_shop'] + // . ' AND `id_product` = ' . $params['id_product'] + // . ' AND `id_currency` = ' . $params['id_currency'] + // . ' AND `id_country` = ' . $params['id_country'] + // . ' AND `id_group` = ' . $params['id_group'] + // . ' AND `id_product_attribute` = 0' + // ); + + // if ($price) + // { + // return [ + // 'formatted' => $this->getFormattedPrice(round($price)), + // 'raw' => $price + // ]; + // } + // } + + if (!$price) + { + if ($this->showIfNotEnoughHistoricalData) + { + return $this->getLatestHistoricalPrice($params); + } + } + return false; + } + + protected function getLatestHistoricalPrice($params) + { + $displayMethod = Group::getPriceDisplayMethod($params['id_group']); + if ($displayMethod) + { + $field = '`price_tex`'; + $arrayField = 'price_tex'; + } + else + { + $field = '`price_tin`'; + $arrayField = 'price_tin'; + } + + $date_history = date( 'Y-m-d', strtotime( '-30 days', time() ) ); + + $prices = Db::getInstance()->executeS( + 'SELECT ' . $field . ', `is_specific_price`' + . ' FROM `' . _DB_PREFIX_ . 'gm_omniprice_history`' + . ' WHERE `id_shop` = ' . $params['id_shop'] + . ' AND `id_product` = ' . $params['id_product'] + . ' AND `id_currency` = ' . $params['id_currency'] + . ' AND `id_country` = ' . $params['id_country'] + . ' AND `id_group` = ' . $params['id_group'] + . ' AND `id_product_attribute` = ' . $params['id_product_attribute'] + . ' AND date >= \'' . $date_history . '\'' + ); + + if ( is_array( $prices ) ) + { + // $price_tmp + } + +// echo 'SELECT ' . $field . ', `is_specific_price`' +// . ' FROM `' . _DB_PREFIX_ . 'gm_omniprice_history`' +// . ' WHERE `id_shop` = ' . $params['id_shop'] +// . ' AND `id_product` = ' . $params['id_product'] +// . ' AND `id_currency` = ' . $params['id_currency'] +// . ' AND `id_country` = ' . $params['id_country'] +// . ' AND `id_group` = ' . $params['id_group'] +// . ' AND `id_product_attribute` = ' . $params['id_product_attribute'] +// . ' AND date >= \'' . $date_history . '\''; +// echo '
'; print_r($prices); echo '
'; + if ((count($prices) == 1) && ($prices[0]['is_specific_price'])) + { + return + [ + 'formatted' => $this->getFormattedPrice(round($prices[0][$arrayField])), + 'raw' => $prices[0][$arrayField] + ]; + } + // else if ($params['id_product_attribute'] != 0) + // { + // $prices = Db::getInstance()->executeS( + // 'SELECT ' . $field . ', `is_specific_price`' + // . ' FROM `' . _DB_PREFIX_ . 'gm_omniprice_history`' + // . ' WHERE `id_shop` = ' . $params['id_shop'] + // . ' AND `id_product` = ' . $params['id_product'] + // . ' AND `id_currency` = ' . $params['id_currency'] + // . ' AND `id_country` = ' . $params['id_country'] + // . ' AND `id_group` = ' . $params['id_group'] + // . ' AND `id_product_attribute` = 0' + // . ' AND date >= \'' . $date_history . '\'' + // ); + + // if ((count($prices) == 1) && ($prices[0]['is_specific_price'])) + // { + // return + // [ + // 'formatted' => $this->getFormattedPrice(round($prices[0][$arrayField])), + // 'raw' => $prices[0][$arrayField] + // ]; + // } + // } + + $price_1 = Product::getPriceStatic( $params['id_product'], true, $params['id_product_attribute'], 2, null, false, false ); + $price_2 = Product::getPriceStatic( $params['id_product'], true, $params['id_product_attribute'], 2, null, false, true ); + if ( $price_1 != $price_2 ) + return + [ + 'formatted' => $this->getFormattedPrice( round( $price_1 ) ) + ]; + return false; + } + + public function getLowestCachedPricesForCombinations($params) + { + $prices = []; + $displayMethod = Group::getPriceDisplayMethod($params['id_group']); + if ($displayMethod) + { + $field = '`price_tex`'; + } + else + { + $field = '`price_tin`'; + } + $result = Db::getInstance()->executeS( + 'SELECT ' . $field . ' AS `price`, `id_product_attribute` ' + . ' FROM `' . _DB_PREFIX_ . 'gm_omniprice_cache`' + . ' WHERE `id_shop` = ' . $params['id_shop'] + . ' AND `id_product` = ' . $params['id_product'] + . ' AND `id_currency` = ' . $params['id_currency'] + . ' AND `id_country` = ' . $params['id_country'] + . ' AND `id_group` = ' . $params['id_group'] + ); + if ($result) + { + foreach ($result as $row) + { + $prices[$row['id_product_attribute']] = $this->getFormattedPrice(round($row['price'])); + } + } + else + { + if ($this->showIfNotEnoughHistoricalData) + { + $result = Db::getInstance()->executeS( + 'SELECT ' . $field . ' AS `price`, `id_product_attribute` ' + . ' FROM `' . _DB_PREFIX_ . 'gm_omniprice_history`' + . ' WHERE `id_shop` = ' . $params['id_shop'] + . ' AND `id_product` = ' . $params['id_product'] + . ' AND `id_currency` = ' . $params['id_currency'] + . ' AND `id_country` = ' . $params['id_country'] + . ' AND `id_group` = ' . $params['id_group'] + . ' AND `is_specific_price` = 1 ' + ); + if ($result) + { + foreach ($result as $row) + { + $prices[$row['id_product_attribute']] = $this->getFormattedPrice(round($row['price'])); + } + } + } + } + return $prices; + } + + public function getFormattedPrice($price) + { + $context = Context::getContext(); + if (isset($context->currentLocale)) + { + return $context->currentLocale->formatPrice($price, $context->currency->iso_code); + } + else + { + return Tools::displayPrice($price); + } + } + + public function hasAttributePrices($productId) + { + $res = Db::getInstance()->getValue('SELECT `id_product` FROM `' . _DB_PREFIX_ . 'gm_omniprice_cache` ' + . ' WHERE `id_product` = ' . $productId . ' AND `id_product_attribute` > 0'); + if ($res == $productId) + { + return true; + } + if ($this->showIfNotEnoughHistoricalData) + { + $res = Db::getInstance()->getValue('SELECT `id_product` FROM `' . _DB_PREFIX_ . 'gm_omniprice_history` ' + . ' WHERE `id_product` = ' . $productId . ' AND `id_product_attribute` > 0 AND `is_specific_price` = 1'); + if ($res == $productId) + { + return true; + } + } + return false; + } + + public function getCurrentParams($productId) + { + $params = []; + $params['id_shop'] = (int) $this->context->shop->id; + $params['id_currency'] = (int) $this->context->currency->id; + $params['id_product'] = (int) $productId; + if ($this->ignoreCombinations) + { + $params['id_product_attribute'] = 0; + } + else + { + $params['id_product_attribute'] = $this->getIdProductAttribute($params['id_product']); + } + if ($this->ignoreCountries) + { + $params['id_country'] = $this->defaultCountryId; + if (Shop::isFeatureActive()) + { + $params['id_country'] = Configuration::get('PS_COUNTRY_DEFAULT', null, null, $params['id_shop']); + } + } + else + { + $params['id_country'] = $this->context->country->id; + } + $currentGroup = $this->context->customer->id_default_group; + if (in_array($currentGroup, $this->ignoredGroups)) + { + $params['id_group'] = $this->defaultGroupId; + } + else + { + $params['id_group'] = $currentGroup; + } + return $params; + } + + public function getDiscountedProductIds($shopId, $currencyId, $countryId, $groupId) + { + if ($this->globalRuleExists($shopId, $currencyId, $countryId, $groupId)) + { + return $this->getAllProductIdsFromShop($shopId); + } + $beginning = null; + $ending = null; + if (Tools::version_compare(_PS_VERSION_, '1.6.1.10', '<=')) + { + $now = date('Y-m-d H:i:00'); + $beginning = $now; + $ending = $now; + } + $ids = SpecificPrice::getProductIdByDate($shopId, $currencyId, $countryId, $groupId, $beginning, $ending, 0, true); + return $ids; + } + + protected function getAllProductIdsFromShop($shopId) + { + $ids = []; + $query = 'SELECT `id_product` FROM `' . _DB_PREFIX_ . 'product_shop` WHERE `id_shop` = ' . $shopId; + $res = Db::getInstance()->executeS($query); + if ($res) + { + foreach ($res as $row) + { + $ids[] = [ + 'id_product' => (int) $row['id_product'], + 'id_product_attribute' => 0 + ]; + } + } + return $ids; + } + + public function globalRuleExists($shopId, $currencyId, $countryId, $groupId) + { + $query = 'SELECT `id_specific_price` FROM `' . _DB_PREFIX_ . 'specific_price` ' + . ' WHERE (`id_shop` = 0 OR `id_shop` = ' . $shopId . ') ' + . ' AND (`id_currency` = 0 OR `id_currency` = ' . $currencyId . ') ' + . ' AND (`id_country` = 0 OR `id_country` = ' . $countryId . ') ' + . ' AND (`id_group` = 0 OR `id_group` = ' . $groupId . ') ' + . ' AND (`from` <= NOW() OR `from` = \'0000-00-00 00:00:00\') ' + . ' AND (`to` >= NOW() OR `to` = \'0000-00-00 00:00:00\' ) ' + . ' AND `id_product` = 0 ' + . ' AND `id_product_attribute` = 0 ' + . ' AND `from_quantity` > 0 '; + $result = (int) Db::getInstance()->getValue($query); + return ($result > 0); + } + + public function getIdProductAttribute($productId) + { + $idProductAttribute = $this->getIdProductAttributeByGroup($productId); + if (null === $idProductAttribute) + { + $idProductAttribute = (int) Tools::getValue('id_product_attribute'); + } + if (!$idProductAttribute) + { + $idProductAttribute = $this->getDefaultAttributeIdForProduct($productId); + } + return $idProductAttribute; + } + + protected function getDefaultAttributeIdForProduct($productId) + { + $shopId = $this->context->shop->id; + return (int) Db::getInstance()->getValue('SELECT `id_product_attribute` FROM `' . _DB_PREFIX_ . 'product_attribute_shop` ' + . ' WHERE `default_on` = 1 AND `id_shop` = ' . $shopId . ' AND `id_product` = ' . $productId); + } + + protected function getIdProductAttributeByGroup($productId) + { + $groups = Tools::getValue('group'); + if (empty($groups)) + { + return null; + } + return (int) Product::getIdProductAttributeByIdAttributes( + $productId, + $groups, + true + ); + } + + public function hookActionFrontControllerSetMedia($params) + { + $this->context->controller->registerStylesheet( + 'module-gm_omniprice-style', + 'modules/' . $this->name . '/views/css/gm_omniprice.css', + [ + 'media' => 'all', + 'priority' => 200, + ] + ); + } + + protected function displayInfo() + { + $token = Tools::getAdminToken($this->name); + $output = '
' + . '
' + . $this->l('Gathering price history') + . '
'; + $output .= ''; + $output .= '
'; + $output .= '
' + . '
' + . $this->l('Cleaning old price history') + . '
'; + $output .= ''; + $output .= '
'; + return $output; + } + + protected function displayInformationPanel() + { + $output = '
' + . '
' + . $this->l('Information') + . '
'; + if (!defined('_TB_VERSION_')) + { //TB has a nasty bug here + $output .= '

' . $this->l('Groups with no customers:') . ' ' . implode(', ', $this->findEmptyGroups()) . '

'; + } + $output .= '

' . $this->l('Groups with group reductions:') . ' ' . implode(', ', $this->findGroupsWithGroupReduction()) . '

'; + $output .= '

' . $this->l('Groups with specific prices:') . ' ' . implode(', ', $this->findGroupsWithSpecificPrices()) . '

'; + $output .= '

' . $this->l('Groups with specific price rules:') . ' ' . implode(', ', $this->findGroupsWithSpecifiPriceRules()) . '

'; + $output .= '

' . $this->l('Products have combinations with price impacts:') . ' ' . ($this->getCombinationsPriceImpactsInfo() ? $this->l('Yes') : $this->l('No')) . '

'; + $output .= '

' . $this->l('Individual combinations have discounts:') . ' ' . ($this->getCombinationsDiscountsInfo() ? $this->l('Yes') : $this->l('No')) . '

'; + $output .= '

' . $this->l('Number of active countries:') . ' ' . $this->countActiveCountries() . '

'; + $output .= '

' . $this->l('Number of active currencies:') . ' ' . $this->countActiveCurrencies() . '

'; + $output .= '

' . $this->l('Number of prices stored in history:') . ' ' . $this->countStoredPrices() . '

'; + $output .= '
'; + return $output; + } + + protected function countActiveCurrencies() + { + return (int) Db::getInstance()->getValue('SELECT COUNT(`id_currency`) FROM `' . _DB_PREFIX_ . 'currency` WHERE `active` = 1'); + } + + protected function countActiveCountries() + { + return (int) Db::getInstance()->getValue('SELECT COUNT(`id_country`) FROM `' . _DB_PREFIX_ . 'country` WHERE `active` = 1'); + } + + protected function countStoredPrices() + { + return (int) Db::getInstance()->getValue('SELECT COUNT(`id_product`) FROM `' . _DB_PREFIX_ . 'gm_omniprice_history`'); + } + + protected function getCombinationsPriceImpactsInfo() + { + $query = 'SELECT `id_product` FROM `' . _DB_PREFIX_ . 'product_attribute` WHERE `price` != 0'; + $res = Db::getInstance()->getValue($query); + if ($res) + { + return true; + } + else + { + return false; + } + } + + protected function getCombinationsDiscountsInfo() + { + $query = 'SELECT `id_product` FROM `' . _DB_PREFIX_ . 'specific_price` WHERE `id_product_attribute` > 0'; + $res = Db::getInstance()->getValue($query); + if ($res) + { + return true; + } + else + { + return false; + } + } + + protected function getGroupNames() + { + $langId = $this->context->language->id; + $query = 'SELECT `id_group`, `name` FROM `' . _DB_PREFIX_ . 'group_lang` WHERE `id_lang` = ' . $langId; + $res = Db::getInstance()->executeS($query); + if ($res) + { + foreach ($res as $row) + { + $this->groupNames[(int) $row['id_group']] = $row['name']; + } + } + } + + protected function findGroupsToSafelyIgnore() + { + $groups = $this->findEmptyGroups(true); + $guestGroupId = Configuration::get('PS_GUEST_GROUP'); + $unidentifiedGroupId = Configuration::get('PS_UNIDENTIFIED_GROUP'); + $groups[] = $guestGroupId; + $groups[] = $unidentifiedGroupId; + $groups = array_unique($groups); + sort($groups); + $ignoredGroups = []; + foreach ($groups as $groupId) + { + if ($groupId != $this->defaultGroupId) + { + $ignoredGroups[] = $groupId; + } + } + return $ignoredGroups; + } + + protected function findEmptyGroups($returnIds = false) + { + $emptyGroups = []; + $emptyIds = []; + $res = Group::getGroups($this->context->language->id); + foreach ($res as $row) + { + $group = new Group((int) $row['id_group']); + $customerCount = $group->getCustomers(true); + if ($customerCount < 1) + { + $emptyGroups[] = $row['name']; + $emptyIds[] = $row['id_group']; + } + } + if ($returnIds) + { + return $emptyIds; + } + if (!count($emptyGroups)) + { + return [$this->l('None')]; + } + return $emptyGroups; + } + + protected function findGroupsWithSpecifiPriceRules() + { + $groupIds = []; + $query = 'SELECT `id_group` FROM `' . _DB_PREFIX_ . 'specific_price_rule` WHERE `id_group` > 0'; + $res = Db::getInstance()->executes($query); + if ($res) + { + foreach ($res as $row) + { + $groupIds[] = (int) $row['id_group']; + } + } + $groupIds = array_unique($groupIds); + sort($groupIds); + return $this->getGroupNamesForIds($groupIds); + } + + protected function findGroupsWithSpecificPrices() + { + $groupIds = []; + $query = 'SELECT `id_group` FROM `' . _DB_PREFIX_ . 'specific_price` WHERE `id_group` > 0'; + $res = Db::getInstance()->executes($query); + if ($res) + { + foreach ($res as $row) + { + $groupIds[] = (int) $row['id_group']; + } + } + $groupIds = array_unique($groupIds); + sort($groupIds); + return $this->getGroupNamesForIds($groupIds); + } + + protected function findGroupsWithGroupReduction() + { + $groupIds = []; + $query = 'SELECT `id_group` FROM `' . _DB_PREFIX_ . 'group` WHERE `reduction` > 0'; + $res = Db::getInstance()->executes($query); + if ($res) + { + foreach ($res as $row) + { + $groupIds[] = (int) $row['id_group']; + } + } + $query = 'SELECT `id_group` FROM `' . _DB_PREFIX_ . 'group_reduction` WHERE `reduction` > 0'; + $res = Db::getInstance()->executes($query); + if ($res) + { + foreach ($res as $row) + { + $groupIds[] = (int) $row['id_group']; + } + } + $groupIds = array_unique($groupIds); + sort($groupIds); + return $this->getGroupNamesForIds($groupIds); + } + + protected function getGroupNamesForIds($groupIds) + { + if (!count($groupIds)) + { + return [$this->l('None')]; + } + $names = []; + $this->getGroupNames(); + foreach ($groupIds as $groupId) + { + $names[] = $this->groupNames[$groupId]; + } + return $names; + } + + public function hookActionProductUpdate($params) + { + $productId = $params['id_product']; + $this->reindexProduct($productId); + } + + public function hookActionObjectSpecificPriceAddAfter($params) + { + $sp = $params['object']; + if ($sp->id_product) + { + $this->reindexProduct($sp->id_product); + } + } + + public function hookActionObjectSpecificPriceUpdateAfter($params) + { + $sp = $params['object']; + if ($sp->id_product) + { + $this->reindexProduct($sp->id_product); + } + } + + public function hookActionObjectSpecificPriceDeleteAfter($params) + { + $sp = $params['object']; + if ($sp->id_product) + { + $this->reindexProduct($sp->id_product); + } + } + + public function reindexProduct($productId) + { + $this->removeProductFromTodaysIndex($productId); + $this->removeProductFromTodaysHistory($productId); + if ($this->reindexOnSave) + { + $this->savePrices(false, $productId); + } + } + + public function resetIndex() + { + Db::getInstance()->delete('gm_omniprice_index'); + Db::getInstance()->delete('gm_omniprice_history', '`date` = \'' . $this->today . '\''); + } + + public function removeProductFromTodaysIndex($productId) + { + Db::getInstance()->delete('gm_omniprice_index', '`id_product` = ' . $productId . ' AND `date` = \'' . $this->today . '\''); + } + + public function removeProductFromTodaysHistory($productId) + { + Db::getInstance()->delete('gm_omniprice_history', '`id_product` = ' . $productId . ' AND `date` = \'' . $this->today . '\''); + } + + public function hookDisplayHeader($params) + { + if (Tools::isSubmit('id_product')) + { + $this->context->controller->addCSS($this->_path . 'views/css/gm_omniprice.css', 'all'); + if (!$this->ignoreCombinations) + { + $params = $this->getCurrentParams((int) Tools::getValue('id_product')); + $prices = $this->getLowestCachedPricesForCombinations($params); + if (count($prices) > 0) + { + $this->context->controller->addJS($this->_path . 'views/js/gm_omniprice.js'); + Media::addJsDef(['gm_omniprice_attr_prices' => $prices]); + } + } + } + } + + public function cleanUp($verbose = false) + { + $output = ''; + //general cleanup + if (Tools::issubmit('zero')) + { + Db::getInstance()->delete('gm_omniprice_history', '`price_tin` < 0.001'); + Db::getInstance()->delete('gm_omniprice_cache', '`price_tin` < 0.001'); + } + Db::getInstance()->delete('gm_omniprice_history', '`id_product` NOT IN (SELECT `id_product` FROM `' . _DB_PREFIX_ . 'product`)'); + Db::getInstance()->delete('gm_omniprice_cache', '`id_product` NOT IN (SELECT `id_product` FROM `' . _DB_PREFIX_ . 'product`)'); + Db::getInstance()->delete( + 'gm_omniprice_history', + '`id_product_attribute` > 0 AND `id_product_attribute` NOT IN (SELECT `id_product_attribute` FROM `' . _DB_PREFIX_ . 'product_attribute`)' + ); + Db::getInstance()->delete( + 'gm_omniprice_cache', + '`id_product_attribute` > 0 AND `id_product_attribute` NOT IN (SELECT `id_product_attribute` FROM `' . _DB_PREFIX_ . 'product_attribute`)' + ); + Db::getInstance()->delete('gm_omniprice_history', '`id_shop` NOT IN (SELECT `id_shop` FROM `' . _DB_PREFIX_ . 'shop`)'); + Db::getInstance()->delete('gm_omniprice_cache', '`id_shop` NOT IN (SELECT `id_shop` FROM `' . _DB_PREFIX_ . 'shop`)'); + Db::getInstance()->delete('gm_omniprice_history', '`id_currency` NOT IN (SELECT `id_currency` FROM `' . _DB_PREFIX_ . 'currency`)'); + Db::getInstance()->delete('gm_omniprice_cache', '`id_currency` NOT IN (SELECT `id_currency` FROM `' . _DB_PREFIX_ . 'currency`)'); + Db::getInstance()->delete('gm_omniprice_history', '`id_group` NOT IN (SELECT `id_group` FROM `' . _DB_PREFIX_ . 'group`)'); + Db::getInstance()->delete('gm_omniprice_cache', '`id_group` NOT IN (SELECT `id_group` FROM `' . _DB_PREFIX_ . 'group`)'); + Db::getInstance()->delete('gm_omniprice_history', '`id_country` NOT IN (SELECT `id_country` FROM `' . _DB_PREFIX_ . 'country` WHERE `active` = 1)'); + Db::getInstance()->delete('gm_omniprice_cache', '`id_country` NOT IN (SELECT `id_country` FROM `' . _DB_PREFIX_ . 'country` WHERE `active` = 1)'); + if ($this->ignoreCountries) + { + if (Shop::isFeatureActive()) + { + //for the future + } + else + { + Db::getInstance()->delete('gm_omniprice_history', '`id_country` != ' . $this->defaultCountryId); + Db::getInstance()->delete('gm_omniprice_cache', '`id_country` != ' . $this->defaultCountryId); + } + } + foreach ($this->ignoredGroups as $ignoredGroupId) + { + if ($ignoredGroupId && ((int) $ignoredGroupId !== (int) $this->defaultGroupId)) + { + Db::getInstance()->delete('gm_omniprice_history', '`id_group` = ' . $ignoredGroupId); + Db::getInstance()->delete('gm_omniprice_cache', '`id_group` = ' . $ignoredGroupId); + } + } + $date = date("Y-m-d", strtotime("-" . $this->daysBack . " days")); + $output .= $this->l('Period') . ': ' . $this->daysBack . ' (' . $date . ')
'; + $shopIds = $this->getShopsIds(); + foreach ($shopIds as $shopId) + { + $currencyIds = $this->getCurrencyIds($shopId); + $countryIds = $this->getCountryIds($shopId); + $groupIds = $this->getGroupIds($shopId); + $productIds = $this->getProductIdsInHistory($shopId); + foreach ($currencyIds as $currencyId) + { + foreach ($countryIds as $countryId) + { + foreach ($groupIds as $groupId) + { + foreach ($productIds as $productId) + { + $query = 'SELECT `date`, `id_product`, `id_product_attribute` FROM `' . _DB_PREFIX_ . 'gm_omniprice_history` ' + . ' WHERE `id_product` = ' . $productId . ' AND `id_shop` = ' . $shopId . ' AND `id_currency` = ' . $currencyId . + ' AND `id_country` = ' . $countryId . ' AND `id_group` = ' . $groupId . ' ORDER BY `date` ASC'; + $res = Db::getInstance()->executeS($query); + $datesMap = []; + if ($res) + { + foreach ($res as $row) + { + $day = $row['date']; + $productId = $row['id_product']; + $attributeId = $row['id_product_attribute']; + if ($day < $date) + { + $datesMap[$productId][$attributeId][] = $day; + } + } + foreach ($datesMap as $productId => $dateItem) + { + foreach ($dateItem as $attributeId => $dates) + { + $output .= "Product ID {$productId}, attribute ID: {$attributeId}
"; + $datesCount = count($dates); + if ($datesCount > 2) + { + for ($i = 0; $i < $datesCount - 2; $i++) + { + $output .= ' ' . $dates[$i] . ' ' . $this->l('this price may be deleted') . '
'; + $where = '`id_shop` = ' . $shopId . ' AND `id_currency` = ' . $currencyId . + ' AND `id_country` = ' . $countryId . ' AND `id_group` = ' . $groupId; + $where .= ' AND `id_product` = ' . $productId . ' AND `id_product_attribute` = ' . $attributeId; + $where .= ' AND `date` = \'' . $dates[$i] . '\''; + Db::getInstance()->delete('gm_omniprice_history', $where); + } + } + $output .= ' ' . $dates[$datesCount - 1] . ' ' . $this->l('this price is still needed') . '
'; + } + } + } + } + } + } + } + } + + if ($verbose) + { + echo '
';
+      echo $output;
+    }
+  }
+
+  protected function getProductIdsInHistory($shopId)
+  {
+    $ids = [];
+    $query = 'SELECT DISTINCT `id_product` FROM `' . _DB_PREFIX_ . 'gm_omniprice_history` '
+      . ' WHERE `id_shop` = ' . $shopId;
+    $res = Db::getInstance()->executeS($query);
+    if ($res)
+    {
+      foreach ($res as $row)
+      {
+        $ids[] = (int) $row['id_product'];
+      }
+    }
+    return $ids;
+  }
+
+  public function hookDisplayAdminProductsExtra(array $params)
+  {
+    $data = [];
+    if (isset($params['id_product']))
+    {
+      $productId = (int) $params['id_product'];
+    }
+    else
+    {
+      $productId = (int) Tools::getValue('id_product');
+    }
+    $shopId = (int) $this->context->shop->id;
+    $currencyId = (int) $this->defaultCurrencyId;
+    if (Shop::isFeatureActive())
+    {
+      $currencyId = Configuration::get('PS_CURRENCY_DEFAULT', null, null, $shopId);
+    }
+    $countryId = (int) $this->defaultCountryId;
+    if (Shop::isFeatureActive())
+    {
+      $countryId = Configuration::get('PS_COUNTRY_DEFAULT', null, null, $shopId);
+    }
+    $groupId = (int) $this->defaultGroupId;
+    $attributeId = 0;
+
+    $query = 'SELECT `date`, `price_tin`, `is_specific_price` '
+      . ' FROM `' . _DB_PREFIX_ . 'gm_omniprice_history`'
+      . ' WHERE `id_shop` = ' . $shopId
+      . ' AND `id_product` = ' . $productId
+      . ' AND `id_product_attribute` = ' . $attributeId
+      . ' AND `id_currency` = ' . $currencyId
+      . ' AND `id_country` = ' . $countryId
+      . ' AND `id_group` = ' . $groupId
+      . ' ORDER BY `date` DESC';
+
+    $res = Db::getInstance()->executeS($query);
+    if ($res)
+    {
+      foreach ($res as $row)
+      {
+        $data[$row['date']] = [
+          'date' => $row['date'],
+          'price_tin' => $row['price_tin'],
+          'is_specific_price' => $row['is_specific_price'],
+          'type' => ($row['is_specific_price'] ? $this->l('Reduced price') : $this->l('Regular price'))
+        ];
+      }
+    }
+
+    $query = 'SELECT `date`, `price_tin` '
+      . ' FROM `' . _DB_PREFIX_ . 'gm_omniprice_cache`'
+      . ' WHERE `id_shop` = ' . $shopId
+      . ' AND `id_product` = ' . $productId
+      . ' AND `id_product_attribute` = ' . $attributeId
+      . ' AND `id_currency` = ' . $currencyId
+      . ' AND `id_country` = ' . $countryId
+      . ' AND `id_group` = ' . $groupId
+      . ' ORDER BY `date` DESC';
+
+    $res = Db::getInstance()->executeS($query);
+    if ($res)
+    {
+      foreach ($res as $row)
+      {
+        if (!array_key_exists($row['date'], $data))
+        {
+          $data[$row['date']] = [
+            'date' => $row['date'],
+            'price_tin' => $row['price_tin'],
+            'is_specific_price' => '',
+            'type' => $this->l('Lowest previous price')
+          ];
+        }
+      }
+    }
+    krsort($data);
+    $indexed = (int) Db::getInstance()->getValue('SELECT `id_product` FROM `' . _DB_PREFIX_ . 'gm_omniprice_index` WHERE `id_product` = ' . $productId .
+      ' AND `date` = \'' . $this->today . '\'');
+    $this->context->smarty->assign(array(
+      'historyData' => $data,
+      'indexedToday' => $indexed
+    ));
+    $debug = '';
+    if (Tools::isSubmit('omnidebug'))
+    {
+      $res = Db::getInstance()->executeS('SELECT * FROM `' . _DB_PREFIX_ . 'gm_omniprice_history` WHERE `id_product` = ' . $productId . ' ORDER BY `date` DESC');
+      if ($res)
+      {
+        $debug = $this->displayTable($res, array_keys($res[0]));
+      }
+    }
+    return $this->display(__FILE__, 'tab.tpl') . $debug;
+  }
+
+  public function displayTable($data, $columns)
+  {
+    $output = '';
+    $output .= '';
+    $output .= '';
+    foreach ($columns as $columnHeader)
+    {
+      $output .= '';
+    }
+    $output .= '';
+    $output .= '';
+    foreach ($data as $row)
+    {
+      $output .= '';
+      foreach ($columns as $key)
+      {
+        $output .= '';
+      }
+      $output .= '';
+    }
+    $output .= '
' . $columnHeader . '
' . $row[$key] . '
'; + return $output; + } + + public function hookActionGetProductPropertiesAfter($params) + { + return; + $product = &$params['product']; + $sp = $product['specific_prices']; + //var_export($product); + $sp['reduction'] = (string) (rand(0, 10) / 100); + $product['specific_prices'] = $sp; + } + + public function fillMissingCache($verbose = false) + { + $output = ''; + $query = 'SELECT * FROM `' . _DB_PREFIX_ . 'gm_omniprice_history` ' + . ' WHERE `is_specific_price` = 1 AND `id_product` IN (SELECT `id_product` FROM `' . _DB_PREFIX_ . 'product` WHERE `active` = 1)' + . ' ORDER BY `date` DESC '; + $res = Db::getInstance()->executeS($query); + if ($res) + { + foreach ($res as $row) + { + $lowestPrice = $this->getLowestCachedPrice($row); + if ($lowestPrice === false) + { + $shopId = (int) $row['id_shop']; + $productId = (int) $row['id_product']; + $groupId = (int) $row['id_group']; + $currencyId = (int) $row['id_currency']; + $countryId = (int) $row['id_country']; + $attributeId = (int) $row['id_product_attribute']; + $output .= var_export($row, true) . '
'; + $output .= ' - no lowest price!
'; + $lastChangeDate = $row['date']; + $output .= ' Look for the lowest price before ' . $lastChangeDate . '
'; + $now = time(); + $your_date = strtotime($row['date']); + $datediff = $now - $your_date; + $daysOffset = floor($datediff / (60 * 60 * 24)); + $output .= ' days offset: ' . $daysOffset . '
'; + $lowestPrices = $this->getLowestPrice($shopId, $productId, $currencyId, $countryId, $groupId, $attributeId, $daysOffset); + if ($lowestPrices) + { + $output .= ' found price: ' . $lowestPrices['price_tin'] . ' (' . $lowestPrices['price_tex'] . ')
'; + $this->saveLowestPrice( + $shopId, + $productId, + $currencyId, + $countryId, + $groupId, + $attributeId, + $lowestPrices['price_tex'], + $lowestPrices['price_tin'], + $lowestPrices['date'] + ); + } + } + } + } + if ($verbose) + { + echo $output; + } + } + + public function getActiveMap() + { + if ($this->activeMap == null) + { + $query = 'SELECT `id_shop`, `id_product`, `active` FROM `' . _DB_PREFIX_ . 'product_shop`'; + $res = Db::getInstance()->executeS($query); + if ($res) + { + foreach ($res as $row) + { + $this->activeMap[(int) $row['id_shop']][(int) $row['id_product']] = (int) $row['active']; + } + } + } + return $this->activeMap; + } + + public function productIsActive($productId, $shopId) + { + $activeMap = $this->getActiveMap(); + if (isset($activeMap[$shopId][$productId])) + { + return ($activeMap[$shopId][$productId] == 1); + } + return false; + } + + public function getCostPriceMap() + { + $map = []; + $query = 'SELECT `id_product`, `id_shop`, `wholesale_price` FROM `' . _DB_PREFIX_ . 'product_shop` WHERE `wholesale_price` > 0'; + $res = Db::getInstance()->executeS($query); + if ($res) + { + foreach ($res as $row) + { + $shopId = (int) $row['id_shop']; + $productId = (int) $row['id_product']; + $costPrice = $row['wholesale_price']; + $map[$shopId][$productId][0] = $costPrice; + } + } + + $query = 'SELECT `id_product`, `id_product_attribute`, `id_shop`, `wholesale_price` FROM `' . _DB_PREFIX_ . 'product_attribute_shop` WHERE `wholesale_price` > 0'; + $res = Db::getInstance()->executeS($query); + if ($res) + { + foreach ($res as $row) + { + $shopId = (int) $row['id_shop']; + $productId = (int) $row['id_product']; + $attributeId = (int) $row['id_product_attribute']; + $costPrice = $row['wholesale_price']; + $map[$shopId][$productId][$attributeId] = $costPrice; + } + } + return $map; + } + + public function getConversionRates() + { + $rates = []; + $currencies = Db::getInstance()->executeS(' + SELECT `id_shop`, `id_currency`, `conversion_rate` + FROM `' . _DB_PREFIX_ . 'currency_shop`'); + if ($currencies) + { + foreach ($currencies as $currency) + { + $shopId = (int) $currency['id_shop']; + $currencyId = (int) $currency['id_currency']; + $rate = $currency['conversion_rate']; + $rates[$currencyId][$shopId] = $rate; + } + } + return $rates; + } + + public function checkIfProductIsSoldBelowCost($priceTex, $costPriceMap, $rates, $shopId, $productId, $attributeId, $currencyId) + { + $conversionRate = $rates[$currencyId][$shopId]; + $costPrice = $costPriceMap[$shopId][$productId][$attributeId]; + $convertedCostPrice = $costPrice / $conversionRate; + return ($priceTex < $convertedCostPrice); + } + + protected function displayGreenMouseModulesPanel() + { + $url = 'https://codecanyon.net/user/greenmousestudio/portfolio'; + $isoCode = Context::getContext()->language->iso_code; + $translations = [ + 'en' => "Check out more PrestaShop modules from GreenMouseStudio", + 'fr' => "Découvrez plus de modules PrestaShop de GreenMouseStudio", + 'es' => "Descubra más módulos de PrestaShop de GreenMouseStudio", + 'de' => "Entdecken Sie mehr PrestaShop-Module von GreenMouseStudio", + 'it' => "Scopri di più moduli PrestaShop di GreenMouseStudio", + 'pl' => "Zobacz więcej modułów PrestaShop od GreenMouseStudio", + 'pt' => "Confira mais módulos PrestaShop do GreenMouseStudio", + 'nl' => "Bekijk meer PrestaShop-modules van GreenMouseStudio", + 'sv' => "Upptäck fler PrestaShop-moduler från GreenMouseStudio", + 'da' => "Se flere PrestaShop-moduler fra GreenMouseStudio", + 'fi' => "Tutustu lisää GreenMouseStudion PrestaShop-moduuleihin", + 'cs' => "Podívejte se na další moduly PrestaShop od GreenMouseStudio", + 'sk' => "Pozrite si viac modulov PrestaShop od GreenMouseStudio", + 'hu' => "Nézzen meg több PrestaShop modult a GreenMouseStudio-tól", + 'ro' => "Descoperiți mai multe module PrestaShop de la GreenMouseStudio", + 'el' => "Δείτε περισσότερες μονάδες PrestaShop από το GreenMouseStudio", + ]; + $message = isset($translations[$isoCode]) ? $translations[$isoCode] : $translations['en']; + $content = ''; + $content .= '

' . $message . '

'; + return $content; + } +} diff --git a/.vscode/ftp-kr.json b/.vscode/ftp-kr.json new file mode 100644 index 00000000..79b7fae6 --- /dev/null +++ b/.vscode/ftp-kr.json @@ -0,0 +1,14 @@ +{ + "host": "dedyk8.cyber-folks.pl", + "username": "www@drmaterac.pl", + "password": "0gK9-E-L+mFL@WRk", + "remotePath": "/domains/lulandia.pl/public_html/", + "protocol": "ftp", + "port": 0, + "fileNameEncoding": "utf8", + "autoUpload": true, + "autoDelete": false, + "autoDownload": false, + "ignoreRemoteModification": true, + "ignore": [".git", "/.vscode"] +} diff --git a/.vscode/ftp-kr.sync.cache.json b/.vscode/ftp-kr.sync.cache.json new file mode 100644 index 00000000..dd9fe291 --- /dev/null +++ b/.vscode/ftp-kr.sync.cache.json @@ -0,0 +1,3672 @@ +{ + "ftp://dedyk8.cyber-folks.pl@www@drmaterac.pl": { + "domains": { + "drmaterac.pl": { + "public_html": { + "1_en_0_sitemap.xml": { + "type": "-", + "size": 256550, + "lmtime": 0, + "modified": false + }, + "1_index_sitemap.xml": { + "type": "-", + "size": 460, + "lmtime": 0, + "modified": false + }, + "1_pl_0_sitemap.xml": { + "type": "-", + "size": 261664, + "lmtime": 0, + "modified": false + }, + "1_sk_0_sitemap.xml": { + "type": "-", + "size": 256561, + "lmtime": 0, + "modified": false + }, + "anu8jitxi6126hvh4r6h6l202t76mo.html": { + "type": "-", + "size": 30, + "lmtime": 0, + "modified": false + }, + "app": { + "config": { + "addons": {}, + "config_dev.yml": { + "type": "-", + "size": 1343, + "lmtime": 0, + "modified": false + }, + "config.php": { + "type": "-", + "size": 4901, + "lmtime": 0, + "modified": false + }, + "config_prod.yml": { + "type": "-", + "size": 715, + "lmtime": 0, + "modified": false + }, + "config_test.yml": { + "type": "-", + "size": 583, + "lmtime": 0, + "modified": false + }, + "config.yml": { + "type": "-", + "size": 4495, + "lmtime": 0, + "modified": false + }, + "parameters.php": { + "type": "-", + "size": 959, + "lmtime": 1732623524174, + "modified": false + }, + "parameters.yml": { + "type": "-", + "size": 11, + "lmtime": 0, + "modified": false + }, + "parameters.yml.dist": { + "type": "-", + "size": 954, + "lmtime": 0, + "modified": false + }, + "routing_dev.yml": { + "type": "-", + "size": 1132, + "lmtime": 0, + "modified": false + }, + "routing.yml": { + "type": "-", + "size": 336, + "lmtime": 0, + "modified": false + }, + "security.yml": { + "type": "-", + "size": 631, + "lmtime": 0, + "modified": false + }, + "services.yml": { + "type": "-", + "size": 258, + "lmtime": 0, + "modified": false + }, + "set_parameters.php": { + "type": "-", + "size": 2084, + "lmtime": 0, + "modified": false + } + } + }, + "archive.zip": { + "type": "-", + "size": 7103141947, + "lmtime": 0, + "modified": false + }, + "autoload.php": { + "type": "-", + "size": 1230, + "lmtime": 0, + "modified": false + }, + "bin": {}, + "bridge_7GGkddwn.php": { + "type": "-", + "size": 171555, + "lmtime": 0, + "modified": false + }, + "bridge_YDFLbObb.php": { + "type": "-", + "size": 171555, + "lmtime": 0, + "modified": false + }, + "buy-by-phone.php": { + "type": "-", + "size": 3611, + "lmtime": 1726131662450, + "modified": true + }, + "cache": {}, + "calculate": {}, + "-cart_default.jpg": { + "type": "-", + "size": 2821, + "lmtime": 0, + "modified": false + }, + "classes": {}, + "composer.lock": { + "type": "-", + "size": 292478, + "lmtime": 0, + "modified": false + }, + "config": { + "alias.php": { + "type": "-", + "size": 1971, + "lmtime": 0, + "modified": false + }, + "autoload.php": { + "type": "-", + "size": 1252, + "lmtime": 0, + "modified": false + }, + "bootstrap.php": { + "type": "-", + "size": 6071, + "lmtime": 0, + "modified": false + }, + "config.inc.php": { + "type": "-", + "size": 10015, + "lmtime": 0, + "modified": false + }, + "db_slave_server.inc.php": { + "type": "-", + "size": 1250, + "lmtime": 0, + "modified": false + }, + "defines.inc.php": { + "type": "-", + "size": 7002, + "lmtime": 1725882331343, + "modified": false + }, + "defines_uri.inc.php": { + "type": "-", + "size": 3074, + "lmtime": 0, + "modified": false + }, + ".htaccess": { + "type": "-", + "size": 180, + "lmtime": 0, + "modified": false + }, + "index.php": { + "type": "-", + "size": 1281, + "lmtime": 0, + "modified": false + }, + "services": {}, + "settings.inc.php": { + "type": "-", + "size": 23, + "lmtime": 0, + "modified": false + }, + "smartyadmin.config.inc.php": { + "type": "-", + "size": 5846, + "lmtime": 0, + "modified": false + }, + "smarty.config.inc.php": { + "type": "-", + "size": 6860, + "lmtime": 0, + "modified": false + }, + "smartyfront.config.inc.php": { + "type": "-", + "size": 8488, + "lmtime": 0, + "modified": false + }, + "themes": {}, + "xml": {} + }, + "controllers": {}, + "cron-estella.php": { + "type": "-", + "size": 2399, + "lmtime": 1720345692384, + "modified": false + }, + "cron-promotion-lulandia.php": { + "type": "-", + "size": 1913, + "lmtime": 0, + "modified": false + }, + "docker-compose.yml": { + "type": "-", + "size": 878, + "lmtime": 0, + "modified": false + }, + "docs": {}, + "download": {}, + "error500.html": { + "type": "-", + "size": 2454, + "lmtime": 0, + "modified": false + }, + ".eslintignore": { + "type": "-", + "size": 90, + "lmtime": 0, + "modified": false + }, + ".eslintrc.js": { + "type": "-", + "size": 779, + "lmtime": 0, + "modified": false + }, + "fileType": { + "type": "-", + "size": 3, + "lmtime": 0, + "modified": false + }, + "franczyza-contact.php": { + "type": "-", + "size": 2194, + "lmtime": 1726131671837, + "modified": false + }, + ".git": {}, + ".gitignore": { + "type": "-", + "size": 32, + "lmtime": 0, + "modified": false + }, + "google-merchant_id-1.xml": { + "type": "-", + "size": 65724999, + "lmtime": 0, + "modified": true + }, + "google-merchant_id-2.xml": { + "type": "-", + "size": 2969580, + "lmtime": 0, + "modified": true + }, + "-home_default.jpg": { + "type": "-", + "size": 6867, + "lmtime": 0, + "modified": false + }, + ".htaccess": { + "type": "-", + "size": 96679, + "lmtime": 1734126227346, + "modified": true + }, + ".htaccess.2025-01-27-1738009656": { + "type": "-", + "size": 25893, + "lmtime": 0, + "modified": false + }, + ".htaccess.2025-01-30-1738238023": { + "type": "-", + "size": 25912, + "lmtime": 0, + "modified": false + }, + ".htaccess_backup_20250107_134938": { + "type": "-", + "size": 14791, + "lmtime": 0, + "modified": false + }, + ".htaccess_backup_20250107_135317": { + "type": "-", + "size": 14309, + "lmtime": 0, + "modified": false + }, + "iadmin": {}, + ".idea": {}, + "image_log.json": { + "type": "-", + "size": 151245, + "lmtime": 1738935881598, + "modified": true + }, + "images.inc.php": { + "type": "-", + "size": 4733, + "lmtime": 0, + "modified": false + }, + "img": { + "14-dni-zwrot.png": { + "type": "-", + "size": 9023, + "lmtime": 0, + "modified": false + }, + "14-dni-zwrot.svg": { + "type": "-", + "size": 3199, + "lmtime": 0, + "modified": false + }, + "14-dni-zwrot.webp": { + "type": "-", + "size": 2704, + "lmtime": 0, + "modified": false + }, + "16px_logo_.ico": { + "type": "-", + "size": 202922, + "lmtime": 0, + "modified": false + }, + "16px_logo_.png": { + "type": "-", + "size": 3081, + "lmtime": 0, + "modified": false + }, + "16px_logo_.webp": { + "type": "-", + "size": 1422, + "lmtime": 0, + "modified": false + }, + "404.gif": { + "type": "-", + "size": 1041, + "lmtime": 0, + "modified": false + }, + "admin": {}, + "alior-button.png": { + "type": "-", + "size": 3101, + "lmtime": 0, + "modified": false + }, + "alior-button.webp": { + "type": "-", + "size": 2090, + "lmtime": 0, + "modified": false + }, + "arrow-bottom.svg": { + "type": "-", + "size": 279, + "lmtime": 0, + "modified": false + }, + "arrow-top.svg": { + "type": "-", + "size": 245, + "lmtime": 0, + "modified": false + }, + "bg_500.png": { + "type": "-", + "size": 4606, + "lmtime": 0, + "modified": false + }, + "bg_loader.png": { + "type": "-", + "size": 70, + "lmtime": 0, + "modified": false + }, + "c": {}, + "cms": { + "baner-tkaniny.jpg": { + "type": "-", + "size": 95246, + "lmtime": 0, + "modified": false + }, + "baner-tkaniny.webp": { + "type": "-", + "size": 34816, + "lmtime": 0, + "modified": false + }, + "Blog": {}, + "CA baner.jpg": { + "type": "-", + "size": 19439, + "lmtime": 0, + "modified": false + }, + "CA baner.webp": { + "type": "-", + "size": 7022, + "lmtime": 0, + "modified": false + }, + "cms": {}, + "cms-img.jpg": { + "type": "-", + "size": 61208, + "lmtime": 0, + "modified": false + }, + "Comforteo": {}, + "curem": {}, + "Drewmax": {}, + "drmaterac": { + "cart.svg": { + "type": "-", + "size": 2030, + "lmtime": 1734091194732, + "modified": false + } + }, + "drMaterac_zdj_blog_2-2.png": { + "type": "-", + "size": 130735, + "lmtime": 0, + "modified": false + }, + "drMaterac_zdj_blog_2-2.webp": { + "type": "-", + "size": 15352, + "lmtime": 0, + "modified": false + }, + "ekodom": {}, + "ekspozycja-fb.jpg": { + "type": "-", + "size": 29532, + "lmtime": 0, + "modified": false + }, + "ekspozycja-fb.webp": { + "type": "-", + "size": 5180, + "lmtime": 0, + "modified": false + }, + "expo": {}, + "foam royal": {}, + "franczyza": {}, + "Gomarco": {}, + "HILDING.png": { + "type": "-", + "size": 5449, + "lmtime": 0, + "modified": false + }, + "hildinguzupelnienie": {}, + "HILDING.webp": { + "type": "-", + "size": 1886, + "lmtime": 0, + "modified": false + }, + ".htaccess": { + "type": "-", + "size": 766, + "lmtime": 0, + "modified": false + }, + "index.php": { + "type": "-", + "size": 1287, + "lmtime": 0, + "modified": false + }, + "janpol": {}, + "karibian descanto": {}, + "katalogi": {}, + "KDR_Tu honorujemy Karte Duzej Rodziny.jpg": { + "type": "-", + "size": 120614, + "lmtime": 0, + "modified": false + }, + "KDR_Tu honorujemy Karte Duzej Rodziny.webp": { + "type": "-", + "size": 27950, + "lmtime": 0, + "modified": false + }, + "konfigurator_kroki": {}, + "layout": { + "arrow.svg": { + "type": "-", + "size": 245, + "lmtime": 0, + "modified": false + }, + "blue_media.png": { + "type": "-", + "size": 5733, + "lmtime": 0, + "modified": false + }, + "blue_media.webp": { + "type": "-", + "size": 1144, + "lmtime": 0, + "modified": false + }, + "cart-lulandia.svg": { + "type": "-", + "size": 1814, + "lmtime": 1734123007701, + "modified": false + }, + "cart.svg": { + "type": "-", + "size": 2030, + "lmtime": 1734123138240, + "modified": false + }, + "chevron_green.svg": { + "type": "-", + "size": 285, + "lmtime": 0, + "modified": false + }, + "chevron.svg": { + "type": "-", + "size": 285, + "lmtime": 0, + "modified": false + }, + "chevron_white.svg": { + "type": "-", + "size": 271, + "lmtime": 0, + "modified": false + }, + "credit-agricole.jpg": { + "type": "-", + "size": 15976, + "lmtime": 0, + "modified": false + }, + "credit-agricole.webp": { + "type": "-", + "size": 7142, + "lmtime": 0, + "modified": false + }, + "dhl.png": { + "type": "-", + "size": 3078, + "lmtime": 0, + "modified": false + }, + "dhl.webp": { + "type": "-", + "size": 736, + "lmtime": 0, + "modified": false + }, + "dpd.png": { + "type": "-", + "size": 3989, + "lmtime": 0, + "modified": false + }, + "dpd.webp": { + "type": "-", + "size": 400, + "lmtime": 0, + "modified": false + }, + "dts.png": { + "type": "-", + "size": 4051, + "lmtime": 0, + "modified": false + }, + "dts.webp": { + "type": "-", + "size": 990, + "lmtime": 0, + "modified": false + }, + "ekspozycja-fb.jpg": { + "type": "-", + "size": 29532, + "lmtime": 0, + "modified": false + }, + "envelope.svg": { + "type": "-", + "size": 587, + "lmtime": 0, + "modified": false + }, + "EU_banner.png": { + "type": "-", + "size": 45210, + "lmtime": 0, + "modified": false + }, + "EU_banner.webp": { + "type": "-", + "size": 8176, + "lmtime": 0, + "modified": false + }, + "facebook.svg": { + "type": "-", + "size": 1148, + "lmtime": 0, + "modified": false + }, + "facebook-white.svg": { + "type": "-", + "size": 1510, + "lmtime": 0, + "modified": false + }, + "gls.png": { + "type": "-", + "size": 7680, + "lmtime": 0, + "modified": false + }, + "gls.webp": { + "type": "-", + "size": 1484, + "lmtime": 0, + "modified": false + }, + "grid_ico_green.svg": { + "type": "-", + "size": 793, + "lmtime": 0, + "modified": false + }, + "grid_ico.svg": { + "type": "-", + "size": 2612, + "lmtime": 0, + "modified": false + }, + "grid.png": { + "type": "-", + "size": 1522, + "lmtime": 0, + "modified": false + }, + "grid.webp": { + "type": "-", + "size": 84, + "lmtime": 0, + "modified": false + }, + "inpost.png": { + "type": "-", + "size": 7380, + "lmtime": 0, + "modified": false + }, + "inpost.webp": { + "type": "-", + "size": 1240, + "lmtime": 0, + "modified": false + }, + "instagram.svg": { + "type": "-", + "size": 1398, + "lmtime": 0, + "modified": false + }, + "instagram-white.svg": { + "type": "-", + "size": 2042, + "lmtime": 0, + "modified": false + }, + "konfigurator": {}, + "list_ico_green.svg": { + "type": "-", + "size": 602, + "lmtime": 0, + "modified": false + }, + "list_ico.png": { + "type": "-", + "size": 219, + "lmtime": 0, + "modified": false + }, + "list_ico.svg": { + "type": "-", + "size": 2640, + "lmtime": 0, + "modified": false + }, + "list_ico.webp": { + "type": "-", + "size": 80, + "lmtime": 0, + "modified": false + }, + "magnifier.svg": { + "type": "-", + "size": 491, + "lmtime": 0, + "modified": false + }, + "master_card.png": { + "type": "-", + "size": 5454, + "lmtime": 0, + "modified": false + }, + "master_card.webp": { + "type": "-", + "size": 1118, + "lmtime": 0, + "modified": false + }, + "pagination_arrow.png": { + "type": "-", + "size": 239, + "lmtime": 0, + "modified": false + }, + "pagination_arrow.svg": { + "type": "-", + "size": 631, + "lmtime": 0, + "modified": false + }, + "pagination_arrow.webp": { + "type": "-", + "size": 122, + "lmtime": 0, + "modified": false + }, + "paypo-black.png": { + "type": "-", + "size": 1043, + "lmtime": 0, + "modified": false + }, + "paypo-black.webp": { + "type": "-", + "size": 504, + "lmtime": 0, + "modified": false + }, + "paypo.png": { + "type": "-", + "size": 3700, + "lmtime": 0, + "modified": false + }, + "paypo.webp": { + "type": "-", + "size": 1060, + "lmtime": 0, + "modified": false + }, + "phone.svg": { + "type": "-", + "size": 1779, + "lmtime": 0, + "modified": false + }, + "pinterest.svg": { + "type": "-", + "size": 773, + "lmtime": 0, + "modified": false + }, + "pinterest-white.svg": { + "type": "-", + "size": 1048, + "lmtime": 0, + "modified": false + }, + "przelewy24.png": { + "type": "-", + "size": 4065, + "lmtime": 0, + "modified": false + }, + "przelewy24.webp": { + "type": "-", + "size": 502, + "lmtime": 0, + "modified": false + }, + "tabs": {}, + "visa.png": { + "type": "-", + "size": 4648, + "lmtime": 0, + "modified": false + }, + "visa.webp": { + "type": "-", + "size": 972, + "lmtime": 0, + "modified": false + }, + "youtube.svg": { + "type": "-", + "size": 1160, + "lmtime": 0, + "modified": false + } + }, + "loga-producentow": {}, + "logo.png": { + "type": "-", + "size": 7043, + "lmtime": 0, + "modified": false + }, + "Loteria - Baner.png": { + "type": "-", + "size": 204295, + "lmtime": 0, + "modified": false + }, + "Loteria - Baner.webp": { + "type": "-", + "size": 38394, + "lmtime": 0, + "modified": false + }, + "magniflex": {}, + "materac diverso mollyflex piktogramy.jpg": { + "type": "-", + "size": 73468, + "lmtime": 0, + "modified": false + }, + "materac diverso mollyflex piktogramy.webp": { + "type": "-", + "size": 29524, + "lmtime": 0, + "modified": false + }, + "materac diverso mollyflex poziom twardosci.jpg": { + "type": "-", + "size": 19110, + "lmtime": 0, + "modified": false + }, + "materac diverso mollyflex poziom twardosci.webp": { + "type": "-", + "size": 6818, + "lmtime": 0, + "modified": false + }, + "materac silver spring mollyflex przekroj.jpg": { + "type": "-", + "size": 170878, + "lmtime": 0, + "modified": false + }, + "materac silver spring mollyflex przekroj.webp": { + "type": "-", + "size": 67916, + "lmtime": 0, + "modified": false + }, + "materac silver spring piktogramy.png": { + "type": "-", + "size": 97502, + "lmtime": 0, + "modified": false + }, + "materac silver spring piktogramy.webp": { + "type": "-", + "size": 31330, + "lmtime": 0, + "modified": false + }, + "materac silver spring razem.jpg": { + "type": "-", + "size": 136286, + "lmtime": 0, + "modified": false + }, + "materac silver spring razem.webp": { + "type": "-", + "size": 63598, + "lmtime": 0, + "modified": false + }, + "materac silver spring skala twardosci.png": { + "type": "-", + "size": 16037, + "lmtime": 0, + "modified": false + }, + "materac silver spring skala twardosci.webp": { + "type": "-", + "size": 5742, + "lmtime": 0, + "modified": false + }, + "Mike_Bergamo 24_Low res.jpg": { + "type": "-", + "size": 341155, + "lmtime": 0, + "modified": false + }, + "Mike_Bergamo 24_white_Low res.jpg": { + "type": "-", + "size": 129860, + "lmtime": 0, + "modified": false + }, + "mollyflex": {}, + "new balance": {}, + "new elegance": {}, + "outlet": {}, + "Perdormire": {}, + "Pliki do pobrania": {}, + "pokrowce": {}, + "producenci": {}, + "produkty": {}, + "przekroje": {}, + "rama_komfort_L38.jpg": { + "type": "-", + "size": 103662, + "lmtime": 0, + "modified": false + }, + "rama_komfort_L38.webp": { + "type": "-", + "size": 20908, + "lmtime": 0, + "modified": false + }, + "rama_standard_L53.jpg": { + "type": "-", + "size": 98392, + "lmtime": 0, + "modified": false + }, + "rama_standard_L53.webp": { + "type": "-", + "size": 19944, + "lmtime": 0, + "modified": false + }, + "salony": {}, + "Sealy": {}, + "sembella": {}, + "sen_active": {}, + "serta": {}, + "skala-twardosci": {}, + "sleepmed": {}, + "Synapsa-med": {}, + "Tempur": {}, + "toppery - Visco Elastic Piramidal Shape i Polisoff_1.png": { + "type": "-", + "size": 62725, + "lmtime": 0, + "modified": false + }, + "toppery - Visco Elastic Piramidal Shape i Polisoff_1.webp": { + "type": "-", + "size": 16128, + "lmtime": 0, + "modified": false + }, + "toppery - Visco Elastic Piramidal Shape i Polisoff.png": { + "type": "-", + "size": 62725, + "lmtime": 0, + "modified": false + }, + "Velfont": {}, + "voucher_drmaterac.jpg": { + "type": "-", + "size": 60686, + "lmtime": 0, + "modified": false + }, + "voucher_drmaterac.webp": { + "type": "-", + "size": 16212, + "lmtime": 0, + "modified": false + }, + "We Love Beds": {}, + "We Love Candles": {}, + "wlasciwosci": {} + }, + "co": {}, + "darmowa-dostawa.png": { + "type": "-", + "size": 11255, + "lmtime": 0, + "modified": false + }, + "darmowa-dostawa.webp": { + "type": "-", + "size": 3052, + "lmtime": 0, + "modified": false + }, + "dr-materac-recepta-na-zdrowy-sen-logo-1585308793.jpg": { + "type": "-", + "size": 7306, + "lmtime": 0, + "modified": false + }, + "dr-materac-recepta-na-zdrowy-sen-logo-1585308793.webp": { + "type": "-", + "size": 3120, + "lmtime": 0, + "modified": false + }, + "drMaterac_sygnet_32px.png": { + "type": "-", + "size": 1228, + "lmtime": 0, + "modified": false + }, + "drMaterac_sygnet_32px.webp": { + "type": "-", + "size": 1170, + "lmtime": 0, + "modified": false + }, + "ets_promotion": {}, + "favicon-1.ico": { + "type": "-", + "size": 93062, + "lmtime": 0, + "modified": false + }, + "favicon.ico": { + "type": "-", + "size": 93062, + "lmtime": 0, + "modified": false + }, + "fileType": { + "type": "-", + "size": 3, + "lmtime": 0, + "modified": false + }, + "genders": {}, + "gwarancja-ceny.png": { + "type": "-", + "size": 6315, + "lmtime": 0, + "modified": false + }, + "gwarancja-ceny.webp": { + "type": "-", + "size": 2584, + "lmtime": 0, + "modified": false + }, + ".htaccess": { + "type": "-", + "size": 520, + "lmtime": 0, + "modified": true + }, + ".htaccess_backup_20210524_101154": { + "type": "-", + "size": 208, + "lmtime": 0, + "modified": false + }, + ".htaccess_backup_20210524_120429": { + "type": "-", + "size": 0, + "lmtime": 0, + "modified": false + }, + ".htaccess_backup_20230412_234131": { + "type": "-", + "size": 756, + "lmtime": 0, + "modified": false + }, + ".htaccess_backup_20230412_234157": { + "type": "-", + "size": 507, + "lmtime": 0, + "modified": false + }, + ".htaccess_backup_20230928_213358": { + "type": "-", + "size": 829, + "lmtime": 0, + "modified": false + }, + ".htaccess_backup_20230928_213905": { + "type": "-", + "size": 508, + "lmtime": 0, + "modified": false + }, + ".htaccess_backup_20230928_214020": { + "type": "-", + "size": 508, + "lmtime": 0, + "modified": false + }, + ".htaccess_backup_20230928_222543": { + "type": "-", + "size": 508, + "lmtime": 0, + "modified": false + }, + ".htaccess_backup_20230928_222700": { + "type": "-", + "size": 509, + "lmtime": 0, + "modified": false + }, + ".htaccess_backup_20250107_134938": { + "type": "-", + "size": 519, + "lmtime": 0, + "modified": false + }, + ".htaccess_backup_20250107_135317": { + "type": "-", + "size": 520, + "lmtime": 0, + "modified": false + }, + "ikona-01.jpg": { + "type": "-", + "size": 50472, + "lmtime": 0, + "modified": false + }, + "ikona-01.webp": { + "type": "-", + "size": 5776, + "lmtime": 0, + "modified": false + }, + "ikona-02.png": { + "type": "-", + "size": 5639, + "lmtime": 0, + "modified": false + }, + "ikona-03.png": { + "type": "-", + "size": 9437, + "lmtime": 0, + "modified": false + }, + "ikona-04.png": { + "type": "-", + "size": 14247, + "lmtime": 0, + "modified": false + }, + "index.php": { + "type": "-", + "size": 1287, + "lmtime": 0, + "modified": false + }, + "jquery-ui": {}, + "l": {}, + "leoblog": {}, + "loader.gif": { + "type": "-", + "size": 3717, + "lmtime": 0, + "modified": false + }, + "loadingAnimation.gif": { + "type": "-", + "size": 5867, + "lmtime": 0, + "modified": false + }, + "logo.gif": { + "type": "-", + "size": 736175, + "lmtime": 0, + "modified": false + }, + "logo_invoice.jpg": { + "type": "-", + "size": 1953, + "lmtime": 0, + "modified": false + }, + "logo.jpg": { + "type": "-", + "size": 1953, + "lmtime": 0, + "modified": false + }, + "logo.png": { + "type": "-", + "size": 29622, + "lmtime": 0, + "modified": false + }, + "logo_stores.png": { + "type": "-", + "size": 2962, + "lmtime": 0, + "modified": false + }, + "logo_stores.webp": { + "type": "-", + "size": 1018, + "lmtime": 0, + "modified": false + }, + "logo.webp": { + "type": "-", + "size": 12878, + "lmtime": 0, + "modified": false + }, + "lulandia-big-logo.png": { + "type": "-", + "size": 13761, + "lmtime": 0, + "modified": false + }, + "lulandia-big-logo.webp": { + "type": "-", + "size": 5146, + "lmtime": 0, + "modified": false + }, + "lulandia-logo.png": { + "type": "-", + "size": 8731, + "lmtime": 0, + "modified": false + }, + "lulandia-logo.webp": { + "type": "-", + "size": 2846, + "lmtime": 0, + "modified": false + }, + "lulandiapl-logo-16666873102.jpg": { + "type": "-", + "size": 8783, + "lmtime": 0, + "modified": false + }, + "lulandiapl-logo-16666873102.webp": { + "type": "-", + "size": 2842, + "lmtime": 0, + "modified": false + }, + "m": {}, + "macFFBgHack.png": { + "type": "-", + "size": 81, + "lmtime": 0, + "modified": false + }, + "os": {}, + "p": {}, + "paypo-violet.png": { + "type": "-", + "size": 5562, + "lmtime": 0, + "modified": false + }, + "paypo-violet.webp": { + "type": "-", + "size": 2258, + "lmtime": 0, + "modified": false + }, + "Play-solid.svg": { + "type": "-", + "size": 770, + "lmtime": 1720343668057, + "modified": false + }, + "prestashop@2x.png": { + "type": "-", + "size": 6315, + "lmtime": 0, + "modified": false + }, + "prestashop@2x.webp": { + "type": "-", + "size": 2062, + "lmtime": 0, + "modified": false + }, + "prestashop-avatar.png": { + "type": "-", + "size": 13699, + "lmtime": 0, + "modified": false + }, + "prestashop-avatar.webp": { + "type": "-", + "size": 4586, + "lmtime": 0, + "modified": false + }, + "preston-login@2x.png": { + "type": "-", + "size": 12316, + "lmtime": 0, + "modified": false + }, + "preston-login@2x.webp": { + "type": "-", + "size": 5888, + "lmtime": 0, + "modified": false + }, + "preston-login-wink@2x.png": { + "type": "-", + "size": 12041, + "lmtime": 0, + "modified": false + }, + "preston-login-wink@2x.webp": { + "type": "-", + "size": 5828, + "lmtime": 0, + "modified": false + }, + "Przycisk-CE.png": { + "type": "-", + "size": 12143, + "lmtime": 0, + "modified": false + }, + "Przycisk-CE.webp": { + "type": "-", + "size": 4026, + "lmtime": 0, + "modified": false + }, + "questionmark.png": { + "type": "-", + "size": 1233, + "lmtime": 0, + "modified": false + }, + "questionmark.webp": { + "type": "-", + "size": 768, + "lmtime": 0, + "modified": false + }, + "raty.png": { + "type": "-", + "size": 14824, + "lmtime": 1737228971568, + "modified": false + }, + "s": {}, + "scenes": {}, + "s_icons": {}, + "st": {}, + "su": {}, + "t": {}, + "tmp": {} + }, + "import_log.txt": { + "type": "-", + "size": 25367, + "lmtime": 0, + "modified": true + }, + "import-product.php": { + "type": "-", + "size": 22080, + "lmtime": 1740078016834, + "modified": false + }, + "index.php": { + "type": "-", + "size": 1620, + "lmtime": 0, + "modified": true + }, + "info.php": { + "type": "-", + "size": 14, + "lmtime": 0, + "modified": false + }, + "init.php": { + "type": "-", + "size": 1168, + "lmtime": 0, + "modified": false + }, + "INSTALL.txt": { + "type": "-", + "size": 4943, + "lmtime": 0, + "modified": false + }, + ".jpg": { + "type": "-", + "size": 25562, + "lmtime": 0, + "modified": false + }, + "js": {}, + "-large_default.jpg": { + "type": "-", + "size": 27873, + "lmtime": 0, + "modified": false + }, + "LICENSES": { + "type": "-", + "size": 183529, + "lmtime": 0, + "modified": false + }, + "localization": {}, + "logs": {}, + "mails": {}, + "-medium_default.jpg": { + "type": "-", + "size": 16403, + "lmtime": 0, + "modified": false + }, + "modules": { + "advancedpopupcreator": {}, + "appagebuilder": {}, + "arseopro": {}, + "baecommercetracking": {}, + "blockreassurance": {}, + "blockwishlist-tmp": {}, + "caraty": { + "caraty.php": { + "type": "-", + "size": 70619, + "lmtime": 1734091194734, + "modified": false + }, + "config_pl.xml": { + "type": "-", + "size": 500, + "lmtime": 0, + "modified": false + }, + "config.xml": { + "type": "-", + "size": 489, + "lmtime": 0, + "modified": false + }, + "controllers": {}, + ".idea": {}, + "index.php": { + "type": "-", + "size": 309, + "lmtime": 0, + "modified": false + }, + "logo.gif": { + "type": "-", + "size": 1226, + "lmtime": 0, + "modified": false + }, + "logo-small.png": { + "type": "-", + "size": 2594, + "lmtime": 0, + "modified": false + }, + "logo-small.webp": { + "type": "-", + "size": 1412, + "lmtime": 1734091194735, + "modified": false + }, + "translations": {}, + "views": { + "templates": { + "hook": { + "product.tpl": { + "type": "-", + "size": 1974, + "lmtime": 1734091194736, + "modified": false + } + } + } + } + }, + "cmsproducts": { + "cmsproducts.css": { + "type": "-", + "size": 548, + "lmtime": 1737114041325, + "modified": false + }, + "cmsproducts.php": { + "type": "-", + "size": 18733, + "lmtime": 1737114041408, + "modified": false + }, + "config_pl.xml": { + "type": "-", + "size": 515, + "lmtime": 1737114041485, + "modified": false + }, + "css.css": { + "type": "-", + "size": 4021, + "lmtime": 1737114041554, + "modified": false + }, + "html.tpl": { + "type": "-", + "size": 364, + "lmtime": 1737114041625, + "modified": false + }, + "index.php": { + "type": "-", + "size": 1267, + "lmtime": 1737114041697, + "modified": false + }, + "logo.gif": { + "type": "-", + "size": 377, + "lmtime": 0, + "modified": false + }, + "logo.png": { + "type": "-", + "size": 8803, + "lmtime": 0, + "modified": false + }, + "logo.webp": { + "type": "-", + "size": 1670, + "lmtime": 1737114041767, + "modified": false + }, + "logo-white.png": { + "type": "-", + "size": 4101, + "lmtime": 0, + "modified": false + }, + "override": { + "controllers": { + "front": { + "CmsController.php": { + "type": "-", + "size": 17915, + "lmtime": 1737114042068, + "modified": false + }, + "index.php": { + "type": "-", + "size": 1267, + "lmtime": 1737114042138, + "modified": false + } + }, + "index.php": { + "type": "-", + "size": 1267, + "lmtime": 1737114041983, + "modified": false + } + }, + "index.php": { + "type": "-", + "size": 1267, + "lmtime": 1737114041909, + "modified": false + } + }, + "products-carousel.tpl": { + "type": "-", + "size": 2277, + "lmtime": 1737114041837, + "modified": false + }, + "products.tpl": { + "type": "-", + "size": 2011, + "lmtime": 1737114034636, + "modified": true + }, + "translations": { + "pl.php": { + "type": "-", + "size": 3134, + "lmtime": 1737114042211, + "modified": false + } + } + }, + "contactform": {}, + "cookiesplus": {}, + "dashactivity": {}, + "dashgoals": {}, + "dashproducts": {}, + "dashtrends": {}, + "dboptimization": {}, + "deleteordersfree": {}, + "dpdpoland": {}, + "eicaptcha": {}, + "ekomiratingsandreviews": {}, + "ekomiSff": {}, + "emarketing": {}, + "empikmarketplace": {}, + "ets_megamenu": {}, + "ets_multilayerslider": {}, + "ets_promotion": {}, + "fbpixel": {}, + "followup": {}, + "gamification": {}, + "gm_omniprice": { + "CHANGELOG": { + "type": "-", + "size": 4613, + "lmtime": 0, + "modified": true + }, + "cleanup.php": { + "type": "-", + "size": 338, + "lmtime": 0, + "modified": true + }, + "config_pl.xml": { + "type": "-", + "size": 544, + "lmtime": 0, + "modified": false + }, + "cron.php": { + "type": "-", + "size": 1356, + "lmtime": 0, + "modified": false + }, + "fill.php": { + "type": "-", + "size": 336, + "lmtime": 0, + "modified": true + }, + "gm_omniprice.php": { + "type": "-", + "size": 90622, + "lmtime": 1738258180313, + "modified": false + }, + "index.php": { + "type": "-", + "size": 1269, + "lmtime": 0, + "modified": false + }, + "logo.png": { + "type": "-", + "size": 4539, + "lmtime": 0, + "modified": false + }, + "logo.webp": { + "type": "-", + "size": 1980, + "lmtime": 0, + "modified": false + }, + "template.php": { + "type": "-", + "size": 1865, + "lmtime": 0, + "modified": false + }, + "translations": {}, + "upgrade": {}, + "views": {} + }, + "graphnvd3": {}, + "gridhtml": {}, + "gsitemap": {}, + ".htaccess": { + "type": "-", + "size": 254, + "lmtime": 0, + "modified": false + }, + "htmlboxpro": { + "ajax_htmlboxpro.php": { + "type": "-", + "size": 816, + "lmtime": 1722582032391, + "modified": false + }, + "config.ini": { + "type": "-", + "size": 32, + "lmtime": 1722582032469, + "modified": false + }, + "config_pl.xml": { + "type": "-", + "size": 542, + "lmtime": 0, + "modified": false + }, + "edit.png": { + "type": "-", + "size": 746, + "lmtime": 1722582032544, + "modified": false + }, + "htmlboxpro.php": { + "type": "-", + "size": 164713, + "lmtime": 1722582032668, + "modified": false + }, + "html.tpl": { + "type": "-", + "size": 20081, + "lmtime": 1723122155356, + "modified": false + }, + "index.php": { + "type": "-", + "size": 1267, + "lmtime": 0, + "modified": false + }, + "key.php": { + "type": "-", + "size": 58, + "lmtime": 1722582032821, + "modified": false + }, + "lib": { + "index.php": { + "type": "-", + "size": 1287, + "lmtime": 1722582033121, + "modified": false + }, + "searchTool": { + "index.php": { + "type": "-", + "size": 1287, + "lmtime": 1722582033208, + "modified": false + }, + "searchTool.php": { + "type": "-", + "size": 12374, + "lmtime": 1722582033290, + "modified": false + }, + "views": { + "index.php": { + "type": "-", + "size": 1287, + "lmtime": 1722582033358, + "modified": false + }, + "scripts.tpl": { + "type": "-", + "size": 8588, + "lmtime": 1722582033438, + "modified": false + } + } + }, + "smartyTemplatesManager": { + "css": { + "index.php": { + "type": "-", + "size": 1287, + "lmtime": 1722582033683, + "modified": false + }, + "smartyTemplatesManager.css": { + "type": "-", + "size": 661, + "lmtime": 1722582033751, + "modified": false + } + }, + "index.php": { + "type": "-", + "size": 1287, + "lmtime": 1722582033525, + "modified": false + }, + "js": { + "index.php": { + "type": "-", + "size": 1287, + "lmtime": 1722582033836, + "modified": false + }, + "smartyTemplatesManager.js": { + "type": "-", + "size": 4896, + "lmtime": 1722582033903, + "modified": false + } + }, + "smartyTemplatesManager.php": { + "type": "-", + "size": 8636, + "lmtime": 1722582033600, + "modified": false + }, + "tpl": { + "example.tpl": { + "type": "-", + "size": 52, + "lmtime": 1722582033981, + "modified": false + }, + "index.php": { + "type": "-", + "size": 1287, + "lmtime": 1722582034053, + "modified": false + } + }, + "views": { + "buttonManager.tpl": { + "type": "-", + "size": 639, + "lmtime": 1722582034129, + "modified": false + }, + "createTemplateForm.tpl": { + "type": "-", + "size": 1353, + "lmtime": 1722582034200, + "modified": false + }, + "editTemplateForm.tpl": { + "type": "-", + "size": 1809, + "lmtime": 1722582034277, + "modified": false + }, + "index.php": { + "type": "-", + "size": 1287, + "lmtime": 1722582034366, + "modified": false + }, + "mainForm.tpl": { + "type": "-", + "size": 2480, + "lmtime": 1722582034444, + "modified": false + }, + "selectInput.tpl": { + "type": "-", + "size": 453, + "lmtime": 1722582034529, + "modified": false + } + } + } + }, + "logo.gif": { + "type": "-", + "size": 377, + "lmtime": 1722582032893, + "modified": false + }, + "logo.png": { + "type": "-", + "size": 8803, + "lmtime": 1722582032964, + "modified": false + }, + "logo-white.png": { + "type": "-", + "size": 4101, + "lmtime": 1722582033034, + "modified": false + }, + "models": { + "hbox.php": { + "type": "-", + "size": 7579, + "lmtime": 1722582034618, + "modified": false + }, + "index.php": { + "type": "-", + "size": 1267, + "lmtime": 1722582034706, + "modified": false + } + }, + "translations": { + "cs.php": { + "type": "-", + "size": 0, + "lmtime": 1722582034781, + "modified": false + }, + "de.php": { + "type": "-", + "size": 17795, + "lmtime": 1722582034872, + "modified": false + }, + "en.php": { + "type": "-", + "size": 142, + "lmtime": 1722582034939, + "modified": false + }, + "es.php": { + "type": "-", + "size": 26198, + "lmtime": 1722582035023, + "modified": false + }, + "et.php": { + "type": "-", + "size": 0, + "lmtime": 1722582035106, + "modified": false + }, + "fr.php": { + "type": "-", + "size": 8407, + "lmtime": 1722582035181, + "modified": false + }, + "hu.php": { + "type": "-", + "size": 0, + "lmtime": 1722582035292, + "modified": false + }, + "index.php": { + "type": "-", + "size": 1267, + "lmtime": 1722582035375, + "modified": false + }, + "it.php": { + "type": "-", + "size": 27076, + "lmtime": 1722582035464, + "modified": false + }, + "nl.php": { + "type": "-", + "size": 0, + "lmtime": 1722582035546, + "modified": false + }, + "pl.php": { + "type": "-", + "size": 32863, + "lmtime": 1722582035632, + "modified": false + }, + "pt.php": { + "type": "-", + "size": 2234, + "lmtime": 1722582035705, + "modified": false + } + }, + "views": { + "css": { + "index.php": { + "type": "-", + "size": 1267, + "lmtime": 1722582036223, + "modified": false + }, + "styles.css": { + "type": "-", + "size": 5593, + "lmtime": 1722582036298, + "modified": false + } + }, + "custom_hook_info.tpl": { + "type": "-", + "size": 1032, + "lmtime": 1722582035779, + "modified": false + }, + "form-add-new.tpl": { + "type": "-", + "size": 354, + "lmtime": 1722582035855, + "modified": false + }, + "form-edit.tpl": { + "type": "-", + "size": 378, + "lmtime": 1722582035933, + "modified": false + }, + "img": { + "add-icon.png": { + "type": "-", + "size": 53448, + "lmtime": 1722582036400, + "modified": false + }, + "bottom-bg.png": { + "type": "-", + "size": 5696, + "lmtime": 1722582036475, + "modified": false + }, + "br_down.png": { + "type": "-", + "size": 3270, + "lmtime": 1722582036553, + "modified": false + }, + "color.png": { + "type": "-", + "size": 6127, + "lmtime": 1722582036622, + "modified": false + }, + "duplicate.png": { + "type": "-", + "size": 641, + "lmtime": 1722582036700, + "modified": false + }, + "edit.png": { + "type": "-", + "size": 1446, + "lmtime": 1722582036766, + "modified": false + }, + "index.php": { + "type": "-", + "size": 1267, + "lmtime": 1722582036840, + "modified": false + }, + "nav-bg.png": { + "type": "-", + "size": 4095, + "lmtime": 1722582036921, + "modified": false + }, + "trash.png": { + "type": "-", + "size": 447, + "lmtime": 1722582036988, + "modified": false + } + }, + "index.php": { + "type": "-", + "size": 1267, + "lmtime": 1722582035993, + "modified": false + }, + "js": { + "index.php": { + "type": "-", + "size": 1267, + "lmtime": 1722582037062, + "modified": false + }, + "script.js": { + "type": "-", + "size": 2171, + "lmtime": 1722582037129, + "modified": false + }, + "tinymce16-force-urls.inc.js": { + "type": "-", + "size": 3284, + "lmtime": 1722582037201, + "modified": false + }, + "tinymce16.inc.js": { + "type": "-", + "size": 3282, + "lmtime": 1722582037278, + "modified": false + } + }, + "messages.tpl": { + "type": "-", + "size": 497, + "lmtime": 1722582036068, + "modified": false + }, + "scripts.tpl": { + "type": "-", + "size": 1533, + "lmtime": 1722582036142, + "modified": false + }, + "templates": { + "admin": { + "_configure": { + "helpers": { + "form": { + "form.tpl": { + "type": "-", + "size": 6356, + "lmtime": 1722582037573, + "modified": false + }, + "index.php": { + "type": "-", + "size": 1267, + "lmtime": 1722582037641, + "modified": false + } + }, + "index.php": { + "type": "-", + "size": 1267, + "lmtime": 1722582037501, + "modified": false + } + }, + "index.php": { + "type": "-", + "size": 1267, + "lmtime": 1722582037432, + "modified": false + } + }, + "index.php": { + "type": "-", + "size": 1267, + "lmtime": 1722582037360, + "modified": false + } + } + } + } + }, + "import_api": { + "classes": { + "convertor.php": { + "type": "-", + "size": 18369, + "lmtime": 0, + "modified": false + }, + "creator.php": { + "type": "-", + "size": 27758, + "lmtime": 1732880908974, + "modified": false + }, + "filereader.php": { + "type": "-", + "size": 12700, + "lmtime": 0, + "modified": false + }, + "import.php": { + "type": "-", + "size": 17379, + "lmtime": 0, + "modified": false + }, + "index.php": { + "type": "-", + "size": 1304, + "lmtime": 0, + "modified": false + }, + "queue.php": { + "type": "-", + "size": 4852, + "lmtime": 0, + "modified": false + } + }, + "controllers": { + "front": { + "ajax.php": { + "type": "-", + "size": 3292, + "lmtime": 0, + "modified": false + }, + "import.php": { + "type": "-", + "size": 22299, + "lmtime": 1734166638266, + "modified": false + }, + "index.php": { + "type": "-", + "size": 1300, + "lmtime": 0, + "modified": false + } + } + } + }, + "index.php": { + "type": "-", + "size": 1289, + "lmtime": 0, + "modified": false + }, + "leoblog": { + "controllers": { + "front": { + "blog.php": { + "type": "-", + "size": 20652, + "lmtime": 1737152157244, + "modified": false + }, + "category.php": { + "type": "-", + "size": 13863, + "lmtime": 0, + "modified": false + }, + "index.php": { + "type": "-", + "size": 1307, + "lmtime": 0, + "modified": false + }, + "list.php": { + "type": "-", + "size": 10487, + "lmtime": 0, + "modified": false + } + } + }, + "views": { + "templates": { + "front": { + "default": { + "blog.tpl": { + "type": "-", + "size": 7412, + "lmtime": 1737114748598, + "modified": false + }, + "blog.tpl_old": { + "type": "-", + "size": 6843, + "lmtime": 0, + "modified": false + }, + "category.tpl": { + "type": "-", + "size": 4347, + "lmtime": 0, + "modified": false + }, + "comment.tpl": { + "type": "-", + "size": 1993, + "lmtime": 0, + "modified": false + }, + "_diquis_comment.tpl": { + "type": "-", + "size": 888, + "lmtime": 0, + "modified": false + }, + "_facebook_comment.tpl": { + "type": "-", + "size": 838, + "lmtime": 0, + "modified": false + }, + "index.php": { + "type": "-", + "size": 1342, + "lmtime": 0, + "modified": false + }, + "_listing_blog.tpl": { + "type": "-", + "size": 4087, + "lmtime": 0, + "modified": false + }, + "listing.tpl": { + "type": "-", + "size": 3247, + "lmtime": 0, + "modified": false + }, + "_local_comment.tpl": { + "type": "-", + "size": 4090, + "lmtime": 0, + "modified": false + }, + "_pagination.tpl": { + "type": "-", + "size": 4843, + "lmtime": 0, + "modified": false + }, + "_social.tpl": { + "type": "-", + "size": 1860, + "lmtime": 0, + "modified": false + } + } + } + } + } + }, + "leobootstrapmenu": {}, + "leofeature": {}, + "leoproductsearch": {}, + "leoquicklogin": {}, + "leoslideshow": {}, + "medoo.php": { + "type": "-", + "size": 36856, + "lmtime": 0, + "modified": false + }, + "pagecache": {}, + "pagesnotfound": {}, + "paynow": {}, + "pdceneozaufaneopiniepro": {}, + "pdcsvpriceupdate": {}, + "pdgoogleanalytycs4pro": {}, + "pdgooglemerchantcenterpro": {}, + "phstickers": {}, + "pm_advancedsearch4": {}, + "pricewars": {}, + "pricewars2": {}, + "productcomments": {}, + "przelewy24": {}, + "psaddonsconnect": {}, + "ps_banner": {}, + "ps_bestsellers": {}, + "ps_brandlist": {}, + "ps_buybuttonlite": {}, + "ps_cashondelivery": {}, + "ps_categoryproducts": {}, + "ps_categorytree": {}, + "ps_checkpayment": {}, + "ps_contactinfo": {}, + "ps_crossselling": {}, + "ps_currencyselector": {}, + "ps_customeraccountlinks": {}, + "ps_customersignin": {}, + "ps_customtext": {}, + "ps_emailalerts": {}, + "ps_emailsubscription": {}, + "ps_facetedsearch": {}, + "ps_faviconnotificationbo": {}, + "ps_featuredproducts": {}, + "psgdpr": {}, + "ps_imageslider": {}, + "ps_languageselector": {}, + "ps_legalcompliance": {}, + "ps_linklist": {}, + "ps_mainmenu": {}, + "ps_mbo": {}, + "ps_newproducts": {}, + "ps_searchbar": {}, + "ps_sharebuttons": {}, + "ps_shoppingcart": {}, + "ps_socialfollow": {}, + "ps_specials": {}, + "ps_supplierlist": {}, + "ps_themecusto": {}, + "ps_viewedproduct": {}, + "ps_wirepayment": {}, + "raty": { + "alior.gif": { + "type": "-", + "size": 2379, + "lmtime": 0, + "modified": false + }, + "alior-kalkulator-guzik.gif": { + "type": "-", + "size": 3714, + "lmtime": 0, + "modified": false + }, + "alior-kalkulator-guzik-old.gif": { + "type": "-", + "size": 6177, + "lmtime": 0, + "modified": false + }, + "config_pl.xml": { + "type": "-", + "size": 568, + "lmtime": 1734091194737, + "modified": false + }, + "controllers": {}, + "index.php": { + "type": "-", + "size": 307, + "lmtime": 0, + "modified": false + }, + "logo.png": { + "type": "-", + "size": 9746, + "lmtime": 0, + "modified": false + }, + "logo.webp": { + "type": "-", + "size": 5004, + "lmtime": 0, + "modified": false + }, + "map.php": { + "type": "-", + "size": 1163, + "lmtime": 0, + "modified": false + }, + "payment.php": { + "type": "-", + "size": 316, + "lmtime": 0, + "modified": false + }, + "raty": {}, + "raty.css": { + "type": "-", + "size": 465, + "lmtime": 0, + "modified": false + }, + "raty.php": { + "type": "-", + "size": 33041, + "lmtime": 0, + "modified": false + }, + "raty.tpl": { + "type": "-", + "size": 333, + "lmtime": 0, + "modified": false + }, + "translations": {}, + "validation.php": { + "type": "-", + "size": 1396, + "lmtime": 0, + "modified": false + }, + "views": {} + }, + "rc_pganalytics": {}, + "referralprogram": {}, + "relatedfree": {}, + "santandercredit": { + "images": { + "logo_254x83.webp": { + "type": "-", + "size": 3828, + "lmtime": 1734091194737, + "modified": false + } + } + }, + "sekeywords": {}, + "smartsupp": {}, + "statsbestcategories": {}, + "statsbestcustomers": {}, + "statsbestmanufacturers": {}, + "statsbestproducts": {}, + "statsbestsuppliers": {}, + "statsbestvouchers": {}, + "statscarrier": {}, + "statscatalog": {}, + "statscheckup": {}, + "statsdata": {}, + "statsequipment": {}, + "statsforecast": { + "composer.json": { + "type": "-", + "size": 402, + "lmtime": 0, + "modified": false + }, + "config_pl.xml": { + "type": "-", + "size": 548, + "lmtime": 0, + "modified": false + }, + "config.xml": { + "type": "-", + "size": 518, + "lmtime": 0, + "modified": false + }, + "funnel.png": { + "type": "-", + "size": 656, + "lmtime": 0, + "modified": false + }, + "index.php": { + "type": "-", + "size": 1300, + "lmtime": 0, + "modified": false + }, + "LICENSE.md": { + "type": "-", + "size": 10329, + "lmtime": 0, + "modified": false + }, + "logo.gif": { + "type": "-", + "size": 1028, + "lmtime": 0, + "modified": false + }, + "logo.png": { + "type": "-", + "size": 1934, + "lmtime": 0, + "modified": false + }, + "logo.webp": { + "type": "-", + "size": 966, + "lmtime": 0, + "modified": false + }, + "next.png": { + "type": "-", + "size": 358, + "lmtime": 0, + "modified": false + }, + "Readme.md": { + "type": "-", + "size": 926, + "lmtime": 0, + "modified": false + }, + "statsforecast.php": { + "type": "-", + "size": 37862, + "lmtime": 1730120146213, + "modified": false + }, + "translations": {} + }, + "statslive": {}, + "statsnewsletter": {}, + "statsorigin": {}, + "statspersonalinfos": {}, + "statsproduct": {}, + "statsregistrations": {}, + "statssales": {}, + "statssearch": {}, + "statsstock": {}, + "statsvisits": {}, + "uecookie": {}, + "welcome": {}, + "x13gpsr": {}, + "x13linkrewrite": {}, + "x13webp": {}, + "xmlfeeds": {}, + "ybc_blog_free": {}, + "ybc_productimagehover": {}, + "ybc_specificprices": {}, + "ybc_themeconfig": {}, + "ybc_widget": {} + }, + "nov": {}, + "override": {}, + "package-lock.json": { + "type": "-", + "size": 66094, + "lmtime": 0, + "modified": false + }, + "pdf": {}, + ".php_cs.dist": { + "type": "-", + "size": 1009, + "lmtime": 0, + "modified": false + }, + "phpmailer": {}, + "plakat informacyjny DRM.pdf": { + "type": "-", + "size": 473470, + "lmtime": 0, + "modified": false + }, + "producer_descriptions": {}, + "przelewy24.txt": { + "type": "-", + "size": 2739, + "lmtime": 0, + "modified": false + }, + "pub": {}, + "robots.txt": { + "type": "-", + "size": 2723, + "lmtime": 0, + "modified": true + }, + "script.php": { + "type": "-", + "size": 534, + "lmtime": 0, + "modified": false + }, + "sitemaps": {}, + "sitemap_shop_2.xml": { + "type": "-", + "size": 548, + "lmtime": 0, + "modified": false + }, + "-small_default.jpg": { + "type": "-", + "size": 2127, + "lmtime": 0, + "modified": false + }, + "src": {}, + "stats.php": { + "type": "-", + "size": 1702, + "lmtime": 1706655248544, + "modified": false + }, + "test.php": { + "type": "-", + "size": 1807, + "lmtime": 0, + "modified": false + }, + "themes": { + "leo_gstore": { + "templates": { + "_partials": { + "breadcrumb.tpl": { + "type": "-", + "size": 1735, + "lmtime": 0, + "modified": false + }, + "footer.tpl": { + "type": "-", + "size": 2193, + "lmtime": 1706786494190, + "modified": false + }, + "form-errors.tpl": { + "type": "-", + "size": 1219, + "lmtime": 0, + "modified": false + }, + "form-fields.tpl": { + "type": "-", + "size": 8125, + "lmtime": 0, + "modified": false + }, + "header.tpl": { + "type": "-", + "size": 2480, + "lmtime": 0, + "modified": false + }, + "head.tpl": { + "type": "-", + "size": 4464, + "lmtime": 1712869144611, + "modified": false + }, + "index.php": { + "type": "-", + "size": 1279, + "lmtime": 0, + "modified": false + }, + "javascript.tpl": { + "type": "-", + "size": 2058, + "lmtime": 0, + "modified": false + }, + "notifications.tpl": { + "type": "-", + "size": 2462, + "lmtime": 0, + "modified": false + }, + "pagination.tpl": { + "type": "-", + "size": 2741, + "lmtime": 0, + "modified": false + }, + "stylesheets.tpl": { + "type": "-", + "size": 1238, + "lmtime": 0, + "modified": false + } + }, + "custom_pages": { + "franczyza.tpl": { + "type": "-", + "size": 12772, + "lmtime": 1720343668089, + "modified": false + } + } + }, + "assets": { + "css": { + "components": {}, + "custom.css": { + "type": "-", + "size": 1472, + "lmtime": 0, + "modified": true + }, + "dr_materac.css": { + "type": "-", + "size": 83268, + "lmtime": 1740080147191, + "modified": false + }, + "dr_materac.css.map": { + "type": "-", + "size": 31361, + "lmtime": 1740080147192, + "modified": false + }, + "dr_materac.css.sync-conflict-20231027-200011-EDGUH2C.map": { + "type": "-", + "size": 115510, + "lmtime": 0, + "modified": false + }, + "dr_materac.scss": { + "type": "-", + "size": 99257, + "lmtime": 1740080147193, + "modified": false + }, + "dr_materac.sync-conflict-20231027-195749-EDGUH2C.css": { + "type": "-", + "size": 62269, + "lmtime": 0, + "modified": false + }, + "dr_materac.sync-conflict-20231027-195828-EDGUH2C.scss": { + "type": "-", + "size": 82102, + "lmtime": 0, + "modified": false + }, + "index.php": { + "type": "-", + "size": 1277, + "lmtime": 0, + "modified": false + }, + "rtl.css": { + "type": "-", + "size": 61948, + "lmtime": 0, + "modified": false + }, + "theme.css": { + "type": "-", + "size": 638136, + "lmtime": 0, + "modified": true + } + }, + "js": { + "custom.js": { + "type": "-", + "size": 28857, + "lmtime": 1720343668083, + "modified": false + } + } + }, + "modules": { + "appagebuilder": { + "views": { + "templates": { + "front": { + "details": { + "detail1526383012.tpl": { + "type": "-", + "size": 11300, + "lmtime": 0, + "modified": false + }, + "detail1526395446 — kopia.tpl": { + "type": "-", + "size": 18302, + "lmtime": 0, + "modified": false + }, + "detail1526395446.tpl": { + "type": "-", + "size": 30075, + "lmtime": 1738066833340, + "modified": false + }, + "detail1526396195.tpl": { + "type": "-", + "size": 11246, + "lmtime": 0, + "modified": false + }, + "detail1526396867.tpl": { + "type": "-", + "size": 11208, + "lmtime": 0, + "modified": false + }, + "detail1526404070.tpl": { + "type": "-", + "size": 11227, + "lmtime": 0, + "modified": false + }, + "detail1526404543.tpl": { + "type": "-", + "size": 10992, + "lmtime": 0, + "modified": false + }, + "detail1526406009.tpl": { + "type": "-", + "size": 11227, + "lmtime": 0, + "modified": false + }, + "detail1526475521.tpl": { + "type": "-", + "size": 5661, + "lmtime": 0, + "modified": false + }, + "detail1526484542.tpl": { + "type": "-", + "size": 10988, + "lmtime": 0, + "modified": false + }, + "index.php": { + "type": "-", + "size": 1279, + "lmtime": 0, + "modified": false + }, + "kopia_3lis2020.tpl": { + "type": "-", + "size": 23055, + "lmtime": 0, + "modified": false + } + } + } + } + } + }, + "ps_shoppingcart": { + "ps_shoppingcart.tpl": { + "type": "-", + "size": 1759, + "lmtime": 1734091194744, + "modified": false + } + } + } + }, + "leo_lulandia": { + "templates": { + "_partials": { + "breadcrumb.tpl": { + "type": "-", + "size": 1630, + "lmtime": 0, + "modified": false + }, + "footer.tpl": { + "type": "-", + "size": 2350, + "lmtime": 1706786481003, + "modified": false + }, + "form-errors.tpl": { + "type": "-", + "size": 1219, + "lmtime": 0, + "modified": false + }, + "form-fields.tpl": { + "type": "-", + "size": 7260, + "lmtime": 0, + "modified": false + }, + "header.tpl": { + "type": "-", + "size": 2550, + "lmtime": 0, + "modified": false + }, + "head.tpl": { + "type": "-", + "size": 6065, + "lmtime": 1712869188790, + "modified": false + }, + "index.php": { + "type": "-", + "size": 1279, + "lmtime": 0, + "modified": false + }, + "javascript.tpl": { + "type": "-", + "size": 2137, + "lmtime": 0, + "modified": true + }, + "notifications.tpl": { + "type": "-", + "size": 2462, + "lmtime": 0, + "modified": false + }, + "pagination.tpl": { + "type": "-", + "size": 2769, + "lmtime": 0, + "modified": false + }, + "stylesheets.tpl": { + "type": "-", + "size": 1238, + "lmtime": 0, + "modified": false + } + }, + "catalog": { + "brands.tpl": { + "type": "-", + "size": 1405, + "lmtime": 0, + "modified": false + }, + "index.php": { + "type": "-", + "size": 1279, + "lmtime": 0, + "modified": false + }, + "listing": {}, + "manufacturers.tpl": { + "type": "-", + "size": 1017, + "lmtime": 0, + "modified": false + }, + "_partials": {}, + "product.tpl": { + "type": "-", + "size": 8357, + "lmtime": 1731623211059, + "modified": false + }, + "suppliers.tpl": { + "type": "-", + "size": 1107, + "lmtime": 0, + "modified": false + } + }, + "sub": { + "product_info": { + "default.tpl": { + "type": "-", + "size": 8994, + "lmtime": 1736192537966, + "modified": false + } + } + } + }, + "assets": { + "css": { + "components": {}, + "dr_materac.css": { + "type": "-", + "size": 79857, + "lmtime": 1738786593694, + "modified": false + }, + "dr_materac.css.map": { + "type": "-", + "size": 225827, + "lmtime": 1738786593694, + "modified": false + }, + "dr_materac.css.sync-conflict-20231027-195928-EDGUH2C.map": { + "type": "-", + "size": 27783, + "lmtime": 0, + "modified": false + }, + "dr_materac.scss": { + "type": "-", + "size": 102781, + "lmtime": 1738786593113, + "modified": false + }, + "dr_materac.sync-conflict-20231027-195844-EDGUH2C.css": { + "type": "-", + "size": 69817, + "lmtime": 0, + "modified": false + }, + "dr_materac.sync-conflict-20231027-195912-EDGUH2C.scss": { + "type": "-", + "size": 88595, + "lmtime": 0, + "modified": false + }, + "index.php": { + "type": "-", + "size": 1277, + "lmtime": 0, + "modified": false + }, + "rtl.css": { + "type": "-", + "size": 61948, + "lmtime": 0, + "modified": false + }, + "theme.css": { + "type": "-", + "size": 433588, + "lmtime": 0, + "modified": false + }, + "theme.css.map": { + "type": "-", + "size": 1362031, + "lmtime": 0, + "modified": false + }, + "theme.scss": { + "type": "-", + "size": 640756, + "lmtime": 0, + "modified": false + } + } + }, + "modules": { + "appagebuilder": { + "views": { + "templates": { + "front": { + "details": { + "detail1526383012.tpl": { + "type": "-", + "size": 11323, + "lmtime": 1731623128924, + "modified": false + }, + "detail1526395446 kopia.tpl": { + "type": "-", + "size": 18621, + "lmtime": 1731623129011, + "modified": false + }, + "detail1526395446 — kopia.tpl": { + "type": "-", + "size": 18302, + "lmtime": 1731623129096, + "modified": false + }, + "detail1526395446.tpl": { + "type": "-", + "size": 29782, + "lmtime": 1738066843448, + "modified": false + }, + "detail1526396195.tpl": { + "type": "-", + "size": 11225, + "lmtime": 1731623182018, + "modified": false + }, + "detail1526396867.tpl": { + "type": "-", + "size": 11189, + "lmtime": 1731623172517, + "modified": false + }, + "detail1526404070.tpl": { + "type": "-", + "size": 11208, + "lmtime": 1731623162760, + "modified": false + }, + "detail1526404543.tpl": { + "type": "-", + "size": 10976, + "lmtime": 1731623152240, + "modified": false + }, + "detail1526406009.tpl": { + "type": "-", + "size": 11206, + "lmtime": 1731623139171, + "modified": false + }, + "detail1526475521.tpl": { + "type": "-", + "size": 5661, + "lmtime": 1731623129532, + "modified": false + }, + "detail1526484542.tpl": { + "type": "-", + "size": 10988, + "lmtime": 1731623129606, + "modified": false + }, + "index.php": { + "type": "-", + "size": 1279, + "lmtime": 1731623129675, + "modified": false + }, + "kopia_3lis2020.tpl": { + "type": "-", + "size": 23093, + "lmtime": 0, + "modified": false + } + }, + "index.php": { + "type": "-", + "size": 1307, + "lmtime": 0, + "modified": false + }, + "info": {}, + "products": {}, + "profiles": {} + } + } + } + }, + "ps_shoppingcart": { + "index.php": { + "type": "-", + "size": 1279, + "lmtime": 0, + "modified": false + }, + "modal.tpl": { + "type": "-", + "size": 4190, + "lmtime": 0, + "modified": false + }, + "ps_shoppingcart-product-line.tpl": { + "type": "-", + "size": 2515, + "lmtime": 0, + "modified": false + }, + "ps_shoppingcart.tpl": { + "type": "-", + "size": 1887, + "lmtime": 1734123383217, + "modified": false + }, + "ps_shoppingcart.tpl_old": { + "type": "-", + "size": 1765, + "lmtime": 1734123149568, + "modified": false + } + } + } + } + }, + "tmp": {}, + "tools": {}, + "translations": {}, + "upload": {}, + "var": { + "bootstrap.php.cache": { + "type": "-", + "size": 42870, + "lmtime": 0, + "modified": false + }, + "cache": {}, + ".htaccess": { + "type": "-", + "size": 170, + "lmtime": 0, + "modified": false + }, + "logs": { + "20250117_exception.log": { + "type": "-", + "size": 118, + "lmtime": 1737116666453, + "modified": false + }, + "dev.log": { + "type": "-", + "size": 1923553, + "lmtime": 1737116560166, + "modified": false + }, + "idn.log": { + "type": "-", + "size": 51120, + "lmtime": 1737116560272, + "modified": false + }, + "prod.log": { + "type": "-", + "size": 557716, + "lmtime": 1737116675579, + "modified": false + } + }, + "sessions": {}, + "SymfonyRequirements.php": { + "type": "-", + "size": 34008, + "lmtime": 0, + "modified": false + } + }, + "vendor": {}, + ".vscode": {}, + "webservice": {}, + "xml_feeds.php": { + "type": "-", + "size": 448, + "lmtime": 0, + "modified": false + } + } + }, + "lulandia.pl": { + "public_html": { + "1_en_0_sitemap.xml": { + "type": "-", + "size": 256550, + "lmtime": 0, + "modified": false + }, + "1_index_sitemap.xml": { + "type": "-", + "size": 460, + "lmtime": 0, + "modified": false + }, + "1_pl_0_sitemap.xml": { + "type": "-", + "size": 261664, + "lmtime": 0, + "modified": false + }, + "1_sk_0_sitemap.xml": { + "type": "-", + "size": 256561, + "lmtime": 0, + "modified": false + }, + "anu8jitxi6126hvh4r6h6l202t76mo.html": { + "type": "-", + "size": 30, + "lmtime": 0, + "modified": false + }, + "app": {}, + "autoload.php": { + "type": "-", + "size": 1230, + "lmtime": 0, + "modified": false + }, + "bin": {}, + "bridge_7GGkddwn.php": { + "type": "-", + "size": 171555, + "lmtime": 0, + "modified": false + }, + "bridge_YDFLbObb.php": { + "type": "-", + "size": 171555, + "lmtime": 0, + "modified": false + }, + "buy-by-phone.php": { + "type": "-", + "size": 3611, + "lmtime": 0, + "modified": false + }, + "cache": {}, + "calculate": {}, + "classes": {}, + "composer.lock": { + "type": "-", + "size": 292478, + "lmtime": 0, + "modified": false + }, + "config": {}, + "controllers": {}, + "cron-estella.php": { + "type": "-", + "size": 2399, + "lmtime": 0, + "modified": false + }, + "cron-promotion-lulandia.php": { + "type": "-", + "size": 1913, + "lmtime": 0, + "modified": false + }, + "docker-compose.yml": { + "type": "-", + "size": 878, + "lmtime": 0, + "modified": false + }, + "docs": {}, + "download": {}, + "error500.html": { + "type": "-", + "size": 2454, + "lmtime": 0, + "modified": false + }, + ".eslintignore": { + "type": "-", + "size": 90, + "lmtime": 0, + "modified": false + }, + ".eslintrc.js": { + "type": "-", + "size": 779, + "lmtime": 0, + "modified": false + }, + "fileType": { + "type": "-", + "size": 3, + "lmtime": 0, + "modified": false + }, + "franczyza-contact.php": { + "type": "-", + "size": 2194, + "lmtime": 0, + "modified": false + }, + "google-merchant_id-1.xml": { + "type": "-", + "size": 73460111, + "lmtime": 0, + "modified": false + }, + "google-merchant_id-2.xml": { + "type": "-", + "size": 2945129, + "lmtime": 0, + "modified": false + }, + ".htaccess": { + "type": "-", + "size": 7362, + "lmtime": 1740638765167, + "modified": false + }, + "iadmin": {}, + "image_log.json": { + "type": "-", + "size": 151245, + "lmtime": 0, + "modified": false + }, + "images.inc.php": { + "type": "-", + "size": 4733, + "lmtime": 0, + "modified": false + }, + "img": {}, + "import_log.txt": { + "type": "-", + "size": 25367, + "lmtime": 0, + "modified": false + }, + "import-product.php": { + "type": "-", + "size": 22080, + "lmtime": 0, + "modified": false + }, + "index.php": { + "type": "-", + "size": 1620, + "lmtime": 0, + "modified": false + }, + "info.php": { + "type": "-", + "size": 14, + "lmtime": 0, + "modified": false + }, + "init.php": { + "type": "-", + "size": 1168, + "lmtime": 0, + "modified": false + }, + "INSTALL.txt": { + "type": "-", + "size": 4943, + "lmtime": 0, + "modified": false + }, + "js": {}, + "LICENSES": { + "type": "-", + "size": 183529, + "lmtime": 0, + "modified": false + }, + "localization": {}, + "logs": {}, + "mails": {}, + "modules": {}, + "nov": {}, + "override": {}, + "package-lock.json": { + "type": "-", + "size": 66094, + "lmtime": 0, + "modified": false + }, + "pdf": {}, + ".php_cs.dist": { + "type": "-", + "size": 1009, + "lmtime": 0, + "modified": false + }, + "phpmailer": {}, + "plakat informacyjny DRM.pdf": { + "type": "-", + "size": 473470, + "lmtime": 0, + "modified": false + }, + "producer_descriptions": {}, + "przelewy24.txt": { + "type": "-", + "size": 2739, + "lmtime": 0, + "modified": false + }, + "pub": {}, + "robots.txt": { + "type": "-", + "size": 2723, + "lmtime": 0, + "modified": false + }, + "script.php": { + "type": "-", + "size": 534, + "lmtime": 0, + "modified": false + }, + "sitemaps": {}, + "sitemap_shop_2.xml": { + "type": "-", + "size": 548, + "lmtime": 0, + "modified": false + }, + "src": {}, + "stats.php": { + "type": "-", + "size": 1702, + "lmtime": 0, + "modified": false + }, + "test.php": { + "type": "-", + "size": 1807, + "lmtime": 0, + "modified": false + }, + "themes": {}, + "tools": {}, + "translations": {}, + "upload": {}, + "var": {}, + "vendor": {}, + "webservice": {}, + "xml_feeds.php": { + "type": "-", + "size": 448, + "lmtime": 0, + "modified": false + } + } + } + } + }, + "$version": 1 +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..87e88651 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,14 @@ +{ + "liveSassCompile.settings.formats": [ + { + "format": "compressed", + "extensionName": ".css", + "savePath": "", + "savePathSegmentKeys": null, + "savePathReplaceSegmentsWith": null + } + ], + "liveSassCompile.settings.generateMap": true, + "liveSassCompile.settings.autoprefix": "defaults", + "liveSassCompile.settings.watchOnLaunch": true +} \ No newline at end of file diff --git a/.vscode/sftp.json b/.vscode/sftp.json new file mode 100644 index 00000000..ab2394d5 --- /dev/null +++ b/.vscode/sftp.json @@ -0,0 +1,12 @@ +{ + "name": "dedyk8.cyber-folks.pl", + "host": "dedyk8.cyber-folks.pl", + "protocol": "ftp", + "port": 21, + "username": "www@drmaterac.pl", + "password": "0gK9-E-L+mFL@WRk", + "remotePath": "/domains/lulandia.pl/public_html/", + "uploadOnSave": false, + "useTempFile": false, + "openSsh": false +}