Subida del módulo y tema de PrestaShop

This commit is contained in:
Kaloyan
2026-04-09 18:31:51 +02:00
parent 12c253296f
commit 16b3ff9424
39262 changed files with 7418797 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>ps_classic_edition</name>
<displayName><![CDATA[PrestaShop Classic Edition]]></displayName>
<version><![CDATA[1.0.2]]></version>
<description><![CDATA[PrestaShop Classic Edition.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[administration]]></tab>
<is_configurable>0</is_configurable>
<need_instance>0</need_instance>
</module>

View File

@@ -0,0 +1,28 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License version 3.0
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,2 @@
imports:
- { resource: ../routes.yml }

View File

@@ -0,0 +1,11 @@
imports:
- { resource: ../services.yml }
services:
PrestaShop\Module\PsClassicEdition\Controller\:
resource: "%kernel.project_dir%/modules/ps_classic_edition/src/Controller/*"
autoconfigure: true
autowire: true
exclude:
# Exclude this protection file that contains no class and breaks the service loading process
- "%kernel.project_dir%/modules/ps_classic_edition/src/Controller/index.php"

View File

@@ -0,0 +1,28 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License version 3.0
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,5 @@
services:
_defaults:
public: true
PrestaShop\Module\PsClassicEdition\Presenter\SetupGuideDataPresenter: ~

View File

@@ -0,0 +1,45 @@
ps_classic_edition_homepage:
path: psclassicedition/homepage
methods: [GET, POST]
defaults:
_controller: PrestaShop\Module\PsClassicEdition\Controller\AdminPsClassicEditionHomepageController::indexAction
_legacy_controller: "AdminPsClassicEditionHomepageController"
_legacy_link: "AdminPsClassicEditionHomepageController"
ps_classic_edition_setup_guide_api:
path: /psclassicedition/setup-guide/api/
methods: [GET, POST, PUT, PATCH]
ps_classic_edition_setup_guide_api_index:
path: psclassicedition/setup-guide/api/index
methods: [GET]
defaults:
_controller: PrestaShop\Module\PsClassicEdition\Controller\AdminPsClassicEditionSetupGuideController::fetchInitialDatas
ps_classic_edition_setup_guide_api_edit:
path: psclassicedition/setup-guide/api/edit
methods: [PATCH]
defaults:
_controller: PrestaShop\Module\PsClassicEdition\Controller\AdminPsClassicEditionSetupGuideController::editStep
ps_classic_edition_setup_guide_api_modal_hidden:
path: psclassicedition/setup-guide/api/modal-hidden
methods: [POST]
defaults:
_controller: PrestaShop\Module\PsClassicEdition\Controller\AdminPsClassicEditionSetupGuideController::storeModalIsHidden
ps_classic_edition_setup_guide_api_delete:
path: psclassicedition/setup-guide/api/delete/{stepName}
methods: [DELETE]
defaults:
_controller: PrestaShop\Module\PsClassicEdition\Controller\AdminPsClassicEditionSetupGuideController::deleteStep
requirements:
stepName: "[a-z-]+"
ps_classic_edition_ps_academy:
path: psclassicedition/ps-academy
methods: [GET]
defaults:
_controller: PrestaShop\Module\PsClassicEdition\Controller\AdminPsClassicEditionPsAcademyController::getProducts
_legacy_controller: "AdminPsClassicEditionPsAcademyController"
_legacy_link: "AdminPsClassicEditionPsAcademyController"

View File

@@ -0,0 +1,26 @@
imports:
- { resource: ./presenters.yml }
services:
_defaults:
public: true
ps_classic_edition.module:
class: ps_classic_edition
factory: ["Module", "getInstanceByName"]
arguments:
- "ps_classic_edition"
ps_classic_edition.ps_accounts.installer:
class: 'PrestaShop\PsAccountsInstaller\Installer\Installer'
arguments:
- "5.2.5"
ps_classic_edition.ps_accounts.facade:
class: 'PrestaShop\PsAccountsInstaller\Installer\Facade\PsAccounts'
arguments:
- "@ps_classic_edition.ps_accounts.installer"
PrestaShop\Module\PsClassicEdition\Helper\PsAccountHelper:
autowire: true
public: true

View File

@@ -0,0 +1,9 @@
<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,11 @@
<?php
include_once _PS_INSTALL_PATH_ . '/theme/views/footer.php';
?>
<div style="text-align: center;">
<?php echo $this->translator->trans('Any questions? Were here to help. Visit the [1]Help Center[/1] or [2]contact us[/2].', [
'[1]' => '<a href="https://help-center.prestashop.com/" target="_blank" rel="noopener noreferrer">',
'[/1]' => '</a>',
'[2]' => '<a href="https://care-center.prestashop.com/contact-us" target="_blank" rel="noopener noreferrer">',
'[/2]' => '</a>',
], 'Install'); ?>
</div>

View File

@@ -0,0 +1,11 @@
<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -0,0 +1,12 @@
[
"AdminPsClassicEditionHomepageController",
"AdminDashboard",
"AdminParentOrders",
"AdminCatalog",
"AdminParentCustomer",
"AdminParentCustomerThreads",
"AdminStats",
"AdminParentModulesSf",
"AdminParentThemes",
"Marketing"
]

View File

@@ -0,0 +1,123 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License version 3.0
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
*/
declare(strict_types=1);
use PrestaShop\Module\PsClassicEdition\Install\Tabs\TabsInstaller;
use PrestaShop\Module\PsClassicEdition\Install\Tabs\TabsUninstaller;
define('PS_CLASSIC_EDITION_SETTINGS_WHITE_LIST', json_decode(file_get_contents(__DIR__ . '/settingsWhiteList.json'), true));
define('PS_CLASSIC_EDITION_SETTINGS_BLACK_LIST', json_decode(file_get_contents(__DIR__ . '/settingsBlackList.json'), true));
define('PS_CLASSIC_EDITION_MENU_WHITE_LIST', json_decode(file_get_contents(__DIR__ . '/menuWhiteList.json'), true));
if (!defined('_PS_VERSION_')) {
exit;
}
if (file_exists(__DIR__ . '/vendor/autoload.php')) {
require_once __DIR__ . '/vendor/autoload.php';
}
class ps_classic_edition extends Module
{
use PrestaShop\Module\PsClassicEdition\Traits\UseHooks;
private string $userflow_id;
public function __construct()
{
$this->name = 'ps_classic_edition';
$this->version = '1.0.2';
$this->tab = 'administration';
$this->author = 'PrestaShop';
$this->need_instance = 0;
$this->ps_versions_compliancy = ['min' => '9.0.0', 'max' => _PS_VERSION_];
$this->module_key = '5530785cbb44445d52d2a98f8ff6d309';
parent::__construct();
$this->displayName = $this->trans('PrestaShop Classic Edition', [], 'Modules.Classicedition.Admin');
$this->description = $this->trans('PrestaShop Classic Edition.', [], 'Modules.Classicedition.Admin');
$this->userflow_id = 'ct_55jfryadgneorc45cjqxpbf6o4';
$this->bootstrap = true;
}
/**
* This function is required in order to make module compatible with new translation system.
*
* @return bool
*/
public function isUsingNewTranslationSystem(): bool
{
return true;
}
public function install(): bool
{
$this->uninstallBasicEditionModule();
$installed =
parent::install()
&& (new TabsInstaller($this->name, $this->getTranslator()))->run()
&& $this->registerHook($this->getHooksNames())
;
if (!$installed) {
return false;
}
// We hide the setup guide by default on install, if we want to enable it again later
// we'll just have to remove this line
Configuration::updateGlobalValue('PS_SETUP_GUIDE_MODAL_IS_HIDDEN', 1);
return true;
}
/**
* @throws Exception
*/
public function uninstall(): bool
{
return parent::uninstall()
&& (new TabsUninstaller($this->name))->run();
}
public function disable($force_all = false): bool
{
return parent::disable($force_all)
&& (new TabsUninstaller($this->name))->run();
}
/**
* @throws Exception
*/
public function enable($force_all = false): bool
{
return parent::enable($force_all)
&& (new TabsInstaller($this->name, $this->getTranslator()))->run();
}
protected function uninstallBasicEditionModule(): void
{
$oldModule = Module::getInstanceByName('ps_edition_basic');
if ($oldModule) {
$oldModule->uninstall();
}
}
}

View File

@@ -0,0 +1 @@
["Multistore"]

View File

@@ -0,0 +1,11 @@
[
"AdminSmbEditionManageDomainNameController",
"AdminPsxlegalassistantController",
"AdminSmbEditionManageSubscriptionController",
"AdminParentShipping",
"AdminParentPayment",
"AdminInternational",
"ShopParameters",
"AdminAdvancedParameters",
"AdminNtbackupandrestore"
]

View File

@@ -0,0 +1,95 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
*/
declare(strict_types=1);
namespace PrestaShop\Module\PsClassicEdition\Controller;
use PrestaShop\Module\PsClassicEdition\Helper\PsAccountHelper;
use PrestaShop\PrestaShop\Adapter\LegacyContext;
use PrestaShopBundle\Controller\Admin\PrestaShopAdminController;
use Symfony\Component\DependencyInjection\Attribute\Autowire;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
class AdminPsClassicEditionHomepageController extends PrestaShopAdminController
{
public static function getSubscribedServices(): array
{
return parent::getSubscribedServices() + [
'psAccountService' => '?PrestaShop\Module\PsAccounts\Service\PsAccountsService',
];
}
public function indexAction(
Request $request,
PsAccountHelper $psAccountHelper,
#[Autowire(service: 'ps_classic_edition.module')]
\ps_classic_edition $modulePsClassicEdition,
LegacyContext $legacyContext,
): Response {
if (!$this->getEmployeeContext()->isSuperAdmin()) {
return $this->redirect($legacyContext->getContext()->link->getAdminLink('AdminDashboard'));
}
/**
* @var string|string[]
*/
$shopCountry = $this->getCountryContext()->getIsoCode();
if (is_array($shopCountry)) { // Country might be an array
$shopCountry = $shopCountry[array_key_first($shopCountry)] ?? '';
}
$shopCountry = strtolower($shopCountry);
$setupGuideApiUrl = $this->generateUrl('ps_classic_edition_setup_guide_api_index', [], UrlGeneratorInterface::ABSOLUTE_URL);
$setupGuideApiUrlEdit = $this->generateUrl('ps_classic_edition_setup_guide_api_edit', [], UrlGeneratorInterface::ABSOLUTE_URL);
$setupGuideApiUrlModalHidden = $this->generateUrl('ps_classic_edition_setup_guide_api_modal_hidden', [], UrlGeneratorInterface::ABSOLUTE_URL);
$psAcademyApiUrl = $this->generateUrl('ps_classic_edition_ps_academy', [], UrlGeneratorInterface::ABSOLUTE_URL);
$psAccountsSettings = $psAccountHelper->loadAccountSettings();
return $this->render('@Modules/ps_classic_edition/views/templates/admin/homepage.html.twig', [
'layoutTitle' => $this->trans('Care Center', [], 'Modules.Classicedition.Admin'),
'urlAccountsCdn' => $psAccountsSettings['urlAccountsCdn'],
'enableSidebar' => true,
'jsContext' => json_encode([
'SETUP_GUIDE_API_URL' => $setupGuideApiUrl,
'SETUP_GUIDE_API_URL_EDIT' => $setupGuideApiUrlEdit,
'SETUP_GUIDE_API_URL_MODAL_HIDDEN' => $setupGuideApiUrlModalHidden,
'SETUP_GUIDE_MODAL_IS_HIDDEN' => (bool) $this->getConfiguration()->get('PS_SETUP_GUIDE_MODAL_IS_HIDDEN'),
'PS_CLASSIC_EDITION_PS_ACADEMY_API_URL' => $psAcademyApiUrl,
'moduleName' => $modulePsClassicEdition->displayName,
'moduleSlug' => $modulePsClassicEdition->name,
'moduleVersion' => $modulePsClassicEdition->version,
'userToken' => $psAccountsSettings['accountUserToken'],
'psAccountShopID' => $psAccountsSettings['psShopID'],
'psAccountID' => $psAccountsSettings['psAccountID'],
'shopName' => (string) $this->getConfiguration()->get('PS_SHOP_NAME'),
'callBack' => [
'isCalledBack' => (bool) $this->getConfiguration()->get('PS_IS_CALLED_BACK'),
],
'locale' => $this->getLanguageContext()->getIsoCode(),
'shopCountry' => $shopCountry,
'baseUrl' => $request->getBaseUrl(),
]),
]);
}
}

View File

@@ -0,0 +1,147 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
*/
declare(strict_types=1);
namespace PrestaShop\Module\PsClassicEdition\Controller;
use PrestaShopBundle\Controller\Admin\PrestaShopAdminController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Contracts\Cache\CacheInterface;
use Symfony\Contracts\Cache\ItemInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;
class AdminPsClassicEditionPsAcademyController extends PrestaShopAdminController
{
public function __construct(
private readonly HttpClientInterface $httpClient,
private readonly CacheInterface $cache,
) {
}
/**
* Handle the call back requests
*
* @return JsonResponse
*/
public function getProducts(): JsonResponse
{
$isoCode = strtolower($this->getLanguageContext()->getIsoCode());
$psAcademyLangId = match ($isoCode) {
'fr' => 1,
'es' => 3,
'it' => 4,
// Default is en
default => 2,
};
$cachedProducts = $this->cache->get('ps_academy_products_' . $isoCode, function (ItemInterface $item, bool &$save) use ($psAcademyLangId) {
$products = [];
$ids = $this->getProductsId($psAcademyLangId);
if (!empty($ids)) {
foreach ($ids as $id) {
$response = $this->httpClient->request('GET', 'https://care-center.prestashop.com/api/products/' . $id . '?ws_key=QG8Z1KD7HAYMAPKK1FR2DKXUIF9LTRJE&output_format=JSON&id_lang=' . $psAcademyLangId);
$httpStatusCode = $response->getStatusCode();
if ($httpStatusCode <= 300) {
$responseContents = json_decode($response->getContent(), true);
$tempObject = $this->createObjectFromResponse($responseContents['product']);
array_push($products, $tempObject);
}
}
}
if (!empty($products)) {
$item->expiresAfter(\DateInterval::createFromDateString('1 day'));
} else {
$save = false;
}
return $products;
});
return new JsonResponse($cachedProducts);
}
private function getProductsId(int $psAcademyLangId): array
{
$responseVideoHosted = $this->httpClient->request(
'GET',
'https://care-center.prestashop.com/api/products?filter[mpn]=[videoHosted]&ws_key=QG8Z1KD7HAYMAPKK1FR2DKXUIF9LTRJE&output_format=JSON&id_lang=' . $psAcademyLangId,
);
$responseLiveHosted = $this->httpClient->request(
'GET',
'https://care-center.prestashop.com/api/products?filter[mpn]=[liveHosted]&ws_key=QG8Z1KD7HAYMAPKK1FR2DKXUIF9LTRJE&output_format=JSON&id_lang=' . $psAcademyLangId,
);
$responseContentsVideoHosted = json_decode($responseVideoHosted->getContent(), true);
$responseContentsLiveHosted = json_decode($responseLiveHosted->getContent(), true);
$httpStatusCodeVideoHosted = $responseVideoHosted->getStatusCode();
$httpStatusCodeLiveHosted = $responseLiveHosted->getStatusCode();
if ($httpStatusCodeVideoHosted >= 400 || $httpStatusCodeLiveHosted >= 400) {
return [];
}
return array_column(array_merge($responseContentsLiveHosted['products'], $responseContentsVideoHosted['products']), 'id');
}
private function createObjectFromResponse(array $response): array
{
$locale = 'gb';
$contextIsoCode = $this->getLanguageContext()->getIsoCode();
if ($contextIsoCode) {
$locale = $contextIsoCode;
$availableLang = ['fr', 'it', 'es'];
if ($locale === 'en' || !in_array($locale, $availableLang)) {
$locale = 'gb';
}
}
$langIds = [
'fr' => 0,
'gb' => 1,
'es' => 2,
'it' => 3,
];
$responseCategory = $this->httpClient->request('GET', 'https://care-center.prestashop.com/api/categories/' . $response['id_category_default'] . '?ws_key=QG8Z1KD7HAYMAPKK1FR2DKXUIF9LTRJE&output_format=JSON');
$httpStatusCode = $responseCategory->getStatusCode();
if ($httpStatusCode > 300) {
return [];
}
$responseContents = json_decode($responseCategory->getContent(), true);
$category = $responseContents['category']['link_rewrite'][$langIds[$locale]]['value'];
$link_rewrite = $response['link_rewrite'][$langIds[$locale]]['value'];
$productUrl = 'https://care-center.prestashop.com/' . $locale . '/' . $category . '/' . $response['id'] . '-' . $link_rewrite . '.html';
$tmp = [
'name' => $response['name'][$langIds[$locale]]['value'],
'description' => $response['description'][$langIds[$locale]]['value'],
'url' => $productUrl,
];
return $tmp;
}
}

View File

@@ -0,0 +1,112 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
*/
declare(strict_types=1);
namespace PrestaShop\Module\PsClassicEdition\Controller;
use PrestaShop\Module\PsClassicEdition\Presenter\SetupGuideDataPresenter;
use PrestaShopBundle\Controller\Admin\PrestaShopAdminController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
class AdminPsClassicEditionSetupGuideController extends PrestaShopAdminController
{
/**
* Get the steps for the setup guide
*
* @return JsonResponse
*/
public function fetchInitialDatas(
SetupGuideDataPresenter $setupGuideDataPresenter,
): JsonResponse {
return new JsonResponse($this->getInitialDatas($setupGuideDataPresenter));
}
/**
* Edit the steps for the setup guide
*
* @param $stepName string
*
* @return JsonResponse
*/
public function editStep(Request $request): JsonResponse
{
$requestBodyContent = (array) json_decode((string) $request->getContent(false), true);
$step = $requestBodyContent['step'];
$stepName = isset($step['name']) ? $step['name'] : '';
$isUserCompleted = isset($step['isUserCompleted']) && $step['isUserCompleted'] ? 1 : 0;
$uc_stepName = \Tools::strtoupper($stepName);
$type = in_array($uc_stepName, ['ACCOUNT']) ? 'AUTO' : 'USER';
$this->getConfiguration()->set("PS_SETUP_GUIDE_STEP_{$uc_stepName}_{$type}_COMPLETED", $isUserCompleted);
return new JsonResponse([
'stepName' => $stepName,
]);
}
/**
* Store modal hidden status for the setup guide
*
* @return JsonResponse
*/
public function storeModalIsHidden(Request $request): JsonResponse
{
$requestBodyContent = (array) json_decode((string) $request->getContent(false), true);
$modalIsHidden = $requestBodyContent['modalIsHidden'];
$this->getConfiguration()->set('PS_SETUP_GUIDE_MODAL_IS_HIDDEN', $modalIsHidden);
return new JsonResponse([
'modalIsHidden' => $modalIsHidden,
]);
}
/**
* Delete the steps for the setup guide
*
* @param $stepName string
*
* @return JsonResponse
*/
public function deleteStep(Request $request, string $stepName): JsonResponse
{
$uc_stepName = \Tools::strtoupper($stepName);
$type = in_array($uc_stepName, ['ACCOUNT']) ? 'AUTO' : 'USER';
$this->getConfiguration()->set("PS_SETUP_GUIDE_STEP_{$uc_stepName}_{$type}_COMPLETED", false);
return new JsonResponse([
'stepName' => $stepName,
]);
}
private function getInitialDatas(SetupGuideDataPresenter $setupGuideDataPresenter): array
{
return [
'isHidden' => (bool) $this->getConfiguration()->get('PS_SETUP_GUIDE_MODAL_IS_HIDDEN'),
'steps' => $setupGuideDataPresenter->getSetupGuideData(),
];
}
}

View File

@@ -0,0 +1,28 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License version 3.0
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,83 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
*/
namespace PrestaShop\Module\PsClassicEdition\Helper;
use PrestaShop\PsAccountsInstaller\Installer\Facade\PsAccounts as PsAccountsFacade;
use PrestaShop\PsAccountsInstaller\Installer\Installer;
use Symfony\Component\DependencyInjection\Attribute\Autowire;
/**
* Service in charge of fetching PrestaShop Accounts data by mixing the data from multiple services.
*/
class PsAccountHelper
{
public function __construct(
#[Autowire(service: 'ps_classic_edition.ps_accounts.installer')]
private readonly Installer $accountsInstaller,
#[Autowire(service: 'ps_classic_edition.ps_accounts.facade')]
private readonly PsAccountsFacade $psAccountsFacade,
#[Autowire(service: 'ps_classic_edition.module')]
private readonly \ps_classic_edition $modulePsClassicEdition,
) {
}
public function loadAccountSettings(): array
{
$psAccountID = '';
$psShopID = '';
$accountUserToken = '';
$urlAccountsCdn = '';
$psAccountService = null;
try {
// Install account module automatically
$this->accountsInstaller->install();
$psAccountService = $this->psAccountsFacade->getPsAccountsService();
} catch (\Throwable) {
}
if ($psAccountService) {
try {
$employeeAccount = $psAccountService->getEmployeeAccount();
$psAccountID = ($employeeAccount ? $employeeAccount->getUid() : $psAccountService->getUserUuid());
$psShopID = $psAccountService->getShopUuid();
$urlAccountsCdn = $psAccountService->getAccountsCdn();
// New method starting from PS Accounts 7.1.1
if (method_exists($psAccountService, 'getShopToken')) {
$accountUserToken = strval($psAccountService->getShopToken());
} elseif (method_exists($psAccountService, 'getOrRefreshToken')) {
$accountUserToken = strval($psAccountService->getOrRefreshToken());
}
} catch (\Throwable) {
}
}
\Media::addJsDef([
'contextPsAccounts' => $this->psAccountsFacade->getPsAccountsPresenter()->present($this->modulePsClassicEdition->name),
]);
return [
'psAccountID' => $psAccountID ?: '',
'psShopID' => $psShopID ?: '',
'accountUserToken' => $accountUserToken ?: '',
'urlAccountsCdn' => $urlAccountsCdn ?: '',
];
}
}

View File

@@ -0,0 +1,141 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
*/
declare(strict_types=1);
namespace PrestaShop\Module\PsClassicEdition\Helper;
class SetupGuideHelper
{
public const DOMAINS_WHITE_LIST = [
'localhost',
'.mydada.shop',
'.mypresta.shop',
];
/**
* Check if the domain name has been changed
*
* @return bool
*/
public static function checklistDomain(): bool
{
return !array_filter(self::DOMAINS_WHITE_LIST, function ($domain) {
return strpos($_SERVER['SERVER_NAME'], $domain) !== false;
});
}
/**
* Check if a product has been created
*
* @return bool
*/
public static function checklistProduct(): bool
{
$products = \Product::getProducts(\Context::getContext()->language->id, 0, 0, 'id_product', 'ASC');
$products = array_filter($products, function ($product) {
return strpos($product['reference'], 'demo_') === false;
});
$product_count = count($products);
return $product_count > 0;
}
/**
* Check if account is linked
*
* @return bool
*/
public static function checklistAccount(): bool
{
try {
return (bool) \Configuration::get('PS_SETUP_GUIDE_STEP_ACCOUNT_AUTO_COMPLETED');
} catch (\Exception $e) {
return false;
}
}
/**
* Check if the shop logo has been changed
*
* @return bool
*/
public static function checklistLogo(): bool
{
return \Configuration::get('PS_LOGO') !== 'logo.png';
}
/**
* Check if a step is completed
*
* @param string $stepName
*
* @return bool
*/
public static function isStepCompleted(string $stepName): bool
{
return self::isStepUserCompleted($stepName) || self::isStepAutoCompleted($stepName);
}
/**
* Check if a step is completed by the user
*
* @param string $stepName
*
* @return bool
*/
public static function isStepUserCompleted(string $stepName): bool
{
return self::getStepUserCompletedStatus($stepName);
}
/**
* Check if a step is auto-completed
*
* @param string $stepName
*
* @return bool
*/
public static function isStepAutoCompleted(string $stepName): bool
{
$method = 'checklist' . ucfirst($stepName);
if (!method_exists(self::class, $method)) {
return false;
}
return self::$method();
}
/**
* Get the user completed status of a step
*
* @param string $stepName
*
* @return bool
*/
public static function getStepUserCompletedStatus(string $stepName): bool
{
$uc_stepName = \Tools::strtoupper($stepName);
return (bool) \Configuration::get("PS_SETUP_GUIDE_STEP_{$uc_stepName}_USER_COMPLETED");
}
}

View File

@@ -0,0 +1,28 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License version 3.0
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,59 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License version 3.0
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
*/
declare(strict_types=1);
namespace PrestaShop\Module\PsClassicEdition\Install\Tabs;
class Tabs
{
/**
* Get module tabs information for installation
*
* @return array<int, array<string, mixed>>
*/
public static function getTabs(): array
{
return [
[
'class_name' => 'HOME',
'route_name' => '',
'icon' => '',
'parent' => '',
'position' => 0,
'active' => true,
'enabled' => true,
'wording' => 'Welcome',
'wording_domain' => 'Modules.Classicedition.Admin',
],
[
'class_name' => 'AdminPsClassicEditionHomepageController',
'route_name' => 'ps_classic_edition_homepage',
'icon' => 'support_agent',
'parent' => 'HOME',
'position' => 0,
'active' => true,
'enabled' => true,
'wording' => 'Care Center',
'wording_domain' => 'Modules.Classicedition.Admin',
],
];
}
}

View File

@@ -0,0 +1,84 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
*/
declare(strict_types=1);
namespace PrestaShop\Module\PsClassicEdition\Install\Tabs;
use Symfony\Contracts\Translation\TranslatorInterface;
use Tab;
class TabsInstaller
{
public function __construct(
private string $moduleName,
private TranslatorInterface $translator,
) {
}
public function run(): bool
{
return $this->installTabs();
}
public function installTabs(): bool
{
$result = true;
$tabs = Tabs::getTabs();
foreach ($tabs as $tabItem) {
$tabId = \Tab::getIdFromClassName($tabItem['class_name']);
if (!$tabId) {
$tabId = null;
}
$tab = new \Tab($tabId);
$tab->id_parent = $tabItem['parent'] ? \Tab::getIdFromClassName($tabItem['parent']) : 0;
$tab->class_name = $tabItem['class_name'];
$tab->route_name = $tabItem['route_name'];
$tab->icon = $tabItem['icon'];
$tab->active = $tabItem['active'];
$tab->enabled = $tabItem['enabled'];
$tab->module = $this->moduleName;
$tab->wording = $tabItem['wording'];
$tab->wording_domain = $tabItem['wording_domain'];
$tab->name = [];
$languages = \Language::getLanguages(false);
foreach ($languages as $language) {
$tab->name[(int) $language['id_lang']] = $this->translator->trans($tabItem['wording'], [], $tabItem['wording_domain'], $language['locale']);
}
$result = $result && $tab->save();
$tab->updatePosition(false, $tabItem['position']);
}
// Update homepage tab position
$tab = new \Tab(\Tab::getIdFromClassName('AdminDashboard'));
$tab->id_parent = \Tab::getIdFromClassName('HOME');
$tab->save();
$tab->updatePosition(false, 0);
return $result;
}
}

View File

@@ -0,0 +1,74 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
*/
declare(strict_types=1);
namespace PrestaShop\Module\PsClassicEdition\Install\Tabs;
class TabsUninstaller
{
/**
* @var string
*/
private $moduleName;
public function __construct(string $moduleName)
{
$this->moduleName = $moduleName;
}
public function run(): bool
{
return $this->uninstallTabs();
}
public function uninstallTabs(): bool
{
$result = true;
// Update employees default tab to dashboard if they wre on classic homepage
$homepageTab = new \Tab(\Tab::getIdFromClassName('AdminPsClassicEditionHomepageController'));
$dashboardTab = new \Tab(\Tab::getIdFromClassName('AdminDashboard'));
if (!empty($homepageTab->id) && !empty($dashboardTab->id)) {
\Db::getInstance()->execute('UPDATE ' . _DB_PREFIX_ . "employee SET default_tab = '$dashboardTab->id' WHERE default_tab = '$homepageTab->id';");
}
foreach (['HOME', 'AdminPsClassicEditionHomepageController', 'AdminPsClassicEditionSettingsController'] as $tabItemClassName) {
$id_tab = (int) \Tab::getIdFromClassName($tabItemClassName);
$tab = new \Tab($id_tab);
if (\Validate::isLoadedObject($tab) && $tab->module === $this->moduleName) {
$result = $result && $tab->delete();
}
}
// Reset Dashboard initial position
if (!empty($dashboardTab->id)) {
$dashboardTab->id_parent = 0;
$dashboardTab->save();
// Must be done in two calls because the position is forced when the parent is changed
$dashboardTab->position = 0;
$dashboardTab->save();
}
return $result;
}
}

View File

@@ -0,0 +1,11 @@
<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,11 @@
<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,307 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
*/
declare(strict_types=1);
namespace PrestaShop\Module\PsClassicEdition\Presenter;
use PrestaShop\Module\PsClassicEdition\Helper\SetupGuideHelper;
use PrestaShop\PrestaShop\Adapter\SymfonyContainer;
use PrestaShopBundle\Translation\TranslatorInterface;
use Psr\Container\ContainerInterface;
class SetupGuideDataPresenter
{
/**
* @var ContainerInterface
*/
protected $container;
/**
* @var TranslatorInterface
*/
public $translator;
/**
* @var false|\Module
*/
public $psAccounts;
public function __construct()
{
$this->translator = \Context::getContext()->getTranslator();
$this->psAccounts = \Module::getInstanceByName('ps_accounts');
}
/**
* Get setup guide datas.
*
* @return array
*/
public function getSetupGuideData(): array
{
$router = $this->get('router');
$response = [];
array_push($response, $this->buildStep(
'account',
'onb.homepage.setupGuide.account.title',
[
[
'description' => '',
'documentation' => [
'cta' => 'onb.homepage.setupGuide.account.documentation.cta',
'href' => 'onb.homepage.setupGuide.account.documentation.href',
],
'buttons' => [],
],
],
true
));
array_push($response, $this->buildStep(
'product',
'onb.homepage.setupGuide.product.title',
[
[
'description' => 'onb.homepage.setupGuide.product.description',
'documentation' => [
'cta' => 'onb.homepage.setupGuide.product.documentation.cta',
'href' => 'onb.homepage.setupGuide.product.documentation.href',
],
'buttons' => [
[
'cta' => 'onb.homepage.setupGuide.product.button.cta',
'href' => $router->generate('admin_product_catalog'),
'userflow_id' => '0a517acb-531a-4aeb-ab8a-b850ddbfdf70', // TODO: get from parameters
],
],
],
]
));
array_push($response, $this->buildStep(
'payment',
'onb.homepage.setupGuide.payment.title',
[
[
'description' => 'onb.homepage.setupGuide.payment.description',
'documentation' => [
'cta' => 'onb.homepage.setupGuide.payment.documentation.cta',
'href' => 'onb.homepage.setupGuide.payment.documentation.href',
],
'buttons' => [
[
'cta' => 'onb.homepage.setupGuide.payment.button.cta',
'href' => $router->generate('admin_payment_methods'),
'userflow_id' => 'fea1c94c-591b-4c44-b05d-8236ec30c3e4',
],
],
],
]
));
array_push($response, $this->buildStep(
'shipping',
'onb.homepage.setupGuide.shipping.title',
[
[
'description' => 'onb.homepage.setupGuide.shipping.description',
'documentation' => [
'cta' => 'onb.homepage.setupGuide.shipping.documentation.cta',
'href' => 'onb.homepage.setupGuide.shipping.documentation.href',
],
'buttons' => [
[
'cta' => 'onb.homepage.setupGuide.shipping.button.skip',
'href' => '#',
'variant' => 'secondary',
'skip' => true,
],
[
'cta' => 'onb.homepage.setupGuide.shipping.button.cta',
'href' => \Context::getContext()->link->getAdminLink('AdminCarriers'),
'userflow_id' => 'e085ee0c-cecf-4ba6-8a70-3f4310790dbf',
],
],
],
]
));
try {
if (\Module::isInstalled('psxlegalassistant') && \Module::isEnabled('psxlegalassistant') && $router->generate('psxlegalassistant_main_page')) {
array_push($response, $this->buildStep(
'legal',
'onb.homepage.setupGuide.legal.title',
[
[
'description' => 'onb.homepage.setupGuide.legal.description',
'documentation' => [
'cta' => 'onb.homepage.setupGuide.legal.documentation.cta',
'href' => 'onb.homepage.setupGuide.legal.documentation.href',
],
'buttons' => [
[
'cta' => 'onb.homepage.setupGuide.legal.button.cta',
'href' => $router->generate('psxlegalassistant_main_page'),
'userflow_id' => '66ceeb79-9663-45f8-9276-b4b23ae750d6',
],
],
],
]
));
}
} catch (\Exception $e) {
}
$contentLogoAndTheme = [];
try {
$contentLogoAndTheme = [
[
'subtitle' => 'onb.homepage.setupGuide.logo.subtitle',
'description' => 'onb.homepage.setupGuide.logo.description',
'documentation' => [
'cta' => 'onb.homepage.setupGuide.logo.documentation.cta',
'href' => 'onb.homepage.setupGuide.logo.documentation.href',
],
'buttons' => [
[
'cta' => 'onb.homepage.setupGuide.logo.button.cta',
'href' => \Module::isInstalled('psxdesign') && \Module::isEnabled('psxdesign') && $router->generate('admin_logos_index') ? $router->generate('admin_logos_index') : $router->generate('admin_themes_index'),
'userflow_id' => '02f43ff1-f2ff-4ab6-9480-2229b2524f7c',
],
],
],
];
} catch (\Exception $e) {
}
try {
if (\Module::isInstalled('psxdesign') && \Module::isEnabled('psxdesign') && $router->generate('admin_psxdesign_themes_index')) {
array_push($contentLogoAndTheme,
[
'subtitle' => 'onb.homepage.setupGuide.psxdesign.subtitle',
'description' => 'onb.homepage.setupGuide.psxdesign.description',
'documentation' => [
'cta' => 'onb.homepage.setupGuide.psxdesign.documentation.cta',
'href' => 'onb.homepage.setupGuide.psxdesign.documentation.href',
'variant' => 'secondary',
],
'buttons' => [
[
'cta' => 'onb.homepage.setupGuide.psxdesign.button.cta',
'href' => $router->generate('admin_psxdesign_themes_index'),
'userflow_id' => '1262b67b-ab4b-49ad-8fa2-e6a5a9e7f8ad',
],
],
]
);
}
} catch (\Exception $e) {
}
array_push($response, $this->buildStep(
'logo-and-theme',
'onb.homepage.setupGuide.logo.title',
$contentLogoAndTheme
));
return $response;
}
/**
* Build step for data presenter
*
* @param string $name
* @param string $title
* @param array $content [(string $title, string $description, array $documentation, array $buttons)]
*
* @return array
*/
public function buildStep(string $name, string $title, array $content = [], bool $disabledForUser = false): array
{
if (strtolower($name) === 'account') {
$isAutoCompleted = $isCompleted = $this->checkAccountAssociation();
$isUserCompleted = false;
} else {
$isCompleted = SetupGuideHelper::isStepCompleted($name);
$isUserCompleted = SetupGuideHelper::isStepUserCompleted($name);
$isAutoCompleted = SetupGuideHelper::isStepAutoCompleted($name);
}
return [
'name' => $name,
'title' => $title,
'content' => $content,
'disabledForUser' => $disabledForUser,
'isCompleted' => $isCompleted,
'isUserCompleted' => $isUserCompleted,
'isAutoCompleted' => $isAutoCompleted,
];
}
/**
* @param string $serviceName
*
* @return object
*/
private function get($serviceName)
{
if (null === $this->container) {
$this->container = SymfonyContainer::getInstance();
}
return $this->container->get($serviceName);
}
/**
* @param string $serviceName
*
* @return bool
*/
private function has($serviceName): bool
{
if (null === $this->container) {
$this->container = SymfonyContainer::getInstance();
}
return $this->container->has($serviceName);
}
/**
* @return object|null
*/
private function getPsAccountsService(): ?object
{
return method_exists($this->psAccounts, 'getService') ? $this->psAccounts->getService('PrestaShop\Module\PsAccounts\Service\PsAccountsService') : null;
}
private function checkAccountAssociation(): bool
{
try {
$psAccountService = $this->getPsAccountsService();
return $psAccountService && method_exists($psAccountService, 'getShopUuid') && !empty($psAccountService->getShopUuid());
} catch (\Exception) {
return false;
} catch (\Throwable) {
return false;
}
}
}

View File

@@ -0,0 +1,28 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License version 3.0
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,45 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License version 3.0
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
*/
declare(strict_types=1);
namespace PrestaShop\Module\PsClassicEdition\Traits\Hooks;
trait UseDisplayAdminStoreInformation {
public function hookDisplayAdminStoreInformation(): string
{
$metadataFile = _PS_ROOT_DIR_ . '/app/metadata.json';
if (file_exists($metadataFile)) {
$metadata = json_decode(file_get_contents($metadataFile), true);
if (!empty($metadata['distribution']) && !empty($metadata['distributionVersion'])) {
return <<<END
<p class="mb-0">
<strong>{$this->trans('PrestaShop distribution:', [], 'Modules.Classicedition.Admin')}</strong> {$metadata['distribution']}
</p>
<p class="mb-0">
<strong>{$this->trans('PrestaShop distribution version:', [], 'Modules.Classicedition.Admin')}</strong> {$metadata['distributionVersion']}
</p>
END;
}
}
return '';
}
}

View File

@@ -0,0 +1,102 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License version 3.0
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
*/
declare(strict_types=1);
namespace PrestaShop\Module\PsClassicEdition\Traits\Hooks;
use PrestaShop\Module\PsClassicEdition\Helper\PsAccountHelper;
use PrestaShop\Module\PsClassicEdition\Presenter\SetupGuideDataPresenter;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
trait UseDisplayBackOfficeHeader
{
public function hookDisplayBackOfficeHeader(): string
{
$minimizedGuideHtml = $this->getMinimizedGuideHtml();
return <<<END
{$minimizedGuideHtml}
<script>
window.userLocale = '{$this->context->language->iso_code}';
window.userflow_id = '{$this->userflow_id}';
</script>
END;
}
private function getMinimizedGuideHtml(): string
{
$controller = \Tools::getValue('controller');
if ($controller === 'AdminPsClassicEditionHomepageController') {
return '';
}
if ((bool) \Configuration::get('PS_SETUP_GUIDE_MODAL_IS_HIDDEN')) {
return '';
}
$setupGuideDataPresenter = \Context::getContext()->controller->getContainer()->get(SetupGuideDataPresenter::class);
$setupData = $setupGuideDataPresenter->getSetupGuideData();
$remainingStepsToComplete = false;
foreach ($setupData as $setupStep) {
if (!$setupStep['isCompleted']) {
$remainingStepsToComplete = true;
break;
}
}
// Only display the minimized setup guide when there are remaining steps to finish
if (!$remainingStepsToComplete) {
return '';
}
// Init URLs for setup guide
$router = \Context::getContext()->controller->getContainer()->get('router');
$setupGuideApiUrl = $router->generate('ps_classic_edition_setup_guide_api_index', [], UrlGeneratorInterface::ABSOLUTE_URL);
$setupGuideApiUrlEdit = $router->generate('ps_classic_edition_setup_guide_api_edit', [], UrlGeneratorInterface::ABSOLUTE_URL);
// Init accounts
$psAccountHelper = \Context::getContext()->controller->getContainer()->get(PsAccountHelper::class);
$psAccountsSettings = $psAccountHelper->loadAccountSettings();
$urlAccountsCdn = $psAccountsSettings['urlAccountsCdn'];
$accountsUserToken = $psAccountsSettings['accountUserToken'];
$psShopID = $psAccountsSettings['psShopID'];
$psAccountID = $psAccountsSettings['psAccountID'];
// Include the minimized setup guide (only if some steps are still needed)
$baseLink = \Context::getContext()->link->getAdminBaseLink();
$minimizedGuideHtml = '<script type="module" src="' . $baseLink . '/modules/ps_classic_edition/views/js/vue/assets/index.js"></script>';
$minimizedGuideHtml .= PHP_EOL . "
<script src=\"$urlAccountsCdn\" rel=\"preload\"></script>
<script>
window.minimizedGuideContext = {
\"SETUP_GUIDE_API_URL\": \"$setupGuideApiUrl\",
\"SETUP_GUIDE_API_URL_EDIT\": \"$setupGuideApiUrlEdit\",
\"'userToken\": \"$accountsUserToken\",
\"psAccountShopID\": \"$psShopID\",
\"psAccountID\": \"$psAccountID\"
};
</script>
";
return $minimizedGuideHtml;
}
}

View File

@@ -0,0 +1,28 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License version 3.0
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../');
exit;

View File

@@ -0,0 +1,95 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License version 3.0
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
*/
declare(strict_types=1);
namespace PrestaShop\Module\PsClassicEdition\Traits;
use Symfony\Component\String\UnicodeString;
trait UseHooks
{
use Hooks\UseDisplayBackOfficeHeader;
use Hooks\UseDisplayAdminStoreInformation;
/**
* @var array An array of method that can be called to register media in the actionAdminControllerSetMedia hook
*
* @see UseActionAdminControllerSetMedia
*/
protected $adminControllerMediaMethods = [];
/**
* Try to call the "bootHookClassName" method on each hook class.
*
* @return void
*/
protected function bootHooks(): void
{
foreach ($this->getTraitNames() as $traitName) {
if (method_exists($this, "boot{$traitName}")) {
$this->{"boot{$traitName}"}();
}
}
}
/**
* Try to call the "hookClassNameExtraOperations" method on each hook class.
*
* @return void
*/
protected function installHooks(): void
{
foreach ($this->getTraitNames() as $traitName) {
$traitName = lcfirst($traitName);
if (method_exists($this, "{$traitName}ExtraOperations")) {
$this->{"{$traitName}ExtraOperations"}();
}
}
}
/**
* Guess the hooks names by using the traits names. Remove the "Use" in the traits name.
*
* @return string[]
*/
protected function getHooksNames(): array
{
return array_map(function ($trait) {
return str_replace('Use', '', $trait);
}, $this->getTraitNames());
}
/**
* Parse all classes used by this trait, and extract them
*
* @return string[]
*/
protected function getTraitNames(): array
{
$traits = [];
// Retrieve all used classes and iterate
foreach (class_uses(UseHooks::class) as $trait) {
// Get only the class name eg. 'UseAdminControllerSetMedia'
$traits[] = (new UnicodeString($trait))->afterLast('\\')->toString();
}
return $traits;
}
}

View File

@@ -0,0 +1,28 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License version 3.0
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,11 @@
<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,177 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file original="admin-dev" source-language="en" target-language="en" datatype="plaintext">
<body>
<trans-unit id="6149631c687b5866fcbd9133254e1015">
<source>PrestaShop Classic Edition</source>
<target state="translated">PrestaShop Classic Edition</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="4c6c4199f559fc0cb998c11097002ee7">
<source>PrestaShop Classic Edition.</source>
<target state="translated">PrestaShop Classic Edition.</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="83218ac34c1834c26781fe4bde918ee4">
<source>Welcome</source>
<target state="translated">Welcome</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="d2c38c5a6cb52b133d58e66470e14daa">
<source>Care Center</source>
<target state="translated">Care Center</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="f4f70727dc34561dfde1a3c529b6205c">
<source>Settings</source>
<target state="translated">Settings</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="cb2f228df35024a7f8895614134b651d">
<source>Customize your Domain Name</source>
<target state="translated">Customize your Domain Name</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="d0c78c13ebd41f2a5e85bcdc760c556b">
<source>Customize your domain name to boost your store's search engine ranking.</source>
<target state="translated">Customize your domain name to boost your store's search engine ranking.</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="862cd24333aa5c27beb1ec8af6b4766e">
<source>View documentation</source>
<target state="translated">View documentation</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="e09e0133e1c69592adfd5c3f69663bd0">
<source>https://help-center.prestashop.com/fr/articles/11530021421714-changer-le-nom-de-domaine</source>
<target state="translated">https://help-center.prestashop.com/en/articles/11530021421714-change-the-domain-name</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="1116ed9b82405b666479000dcc482f84">
<source>Skip this step</source>
<target state="translated">Skip this step</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="8422e56d95ab9587169f917f53a23a43">
<source>Add your First Product</source>
<target state="translated">Add your First Product</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="d4c43599c3d803321cac28609976291b">
<source>Expand your catalog with your very first product</source>
<target state="translated">Expand your catalog with your very first product</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="4ab7d549596c13206e215c9d0f26000e">
<source>https://help-center.prestashop.com/fr/articles/11637213915666-ajouter-un-nouveau-produit</source>
<target state="translated">https://help-center.prestashop.com/en/articles/11637213915666-add-a-new-product</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="dc16a8bae9c316f56d4db39800bfa86a">
<source>Add a Product</source>
<target state="translated">Add a Product</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="bb324583a12984d72eeb70c2c38d6cda">
<source>Configure your Payment Options</source>
<target state="translated">Configure your Payment Options</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="b0f2ff3544cea0f250b4ac64c96991ad">
<source>Enhance your customers' shopping experience by offering multiple payment options on your store.</source>
<target state="translated">Enhance your customers' shopping experience by offering multiple payment options on your store.</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="5cb09dc063501817d498214ccb99c0f3">
<source>https://help-center.prestashop.com/fr/articles/11640755605778-configurer-les-moyens-de-paiement</source>
<target state="translated">https://help-center.prestashop.com/en/articles/11640755605778-configure-payment-methods</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="5fec693e2128dcfb09ac35626dd4a572">
<source>Configure your Delivery Options</source>
<target state="translated">Configure your Delivery Options</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="1ec525eb1946fbcb914525fe1ba7f4e0">
<source>Configure delivery options to send your products.</source>
<target state="translated">Configure delivery options to send your products.</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="266164f640e3fd7ac655e47c40e2fc78">
<source>https://help-center.prestashop.com/fr/articles/11615624974994-configurer-les-modes-de-livraison</source>
<target state="translated">https://help-center.prestashop.com/en/articles/11615624974994-configure-the-shipping-methods</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="ea199c50d679d09dbfe7b272a5dfc230">
<source>Meet your Legal Obligations</source>
<target state="translated">Meet your Legal Obligations</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="e917d41a7d894760a649f595426555cb">
<source>Ensure your store complies with legal requirements before you begin selling.</source>
<target state="translated">Ensure your store complies with legal requirements before you begin selling.</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="53bfc8c2e07fa9a1407869eeeb1e975b">
<source>https://help-center.prestashop.com/fr/articles/11644037761042-repondre-aux-obligations-legales</source>
<target state="translated">https://help-center.prestashop.com/en/articles/11644037761042-comply-with-legal-requirements</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="1ddeefbce4668401f03fae436fc6674e">
<source>Add a Logo</source>
<target state="translated">Add a Logo</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="87740d5668147a7ecd2ecba915a5aaad">
<source>Add Logos for your store (Header, E-mails, Invoice, and Favicon)</source>
<target state="translated">Add Logos for your store (Header, E-mails, Invoice, and Favicon)</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="855a91c6a0e71a12bc94322e7b3685c4">
<source>https://help-center.prestashop.com/fr/articles/11674550243474-ajouter-un-logo-et-une-favicon</source>
<target state="translated">https://help-center.prestashop.com/en/articles/11674550243474-add-a-logo-and-a-favicon</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="943e3c8b871d7ac7efd2d2f04640b791">
<source>Select and Customize your Theme</source>
<target state="translated">Select and Customize your Theme</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="6d00d1805e43ec87dd2e998b24b108b6">
<source>Choose and customize a theme that defines the look of your store</source>
<target state="translated">Choose and customize a theme that defines the look of your store</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="ab7d62a1228738d0bc46e115b5e71c33">
<source>https://help-center.prestashop.com/fr/articles/11663976521490-choisir-et-configurer-un-theme</source>
<target state="translated">https://help-center.prestashop.com/en/articles/11663976521490-choose-and-configure-a-theme</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="c68308ce7ca65863ba890fdaf48c286a">
<source>Activate new menu and breadcrumb</source>
<target state="translated">Activate new menu and breadcrumb</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="fe5d926454b6a8144efce13a44d019ba">
<source>Invalid Configuration value</source>
<target state="translated">Invalid Configuration value</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="c888438d14855d7d96a2724ee9c306bd">
<source>Settings updated</source>
<target state="translated">Settings updated</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="981d0481276dad6df56cb70e95eafb14">
<source>PrestaShop distribution:</source>
<target state="translated">PrestaShop distribution:</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="224ba70d3a567aa327af41e8b6d79430">
<source>PrestaShop distribution version:</source>
<target state="translated">PrestaShop distribution version:</target>
<note>Line: </note>
</trans-unit>
</body>
</file>
</xliff>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file original="admin-dev" source-language="en-US" target-language="en-US" datatype="plaintext">
<body>
<trans-unit id="6149631c687b5866fcbd9133254e1015">
<source>PrestaShop Classic Edition</source>
<target>PrestaShop Classic Edition</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="4c6c4199f559fc0cb998c11097002ee7">
<source>PrestaShop Classic Edition.</source>
<target>PrestaShop Classic Edition.</target>
<note>Line: </note>
</trans-unit>
</body>
</file>
</xliff>

View File

@@ -0,0 +1,11 @@
<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,167 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file original="admin-dev" source-language="en" target-language="es-ES" datatype="plaintext">
<body>
<trans-unit id="6149631c687b5866fcbd9133254e1015">
<source>PrestaShop Classic Edition</source>
<target state="needs-translation">PrestaShop Classic Edition</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="4c6c4199f559fc0cb998c11097002ee7">
<source>PrestaShop Classic Edition.</source>
<target state="needs-translation">PrestaShop Classic Edition.</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="83218ac34c1834c26781fe4bde918ee4">
<source>Welcome</source>
<target state="translated">Bienvenido</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="d2c38c5a6cb52b133d58e66470e14daa">
<source>Care Center</source>
<target state="translated">Care Center</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="f4f70727dc34561dfde1a3c529b6205c">
<source>Settings</source>
<target state="translated">Ajustes</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="cb2f228df35024a7f8895614134b651d">
<source>Customize your Domain Name</source>
<target state="translated">Personalizar el nombre de dominio</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="d0c78c13ebd41f2a5e85bcdc760c556b">
<source>Customize your domain name to boost your store's search engine ranking.</source>
<target state="translated">Personaliza tu nombre de dominio para mejorar el posicionamiento de tu tienda en los buscadores.</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="862cd24333aa5c27beb1ec8af6b4766e">
<source>View documentation</source>
<target state="translated">Ver documentación</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="e09e0133e1c69592adfd5c3f69663bd0">
<source>https://help-center.prestashop.com/fr/articles/11530021421714-changer-le-nom-de-domaine</source>
<target state="translated">https://help-center.prestashop.com/en/articles/11530021421714-change-the-domain-name</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="1116ed9b82405b666479000dcc482f84">
<source>Skip this step</source>
<target state="translated">Omitir este paso</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="8422e56d95ab9587169f917f53a23a43">
<source>Add your First Product</source>
<target state="translated">Añadir un primer producto</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="d4c43599c3d803321cac28609976291b">
<source>Expand your catalog with your very first product</source>
<target state="translated">Enriquece tu catálogo añadiendo tu primer producto</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="4ab7d549596c13206e215c9d0f26000e">
<source>https://help-center.prestashop.com/fr/articles/11637213915666-ajouter-un-nouveau-produit</source>
<target state="translated">https://help-center.prestashop.com/en/articles/11637213915666-add-a-new-product</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="dc16a8bae9c316f56d4db39800bfa86a">
<source>Add a Product</source>
<target state="translated">Añadir un producto</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="bb324583a12984d72eeb70c2c38d6cda">
<source>Configure your Payment Options</source>
<target state="translated">Configurar los métodos de pago</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="b0f2ff3544cea0f250b4ac64c96991ad">
<source>Enhance your customers' shopping experience by offering multiple payment options on your store.</source>
<target state="translated">Mejora la experiencia de compra de tus clientes ofreciendo varios métodos de pago en tu tienda.</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="5cb09dc063501817d498214ccb99c0f3">
<source>https://help-center.prestashop.com/fr/articles/11640755605778-configurer-les-moyens-de-paiement</source>
<target state="translated">https://help-center.prestashop.com/en/articles/11640755605778-configure-payment-methods</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="5fec693e2128dcfb09ac35626dd4a572">
<source>Configure your Delivery Options</source>
<target state="translated">Configurar los métodos de envío</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="1ec525eb1946fbcb914525fe1ba7f4e0">
<source>Configure delivery options to send your products.</source>
<target state="translated">Configura métodos de entrega para enviar tus productos.</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="266164f640e3fd7ac655e47c40e2fc78">
<source>https://help-center.prestashop.com/fr/articles/11615624974994-configurer-les-modes-de-livraison</source>
<target state="translated">https://help-center.prestashop.com/en/articles/11615624974994-configure-the-shipping-methods</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="ea199c50d679d09dbfe7b272a5dfc230">
<source>Meet your Legal Obligations</source>
<target state="translated">Cumplir las obligaciones legales</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="e917d41a7d894760a649f595426555cb">
<source>Ensure your store complies with legal requirements before you begin selling.</source>
<target state="translated">Asegúrate de que tu tienda cumple los requisitos legales antes de empezar a vender.</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="53bfc8c2e07fa9a1407869eeeb1e975b">
<source>https://help-center.prestashop.com/fr/articles/11644037761042-repondre-aux-obligations-legales</source>
<target state="translated">https://help-center.prestashop.com/en/articles/11644037761042-comply-with-legal-requirements</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="1ddeefbce4668401f03fae436fc6674e">
<source>Add a Logo</source>
<target state="translated">Añadir un logotipo</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="87740d5668147a7ecd2ecba915a5aaad">
<source>Add Logos for your store (Header, E-mails, Invoice, and Favicon)</source>
<target state="translated">Añade los logotipos que aparecerán en tu tienda (cabecera, e-mails, facturas y favicon)</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="855a91c6a0e71a12bc94322e7b3685c4">
<source>https://help-center.prestashop.com/fr/articles/11674550243474-ajouter-un-logo-et-une-favicon</source>
<target state="translated">https://help-center.prestashop.com/en/articles/11674550243474-add-a-logo-and-a-favicon</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="943e3c8b871d7ac7efd2d2f04640b791">
<source>Select and Customize your Theme</source>
<target state="translated">Elegir y configurar un tema</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="6d00d1805e43ec87dd2e998b24b108b6">
<source>Choose and customize a theme that defines the look of your store</source>
<target state="translated">Selecciona y configura el tema que definirá el diseño de tu tienda</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="ab7d62a1228738d0bc46e115b5e71c33">
<source>https://help-center.prestashop.com/fr/articles/11663976521490-choisir-et-configurer-un-theme</source>
<target state="translated">https://help-center.prestashop.com/en/articles/11663976521490-choose-and-configure-a-theme</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="c68308ce7ca65863ba890fdaf48c286a">
<source>Activate new menu and breadcrumb</source>
<target state="translated">Activar nuevo menú y ruta de navegación</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="fe5d926454b6a8144efce13a44d019ba">
<source>Invalid Configuration value</source>
<target state="translated">Valor de configuración no válido</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="c888438d14855d7d96a2724ee9c306bd">
<source>Settings updated</source>
<target state="translated">Ajustes actualizan</target>
<note>Line: </note>
</trans-unit>
</body>
</file>
</xliff>

View File

@@ -0,0 +1,11 @@
<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,167 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file original="admin-dev" source-language="en" target-language="fr" datatype="plaintext">
<body>
<trans-unit id="6149631c687b5866fcbd9133254e1015">
<source>PrestaShop Classic Edition</source>
<target state="translated">PrestaShop Classic Edition</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="4c6c4199f559fc0cb998c11097002ee7">
<source>PrestaShop Classic Edition.</source>
<target state="translated">PrestaShop Classic Edition.</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="83218ac34c1834c26781fe4bde918ee4">
<source>Welcome</source>
<target state="translated">Bienvenue</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="d2c38c5a6cb52b133d58e66470e14daa">
<source>Care Center</source>
<target state="translated">Care Center</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="f4f70727dc34561dfde1a3c529b6205c">
<source>Settings</source>
<target state="translated">Paramètres</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="cb2f228df35024a7f8895614134b651d">
<source>Customize your Domain Name</source>
<target state="translated">Personnaliser le nom de domaine</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="d0c78c13ebd41f2a5e85bcdc760c556b">
<source>Customize your domain name to boost your store's search engine ranking.</source>
<target state="translated">Personnalisez votre nom de domaine pour améliorer le référencement de votre boutique sur les moteurs de recherche.</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="862cd24333aa5c27beb1ec8af6b4766e">
<source>View documentation</source>
<target state="translated">Voir la documentation</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="e09e0133e1c69592adfd5c3f69663bd0">
<source>https://help-center.prestashop.com/fr/articles/11530021421714-changer-le-nom-de-domaine</source>
<target state="translated">https://help-center.prestashop.com/fr/articles/11530021421714-changer-le-nom-de-domaine</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="1116ed9b82405b666479000dcc482f84">
<source>Skip this step</source>
<target state="translated">Ignorer cette étape</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="8422e56d95ab9587169f917f53a23a43">
<source>Add your First Product</source>
<target state="translated">Ajouter un premier produit</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="d4c43599c3d803321cac28609976291b">
<source>Expand your catalog with your very first product</source>
<target state="translated">Enrichissez votre catalogue en ajoutant votre tout premier produit</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="4ab7d549596c13206e215c9d0f26000e">
<source>https://help-center.prestashop.com/fr/articles/11637213915666-ajouter-un-nouveau-produit</source>
<target state="translated">https://help-center.prestashop.com/fr/articles/11637213915666-ajouter-un-nouveau-produit</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="dc16a8bae9c316f56d4db39800bfa86a">
<source>Add a Product</source>
<target state="translated">Ajouter un produit</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="bb324583a12984d72eeb70c2c38d6cda">
<source>Configure your Payment Options</source>
<target state="translated">Configurer les moyens de paiement</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="b0f2ff3544cea0f250b4ac64c96991ad">
<source>Enhance your customers' shopping experience by offering multiple payment options on your store.</source>
<target state="translated">Améliorez l'expérience dachat de vos clients en proposant plusieurs moyens de paiement sur votre boutique.</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="5cb09dc063501817d498214ccb99c0f3">
<source>https://help-center.prestashop.com/fr/articles/11640755605778-configurer-les-moyens-de-paiement</source>
<target state="translated">https://help-center.prestashop.com/fr/articles/11640755605778-configurer-les-moyens-de-paiement</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="5fec693e2128dcfb09ac35626dd4a572">
<source>Configure your Delivery Options</source>
<target state="translated">Configurer les modes de livraison</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="1ec525eb1946fbcb914525fe1ba7f4e0">
<source>Configure delivery options to send your products.</source>
<target state="translated">Configurez les méthodes de livraison pour envoyer vos produits.</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="266164f640e3fd7ac655e47c40e2fc78">
<source>https://help-center.prestashop.com/fr/articles/11615624974994-configurer-les-modes-de-livraison</source>
<target state="translated">https://help-center.prestashop.com/fr/articles/11615624974994-configurer-les-modes-de-livraison</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="ea199c50d679d09dbfe7b272a5dfc230">
<source>Meet your Legal Obligations</source>
<target state="translated">Répondre aux obligations légales</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="e917d41a7d894760a649f595426555cb">
<source>Ensure your store complies with legal requirements before you begin selling.</source>
<target state="translated">Assurez-vous que votre boutique respecte les obligations légales avant de commencer à vendre.</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="53bfc8c2e07fa9a1407869eeeb1e975b">
<source>https://help-center.prestashop.com/fr/articles/11644037761042-repondre-aux-obligations-legales</source>
<target state="translated">https://help-center.prestashop.com/fr/articles/11644037761042-repondre-aux-obligations-legales</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="1ddeefbce4668401f03fae436fc6674e">
<source>Add a Logo</source>
<target state="translated">Ajouter un logo</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="87740d5668147a7ecd2ecba915a5aaad">
<source>Add Logos for your store (Header, E-mails, Invoice, and Favicon)</source>
<target state="translated">Ajoutez les logos qui apparaîtront sur votre boutique (en-tête, e-mails, factures et favicon)</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="855a91c6a0e71a12bc94322e7b3685c4">
<source>https://help-center.prestashop.com/fr/articles/11674550243474-ajouter-un-logo-et-une-favicon</source>
<target state="translated">https://help-center.prestashop.com/fr/articles/11674550243474-ajouter-un-logo-et-une-favicon</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="943e3c8b871d7ac7efd2d2f04640b791">
<source>Select and Customize your Theme</source>
<target state="translated">Choisir et configurer un thème</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="6d00d1805e43ec87dd2e998b24b108b6">
<source>Choose and customize a theme that defines the look of your store</source>
<target state="translated">Sélectionnez et configurez le thème qui définira l'apparence de votre boutique</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="ab7d62a1228738d0bc46e115b5e71c33">
<source>https://help-center.prestashop.com/fr/articles/11663976521490-choisir-et-configurer-un-theme</source>
<target state="translated">https://help-center.prestashop.com/fr/articles/11663976521490-choisir-et-configurer-un-theme</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="c68308ce7ca65863ba890fdaf48c286a">
<source>Activate new menu and breadcrumb</source>
<target state="translated">Activer le nouveau menu et le fil d'ariane</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="fe5d926454b6a8144efce13a44d019ba">
<source>Invalid Configuration value</source>
<target state="translated">Valeur de configuration invalide</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="c888438d14855d7d96a2724ee9c306bd">
<source>Settings updated</source>
<target state="translated">Paramètres mis à jour</target>
<note>Line: </note>
</trans-unit>
</body>
</file>
</xliff>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file original="admin-dev" source-language="fr-FR" target-language="fr-FR" datatype="plaintext">
<body>
<trans-unit id="6149631c687b5866fcbd9133254e1015">
<source>PrestaShop Classic Edition</source>
<target>PrestaShop Classic Edition</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="4c6c4199f559fc0cb998c11097002ee7">
<source>PrestaShop Classic Edition.</source>
<target>PrestaShop Classic Edition.</target>
<note>Line: </note>
</trans-unit>
</body>
</file>
</xliff>

View File

@@ -0,0 +1,11 @@
<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,11 @@
<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,167 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file original="admin-dev" source-language="en" target-language="it" datatype="plaintext">
<body>
<trans-unit id="6149631c687b5866fcbd9133254e1015">
<source>PrestaShop Classic Edition</source>
<target state="needs-translation">PrestaShop Classic Edition</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="4c6c4199f559fc0cb998c11097002ee7">
<source>PrestaShop Classic Edition.</source>
<target state="needs-translation">PrestaShop Classic Edition.</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="83218ac34c1834c26781fe4bde918ee4">
<source>Welcome</source>
<target state="translated">Benvenuto</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="d2c38c5a6cb52b133d58e66470e14daa">
<source>Care Center</source>
<target state="translated">Care Center</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="f4f70727dc34561dfde1a3c529b6205c">
<source>Settings</source>
<target state="translated">Impostazioni</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="cb2f228df35024a7f8895614134b651d">
<source>Customize your Domain Name</source>
<target state="translated">Personalizza il nome di dominio</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="d0c78c13ebd41f2a5e85bcdc760c556b">
<source>Customize your domain name to boost your store's search engine ranking.</source>
<target state="translated">Personalizza il tuo nome di dominio per migliorare l'ottimizzazione dei motori di ricerca.</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="862cd24333aa5c27beb1ec8af6b4766e">
<source>View documentation</source>
<target state="translated">Visualizza la documentazione</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="e09e0133e1c69592adfd5c3f69663bd0">
<source>https://help-center.prestashop.com/fr/articles/11530021421714-changer-le-nom-de-domaine</source>
<target state="translated">https://help-center.prestashop.com/en/articles/11530021421714-change-the-domain-name</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="1116ed9b82405b666479000dcc482f84">
<source>Skip this step</source>
<target state="translated">Salta questo passaggio</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="8422e56d95ab9587169f917f53a23a43">
<source>Add your First Product</source>
<target state="translated">Aggiungi il primo prodotto</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="d4c43599c3d803321cac28609976291b">
<source>Expand your catalog with your very first product</source>
<target state="translated">Arricchisci il tuo catalogo aggiungendo il primo prodotto</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="4ab7d549596c13206e215c9d0f26000e">
<source>https://help-center.prestashop.com/fr/articles/11637213915666-ajouter-un-nouveau-produit</source>
<target state="translated">https://help-center.prestashop.com/en/articles/11637213915666-add-a-new-product</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="dc16a8bae9c316f56d4db39800bfa86a">
<source>Add a Product</source>
<target state="translated">Aggiungi un prodotto</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="bb324583a12984d72eeb70c2c38d6cda">
<source>Configure your Payment Options</source>
<target state="translated">Configura i metodi di pagamento</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="b0f2ff3544cea0f250b4ac64c96991ad">
<source>Enhance your customers' shopping experience by offering multiple payment options on your store.</source>
<target state="translated">Migliora l'esperienza di acquisto dei tuoi clienti offrendo diversi metodi di pagamento sul tuo negozio.</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="5cb09dc063501817d498214ccb99c0f3">
<source>https://help-center.prestashop.com/fr/articles/11640755605778-configurer-les-moyens-de-paiement</source>
<target state="translated">https://help-center.prestashop.com/en/articles/11640755605778-configure-payment-methods</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="5fec693e2128dcfb09ac35626dd4a572">
<source>Configure your Delivery Options</source>
<target state="translated">Configura i metodi di consegna</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="1ec525eb1946fbcb914525fe1ba7f4e0">
<source>Configure delivery options to send your products.</source>
<target state="translated">Imposta i vari metodi di consegna per l'invio dei tuoi prodotti.</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="266164f640e3fd7ac655e47c40e2fc78">
<source>https://help-center.prestashop.com/fr/articles/11615624974994-configurer-les-modes-de-livraison</source>
<target state="translated">https://help-center.prestashop.com/en/articles/11615624974994-configure-the-shipping-methods</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="ea199c50d679d09dbfe7b272a5dfc230">
<source>Meet your Legal Obligations</source>
<target state="translated">Conformità ai requisiti legali</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="e917d41a7d894760a649f595426555cb">
<source>Ensure your store complies with legal requirements before you begin selling.</source>
<target state="translated">Assicurati che il tuo negozio sia conforme ai requisiti legali prima di iniziare a vendere.</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="53bfc8c2e07fa9a1407869eeeb1e975b">
<source>https://help-center.prestashop.com/fr/articles/11644037761042-repondre-aux-obligations-legales</source>
<target state="translated">https://help-center.prestashop.com/en/articles/11644037761042-comply-with-legal-requirements</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="1ddeefbce4668401f03fae436fc6674e">
<source>Add a Logo</source>
<target state="translated">Aggiungere un logo</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="87740d5668147a7ecd2ecba915a5aaad">
<source>Add Logos for your store (Header, E-mails, Invoice, and Favicon)</source>
<target state="translated">Aggiungi i loghi che appariranno sul tuo negozio (intestazione, e-mail, fatture e favicon)</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="855a91c6a0e71a12bc94322e7b3685c4">
<source>https://help-center.prestashop.com/fr/articles/11674550243474-ajouter-un-logo-et-une-favicon</source>
<target state="translated">https://help-center.prestashop.com/en/articles/11674550243474-add-a-logo-and-a-favicon</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="943e3c8b871d7ac7efd2d2f04640b791">
<source>Select and Customize your Theme</source>
<target state="translated">Scegli e configura un tema</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="6d00d1805e43ec87dd2e998b24b108b6">
<source>Choose and customize a theme that defines the look of your store</source>
<target state="translated">Scegli e configura il tema che definirà l'aspetto del tuo negozio</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="ab7d62a1228738d0bc46e115b5e71c33">
<source>https://help-center.prestashop.com/fr/articles/11663976521490-choisir-et-configurer-un-theme</source>
<target state="translated">https://help-center.prestashop.com/en/articles/11663976521490-choose-and-configure-a-theme</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="c68308ce7ca65863ba890fdaf48c286a">
<source>Activate new menu and breadcrumb</source>
<target state="translated">Attiva nuovo menu e breadcrumb</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="fe5d926454b6a8144efce13a44d019ba">
<source>Invalid Configuration value</source>
<target state="translated">Valore di configurazione non valido</target>
<note>Line: </note>
</trans-unit>
<trans-unit id="c888438d14855d7d96a2724ee9c306bd">
<source>Settings updated</source>
<target state="translated">Impostazioni aggiornate</target>
<note>Line: </note>
</trans-unit>
</body>
</file>
</xliff>

View File

@@ -0,0 +1,11 @@
<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,28 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License version 3.0
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,23 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License version 3.0
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
*/
function upgrade_module_0_2_2(ps_classic_edition_ $module): bool
{
return $module->install(true);
}

View File

@@ -0,0 +1,33 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License version 3.0
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
*/
function upgrade_module_2_0_0(ps_classic_edition_ $module): bool
{
$result = true;
// Remove tab to former settings page
$id_tab = (int) Tab::getIdFromClassName('AdminPsClassicEditionSettingsController');
$tab = new Tab($id_tab);
if (Validate::isLoadedObject($tab)) {
$result = $result && $tab->delete();
}
return $result;
}

View File

@@ -0,0 +1,10 @@
# Apache 2.2
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>
# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>

View File

@@ -0,0 +1,22 @@
<?php
// autoload.php @generated by Composer
if (PHP_VERSION_ID < 50600) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, $err);
} elseif (!headers_sent()) {
echo $err;
}
}
throw new RuntimeException($err);
}
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitebe19a2c2a513990ab5c953d4b654b48::getLoader();

