Add Creative Elements templates and update index files

- Introduced new templates for catalog, checkout, contact, and error pages.
- Implemented caching headers and redirection in index.php files across various directories.
- Enhanced product and layout templates for better integration with Creative Elements.
- Added backoffice header styles and scripts for improved UI/UX in the admin panel.
This commit is contained in:
2025-07-01 00:56:07 +02:00
parent f00cd5b992
commit 6cc26c0ed2
642 changed files with 213294 additions and 12 deletions

View File

@@ -0,0 +1,13 @@
# Apache 2.2
<IfModule !mod_authz_core.c>
<Files ~ "(?i)^.*\.webp$">
Allow from all
</Files>
</IfModule>
# Apache 2.4
<IfModule mod_authz_core.c>
<Files ~ "(?i)^.*\.webp$">
Require all granted
</Files>
</IfModule>

View File

@@ -0,0 +1,46 @@
<?php
/**
* Creative Elements - live Theme & Page Builder
*
* @author WebshopWorks
* @copyright 2019-2022 WebshopWorks.com
* @license One domain support license
*/
defined('_PS_VERSION_') or die;
if (Tools::getValue('field_id') !== '3' && basename($_SERVER['SCRIPT_NAME']) === 'dialog.php') {
return;
}
$ext_img[] = 'webp';
$mime_img[] = 'image/webp';
$mime_img[] = 'image/svg+xml';
$ext[] = 'webp';
$mime[] = 'image/webp';
$mime[] = 'image/svg+xml';
if (in_array(Tools::getValue('action'), ['rename_file', 'duplicate_file', 'delete_file'])) {
${'_POST'}['path'] = Tools::substr(${'_POST'}['path_thumb'], Tools::strlen($thumbs_base_path));
}
if (isset($_FILES['file']['name'])) {
if (!strcasecmp('svg', pathinfo($_FILES['file']['name'], PATHINFO_EXTENSION))) {
$svg = file_get_contents($_FILES['file']['tmp_name']);
if (!preg_match('/^<\?xml version="1\.\d+"(\s+encoding="[^"]+")?\s+\?\>/', $svg)) {
// SVG upload compatibility fix
file_put_contents($_FILES['file']['tmp_name'], '<?xml version="1.0" encoding="UTF-8"?>' . $svg);
}
}
register_shutdown_function(function () {
$error = error_get_last();
if ($error && stripos($error['message'], '.webp is missing or invalid') !== false) {
// Ignore WEBP thumbnail generation error
http_response_code(200);
}
});
}

View File

@@ -0,0 +1,8 @@
<?php
header('Expires: Thu, 28 Feb 2019 00:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../../../../');
die;