Initial commit: custom PrestaShop 9 EduBox image

This commit is contained in:
2026-06-20 20:32:55 +00:00
commit d97a78e6b6
16 changed files with 466 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
--- a/classes/Tools.php
+++ b/classes/Tools.php
@@ -269,9 +269,7 @@
*/
public static function getShopDomain($http = false, $entities = false)
{
- if (!$domain = ShopUrl::getMainShopDomain()) {
- $domain = Tools::getHttpHost();
- }
+ $domain = Tools::getHttpHost(false, false, true);
if ($entities) {
$domain = htmlspecialchars($domain, ENT_COMPAT, 'UTF-8');
}
@@ -292,14 +290,12 @@
*/
public static function getShopDomainSsl($http = false, $entities = false)
{
- if (!$domain = ShopUrl::getMainShopDomainSSL()) {
- $domain = Tools::getHttpHost();
- }
+ $domain = Tools::getHttpHost(false, false, true);
if ($entities) {
$domain = htmlspecialchars($domain, ENT_COMPAT, 'UTF-8');
}
if ($http) {
- $domain = static::getProtocol((bool) Configuration::get('PS_SSL_ENABLED')) . $domain;
+ $domain = static::getProtocol(Tools::usingSecureMode()) . $domain;
}
return $domain;
@@ -2246,7 +2242,7 @@
$rewrite_settings = (int) Configuration::get('PS_REWRITING_SETTINGS', null, null, (int) $uri['id_shop']);
}
- $domain_rewrite_cond = 'RewriteCond %{HTTP_HOST} ^' . $domain . '$' . PHP_EOL;
+ $domain_rewrite_cond = ''; // EduBox: removed HTTP_HOST condition for dynamic domains
// Rewrite virtual multishop uri
if ($uri['virtual']) {
if (!$rewrite_settings) {