View File

@@ -0,0 +1,579 @@
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Autoload;
/**
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
*
* $loader = new \Composer\Autoload\ClassLoader();
*
* // register classes with namespaces
* $loader->add('Symfony\Component', __DIR__.'/component');
* $loader->add('Symfony', __DIR__.'/framework');
*
* // activate the autoloader
* $loader->register();
*
* // to enable searching the include path (eg. for PEAR packages)
* $loader->setUseIncludePath(true);
*
* In this example, if you try to use a class in the Symfony\Component
* namespace or one of its children (Symfony\Component\Console for instance),
* the autoloader will first look for the class under the component/
* directory, and it will then fallback to the framework/ directory if not
* found before giving up.
*
* This class is loosely based on the Symfony UniversalClassLoader.
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @see https://www.php-fig.org/psr/psr-0/
* @see https://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
/** @var \Closure(string):void */
private static $includeFile;
/** @var string|null */
private $vendorDir;
// PSR-4
/**
* @var array<string, array<string, int>>
*/
private $prefixLengthsPsr4 = array();
/**
* @var array<string, list<string>>
*/
private $prefixDirsPsr4 = array();
/**
* @var list<string>
*/
private $fallbackDirsPsr4 = array();
// PSR-0
/**
* List of PSR-0 prefixes
*
* Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
*
* @var array<string, array<string, list<string>>>
*/
private $prefixesPsr0 = array();
/**
* @var list<string>
*/
private $fallbackDirsPsr0 = array();
/** @var bool */
private $useIncludePath = false;
/**
* @var array<string, string>
*/
private $classMap = array();
/** @var bool */
private $classMapAuthoritative = false;
/**
* @var array<string, bool>
*/
private $missingClasses = array();
/** @var string|null */
private $apcuPrefix;
/**
* @var array<string, self>
*/
private static $registeredLoaders = array();
/**
* @param string|null $vendorDir
*/
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
self::initializeIncludeClosure();
}
/**
* @return array<string, list<string>>
*/
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
}
return array();
}
/**
* @return array<string, list<string>>
*/
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}
/**
* @return list<string>
*/
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}
/**
* @return list<string>
*/
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}
/**
* @return array<string, string> Array of classname => path
*/
public function getClassMap()
{
return $this->classMap;
}
/**
* @param array<string, string> $classMap Class to filename map
*
* @return void
*/
public function addClassMap(array $classMap)
{
if ($this->classMap) {
$this->classMap = array_merge($this->classMap, $classMap);
} else {
$this->classMap = $classMap;
}
}
/**
* Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix.
*
* @param string $prefix The prefix
* @param list<string>|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
*
* @return void
*/
public function add($prefix, $paths, $prepend = false)
{
$paths = (array) $paths;
if (!$prefix) {
if ($prepend) {
$this->fallbackDirsPsr0 = array_merge(
$paths,
$this->fallbackDirsPsr0
);
} else {
$this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0,
$paths
);
}
return;
}
$first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) {
$this->prefixesPsr0[$first][$prefix] = $paths;
return;
}
if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$paths,
$this->prefixesPsr0[$first][$prefix]
);
} else {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix],
$paths
);
}
}
/**
* Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param list<string>|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
$paths = (array) $paths;
if (!$prefix) {
// Register directories for the root namespace.
if ($prepend) {
$this->fallbackDirsPsr4 = array_merge(
$paths,
$this->fallbackDirsPsr4
);
} else {
$this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4,
$paths
);
}
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
// Register directories for a new namespace.
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$paths,
$this->prefixDirsPsr4[$prefix]
);
} else {
// Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix],
$paths
);
}
}
/**
* Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix.
*
* @param string $prefix The prefix
* @param list<string>|string $paths The PSR-0 base directories
*
* @return void
*/
public function set($prefix, $paths)
{
if (!$prefix) {
$this->fallbackDirsPsr0 = (array) $paths;
} else {
$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
}
}
/**
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param list<string>|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function setPsr4($prefix, $paths)
{
if (!$prefix) {
$this->fallbackDirsPsr4 = (array) $paths;
} else {
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
}
}
/**
* Turns on searching the include path for class files.
*
* @param bool $useIncludePath
*
* @return void
*/
public function setUseIncludePath($useIncludePath)
{
$this->useIncludePath = $useIncludePath;
}
/**
* Can be used to check if the autoloader uses the include path to check
* for classes.
*
* @return bool
*/
public function getUseIncludePath()
{
return $this->useIncludePath;
}
/**
* Turns off searching the prefix and fallback directories for classes
* that have not been registered with the class map.
*
* @param bool $classMapAuthoritative
*
* @return void
*/
public function setClassMapAuthoritative($classMapAuthoritative)
{
$this->classMapAuthoritative = $classMapAuthoritative;
}
/**
* Should class lookup fail if not found in the current class map?
*
* @return bool
*/
public function isClassMapAuthoritative()
{
return $this->classMapAuthoritative;
}
/**
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
*
* @param string|null $apcuPrefix
*
* @return void
*/
public function setApcuPrefix($apcuPrefix)
{
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
}
/**
* The APCu prefix in use, or null if APCu caching is not enabled.
*
* @return string|null
*/
public function getApcuPrefix()
{
return $this->apcuPrefix;
}
/**
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
*
* @return void
*/
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
if (null === $this->vendorDir) {
return;
}
if ($prepend) {
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
} else {
unset(self::$registeredLoaders[$this->vendorDir]);
self::$registeredLoaders[$this->vendorDir] = $this;
}
}
/**
* Unregisters this instance as an autoloader.
*
* @return void
*/
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
if (null !== $this->vendorDir) {
unset(self::$registeredLoaders[$this->vendorDir]);
}
}
/**
* Loads the given class or interface.
*
* @param string $class The name of the class
* @return true|null True if loaded, null otherwise
*/
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
$includeFile = self::$includeFile;
$includeFile($file);
return true;
}
return null;
}
/**
* Finds the path to the file where the class is defined.
*
* @param string $class The name of the class
*
* @return string|false The path if found, false otherwise
*/
public function findFile($class)
{
// class map lookup
if (isset($this->classMap[$class])) {
return $this->classMap[$class];
}
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
return false;
}
if (null !== $this->apcuPrefix) {
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
if ($hit) {
return $file;
}
}
$file = $this->findFileWithExtension($class, '.php');
// Search for Hack files if we are running on HHVM
if (false === $file && defined('HHVM_VERSION')) {
$file = $this->findFileWithExtension($class, '.hh');
}
if (null !== $this->apcuPrefix) {
apcu_add($this->apcuPrefix.$class, $file);
}
if (false === $file) {
// Remember that this class does not exist.
$this->missingClasses[$class] = true;
}
return $file;
}
/**
* Returns the currently registered loaders keyed by their corresponding vendor directories.
*
* @return array<string, self>
*/
public static function getRegisteredLoaders()
{
return self::$registeredLoaders;
}
/**
* @param string $class
* @param string $ext
* @return string|false
*/
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
$first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) {
$subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos);
$search = $subPath . '\\';
if (isset($this->prefixDirsPsr4[$search])) {
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
foreach ($this->prefixDirsPsr4[$search] as $dir) {
if (file_exists($file = $dir . $pathEnd)) {
return $file;
}
}
}
}
}
// PSR-4 fallback dirs
foreach ($this->fallbackDirsPsr4 as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
return $file;
}
}
// PSR-0 lookup
if (false !== $pos = strrpos($class, '\\')) {
// namespaced class name
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
} else {
// PEAR-like class name
$logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
}
if (isset($this->prefixesPsr0[$first])) {
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
if (0 === strpos($class, $prefix)) {
foreach ($dirs as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
return $file;
}
}
}
}
}
// PSR-0 fallback dirs
foreach ($this->fallbackDirsPsr0 as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
return $file;
}
}
// PSR-0 include paths.
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
return $file;
}
return false;
}
/**
* @return void
*/
private static function initializeIncludeClosure()
{
if (self::$includeFile !== null) {
return;
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
*/
self::$includeFile = \Closure::bind(static function($file) {
include $file;
}, null, null);
}
}

