fix(prestashop): image edubox-prestashop fonctionne en local et derrière proxy

- edubox-tools.patch : getShopDomain/Ssl conservent les ports non standards
- edubox-configuration.patch : PS_SHOP_DOMAIN, _PS_BASE_URL_, PS_SSL_ENABLED… résolus dynamiquement
- edubox-shop-getbaseurl.patch : Shop::getBaseURL() utilise le host de la requête
- edubox-shopurl.patch : getMainShopDomain conserve les ports non standards
- edubox-clear-cache-init.sh : vidage des caches à chaque démarrage
- seed.ts : passage au tag 9-edubox-9
- README mis à jour avec les nouveaux patches
This commit is contained in:
EduBox Dev
2026-06-23 16:39:12 +00:00
parent 8a9deb8ebc
commit 73b561ed33
21 changed files with 651 additions and 1 deletions
+46
View File
@@ -0,0 +1,46 @@
--- a/classes/Link.php 2026-06-20 20:05:45.983104609 +0000
+++ b/classes/Link.php 2026-06-20 20:05:46.195748630 +0000
@@ -862,7 +862,7 @@
public function getAdminBaseLink($idShop = null, $ssl = null, $relativeProtocol = false)
{
if (null === $ssl) {
- $ssl = Configuration::get('PS_SSL_ENABLED');
+ $ssl = Tools::usingSecureMode();
}
if (Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE')) {
@@ -881,9 +881,10 @@
}
if ($relativeProtocol) {
- $base = '//' . ($ssl && $this->ssl_enable ? $shop->domain_ssl : $shop->domain);
+ $base = '//' . Tools::getHttpHost(false, false, false);
} else {
- $base = (($ssl && $this->ssl_enable) ? 'https://' . $shop->domain_ssl : 'http://' . $shop->domain);
+ $protocol = Tools::usingSecureMode() ? 'https://' : 'http://';
+ $base = $protocol . Tools::getHttpHost(false, false, false);
}
return $base . $shop->getBaseURI();
@@ -1391,7 +1392,7 @@
public function getBaseLink($idShop = null, $ssl = null, $relativeProtocol = false)
{
if (null === $ssl) {
- $ssl = Configuration::get('PS_SSL_ENABLED');
+ $ssl = Tools::usingSecureMode();
}
if (Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE') && $idShop !== null) {
@@ -1401,9 +1402,10 @@
}
if ($relativeProtocol) {
- $base = '//' . ($ssl && $this->ssl_enable ? $shop->domain_ssl : $shop->domain);
+ $base = '//' . Tools::getHttpHost(false, false, false);
} else {
- $base = (($ssl && $this->ssl_enable) ? 'https://' . $shop->domain_ssl : 'http://' . $shop->domain);
+ $protocol = Tools::usingSecureMode() ? 'https://' : 'http://';
+ $base = $protocol . Tools::getHttpHost(false, false, false);
}
return $base . $shop->getBaseURI();