View File

@@ -0,0 +1,396 @@
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer;
use Composer\Autoload\ClassLoader;
use Composer\Semver\VersionParser;
/**
* This class is copied in every Composer installed project and available to all
*
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
*
* To require its presence, you can require `composer-runtime-api ^2.0`
*
* @final
*/
class InstalledVersions
{
/**
* @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to
* @internal
*/
private static $selfDir = null;
/**
* @var mixed[]|null
* @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
*/
private static $installed;
/**
* @var bool
*/
private static $installedIsLocalDir;
/**
* @var bool|null
*/
private static $canGetVendors;
/**
* @var array[]
* @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
private static $installedByVendor = array();
/**
* Returns a list of all package names which are present, either by being installed, replaced or provided
*
* @return string[]
* @psalm-return list<string>
*/
public static function getInstalledPackages()
{
$packages = array();
foreach (self::getInstalled() as $installed) {
$packages[] = array_keys($installed['versions']);
}
if (1 === \count($packages)) {
return $packages[0];
}
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
}
/**
* Returns a list of all package names with a specific type e.g. 'library'
*
* @param string $type
* @return string[]
* @psalm-return list<string>
*/
public static function getInstalledPackagesByType($type)
{
$packagesByType = array();
foreach (self::getInstalled() as $installed) {
foreach ($installed['versions'] as $name => $package) {
if (isset($package['type']) && $package['type'] === $type) {
$packagesByType[] = $name;
}
}
}
return $packagesByType;
}
/**
* Checks whether the given package is installed
*
* This also returns true if the package name is provided or replaced by another package
*
* @param string $packageName
* @param bool $includeDevRequirements
* @return bool
*/
public static function isInstalled($packageName, $includeDevRequirements = true)
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
}
}
return false;
}
/**
* Checks whether the given package satisfies a version constraint
*
* e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
*
* Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
*
* @param VersionParser $parser Install composer/semver to have access to this class and functionality
* @param string $packageName
* @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
* @return bool
*/
public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
$constraint = $parser->parseConstraints((string) $constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint);
}
/**
* Returns a version constraint representing all the range(s) which are installed for a given package
*
* It is easier to use this via isInstalled() with the $constraint argument if you need to check
* whether a given version of a package is installed, and not just whether it exists
*
* @param string $packageName
* @return string Version constraint usable with composer/semver
*/
public static function getVersionRanges($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
$ranges = array();
if (isset($installed['versions'][$packageName]['pretty_version'])) {
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
}
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
}
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
}
if (array_key_exists('provided', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
}
return implode(' || ', $ranges);
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
*/
public static function getVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['version'])) {
return null;
}
return $installed['versions'][$packageName]['version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
*/
public static function getPrettyVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['pretty_version'])) {
return null;
}
return $installed['versions'][$packageName]['pretty_version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
*/
public static function getReference($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['reference'])) {
return null;
}
return $installed['versions'][$packageName]['reference'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
*/
public static function getInstallPath($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @return array
* @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
*/
public static function getRootPackage()
{
$installed = self::getInstalled();
return $installed[0]['root'];
}
/**
* Returns the raw installed.php data for custom implementations
*
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
* @return array[]
* @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
*/
public static function getRawData()
{
@trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = include __DIR__ . '/installed.php';
} else {
self::$installed = array();
}
}
return self::$installed;
}
/**
* Returns the raw data of all installed.php which are currently loaded for custom implementations
*
* @return array[]
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
public static function getAllRawData()
{
return self::getInstalled();
}
/**
* Lets you reload the static array from another file
*
* This is only useful for complex integrations in which a project needs to use
* this class but then also needs to execute another project's autoloader in process,
* and wants to ensure both projects have access to their version of installed.php.
*
* A typical case would be PHPUnit, where it would need to make sure it reads all
* the data it needs from this class, then call reload() with
* `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
* the project in which it runs can then also use this class safely, without
* interference between PHPUnit's dependencies and the project's dependencies.
*
* @param array[] $data A vendor/composer/installed.php data set
* @return void
*
* @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
*/
public static function reload($data)
{
self::$installed = $data;
self::$installedByVendor = array();
// when using reload, we disable the duplicate protection to ensure that self::$installed data is
// always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not,
// so we have to assume it does not, and that may result in duplicate data being returned when listing
// all installed packages for example
self::$installedIsLocalDir = false;
}
/**
* @return string
*/
private static function getSelfDir()
{
if (self::$selfDir === null) {
self::$selfDir = strtr(__DIR__, '\\', '/');
}
return self::$selfDir;
}
/**
* @return array[]
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
private static function getInstalled()
{
if (null === self::$canGetVendors) {
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
}
$installed = array();
$copiedLocalDir = false;
if (self::$canGetVendors) {
$selfDir = self::getSelfDir();
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
$vendorDir = strtr($vendorDir, '\\', '/');
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require $vendorDir.'/composer/installed.php';
self::$installedByVendor[$vendorDir] = $required;
$installed[] = $required;
if (self::$installed === null && $vendorDir.'/composer' === $selfDir) {
self::$installed = $required;
self::$installedIsLocalDir = true;
}
}
if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) {
$copiedLocalDir = true;
}
}
}
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require __DIR__ . '/installed.php';
self::$installed = $required;
} else {
self::$installed = array();
}
}
if (self::$installed !== array() && !$copiedLocalDir) {
$installed[] = self::$installed;
}
return $installed;
}
}

View File

@@ -0,0 +1,21 @@
Copyright (c) Nils Adermann, Jordi Boggiano
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -0,0 +1,149 @@
<?php
// autoload_classmap.php @generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
'Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
'PrestaShop\\ModuleLibCacheDirectoryProvider\\Cache\\CacheDirectoryProvider' => $vendorDir . '/prestashop/module-lib-cache-directory-provider/src/Cache/CacheDirectoryProvider.php',
'PrestaShop\\ModuleLibServiceContainer\\DependencyInjection\\ContainerProvider' => $vendorDir . '/prestashop/module-lib-service-container/src/DependencyInjection/ContainerProvider.php',
'PrestaShop\\ModuleLibServiceContainer\\DependencyInjection\\ServiceContainer' => $vendorDir . '/prestashop/module-lib-service-container/src/DependencyInjection/ServiceContainer.php',
'PrestaShop\\Module\\PsClassicEdition\\Controller\\AdminPsClassicEditionHomepageController' => $baseDir . '/src/Controller/AdminPsClassicEditionHomepageController.php',
'PrestaShop\\Module\\PsClassicEdition\\Controller\\AdminPsClassicEditionPsAcademyController' => $baseDir . '/src/Controller/AdminPsClassicEditionPsAcademyController.php',
'PrestaShop\\Module\\PsClassicEdition\\Controller\\AdminPsClassicEditionSetupGuideController' => $baseDir . '/src/Controller/AdminPsClassicEditionSetupGuideController.php',
'PrestaShop\\Module\\PsClassicEdition\\Helper\\PsAccountHelper' => $baseDir . '/src/Helper/PsAccountHelper.php',
'PrestaShop\\Module\\PsClassicEdition\\Helper\\SetupGuideHelper' => $baseDir . '/src/Helper/SetupGuideHelper.php',
'PrestaShop\\Module\\PsClassicEdition\\Install\\Tabs\\Tabs' => $baseDir . '/src/Install/Tabs/Tabs.php',
'PrestaShop\\Module\\PsClassicEdition\\Install\\Tabs\\TabsInstaller' => $baseDir . '/src/Install/Tabs/TabsInstaller.php',
'PrestaShop\\Module\\PsClassicEdition\\Install\\Tabs\\TabsUninstaller' => $baseDir . '/src/Install/Tabs/TabsUninstaller.php',
'PrestaShop\\Module\\PsClassicEdition\\Presenter\\SetupGuideDataPresenter' => $baseDir . '/src/Presenter/SetupGuideDataPresenter.php',
'PrestaShop\\Module\\PsClassicEdition\\Traits\\Hooks\\UseDisplayAdminStoreInformation' => $baseDir . '/src/Traits/Hooks/UseDisplayAdminStoreInformation.php',
'PrestaShop\\Module\\PsClassicEdition\\Traits\\Hooks\\UseDisplayBackOfficeHeader' => $baseDir . '/src/Traits/Hooks/UseDisplayBackOfficeHeader.php',
'PrestaShop\\Module\\PsClassicEdition\\Traits\\UseHooks' => $baseDir . '/src/Traits/UseHooks.php',
'PrestaShop\\PsAccountsInstaller\\Installer\\Exception\\InstallerException' => $vendorDir . '/prestashop/prestashop-accounts-installer/src/Installer/Exception/InstallerException.php',
'PrestaShop\\PsAccountsInstaller\\Installer\\Exception\\ModuleNotInstalledException' => $vendorDir . '/prestashop/prestashop-accounts-installer/src/Installer/Exception/ModuleNotInstalledException.php',
'PrestaShop\\PsAccountsInstaller\\Installer\\Exception\\ModuleVersionException' => $vendorDir . '/prestashop/prestashop-accounts-installer/src/Installer/Exception/ModuleVersionException.php',
'PrestaShop\\PsAccountsInstaller\\Installer\\Facade\\PsAccounts' => $vendorDir . '/prestashop/prestashop-accounts-installer/src/Installer/Facade/PsAccounts.php',
'PrestaShop\\PsAccountsInstaller\\Installer\\Installer' => $vendorDir . '/prestashop/prestashop-accounts-installer/src/Installer/Installer.php',
'PrestaShop\\PsAccountsInstaller\\Installer\\Presenter\\InstallerPresenter' => $vendorDir . '/prestashop/prestashop-accounts-installer/src/Installer/Presenter/InstallerPresenter.php',
'Psr\\Container\\ContainerExceptionInterface' => $vendorDir . '/psr/container/src/ContainerExceptionInterface.php',
'Psr\\Container\\ContainerInterface' => $vendorDir . '/psr/container/src/ContainerInterface.php',
'Psr\\Container\\NotFoundExceptionInterface' => $vendorDir . '/psr/container/src/NotFoundExceptionInterface.php',
'Psr\\Log\\AbstractLogger' => $vendorDir . '/psr/log/src/AbstractLogger.php',
'Psr\\Log\\InvalidArgumentException' => $vendorDir . '/psr/log/src/InvalidArgumentException.php',
'Psr\\Log\\LogLevel' => $vendorDir . '/psr/log/src/LogLevel.php',
'Psr\\Log\\LoggerAwareInterface' => $vendorDir . '/psr/log/src/LoggerAwareInterface.php',
'Psr\\Log\\LoggerAwareTrait' => $vendorDir . '/psr/log/src/LoggerAwareTrait.php',
'Psr\\Log\\LoggerInterface' => $vendorDir . '/psr/log/src/LoggerInterface.php',
'Psr\\Log\\LoggerTrait' => $vendorDir . '/psr/log/src/LoggerTrait.php',
'Psr\\Log\\NullLogger' => $vendorDir . '/psr/log/src/NullLogger.php',
'Symfony\\Component\\HttpClient\\AmpHttpClient' => $vendorDir . '/symfony/http-client/AmpHttpClient.php',
'Symfony\\Component\\HttpClient\\AsyncDecoratorTrait' => $vendorDir . '/symfony/http-client/AsyncDecoratorTrait.php',
'Symfony\\Component\\HttpClient\\CachingHttpClient' => $vendorDir . '/symfony/http-client/CachingHttpClient.php',
'Symfony\\Component\\HttpClient\\Chunk\\DataChunk' => $vendorDir . '/symfony/http-client/Chunk/DataChunk.php',
'Symfony\\Component\\HttpClient\\Chunk\\ErrorChunk' => $vendorDir . '/symfony/http-client/Chunk/ErrorChunk.php',
'Symfony\\Component\\HttpClient\\Chunk\\FirstChunk' => $vendorDir . '/symfony/http-client/Chunk/FirstChunk.php',
'Symfony\\Component\\HttpClient\\Chunk\\InformationalChunk' => $vendorDir . '/symfony/http-client/Chunk/InformationalChunk.php',
'Symfony\\Component\\HttpClient\\Chunk\\LastChunk' => $vendorDir . '/symfony/http-client/Chunk/LastChunk.php',
'Symfony\\Component\\HttpClient\\Chunk\\ServerSentEvent' => $vendorDir . '/symfony/http-client/Chunk/ServerSentEvent.php',
'Symfony\\Component\\HttpClient\\CurlHttpClient' => $vendorDir . '/symfony/http-client/CurlHttpClient.php',
'Symfony\\Component\\HttpClient\\DataCollector\\HttpClientDataCollector' => $vendorDir . '/symfony/http-client/DataCollector/HttpClientDataCollector.php',
'Symfony\\Component\\HttpClient\\DecoratorTrait' => $vendorDir . '/symfony/http-client/DecoratorTrait.php',
'Symfony\\Component\\HttpClient\\DependencyInjection\\HttpClientPass' => $vendorDir . '/symfony/http-client/DependencyInjection/HttpClientPass.php',
'Symfony\\Component\\HttpClient\\EventSourceHttpClient' => $vendorDir . '/symfony/http-client/EventSourceHttpClient.php',
'Symfony\\Component\\HttpClient\\Exception\\ClientException' => $vendorDir . '/symfony/http-client/Exception/ClientException.php',
'Symfony\\Component\\HttpClient\\Exception\\EventSourceException' => $vendorDir . '/symfony/http-client/Exception/EventSourceException.php',
'Symfony\\Component\\HttpClient\\Exception\\HttpExceptionTrait' => $vendorDir . '/symfony/http-client/Exception/HttpExceptionTrait.php',
'Symfony\\Component\\HttpClient\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/http-client/Exception/InvalidArgumentException.php',
'Symfony\\Component\\HttpClient\\Exception\\JsonException' => $vendorDir . '/symfony/http-client/Exception/JsonException.php',
'Symfony\\Component\\HttpClient\\Exception\\RedirectionException' => $vendorDir . '/symfony/http-client/Exception/RedirectionException.php',
'Symfony\\Component\\HttpClient\\Exception\\ServerException' => $vendorDir . '/symfony/http-client/Exception/ServerException.php',
'Symfony\\Component\\HttpClient\\Exception\\TimeoutException' => $vendorDir . '/symfony/http-client/Exception/TimeoutException.php',
'Symfony\\Component\\HttpClient\\Exception\\TransportException' => $vendorDir . '/symfony/http-client/Exception/TransportException.php',
'Symfony\\Component\\HttpClient\\HttpClient' => $vendorDir . '/symfony/http-client/HttpClient.php',
'Symfony\\Component\\HttpClient\\HttpClientTrait' => $vendorDir . '/symfony/http-client/HttpClientTrait.php',
'Symfony\\Component\\HttpClient\\HttpOptions' => $vendorDir . '/symfony/http-client/HttpOptions.php',
'Symfony\\Component\\HttpClient\\HttplugClient' => $vendorDir . '/symfony/http-client/HttplugClient.php',
'Symfony\\Component\\HttpClient\\Internal\\AmpBody' => $vendorDir . '/symfony/http-client/Internal/AmpBody.php',
'Symfony\\Component\\HttpClient\\Internal\\AmpClientState' => $vendorDir . '/symfony/http-client/Internal/AmpClientState.php',
'Symfony\\Component\\HttpClient\\Internal\\AmpListener' => $vendorDir . '/symfony/http-client/Internal/AmpListener.php',
'Symfony\\Component\\HttpClient\\Internal\\AmpResolver' => $vendorDir . '/symfony/http-client/Internal/AmpResolver.php',
'Symfony\\Component\\HttpClient\\Internal\\Canary' => $vendorDir . '/symfony/http-client/Internal/Canary.php',
'Symfony\\Component\\HttpClient\\Internal\\ClientState' => $vendorDir . '/symfony/http-client/Internal/ClientState.php',
'Symfony\\Component\\HttpClient\\Internal\\CurlClientState' => $vendorDir . '/symfony/http-client/Internal/CurlClientState.php',
'Symfony\\Component\\HttpClient\\Internal\\DnsCache' => $vendorDir . '/symfony/http-client/Internal/DnsCache.php',
'Symfony\\Component\\HttpClient\\Internal\\HttplugWaitLoop' => $vendorDir . '/symfony/http-client/Internal/HttplugWaitLoop.php',
'Symfony\\Component\\HttpClient\\Internal\\LegacyHttplugInterface' => $vendorDir . '/symfony/http-client/Internal/LegacyHttplugInterface.php',
'Symfony\\Component\\HttpClient\\Internal\\NativeClientState' => $vendorDir . '/symfony/http-client/Internal/NativeClientState.php',
'Symfony\\Component\\HttpClient\\Internal\\PushedResponse' => $vendorDir . '/symfony/http-client/Internal/PushedResponse.php',
'Symfony\\Component\\HttpClient\\Messenger\\PingWebhookMessage' => $vendorDir . '/symfony/http-client/Messenger/PingWebhookMessage.php',
'Symfony\\Component\\HttpClient\\Messenger\\PingWebhookMessageHandler' => $vendorDir . '/symfony/http-client/Messenger/PingWebhookMessageHandler.php',
'Symfony\\Component\\HttpClient\\MockHttpClient' => $vendorDir . '/symfony/http-client/MockHttpClient.php',
'Symfony\\Component\\HttpClient\\NativeHttpClient' => $vendorDir . '/symfony/http-client/NativeHttpClient.php',
'Symfony\\Component\\HttpClient\\NoPrivateNetworkHttpClient' => $vendorDir . '/symfony/http-client/NoPrivateNetworkHttpClient.php',
'Symfony\\Component\\HttpClient\\Psr18Client' => $vendorDir . '/symfony/http-client/Psr18Client.php',
'Symfony\\Component\\HttpClient\\Response\\AmpResponse' => $vendorDir . '/symfony/http-client/Response/AmpResponse.php',
'Symfony\\Component\\HttpClient\\Response\\AsyncContext' => $vendorDir . '/symfony/http-client/Response/AsyncContext.php',
'Symfony\\Component\\HttpClient\\Response\\AsyncResponse' => $vendorDir . '/symfony/http-client/Response/AsyncResponse.php',
'Symfony\\Component\\HttpClient\\Response\\CommonResponseTrait' => $vendorDir . '/symfony/http-client/Response/CommonResponseTrait.php',
'Symfony\\Component\\HttpClient\\Response\\CurlResponse' => $vendorDir . '/symfony/http-client/Response/CurlResponse.php',
'Symfony\\Component\\HttpClient\\Response\\HttplugPromise' => $vendorDir . '/symfony/http-client/Response/HttplugPromise.php',
'Symfony\\Component\\HttpClient\\Response\\JsonMockResponse' => $vendorDir . '/symfony/http-client/Response/JsonMockResponse.php',
'Symfony\\Component\\HttpClient\\Response\\MockResponse' => $vendorDir . '/symfony/http-client/Response/MockResponse.php',
'Symfony\\Component\\HttpClient\\Response\\NativeResponse' => $vendorDir . '/symfony/http-client/Response/NativeResponse.php',
'Symfony\\Component\\HttpClient\\Response\\ResponseStream' => $vendorDir . '/symfony/http-client/Response/ResponseStream.php',
'Symfony\\Component\\HttpClient\\Response\\StreamWrapper' => $vendorDir . '/symfony/http-client/Response/StreamWrapper.php',
'Symfony\\Component\\HttpClient\\Response\\StreamableInterface' => $vendorDir . '/symfony/http-client/Response/StreamableInterface.php',
'Symfony\\Component\\HttpClient\\Response\\TraceableResponse' => $vendorDir . '/symfony/http-client/Response/TraceableResponse.php',
'Symfony\\Component\\HttpClient\\Response\\TransportResponseTrait' => $vendorDir . '/symfony/http-client/Response/TransportResponseTrait.php',
'Symfony\\Component\\HttpClient\\Retry\\GenericRetryStrategy' => $vendorDir . '/symfony/http-client/Retry/GenericRetryStrategy.php',
'Symfony\\Component\\HttpClient\\Retry\\RetryStrategyInterface' => $vendorDir . '/symfony/http-client/Retry/RetryStrategyInterface.php',
'Symfony\\Component\\HttpClient\\RetryableHttpClient' => $vendorDir . '/symfony/http-client/RetryableHttpClient.php',
'Symfony\\Component\\HttpClient\\ScopingHttpClient' => $vendorDir . '/symfony/http-client/ScopingHttpClient.php',
'Symfony\\Component\\HttpClient\\Test\\HarFileResponseFactory' => $vendorDir . '/symfony/http-client/Test/HarFileResponseFactory.php',
'Symfony\\Component\\HttpClient\\TraceableHttpClient' => $vendorDir . '/symfony/http-client/TraceableHttpClient.php',
'Symfony\\Component\\HttpClient\\UriTemplateHttpClient' => $vendorDir . '/symfony/http-client/UriTemplateHttpClient.php',
'Symfony\\Component\\String\\AbstractString' => $vendorDir . '/symfony/string/AbstractString.php',
'Symfony\\Component\\String\\AbstractUnicodeString' => $vendorDir . '/symfony/string/AbstractUnicodeString.php',
'Symfony\\Component\\String\\ByteString' => $vendorDir . '/symfony/string/ByteString.php',
'Symfony\\Component\\String\\CodePointString' => $vendorDir . '/symfony/string/CodePointString.php',
'Symfony\\Component\\String\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/string/Exception/ExceptionInterface.php',
'Symfony\\Component\\String\\Exception\\InvalidArgumentException' => $vendorDir . '/symfony/string/Exception/InvalidArgumentException.php',
'Symfony\\Component\\String\\Exception\\RuntimeException' => $vendorDir . '/symfony/string/Exception/RuntimeException.php',
'Symfony\\Component\\String\\Inflector\\EnglishInflector' => $vendorDir . '/symfony/string/Inflector/EnglishInflector.php',
'Symfony\\Component\\String\\Inflector\\FrenchInflector' => $vendorDir . '/symfony/string/Inflector/FrenchInflector.php',
'Symfony\\Component\\String\\Inflector\\InflectorInterface' => $vendorDir . '/symfony/string/Inflector/InflectorInterface.php',
'Symfony\\Component\\String\\LazyString' => $vendorDir . '/symfony/string/LazyString.php',
'Symfony\\Component\\String\\Slugger\\AsciiSlugger' => $vendorDir . '/symfony/string/Slugger/AsciiSlugger.php',
'Symfony\\Component\\String\\Slugger\\SluggerInterface' => $vendorDir . '/symfony/string/Slugger/SluggerInterface.php',
'Symfony\\Component\\String\\UnicodeString' => $vendorDir . '/symfony/string/UnicodeString.php',
'Symfony\\Contracts\\HttpClient\\ChunkInterface' => $vendorDir . '/symfony/http-client-contracts/ChunkInterface.php',
'Symfony\\Contracts\\HttpClient\\Exception\\ClientExceptionInterface' => $vendorDir . '/symfony/http-client-contracts/Exception/ClientExceptionInterface.php',
'Symfony\\Contracts\\HttpClient\\Exception\\DecodingExceptionInterface' => $vendorDir . '/symfony/http-client-contracts/Exception/DecodingExceptionInterface.php',
'Symfony\\Contracts\\HttpClient\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/http-client-contracts/Exception/ExceptionInterface.php',
'Symfony\\Contracts\\HttpClient\\Exception\\HttpExceptionInterface' => $vendorDir . '/symfony/http-client-contracts/Exception/HttpExceptionInterface.php',
'Symfony\\Contracts\\HttpClient\\Exception\\RedirectionExceptionInterface' => $vendorDir . '/symfony/http-client-contracts/Exception/RedirectionExceptionInterface.php',
'Symfony\\Contracts\\HttpClient\\Exception\\ServerExceptionInterface' => $vendorDir . '/symfony/http-client-contracts/Exception/ServerExceptionInterface.php',
'Symfony\\Contracts\\HttpClient\\Exception\\TimeoutExceptionInterface' => $vendorDir . '/symfony/http-client-contracts/Exception/TimeoutExceptionInterface.php',
'Symfony\\Contracts\\HttpClient\\Exception\\TransportExceptionInterface' => $vendorDir . '/symfony/http-client-contracts/Exception/TransportExceptionInterface.php',
'Symfony\\Contracts\\HttpClient\\HttpClientInterface' => $vendorDir . '/symfony/http-client-contracts/HttpClientInterface.php',
'Symfony\\Contracts\\HttpClient\\ResponseInterface' => $vendorDir . '/symfony/http-client-contracts/ResponseInterface.php',
'Symfony\\Contracts\\HttpClient\\ResponseStreamInterface' => $vendorDir . '/symfony/http-client-contracts/ResponseStreamInterface.php',
'Symfony\\Contracts\\Service\\Attribute\\Required' => $vendorDir . '/symfony/service-contracts/Attribute/Required.php',
'Symfony\\Contracts\\Service\\Attribute\\SubscribedService' => $vendorDir . '/symfony/service-contracts/Attribute/SubscribedService.php',
'Symfony\\Contracts\\Service\\ResetInterface' => $vendorDir . '/symfony/service-contracts/ResetInterface.php',
'Symfony\\Contracts\\Service\\ServiceCollectionInterface' => $vendorDir . '/symfony/service-contracts/ServiceCollectionInterface.php',
'Symfony\\Contracts\\Service\\ServiceLocatorTrait' => $vendorDir . '/symfony/service-contracts/ServiceLocatorTrait.php',
'Symfony\\Contracts\\Service\\ServiceMethodsSubscriberTrait' => $vendorDir . '/symfony/service-contracts/ServiceMethodsSubscriberTrait.php',
'Symfony\\Contracts\\Service\\ServiceProviderInterface' => $vendorDir . '/symfony/service-contracts/ServiceProviderInterface.php',
'Symfony\\Contracts\\Service\\ServiceSubscriberInterface' => $vendorDir . '/symfony/service-contracts/ServiceSubscriberInterface.php',
'Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => $vendorDir . '/symfony/service-contracts/ServiceSubscriberTrait.php',
'Symfony\\Polyfill\\Ctype\\Ctype' => $vendorDir . '/symfony/polyfill-ctype/Ctype.php',
'Symfony\\Polyfill\\Intl\\Grapheme\\Grapheme' => $vendorDir . '/symfony/polyfill-intl-grapheme/Grapheme.php',
'Symfony\\Polyfill\\Intl\\Normalizer\\Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Normalizer.php',
'Symfony\\Polyfill\\Mbstring\\Mbstring' => $vendorDir . '/symfony/polyfill-mbstring/Mbstring.php',
'ps_classic_edition' => $baseDir . '/ps_classic_edition.php',
);

View File

@@ -0,0 +1,15 @@
<?php
// autoload_files.php @generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
'8825ede83f2f289127722d4e842cf7e8' => $vendorDir . '/symfony/polyfill-intl-grapheme/bootstrap.php',
'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'b6b991a57620e2fb6b2f66f03fe9ddc2' => $vendorDir . '/symfony/string/Resources/functions.php',
);

View File

@@ -0,0 +1,9 @@
<?php
// autoload_namespaces.php @generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
);

View File

@@ -0,0 +1,23 @@
<?php
// autoload_psr4.php @generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
'Symfony\\Polyfill\\Intl\\Normalizer\\' => array($vendorDir . '/symfony/polyfill-intl-normalizer'),
'Symfony\\Polyfill\\Intl\\Grapheme\\' => array($vendorDir . '/symfony/polyfill-intl-grapheme'),
'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
'Symfony\\Contracts\\Service\\' => array($vendorDir . '/symfony/service-contracts'),
'Symfony\\Contracts\\HttpClient\\' => array($vendorDir . '/symfony/http-client-contracts'),
'Symfony\\Component\\String\\' => array($vendorDir . '/symfony/string'),
'Symfony\\Component\\HttpClient\\' => array($vendorDir . '/symfony/http-client'),
'Psr\\Log\\' => array($vendorDir . '/psr/log/src'),
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
'PrestaShop\\PsAccountsInstaller\\' => array($vendorDir . '/prestashop/prestashop-accounts-installer/src'),
'PrestaShop\\Module\\PsClassicEdition\\' => array($baseDir . '/src'),
'PrestaShop\\ModuleLibServiceContainer\\' => array($vendorDir . '/prestashop/module-lib-service-container/src'),
'PrestaShop\\ModuleLibCacheDirectoryProvider\\' => array($vendorDir . '/prestashop/module-lib-cache-directory-provider/src'),
);

View File

@@ -0,0 +1,50 @@
<?php
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitebe19a2c2a513990ab5c953d4b654b48
{
private static $loader;
public static function loadClassLoader($class)
{
if ('Composer\Autoload\ClassLoader' === $class) {
require __DIR__ . '/ClassLoader.php';
}
}
/**
* @return \Composer\Autoload\ClassLoader
*/
public static function getLoader()
{
if (null !== self::$loader) {
return self::$loader;
}
require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInitebe19a2c2a513990ab5c953d4b654b48', 'loadClassLoader'), true, false);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitebe19a2c2a513990ab5c953d4b654b48', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitebe19a2c2a513990ab5c953d4b654b48::getInitializer($loader));
$loader->register(false);
$filesToLoad = \Composer\Autoload\ComposerStaticInitebe19a2c2a513990ab5c953d4b654b48::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
require $file;
}
}, null, null);
foreach ($filesToLoad as $fileIdentifier => $file) {
$requireFile($fileIdentifier, $file);
}
return $loader;
}
}

View File

@@ -0,0 +1,252 @@
<?php
// autoload_static.php @generated by Composer
namespace Composer\Autoload;
class ComposerStaticInitebe19a2c2a513990ab5c953d4b654b48
{
public static $files = array (
'6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
'8825ede83f2f289127722d4e842cf7e8' => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme/bootstrap.php',
'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
'b6b991a57620e2fb6b2f66f03fe9ddc2' => __DIR__ . '/..' . '/symfony/string/Resources/functions.php',
);
public static $prefixLengthsPsr4 = array (
'S' =>
array (
'Symfony\\Polyfill\\Mbstring\\' => 26,
'Symfony\\Polyfill\\Intl\\Normalizer\\' => 33,
'Symfony\\Polyfill\\Intl\\Grapheme\\' => 31,
'Symfony\\Polyfill\\Ctype\\' => 23,
'Symfony\\Contracts\\Service\\' => 26,
'Symfony\\Contracts\\HttpClient\\' => 29,
'Symfony\\Component\\String\\' => 25,
'Symfony\\Component\\HttpClient\\' => 29,
),
'P' =>
array (
'Psr\\Log\\' => 8,
'Psr\\Container\\' => 14,
'PrestaShop\\PsAccountsInstaller\\' => 31,
'PrestaShop\\Module\\PsClassicEdition\\' => 35,
'PrestaShop\\ModuleLibServiceContainer\\' => 37,
'PrestaShop\\ModuleLibCacheDirectoryProvider\\' => 43,
),
);
public static $prefixDirsPsr4 = array (
'Symfony\\Polyfill\\Mbstring\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
),
'Symfony\\Polyfill\\Intl\\Normalizer\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer',
),
'Symfony\\Polyfill\\Intl\\Grapheme\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme',
),
'Symfony\\Polyfill\\Ctype\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/polyfill-ctype',
),
'Symfony\\Contracts\\Service\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/service-contracts',
),
'Symfony\\Contracts\\HttpClient\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/http-client-contracts',
),
'Symfony\\Component\\String\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/string',
),
'Symfony\\Component\\HttpClient\\' =>
array (
0 => __DIR__ . '/..' . '/symfony/http-client',
),
'Psr\\Log\\' =>
array (
0 => __DIR__ . '/..' . '/psr/log/src',
),
'Psr\\Container\\' =>
array (
0 => __DIR__ . '/..' . '/psr/container/src',
),
'PrestaShop\\PsAccountsInstaller\\' =>
array (
0 => __DIR__ . '/..' . '/prestashop/prestashop-accounts-installer/src',
),
'PrestaShop\\Module\\PsClassicEdition\\' =>
array (
0 => __DIR__ . '/../..' . '/src',
),
'PrestaShop\\ModuleLibServiceContainer\\' =>
array (
0 => __DIR__ . '/..' . '/prestashop/module-lib-service-container/src',
),
'PrestaShop\\ModuleLibCacheDirectoryProvider\\' =>
array (
0 => __DIR__ . '/..' . '/prestashop/module-lib-cache-directory-provider/src',
),
);
public static $classMap = array (
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
'Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php',
'PrestaShop\\ModuleLibCacheDirectoryProvider\\Cache\\CacheDirectoryProvider' => __DIR__ . '/..' . '/prestashop/module-lib-cache-directory-provider/src/Cache/CacheDirectoryProvider.php',
'PrestaShop\\ModuleLibServiceContainer\\DependencyInjection\\ContainerProvider' => __DIR__ . '/..' . '/prestashop/module-lib-service-container/src/DependencyInjection/ContainerProvider.php',
'PrestaShop\\ModuleLibServiceContainer\\DependencyInjection\\ServiceContainer' => __DIR__ . '/..' . '/prestashop/module-lib-service-container/src/DependencyInjection/ServiceContainer.php',
'PrestaShop\\Module\\PsClassicEdition\\Controller\\AdminPsClassicEditionHomepageController' => __DIR__ . '/../..' . '/src/Controller/AdminPsClassicEditionHomepageController.php',
'PrestaShop\\Module\\PsClassicEdition\\Controller\\AdminPsClassicEditionPsAcademyController' => __DIR__ . '/../..' . '/src/Controller/AdminPsClassicEditionPsAcademyController.php',
'PrestaShop\\Module\\PsClassicEdition\\Controller\\AdminPsClassicEditionSetupGuideController' => __DIR__ . '/../..' . '/src/Controller/AdminPsClassicEditionSetupGuideController.php',
'PrestaShop\\Module\\PsClassicEdition\\Helper\\PsAccountHelper' => __DIR__ . '/../..' . '/src/Helper/PsAccountHelper.php',
'PrestaShop\\Module\\PsClassicEdition\\Helper\\SetupGuideHelper' => __DIR__ . '/../..' . '/src/Helper/SetupGuideHelper.php',
'PrestaShop\\Module\\PsClassicEdition\\Install\\Tabs\\Tabs' => __DIR__ . '/../..' . '/src/Install/Tabs/Tabs.php',
'PrestaShop\\Module\\PsClassicEdition\\Install\\Tabs\\TabsInstaller' => __DIR__ . '/../..' . '/src/Install/Tabs/TabsInstaller.php',
'PrestaShop\\Module\\PsClassicEdition\\Install\\Tabs\\TabsUninstaller' => __DIR__ . '/../..' . '/src/Install/Tabs/TabsUninstaller.php',
'PrestaShop\\Module\\PsClassicEdition\\Presenter\\SetupGuideDataPresenter' => __DIR__ . '/../..' . '/src/Presenter/SetupGuideDataPresenter.php',
'PrestaShop\\Module\\PsClassicEdition\\Traits\\Hooks\\UseDisplayAdminStoreInformation' => __DIR__ . '/../..' . '/src/Traits/Hooks/UseDisplayAdminStoreInformation.php',
'PrestaShop\\Module\\PsClassicEdition\\Traits\\Hooks\\UseDisplayBackOfficeHeader' => __DIR__ . '/../..' . '/src/Traits/Hooks/UseDisplayBackOfficeHeader.php',
'PrestaShop\\Module\\PsClassicEdition\\Traits\\UseHooks' => __DIR__ . '/../..' . '/src/Traits/UseHooks.php',
'PrestaShop\\PsAccountsInstaller\\Installer\\Exception\\InstallerException' => __DIR__ . '/..' . '/prestashop/prestashop-accounts-installer/src/Installer/Exception/InstallerException.php',
'PrestaShop\\PsAccountsInstaller\\Installer\\Exception\\ModuleNotInstalledException' => __DIR__ . '/..' . '/prestashop/prestashop-accounts-installer/src/Installer/Exception/ModuleNotInstalledException.php',
'PrestaShop\\PsAccountsInstaller\\Installer\\Exception\\ModuleVersionException' => __DIR__ . '/..' . '/prestashop/prestashop-accounts-installer/src/Installer/Exception/ModuleVersionException.php',
'PrestaShop\\PsAccountsInstaller\\Installer\\Facade\\PsAccounts' => __DIR__ . '/..' . '/prestashop/prestashop-accounts-installer/src/Installer/Facade/PsAccounts.php',
'PrestaShop\\PsAccountsInstaller\\Installer\\Installer' => __DIR__ . '/..' . '/prestashop/prestashop-accounts-installer/src/Installer/Installer.php',
'PrestaShop\\PsAccountsInstaller\\Installer\\Presenter\\InstallerPresenter' => __DIR__ . '/..' . '/prestashop/prestashop-accounts-installer/src/Installer/Presenter/InstallerPresenter.php',
'Psr\\Container\\ContainerExceptionInterface' => __DIR__ . '/..' . '/psr/container/src/ContainerExceptionInterface.php',
'Psr\\Container\\ContainerInterface' => __DIR__ . '/..' . '/psr/container/src/ContainerInterface.php',
'Psr\\Container\\NotFoundExceptionInterface' => __DIR__ . '/..' . '/psr/container/src/NotFoundExceptionInterface.php',
'Psr\\Log\\AbstractLogger' => __DIR__ . '/..' . '/psr/log/src/AbstractLogger.php',
'Psr\\Log\\InvalidArgumentException' => __DIR__ . '/..' . '/psr/log/src/InvalidArgumentException.php',
'Psr\\Log\\LogLevel' => __DIR__ . '/..' . '/psr/log/src/LogLevel.php',
'Psr\\Log\\LoggerAwareInterface' => __DIR__ . '/..' . '/psr/log/src/LoggerAwareInterface.php',
'Psr\\Log\\LoggerAwareTrait' => __DIR__ . '/..' . '/psr/log/src/LoggerAwareTrait.php',
'Psr\\Log\\LoggerInterface' => __DIR__ . '/..' . '/psr/log/src/LoggerInterface.php',
'Psr\\Log\\LoggerTrait' => __DIR__ . '/..' . '/psr/log/src/LoggerTrait.php',
'Psr\\Log\\NullLogger' => __DIR__ . '/..' . '/psr/log/src/NullLogger.php',
'Symfony\\Component\\HttpClient\\AmpHttpClient' => __DIR__ . '/..' . '/symfony/http-client/AmpHttpClient.php',
'Symfony\\Component\\HttpClient\\AsyncDecoratorTrait' => __DIR__ . '/..' . '/symfony/http-client/AsyncDecoratorTrait.php',
'Symfony\\Component\\HttpClient\\CachingHttpClient' => __DIR__ . '/..' . '/symfony/http-client/CachingHttpClient.php',
'Symfony\\Component\\HttpClient\\Chunk\\DataChunk' => __DIR__ . '/..' . '/symfony/http-client/Chunk/DataChunk.php',
'Symfony\\Component\\HttpClient\\Chunk\\ErrorChunk' => __DIR__ . '/..' . '/symfony/http-client/Chunk/ErrorChunk.php',
'Symfony\\Component\\HttpClient\\Chunk\\FirstChunk' => __DIR__ . '/..' . '/symfony/http-client/Chunk/FirstChunk.php',
'Symfony\\Component\\HttpClient\\Chunk\\InformationalChunk' => __DIR__ . '/..' . '/symfony/http-client/Chunk/InformationalChunk.php',
'Symfony\\Component\\HttpClient\\Chunk\\LastChunk' => __DIR__ . '/..' . '/symfony/http-client/Chunk/LastChunk.php',
'Symfony\\Component\\HttpClient\\Chunk\\ServerSentEvent' => __DIR__ . '/..' . '/symfony/http-client/Chunk/ServerSentEvent.php',
'Symfony\\Component\\HttpClient\\CurlHttpClient' => __DIR__ . '/..' . '/symfony/http-client/CurlHttpClient.php',
'Symfony\\Component\\HttpClient\\DataCollector\\HttpClientDataCollector' => __DIR__ . '/..' . '/symfony/http-client/DataCollector/HttpClientDataCollector.php',
'Symfony\\Component\\HttpClient\\DecoratorTrait' => __DIR__ . '/..' . '/symfony/http-client/DecoratorTrait.php',
'Symfony\\Component\\HttpClient\\DependencyInjection\\HttpClientPass' => __DIR__ . '/..' . '/symfony/http-client/DependencyInjection/HttpClientPass.php',
'Symfony\\Component\\HttpClient\\EventSourceHttpClient' => __DIR__ . '/..' . '/symfony/http-client/EventSourceHttpClient.php',
'Symfony\\Component\\HttpClient\\Exception\\ClientException' => __DIR__ . '/..' . '/symfony/http-client/Exception/ClientException.php',
'Symfony\\Component\\HttpClient\\Exception\\EventSourceException' => __DIR__ . '/..' . '/symfony/http-client/Exception/EventSourceException.php',
'Symfony\\Component\\HttpClient\\Exception\\HttpExceptionTrait' => __DIR__ . '/..' . '/symfony/http-client/Exception/HttpExceptionTrait.php',
'Symfony\\Component\\HttpClient\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/http-client/Exception/InvalidArgumentException.php',
'Symfony\\Component\\HttpClient\\Exception\\JsonException' => __DIR__ . '/..' . '/symfony/http-client/Exception/JsonException.php',
'Symfony\\Component\\HttpClient\\Exception\\RedirectionException' => __DIR__ . '/..' . '/symfony/http-client/Exception/RedirectionException.php',
'Symfony\\Component\\HttpClient\\Exception\\ServerException' => __DIR__ . '/..' . '/symfony/http-client/Exception/ServerException.php',
'Symfony\\Component\\HttpClient\\Exception\\TimeoutException' => __DIR__ . '/..' . '/symfony/http-client/Exception/TimeoutException.php',
'Symfony\\Component\\HttpClient\\Exception\\TransportException' => __DIR__ . '/..' . '/symfony/http-client/Exception/TransportException.php',
'Symfony\\Component\\HttpClient\\HttpClient' => __DIR__ . '/..' . '/symfony/http-client/HttpClient.php',
'Symfony\\Component\\HttpClient\\HttpClientTrait' => __DIR__ . '/..' . '/symfony/http-client/HttpClientTrait.php',
'Symfony\\Component\\HttpClient\\HttpOptions' => __DIR__ . '/..' . '/symfony/http-client/HttpOptions.php',
'Symfony\\Component\\HttpClient\\HttplugClient' => __DIR__ . '/..' . '/symfony/http-client/HttplugClient.php',
'Symfony\\Component\\HttpClient\\Internal\\AmpBody' => __DIR__ . '/..' . '/symfony/http-client/Internal/AmpBody.php',
'Symfony\\Component\\HttpClient\\Internal\\AmpClientState' => __DIR__ . '/..' . '/symfony/http-client/Internal/AmpClientState.php',
'Symfony\\Component\\HttpClient\\Internal\\AmpListener' => __DIR__ . '/..' . '/symfony/http-client/Internal/AmpListener.php',
'Symfony\\Component\\HttpClient\\Internal\\AmpResolver' => __DIR__ . '/..' . '/symfony/http-client/Internal/AmpResolver.php',
'Symfony\\Component\\HttpClient\\Internal\\Canary' => __DIR__ . '/..' . '/symfony/http-client/Internal/Canary.php',
'Symfony\\Component\\HttpClient\\Internal\\ClientState' => __DIR__ . '/..' . '/symfony/http-client/Internal/ClientState.php',
'Symfony\\Component\\HttpClient\\Internal\\CurlClientState' => __DIR__ . '/..' . '/symfony/http-client/Internal/CurlClientState.php',
'Symfony\\Component\\HttpClient\\Internal\\DnsCache' => __DIR__ . '/..' . '/symfony/http-client/Internal/DnsCache.php',
'Symfony\\Component\\HttpClient\\Internal\\HttplugWaitLoop' => __DIR__ . '/..' . '/symfony/http-client/Internal/HttplugWaitLoop.php',
'Symfony\\Component\\HttpClient\\Internal\\LegacyHttplugInterface' => __DIR__ . '/..' . '/symfony/http-client/Internal/LegacyHttplugInterface.php',
'Symfony\\Component\\HttpClient\\Internal\\NativeClientState' => __DIR__ . '/..' . '/symfony/http-client/Internal/NativeClientState.php',
'Symfony\\Component\\HttpClient\\Internal\\PushedResponse' => __DIR__ . '/..' . '/symfony/http-client/Internal/PushedResponse.php',
'Symfony\\Component\\HttpClient\\Messenger\\PingWebhookMessage' => __DIR__ . '/..' . '/symfony/http-client/Messenger/PingWebhookMessage.php',
'Symfony\\Component\\HttpClient\\Messenger\\PingWebhookMessageHandler' => __DIR__ . '/..' . '/symfony/http-client/Messenger/PingWebhookMessageHandler.php',
'Symfony\\Component\\HttpClient\\MockHttpClient' => __DIR__ . '/..' . '/symfony/http-client/MockHttpClient.php',
'Symfony\\Component\\HttpClient\\NativeHttpClient' => __DIR__ . '/..' . '/symfony/http-client/NativeHttpClient.php',
'Symfony\\Component\\HttpClient\\NoPrivateNetworkHttpClient' => __DIR__ . '/..' . '/symfony/http-client/NoPrivateNetworkHttpClient.php',
'Symfony\\Component\\HttpClient\\Psr18Client' => __DIR__ . '/..' . '/symfony/http-client/Psr18Client.php',
'Symfony\\Component\\HttpClient\\Response\\AmpResponse' => __DIR__ . '/..' . '/symfony/http-client/Response/AmpResponse.php',
'Symfony\\Component\\HttpClient\\Response\\AsyncContext' => __DIR__ . '/..' . '/symfony/http-client/Response/AsyncContext.php',
'Symfony\\Component\\HttpClient\\Response\\AsyncResponse' => __DIR__ . '/..' . '/symfony/http-client/Response/AsyncResponse.php',
'Symfony\\Component\\HttpClient\\Response\\CommonResponseTrait' => __DIR__ . '/..' . '/symfony/http-client/Response/CommonResponseTrait.php',
'Symfony\\Component\\HttpClient\\Response\\CurlResponse' => __DIR__ . '/..' . '/symfony/http-client/Response/CurlResponse.php',
'Symfony\\Component\\HttpClient\\Response\\HttplugPromise' => __DIR__ . '/..' . '/symfony/http-client/Response/HttplugPromise.php',
'Symfony\\Component\\HttpClient\\Response\\JsonMockResponse' => __DIR__ . '/..' . '/symfony/http-client/Response/JsonMockResponse.php',
'Symfony\\Component\\HttpClient\\Response\\MockResponse' => __DIR__ . '/..' . '/symfony/http-client/Response/MockResponse.php',
'Symfony\\Component\\HttpClient\\Response\\NativeResponse' => __DIR__ . '/..' . '/symfony/http-client/Response/NativeResponse.php',
'Symfony\\Component\\HttpClient\\Response\\ResponseStream' => __DIR__ . '/..' . '/symfony/http-client/Response/ResponseStream.php',
'Symfony\\Component\\HttpClient\\Response\\StreamWrapper' => __DIR__ . '/..' . '/symfony/http-client/Response/StreamWrapper.php',
'Symfony\\Component\\HttpClient\\Response\\StreamableInterface' => __DIR__ . '/..' . '/symfony/http-client/Response/StreamableInterface.php',
'Symfony\\Component\\HttpClient\\Response\\TraceableResponse' => __DIR__ . '/..' . '/symfony/http-client/Response/TraceableResponse.php',
'Symfony\\Component\\HttpClient\\Response\\TransportResponseTrait' => __DIR__ . '/..' . '/symfony/http-client/Response/TransportResponseTrait.php',
'Symfony\\Component\\HttpClient\\Retry\\GenericRetryStrategy' => __DIR__ . '/..' . '/symfony/http-client/Retry/GenericRetryStrategy.php',
'Symfony\\Component\\HttpClient\\Retry\\RetryStrategyInterface' => __DIR__ . '/..' . '/symfony/http-client/Retry/RetryStrategyInterface.php',
'Symfony\\Component\\HttpClient\\RetryableHttpClient' => __DIR__ . '/..' . '/symfony/http-client/RetryableHttpClient.php',
'Symfony\\Component\\HttpClient\\ScopingHttpClient' => __DIR__ . '/..' . '/symfony/http-client/ScopingHttpClient.php',
'Symfony\\Component\\HttpClient\\Test\\HarFileResponseFactory' => __DIR__ . '/..' . '/symfony/http-client/Test/HarFileResponseFactory.php',
'Symfony\\Component\\HttpClient\\TraceableHttpClient' => __DIR__ . '/..' . '/symfony/http-client/TraceableHttpClient.php',
'Symfony\\Component\\HttpClient\\UriTemplateHttpClient' => __DIR__ . '/..' . '/symfony/http-client/UriTemplateHttpClient.php',
'Symfony\\Component\\String\\AbstractString' => __DIR__ . '/..' . '/symfony/string/AbstractString.php',
'Symfony\\Component\\String\\AbstractUnicodeString' => __DIR__ . '/..' . '/symfony/string/AbstractUnicodeString.php',
'Symfony\\Component\\String\\ByteString' => __DIR__ . '/..' . '/symfony/string/ByteString.php',
'Symfony\\Component\\String\\CodePointString' => __DIR__ . '/..' . '/symfony/string/CodePointString.php',
'Symfony\\Component\\String\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/string/Exception/ExceptionInterface.php',
'Symfony\\Component\\String\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/symfony/string/Exception/InvalidArgumentException.php',
'Symfony\\Component\\String\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/string/Exception/RuntimeException.php',
'Symfony\\Component\\String\\Inflector\\EnglishInflector' => __DIR__ . '/..' . '/symfony/string/Inflector/EnglishInflector.php',
'Symfony\\Component\\String\\Inflector\\FrenchInflector' => __DIR__ . '/..' . '/symfony/string/Inflector/FrenchInflector.php',
'Symfony\\Component\\String\\Inflector\\InflectorInterface' => __DIR__ . '/..' . '/symfony/string/Inflector/InflectorInterface.php',
'Symfony\\Component\\String\\LazyString' => __DIR__ . '/..' . '/symfony/string/LazyString.php',
'Symfony\\Component\\String\\Slugger\\AsciiSlugger' => __DIR__ . '/..' . '/symfony/string/Slugger/AsciiSlugger.php',
'Symfony\\Component\\String\\Slugger\\SluggerInterface' => __DIR__ . '/..' . '/symfony/string/Slugger/SluggerInterface.php',
'Symfony\\Component\\String\\UnicodeString' => __DIR__ . '/..' . '/symfony/string/UnicodeString.php',
'Symfony\\Contracts\\HttpClient\\ChunkInterface' => __DIR__ . '/..' . '/symfony/http-client-contracts/ChunkInterface.php',
'Symfony\\Contracts\\HttpClient\\Exception\\ClientExceptionInterface' => __DIR__ . '/..' . '/symfony/http-client-contracts/Exception/ClientExceptionInterface.php',
'Symfony\\Contracts\\HttpClient\\Exception\\DecodingExceptionInterface' => __DIR__ . '/..' . '/symfony/http-client-contracts/Exception/DecodingExceptionInterface.php',
'Symfony\\Contracts\\HttpClient\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/http-client-contracts/Exception/ExceptionInterface.php',
'Symfony\\Contracts\\HttpClient\\Exception\\HttpExceptionInterface' => __DIR__ . '/..' . '/symfony/http-client-contracts/Exception/HttpExceptionInterface.php',
'Symfony\\Contracts\\HttpClient\\Exception\\RedirectionExceptionInterface' => __DIR__ . '/..' . '/symfony/http-client-contracts/Exception/RedirectionExceptionInterface.php',
'Symfony\\Contracts\\HttpClient\\Exception\\ServerExceptionInterface' => __DIR__ . '/..' . '/symfony/http-client-contracts/Exception/ServerExceptionInterface.php',
'Symfony\\Contracts\\HttpClient\\Exception\\TimeoutExceptionInterface' => __DIR__ . '/..' . '/symfony/http-client-contracts/Exception/TimeoutExceptionInterface.php',
'Symfony\\Contracts\\HttpClient\\Exception\\TransportExceptionInterface' => __DIR__ . '/..' . '/symfony/http-client-contracts/Exception/TransportExceptionInterface.php',
'Symfony\\Contracts\\HttpClient\\HttpClientInterface' => __DIR__ . '/..' . '/symfony/http-client-contracts/HttpClientInterface.php',
'Symfony\\Contracts\\HttpClient\\ResponseInterface' => __DIR__ . '/..' . '/symfony/http-client-contracts/ResponseInterface.php',
'Symfony\\Contracts\\HttpClient\\ResponseStreamInterface' => __DIR__ . '/..' . '/symfony/http-client-contracts/ResponseStreamInterface.php',
'Symfony\\Contracts\\Service\\Attribute\\Required' => __DIR__ . '/..' . '/symfony/service-contracts/Attribute/Required.php',
'Symfony\\Contracts\\Service\\Attribute\\SubscribedService' => __DIR__ . '/..' . '/symfony/service-contracts/Attribute/SubscribedService.php',
'Symfony\\Contracts\\Service\\ResetInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ResetInterface.php',
'Symfony\\Contracts\\Service\\ServiceCollectionInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceCollectionInterface.php',
'Symfony\\Contracts\\Service\\ServiceLocatorTrait' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceLocatorTrait.php',
'Symfony\\Contracts\\Service\\ServiceMethodsSubscriberTrait' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceMethodsSubscriberTrait.php',
'Symfony\\Contracts\\Service\\ServiceProviderInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceProviderInterface.php',
'Symfony\\Contracts\\Service\\ServiceSubscriberInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceSubscriberInterface.php',
'Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceSubscriberTrait.php',
'Symfony\\Polyfill\\Ctype\\Ctype' => __DIR__ . '/..' . '/symfony/polyfill-ctype/Ctype.php',
'Symfony\\Polyfill\\Intl\\Grapheme\\Grapheme' => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme/Grapheme.php',
'Symfony\\Polyfill\\Intl\\Normalizer\\Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Normalizer.php',
'Symfony\\Polyfill\\Mbstring\\Mbstring' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/Mbstring.php',
'ps_classic_edition' => __DIR__ . '/../..' . '/ps_classic_edition.php',
);
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitebe19a2c2a513990ab5c953d4b654b48::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitebe19a2c2a513990ab5c953d4b654b48::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitebe19a2c2a513990ab5c953d4b654b48::$classMap;
}, null, ClassLoader::class);
}
}

View File

@@ -0,0 +1,11 @@
<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,173 @@
<?php return array(
'root' => array(
'name' => 'prestashopcorp/ps_classic_edition',
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => '5a1d39065b1a82457a02427d3765d6436cb9905e',
'type' => 'prestashop-module',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev' => false,
),
'versions' => array(
'php-http/async-client-implementation' => array(
'dev_requirement' => false,
'provided' => array(
0 => '*',
),
),
'php-http/client-implementation' => array(
'dev_requirement' => false,
'provided' => array(
0 => '*',
),
),
'prestashop/module-lib-cache-directory-provider' => array(
'pretty_version' => 'v1.0.0',
'version' => '1.0.0.0',
'reference' => '34a577b66a7e52ae16d6f40efd1db17290bad453',
'type' => 'project',
'install_path' => __DIR__ . '/../prestashop/module-lib-cache-directory-provider',
'aliases' => array(),
'dev_requirement' => false,
),
'prestashop/module-lib-service-container' => array(
'pretty_version' => 'v2.0',
'version' => '2.0.0.0',
'reference' => '5525b56513d9ddad6e4232dfd93a24e028efdca7',
'type' => 'library',
'install_path' => __DIR__ . '/../prestashop/module-lib-service-container',
'aliases' => array(),
'dev_requirement' => false,
),
'prestashop/prestashop-accounts-installer' => array(
'pretty_version' => 'v1.0.4',
'version' => '1.0.4.0',
'reference' => '0ad934bc540558db3944a9a1e5b08b852bb46e8b',
'type' => 'library',
'install_path' => __DIR__ . '/../prestashop/prestashop-accounts-installer',
'aliases' => array(),
'dev_requirement' => false,
),
'prestashopcorp/ps_classic_edition' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => '5a1d39065b1a82457a02427d3765d6436cb9905e',
'type' => 'prestashop-module',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev_requirement' => false,
),
'psr/container' => array(
'pretty_version' => '2.0.2',
'version' => '2.0.2.0',
'reference' => 'c71ecc56dfe541dbd90c5360474fbc405f8d5963',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/container',
'aliases' => array(),
'dev_requirement' => false,
),
'psr/http-client-implementation' => array(
'dev_requirement' => false,
'provided' => array(
0 => '1.0',
),
),
'psr/log' => array(
'pretty_version' => '3.0.2',
'version' => '3.0.2.0',
'reference' => 'f16e1d5863e37f8d8c2a01719f5b34baa2b714d3',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/log',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/deprecation-contracts' => array(
'pretty_version' => 'v3.6.0',
'version' => '3.6.0.0',
'reference' => '63afe740e99a13ba87ec199bb07bbdee937a5b62',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/http-client' => array(
'pretty_version' => 'v6.4.15',
'version' => '6.4.15.0',
'reference' => 'cb4073c905cd12b8496d24ac428a9228c1750670',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/http-client',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/http-client-contracts' => array(
'pretty_version' => 'v3.6.0',
'version' => '3.6.0.0',
'reference' => '75d7043853a42837e68111812f4d964b01e5101c',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/http-client-contracts',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/http-client-implementation' => array(
'dev_requirement' => false,
'provided' => array(
0 => '3.0',
),
),
'symfony/polyfill-ctype' => array(
'pretty_version' => 'v1.33.0',
'version' => '1.33.0.0',
'reference' => 'a3cc8b044a6ea513310cbd48ef7333b384945638',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-ctype',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/polyfill-intl-grapheme' => array(
'pretty_version' => 'v1.33.0',
'version' => '1.33.0.0',
'reference' => '380872130d3a5dd3ace2f4010d95125fde5d5c70',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-intl-grapheme',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/polyfill-intl-normalizer' => array(
'pretty_version' => 'v1.33.0',
'version' => '1.33.0.0',
'reference' => '3833d7255cc303546435cb650316bff708a1c75c',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/polyfill-mbstring' => array(
'pretty_version' => 'v1.33.0',
'version' => '1.33.0.0',
'reference' => '6d857f4d76bd4b343eac26d6b539585d2bc56493',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/service-contracts' => array(
'pretty_version' => 'v3.6.0',
'version' => '3.6.0.0',
'reference' => 'f021b05a130d35510bd6b25fe9053c2a8a15d5d4',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/service-contracts',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/string' => array(
'pretty_version' => 'v6.4.26',
'version' => '6.4.26.0',
'reference' => '5621f039a71a11c87c106c1c598bdcd04a19aeea',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/string',
'aliases' => array(),
'dev_requirement' => false,
),
),
);

View File

@@ -0,0 +1,25 @@
<?php
// platform_check.php @generated by Composer
$issues = array();
if (!(PHP_VERSION_ID >= 80100)) {
$issues[] = 'Your Composer dependencies require a PHP version ">= 8.1.0". You are running ' . PHP_VERSION . '.';
}
if ($issues) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
} elseif (!headers_sent()) {
echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
}
}
throw new \RuntimeException(
'Composer detected issues in your platform: ' . implode(' ', $issues)
);
}

View File

@@ -0,0 +1,11 @@
<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,11 @@
<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,170 @@
Academic Free License (“AFL”) v. 3.0
This Academic Free License (the "License") applies to any original work of
authorship (the "Original Work") whose owner (the "Licensor") has placed the
following licensing notice adjacent to the copyright notice for the Original
Work:
Licensed under the Academic Free License version 3.0
1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free,
non-exclusive, sublicensable license, for the duration of the copyright, to do
the following:
a) to reproduce the Original Work in copies, either alone or as part of a
collective work;
b) to translate, adapt, alter, transform, modify, or arrange the Original
Work, thereby creating derivative works ("Derivative Works") based upon
the Original Work;
c) to distribute or communicate copies of the Original Work and
Derivative Works to the public, under any license of your choice that
does not contradict the terms and conditions, including Licensors
reserved rights and remedies, in this Academic Free License;
d) to perform the Original Work publicly; and
e) to display the Original Work publicly.
2) Grant of Patent License. Licensor grants You a worldwide, royalty-free,
non-exclusive, sublicensable license, under patent claims owned or controlled
by the Licensor that are embodied in the Original Work as furnished by the
Licensor, for the duration of the patents, to make, use, sell, offer for sale,
have made, and import the Original Work and Derivative Works.
3) Grant of Source Code License. The term "Source Code" means the preferred
form of the Original Work for making modifications to it and all available
documentation describing how to modify the Original Work. Licensor agrees to
provide a machine-readable copy of the Source Code of the Original Work along
with each copy of the Original Work that Licensor distributes. Licensor
reserves the right to satisfy this obligation by placing a machine-readable
copy of the Source Code in an information repository reasonably calculated to
permit inexpensive and convenient access by You for as long as Licensor
continues to distribute the Original Work.
4) Exclusions From License Grant. Neither the names of Licensor, nor the names
of any contributors to the Original Work, nor any of their trademarks or
service marks, may be used to endorse or promote products derived from this
Original Work without express prior permission of the Licensor. Except as
expressly stated herein, nothing in this License grants any license to
Licensors trademarks, copyrights, patents, trade secrets or any other
intellectual property. No patent license is granted to make, use, sell, offer
for sale, have made, or import embodiments of any patent claims other than the
licensed claims defined in Section 2. No license is granted to the trademarks
of Licensor even if such marks are included in the Original Work. Nothing in
this License shall be interpreted to prohibit Licensor from licensing under
terms different from this License any Original Work that Licensor otherwise
would have a right to license.
5) External Deployment. The term "External Deployment" means the use,
distribution, or communication of the Original Work or Derivative Works in any
way such that the Original Work or Derivative Works may be used by anyone
other than You, whether those works are distributed or communicated to those
persons or made available as an application intended for use over a network.
As an express condition for the grants of license hereunder, You must treat
any External Deployment by You of the Original Work or a Derivative Work as a
distribution under section 1(c).
6) Attribution Rights. You must retain, in the Source Code of any Derivative
Works that You create, all copyright, patent, or trademark notices from the
Source Code of the Original Work, as well as any notices of licensing and any
descriptive text identified therein as an "Attribution Notice." You must cause
the Source Code for any Derivative Works that You create to carry a prominent
Attribution Notice reasonably calculated to inform recipients that You have
modified the Original Work.
7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that
the copyright in and to the Original Work and the patent rights granted herein
by Licensor are owned by the Licensor or are sublicensed to You under the
terms of this License with the permission of the contributor(s) of those
copyrights and patent rights. Except as expressly stated in the immediately
preceding sentence, the Original Work is provided under this License on an "AS
IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without
limitation, the warranties of non-infringement, merchantability or fitness for
a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK
IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this
License. No license to the Original Work is granted by this License except
under this disclaimer.
8) Limitation of Liability. Under no circumstances and under no legal theory,
whether in tort (including negligence), contract, or otherwise, shall the
Licensor be liable to anyone for any indirect, special, incidental, or
consequential damages of any character arising as a result of this License or
the use of the Original Work including, without limitation, damages for loss
of goodwill, work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses. This limitation of liability shall not
apply to the extent applicable law prohibits such limitation.
9) Acceptance and Termination. If, at any time, You expressly assented to this
License, that assent indicates your clear and irrevocable acceptance of this
License and all of its terms and conditions. If You distribute or communicate
copies of the Original Work or a Derivative Work, You must make a reasonable
effort under the circumstances to obtain the express assent of recipients to
the terms of this License. This License conditions your rights to undertake
the activities listed in Section 1, including your right to create Derivative
Works based upon the Original Work, and doing so without honoring these terms
and conditions is prohibited by copyright law and international treaty.
Nothing in this License is intended to affect copyright exceptions and
limitations (including “fair use” or “fair dealing”). This License shall
terminate immediately and You may no longer exercise any of the rights granted
to You by this License upon your failure to honor the conditions in Section
1(c).
10) Termination for Patent Action. This License shall terminate automatically
and You may no longer exercise any of the rights granted to You by this
License as of the date You commence an action, including a cross-claim or
counterclaim, against Licensor or any licensee alleging that the Original Work
infringes a patent. This termination provision shall not apply for an action
alleging patent infringement by combinations of the Original Work with other
software or hardware.
11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this
License may be brought only in the courts of a jurisdiction wherein the
Licensor resides or in which Licensor conducts its primary business, and under
the laws of that jurisdiction excluding its conflict-of-law provisions. The
application of the United Nations Convention on Contracts for the
International Sale of Goods is expressly excluded. Any use of the Original
Work outside the scope of this License or after its termination shall be
subject to the requirements and penalties of copyright or patent law in the
appropriate jurisdiction. This section shall survive the termination of this
License.
12) Attorneys Fees. In any action to enforce the terms of this License or
seeking damages relating thereto, the prevailing party shall be entitled to
recover its costs and expenses, including, without limitation, reasonable
attorneys' fees and costs incurred in connection with such action, including
any appeal of such action. This section shall survive the termination of this
License.
13) Miscellaneous. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent necessary
to make it enforceable.
14) Definition of "You" in This License. "You" throughout this License,
whether in upper or lower case, means an individual or a legal entity
exercising rights under, and complying with all of the terms of, this License.
For legal entities, "You" includes any entity that controls, is controlled by,
or is under common control with you. For purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the direction or
management of such entity, whether by contract or otherwise, or (ii) ownership
of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial
ownership of such entity.
15) Right to Use. You may use the Original Work in all ways not otherwise
restricted or conditioned by this License or by law, and Licensor promises not
to interfere with or be responsible for such uses by You.
16) Modification of This License. This License is Copyright © 2005 Lawrence
Rosen. Permission is granted to copy, distribute, or communicate this License
without modification. Nothing in this License permits You to modify this
License as applied to the Original Work or to Derivative Works. However, You
may modify the text of this License and copy, distribute or communicate your
modified version (the "Modified License") and apply it to other original works
of authorship subject to the following conditions: (i) You may not indicate in
any way that your Modified License is the "Academic Free License" or "AFL" and
you may not use those names in the name of your Modified License; (ii) You
must replace the notice specified in the first paragraph above with the notice
"Licensed under <insert your license name here>" or with a notice of your own
that is not confusingly similar to the notice in this License; and (iii) You
may not claim that your original works are open source software unless your
Modified License has been approved by Open Source Initiative (OSI) and You
comply with its license review and certification process.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,11 @@
<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,98 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
*/
namespace PrestaShop\ModuleLibCacheDirectoryProvider\Cache;
/**
* Class responsible for returning cache directory path.
*/
class CacheDirectoryProvider
{
/**
* @var string PrestaShop version
*/
private $psVersion;
/**
* @var string PrestaShop path
*/
private $psPath;
/**
* @var bool PrestaShop Debug Mode
*/
private $psIsDebugMode;
/**
* @param string $psVersion
* @param string $psPath
* @param bool $psIsDebugMode
*/
public function __construct($psVersion, $psPath, $psIsDebugMode)
{
$this->psVersion = $psVersion;
$this->psPath = $psPath;
$this->psIsDebugMode = $psIsDebugMode;
}
/**
* @return string
*/
public function getPath()
{
if (defined('_PS_CACHE_DIR_')) {
return constant('_PS_CACHE_DIR_');
}
$path = '/var/cache/' . $this->getEnvName();
if (version_compare($this->psVersion, '1.7.0.0', '<')) {
$path = '/cache';
} elseif (version_compare($this->psVersion, '1.7.4.0', '<')) {
$path = '/app/cache/' . $this->getEnvName();
}
return $this->psPath . $path;
}
/**
* @return bool
*/
public function isWritable()
{
return is_writable($this->getPath());
}
/**
* @return bool
*/
public function isReadable()
{
return is_readable($this->getPath());
}
/**
* @return string
*/
private function getEnvName()
{
return $this->psIsDebugMode ? 'dev' : 'prod';
}
}

View File

@@ -0,0 +1,11 @@
<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,11 @@
<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,170 @@
Academic Free License (“AFL”) v. 3.0
This Academic Free License (the "License") applies to any original work of
authorship (the "Original Work") whose owner (the "Licensor") has placed the
following licensing notice adjacent to the copyright notice for the Original
Work:
Licensed under the Academic Free License version 3.0
1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free,
non-exclusive, sublicensable license, for the duration of the copyright, to do
the following:
a) to reproduce the Original Work in copies, either alone or as part of a
collective work;
b) to translate, adapt, alter, transform, modify, or arrange the Original
Work, thereby creating derivative works ("Derivative Works") based upon
the Original Work;
c) to distribute or communicate copies of the Original Work and
Derivative Works to the public, under any license of your choice that
does not contradict the terms and conditions, including Licensors
reserved rights and remedies, in this Academic Free License;
d) to perform the Original Work publicly; and
e) to display the Original Work publicly.
2) Grant of Patent License. Licensor grants You a worldwide, royalty-free,
non-exclusive, sublicensable license, under patent claims owned or controlled
by the Licensor that are embodied in the Original Work as furnished by the
Licensor, for the duration of the patents, to make, use, sell, offer for sale,
have made, and import the Original Work and Derivative Works.
3) Grant of Source Code License. The term "Source Code" means the preferred
form of the Original Work for making modifications to it and all available
documentation describing how to modify the Original Work. Licensor agrees to
provide a machine-readable copy of the Source Code of the Original Work along
with each copy of the Original Work that Licensor distributes. Licensor
reserves the right to satisfy this obligation by placing a machine-readable
copy of the Source Code in an information repository reasonably calculated to
permit inexpensive and convenient access by You for as long as Licensor
continues to distribute the Original Work.
4) Exclusions From License Grant. Neither the names of Licensor, nor the names
of any contributors to the Original Work, nor any of their trademarks or
service marks, may be used to endorse or promote products derived from this
Original Work without express prior permission of the Licensor. Except as
expressly stated herein, nothing in this License grants any license to
Licensors trademarks, copyrights, patents, trade secrets or any other
intellectual property. No patent license is granted to make, use, sell, offer
for sale, have made, or import embodiments of any patent claims other than the
licensed claims defined in Section 2. No license is granted to the trademarks
of Licensor even if such marks are included in the Original Work. Nothing in
this License shall be interpreted to prohibit Licensor from licensing under
terms different from this License any Original Work that Licensor otherwise
would have a right to license.
5) External Deployment. The term "External Deployment" means the use,
distribution, or communication of the Original Work or Derivative Works in any
way such that the Original Work or Derivative Works may be used by anyone
other than You, whether those works are distributed or communicated to those
persons or made available as an application intended for use over a network.
As an express condition for the grants of license hereunder, You must treat
any External Deployment by You of the Original Work or a Derivative Work as a
distribution under section 1(c).
6) Attribution Rights. You must retain, in the Source Code of any Derivative
Works that You create, all copyright, patent, or trademark notices from the
Source Code of the Original Work, as well as any notices of licensing and any
descriptive text identified therein as an "Attribution Notice." You must cause
the Source Code for any Derivative Works that You create to carry a prominent
Attribution Notice reasonably calculated to inform recipients that You have
modified the Original Work.
7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that
the copyright in and to the Original Work and the patent rights granted herein
by Licensor are owned by the Licensor or are sublicensed to You under the
terms of this License with the permission of the contributor(s) of those
copyrights and patent rights. Except as expressly stated in the immediately
preceding sentence, the Original Work is provided under this License on an "AS
IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without
limitation, the warranties of non-infringement, merchantability or fitness for
a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK
IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this
License. No license to the Original Work is granted by this License except
under this disclaimer.
8) Limitation of Liability. Under no circumstances and under no legal theory,
whether in tort (including negligence), contract, or otherwise, shall the
Licensor be liable to anyone for any indirect, special, incidental, or
consequential damages of any character arising as a result of this License or
the use of the Original Work including, without limitation, damages for loss
of goodwill, work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses. This limitation of liability shall not
apply to the extent applicable law prohibits such limitation.
9) Acceptance and Termination. If, at any time, You expressly assented to this
License, that assent indicates your clear and irrevocable acceptance of this
License and all of its terms and conditions. If You distribute or communicate
copies of the Original Work or a Derivative Work, You must make a reasonable
effort under the circumstances to obtain the express assent of recipients to
the terms of this License. This License conditions your rights to undertake
the activities listed in Section 1, including your right to create Derivative
Works based upon the Original Work, and doing so without honoring these terms
and conditions is prohibited by copyright law and international treaty.
Nothing in this License is intended to affect copyright exceptions and
limitations (including “fair use” or “fair dealing”). This License shall
terminate immediately and You may no longer exercise any of the rights granted
to You by this License upon your failure to honor the conditions in Section
1(c).
10) Termination for Patent Action. This License shall terminate automatically
and You may no longer exercise any of the rights granted to You by this
License as of the date You commence an action, including a cross-claim or
counterclaim, against Licensor or any licensee alleging that the Original Work
infringes a patent. This termination provision shall not apply for an action
alleging patent infringement by combinations of the Original Work with other
software or hardware.
11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this
License may be brought only in the courts of a jurisdiction wherein the
Licensor resides or in which Licensor conducts its primary business, and under
the laws of that jurisdiction excluding its conflict-of-law provisions. The
application of the United Nations Convention on Contracts for the
International Sale of Goods is expressly excluded. Any use of the Original
Work outside the scope of this License or after its termination shall be
subject to the requirements and penalties of copyright or patent law in the
appropriate jurisdiction. This section shall survive the termination of this
License.
12) Attorneys Fees. In any action to enforce the terms of this License or
seeking damages relating thereto, the prevailing party shall be entitled to
recover its costs and expenses, including, without limitation, reasonable
attorneys' fees and costs incurred in connection with such action, including
any appeal of such action. This section shall survive the termination of this
License.
13) Miscellaneous. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent necessary
to make it enforceable.
14) Definition of "You" in This License. "You" throughout this License,
whether in upper or lower case, means an individual or a legal entity
exercising rights under, and complying with all of the terms of, this License.
For legal entities, "You" includes any entity that controls, is controlled by,
or is under common control with you. For purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the direction or
management of such entity, whether by contract or otherwise, or (ii) ownership
of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial
ownership of such entity.
15) Right to Use. You may use the Original Work in all ways not otherwise
restricted or conditioned by this License or by law, and Licensor promises not
to interfere with or be responsible for such uses by You.
16) Modification of This License. This License is Copyright © 2005 Lawrence
Rosen. Permission is granted to copy, distribute, or communicate this License
without modification. Nothing in this License permits You to modify this
License as applied to the Original Work or to Derivative Works. However, You
may modify the text of this License and copy, distribute or communicate your
modified version (the "Modified License") and apply it to other original works
of authorship subject to the following conditions: (i) You may not indicate in
any way that your Modified License is the "Academic Free License" or "AFL" and
you may not use those names in the name of your Modified License; (ii) You
must replace the notice specified in the first paragraph above with the notice
"Licensed under <insert your license name here>" or with a notice of your own
that is not confusingly similar to the notice in this License; and (iii) You
may not claim that your original works are open source software unless your
Modified License has been approved by Open Source Initiative (OSI) and You
comply with its license review and certification process.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,11 @@
<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,100 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
*/
namespace PrestaShop\ModuleLibServiceContainer\DependencyInjection;
use PrestaShop\ModuleLibCacheDirectoryProvider\Cache\CacheDirectoryProvider;
use Symfony\Component\Config\ConfigCache;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Dumper\PhpDumper;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
class ContainerProvider
{
/**
* @var string Module Name
*/
private $moduleName;
/**
* @var string Module Local Path
*/
private $moduleLocalPath;
/**
* @var CacheDirectoryProvider
*/
private $cacheDirectory;
/**
* @param string $moduleName
* @param string $moduleLocalPath
* @param CacheDirectoryProvider $cacheDirectory
*/
public function __construct($moduleName, $moduleLocalPath, CacheDirectoryProvider $cacheDirectory)
{
$this->moduleName = $moduleName;
$this->moduleLocalPath = $moduleLocalPath;
$this->cacheDirectory = $cacheDirectory;
}
/**
* @param string $containerName
*
* @return ContainerInterface
*/
public function get($containerName)
{
$containerClassName = ucfirst($this->moduleName)
. ucfirst($containerName)
. 'Container'
;
$containerFilePath = $this->cacheDirectory->getPath() . '/' . $containerClassName . '.php';
$containerConfigCache = new ConfigCache($containerFilePath, constant('_PS_MODE_DEV_'));
if ($containerConfigCache->isFresh()) {
require_once $containerFilePath;
return new $containerClassName();
}
$containerBuilder = new ContainerBuilder();
$containerBuilder->set(
$this->moduleName . '.cache.directory',
$this->cacheDirectory
);
$moduleConfigPath = $this->moduleLocalPath
. 'config/'
. $containerName
;
$loader = new YamlFileLoader($containerBuilder, new FileLocator($moduleConfigPath));
$loader->load('services.yml');
$containerBuilder->compile();
$dumper = new PhpDumper($containerBuilder);
$containerConfigCache->write(
$dumper->dump(['class' => $containerClassName]),
$containerBuilder->getResources()
);
return $containerBuilder;
}
}

View File

@@ -0,0 +1,83 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
*/
namespace PrestaShop\ModuleLibServiceContainer\DependencyInjection;
use PrestaShop\ModuleLibCacheDirectoryProvider\Cache\CacheDirectoryProvider;
use Symfony\Component\DependencyInjection\ContainerInterface;
class ServiceContainer
{
/**
* @var string Module Name
*/
private $moduleName;
/**
* @var string Module Local Path
*/
private $moduleLocalPath;
/**
* @var ContainerInterface
*/
private $container;
/**
* @param string $moduleName
* @param string $moduleLocalPath
*/
public function __construct($moduleName, $moduleLocalPath)
{
$this->moduleName = $moduleName;
$this->moduleLocalPath = $moduleLocalPath;
}
/**
* @param string $serviceName
*
* @return object|null
*/
public function getService($serviceName)
{
if (null === $this->container) {
$this->initContainer();
}
return $this->container->get($serviceName);
}
/**
* Instantiate a new ContainerProvider
*
* @return void
*/
private function initContainer()
{
$cacheDirectory = new CacheDirectoryProvider(
constant('_PS_VERSION_'),
constant('_PS_ROOT_DIR_'),
constant('_PS_MODE_DEV_')
);
$containerProvider = new ContainerProvider($this->moduleName, $this->moduleLocalPath, $cacheDirectory);
$this->container = $containerProvider->get(defined('_PS_ADMIN_DIR_') || defined('PS_INSTALLATION_IN_PROGRESS') || PHP_SAPI === 'cli' ? 'admin' : 'front');
}
}

View File

@@ -0,0 +1,11 @@
<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,11 @@
<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 PrestaShopCorp
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,11 @@
<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,7 @@
<?php
namespace PrestaShop\PsAccountsInstaller\Installer\Exception;
class InstallerException extends \Exception
{
}

View File

@@ -0,0 +1,7 @@
<?php
namespace PrestaShop\PsAccountsInstaller\Installer\Exception;
class ModuleNotInstalledException extends InstallerException
{
}

View File

@@ -0,0 +1,7 @@
<?php
namespace PrestaShop\PsAccountsInstaller\Installer\Exception;
class ModuleVersionException extends InstallerException
{
}

View File

@@ -0,0 +1,11 @@
<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,93 @@
<?php
namespace PrestaShop\PsAccountsInstaller\Installer\Facade;
use PrestaShop\PsAccountsInstaller\Installer\Exception\ModuleNotInstalledException;
use PrestaShop\PsAccountsInstaller\Installer\Exception\ModuleVersionException;
use PrestaShop\PsAccountsInstaller\Installer\Installer;
use PrestaShop\PsAccountsInstaller\Installer\Presenter\InstallerPresenter;
class PsAccounts
{
/**
* Available services class names
*/
const PS_ACCOUNTS_PRESENTER = 'PrestaShop\Module\PsAccounts\Presenter\PsAccountsPresenter';
const PS_ACCOUNTS_SERVICE = 'PrestaShop\Module\PsAccounts\Service\PsAccountsService';
const PS_BILLING_SERVICE = 'PrestaShop\Module\PsAccounts\Service\PsBillingService';
/**
* @var Installer
*/
private $installer;
/**
* PsAccounts constructor.
*
* @param Installer $installer
*/
public function __construct(Installer $installer)
{
$this->installer = $installer;
}
/**
* @param string $serviceName
*
* @return mixed
*
* @throws ModuleNotInstalledException
* @throws ModuleVersionException
*/
public function getService($serviceName)
{
if ($this->installer->isModuleInstalled()) {
if ($this->installer->checkModuleVersion()) {
return \Module::getInstanceByName($this->installer->getModuleName())
->getService($serviceName);
}
throw new ModuleVersionException('The current version of the module "' . $this->installer->getModuleName() . '" is below the required one and should be upgraded. The minimum expected version is: ' . $this->installer->getModuleVersion());
}
throw new ModuleNotInstalledException('Module not installed : ' . $this->installer->getModuleName());
}
/**
* @return mixed
*
* @throws ModuleNotInstalledException
* @throws ModuleVersionException
*/
public function getPsAccountsService()
{
return $this->getService(self::PS_ACCOUNTS_SERVICE);
}
/**
* @return mixed
*
* @throws ModuleNotInstalledException
* @throws ModuleVersionException
*/
public function getPsBillingService()
{
return $this->getService(self::PS_BILLING_SERVICE);
}
/**
* @return mixed
*
* @throws ModuleNotInstalledException
* @throws ModuleVersionException
*/
public function getPsAccountsPresenter()
{
if ($this->installer->isModuleInstalled() &&
$this->installer->checkModuleVersion() &&
$this->installer->isModuleEnabled()
) {
return $this->getService(self::PS_ACCOUNTS_PRESENTER);
} else {
return new InstallerPresenter($this->installer);
}
}
}

View File

@@ -0,0 +1,11 @@
<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,242 @@
<?php
namespace PrestaShop\PsAccountsInstaller\Installer;
use PrestaShop\PrestaShop\Adapter\SymfonyContainer;
use PrestaShop\PrestaShop\Core\Addon\Module\ModuleManagerBuilder;
class Installer
{
const PS_ACCOUNTS_MODULE_NAME = 'ps_accounts';
/**
* @var string required version
*/
private $moduleVersion;
/**
* @var string
*/
private $moduleName = self::PS_ACCOUNTS_MODULE_NAME;
/**
* @var \Link
*/
private $link;
/**
* @var mixed
*/
private $moduleManager;
/**
* Installer constructor.
*
* @param string $psAccountsVersion
* @param \Link|null $link
*/
public function __construct($psAccountsVersion, \Link $link = null)
{
$this->moduleVersion = $psAccountsVersion;
if (null === $link) {
$link = new \Link();
}
$this->link = $link;
if (true === $this->isShopVersion17()) {
$moduleManagerBuilder = ModuleManagerBuilder::getInstance();
$this->moduleManager = $moduleManagerBuilder->build();
}
}
/**
* Install ps_accounts module if not installed
* Method to call in every psx modules during the installation process
*
* @return bool
*
* @throws \Exception
*/
public function install()
{
if (true === $this->isModuleInstalled()) {
return true;
}
if (false === $this->isShopVersion17()) {
return true;
}
return $this->moduleManager->install($this->getModuleName());
}
/**
* @return bool
*/
public function isModuleInstalled()
{
if (false === $this->isShopVersion17()) {
return \Module::isInstalled($this->getModuleName());
}
return $this->moduleManager->isInstalled($this->getModuleName());
}
/**
* @return bool
*/
public function isModuleEnabled()
{
if (false === $this->isShopVersion17()) {
return \Module::isEnabled($this->getModuleName());
}
return $this->moduleManager->isEnabled($this->getModuleName());
}
/**
* @return string|null
*
* @throws \PrestaShopException
*/
public function getInstallLink()
{
if ($this->isShopVersion173()) {
$router = SymfonyContainer::getInstance()->get('router');
return \Tools::getHttpHost(true) . $router->generate('admin_module_manage_action', [
'action' => 'install',
'module_name' => $this->moduleName,
]);
}
return $this->getAdminLink('AdminModules', true, [], [
'module_name' => $this->moduleName,
'install' => $this->moduleName,
]);
}
/**
* @return string|null
*
* @throws \PrestaShopException
*/
public function getEnableLink()
{
if ($this->isShopVersion173()) {
$router = SymfonyContainer::getInstance()->get('router');
return \Tools::getHttpHost(true) . $router->generate('admin_module_manage_action', [
'action' => 'enable',
'module_name' => $this->moduleName,
]);
}
return $this->getAdminLink('AdminModules', true, [], [
'module_name' => $this->moduleName,
'enable' => 1,
]);
}
/**
* @return string|null
*
* @throws \PrestaShopException
*/
public function getUpgradeLink()
{
if ($this->isShopVersion173()) {
$router = SymfonyContainer::getInstance()->get('router');
return \Tools::getHttpHost(true) . $router->generate('admin_module_manage_action', [
'action' => 'upgrade',
'module_name' => $this->moduleName,
]);
}
return $this->getAdminLink('AdminModules', true, [], [
'module_name' => $this->moduleName,
'upgrade' => $this->moduleName,
]);
}
/**
* @return bool
*/
public function isShopVersion17()
{
return version_compare(_PS_VERSION_, '1.7.0.0', '>=');
}
/**
* @return bool
*/
public function isShopVersion173()
{
return version_compare(_PS_VERSION_, '1.7.3.0', '>=');
}
/**
* @return bool
*/
public function checkModuleVersion()
{
$module = \Module::getInstanceByName($this->getModuleName());
if ($module instanceof \Ps_accounts) {
return version_compare(
$module->version,
$this->moduleVersion,
'>='
);
}
return false;
}
/**
* @return string
*/
public function getModuleVersion()
{
return $this->moduleVersion;
}
/**
* @return string
*/
public function getModuleName()
{
return $this->moduleName;
}
/**
* Adapter for getAdminLink from prestashop link class
*
* @param string $controller controller name
* @param bool $withToken include or not the token in the url
* @param array $sfRouteParams
* @param array $params
*
* @return string
*
* @throws \PrestaShopException
*/
protected function getAdminLink($controller, $withToken = true, $sfRouteParams = [], $params = [])
{
if ($this->isShopVersion17()) {
return $this->link->getAdminLink($controller, $withToken, $sfRouteParams, $params);
}
$paramsAsString = '';
foreach ($params as $key => $value) {
$paramsAsString .= "&$key=$value";
}
return \Tools::getShopDomainSsl(true)
. __PS_BASE_URI__
. basename(_PS_ADMIN_DIR_)
. '/' . $this->link->getAdminLink($controller, $withToken)
. $paramsAsString;
}
}

View File

@@ -0,0 +1,75 @@
<?php
namespace PrestaShop\PsAccountsInstaller\Installer\Presenter;
use PrestaShop\PsAccountsInstaller\Installer\Installer;
class InstallerPresenter
{
/**
* @var Installer
*/
private $installer;
/**
* @var \Context
*/
private $context;
/**
* InstallerPresenter constructor.
*
* @param Installer $installer
* @param \Context|null $context
*/
public function __construct(Installer $installer, \Context $context = null)
{
$this->installer = $installer;
if (null === $context) {
$context = \Context::getContext();
}
$this->context = $context;
}
/**
* @return array
*
* @throws \Exception
*/
public function present()
{
// Fallback minimal Presenter
return [
'psIs17' => $this->installer->isShopVersion17(),
'psAccountsInstallLink' => $this->installer->getInstallLink(),
'psAccountsEnableLink' => $this->installer->getEnableLink(),
'psAccountsUpdateLink' => $this->installer->getUpgradeLink(),
'psAccountsIsInstalled' => $this->installer->isModuleInstalled(),
'psAccountsIsEnabled' => $this->installer->isModuleEnabled(),
'psAccountsIsUptodate' => $this->installer->checkModuleVersion(),
'onboardingLink' => null,
'user' => [
'email' => null,
'emailIsValidated' => false,
'isSuperAdmin' => $this->isEmployeeSuperAdmin(),
],
'currentShop' => null,
'shops' => [],
'superAdminEmail' => null,
'ssoResendVerificationEmail' => null,
'manageAccountLink' => null,
];
}
/**
* @return bool
*/
public function isEmployeeSuperAdmin()
{
return $this->context->employee->isSuperAdmin();
}
}

View File

@@ -0,0 +1,11 @@
<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,11 @@
<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,11 @@
<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2013-2016 container-interop
Copyright (c) 2016 PHP Framework Interoperability Group
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,11 @@
<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

View File

@@ -0,0 +1,12 @@
<?php
namespace Psr\Container;
use Throwable;
/**
* Base interface representing a generic exception in a container.
*/
interface ContainerExceptionInterface extends Throwable
{
}

View File

@@ -0,0 +1,36 @@
<?php
declare(strict_types=1);
namespace Psr\Container;
/**
* Describes the interface of a container that exposes methods to read its entries.
*/
interface ContainerInterface
{
/**
* Finds an entry of the container by its identifier and returns it.
*
* @param string $id Identifier of the entry to look for.
*
* @throws NotFoundExceptionInterface No entry was found for **this** identifier.
* @throws ContainerExceptionInterface Error while retrieving the entry.
*
* @return mixed Entry.
*/
public function get(string $id);
/**
* Returns true if the container can return an entry for the given identifier.
* Returns false otherwise.
*
* `has($id)` returning true does not mean that `get($id)` will not throw an exception.
* It does however mean that `get($id)` will not throw a `NotFoundExceptionInterface`.
*
* @param string $id Identifier of the entry to look for.
*
* @return bool
*/
public function has(string $id): bool;
}

View File

@@ -0,0 +1,10 @@
<?php
namespace Psr\Container;
/**
* No entry was found in the container.
*/
interface NotFoundExceptionInterface extends ContainerExceptionInterface
{
}

View File

@@ -0,0 +1,11 @@
<?php
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;

Some files were not shown because too many files have changed in this diff Show More