Initial commit: is_shoppingcart out of the box. V3.0.1

This commit is contained in:
Isabelle Anno
2025-11-19 13:23:49 +01:00
commit 8135ee3594
70 changed files with 7864 additions and 0 deletions

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,40 @@
imports:
- { resource: ../common.yml }
services:
_defaults:
public: true
# Controller
Oksydan\IsShoppingcart\Controller\IsShoppingCartController:
public: true
class: Oksydan\IsShoppingcart\Controller\IsShoppingCartController
# config form
oksydan.is_shoppingcart.configuration:
class: 'Oksydan\IsShoppingcart\Form\DataConfiguration\ShoppingCartDataConfiguration'
arguments:
- '@prestashop.adapter.legacy.configuration'
- '@prestashop.adapter.shop.context'
- '@prestashop.adapter.multistore_feature'
oksydan.is_shoppingcart.configuration.form_provider:
class: 'Oksydan\IsShoppingcart\Form\Provider\ShoppingCartConfigurationFormDataProvider'
arguments:
- '@oksydan.is_shoppingcart.configuration'
oksydan.is_shoppingcart.configuration.form_handler:
class: 'PrestaShop\PrestaShop\Core\Form\Handler'
arguments:
- '@form.factory'
- '@prestashop.core.hook.dispatcher'
- '@oksydan.is_shoppingcart.configuration.form_provider'
- 'Oksydan\IsShoppingcart\Form\ImageSliderConfigurationType'
- 'ConfigurationForm'
oksydan.is_shoppingcart.form.configuration_type:
class: 'Oksydan\IsShoppingcart\Form\ImageSliderConfigurationType'
parent: 'form.type.translatable.aware'
public: true
tags:
- { name: form.type }

View File

@ -0,0 +1,37 @@
services:
_defaults:
public: true
oksydan.is_shoppingcart.module:
class: Is_shoppingcart
factory: [ 'Module', 'getInstanceByName' ]
public: false
arguments:
- 'is_shoppingcart'
oksydan.is_shoppingcart.shopping_cart_configuration:
class: Oksydan\IsShoppingcart\Configuration\ShoppingCartConfiguration
public: true
oksydan.is_shoppingcart.hook.abstract_hook:
class: Oksydan\IsShoppingcart\Hook\AbstractHook
public: true
arguments:
- '@oksydan.is_shoppingcart.module'
- "@=service('prestashop.adapter.legacy.context').getContext()"
- '@oksydan.is_shoppingcart.shopping_cart_configuration'
oksydan.is_shoppingcart.hook.abstract_display_hook:
class: Oksydan\IsShoppingcart\Hook\AbstractDisplayHook
parent: 'oksydan.is_shoppingcart.hook.abstract_hook'
public: true
oksydan.is_shoppingcart.hook.display_top:
class: Oksydan\IsShoppingcart\Hook\DisplayTop
parent: 'oksydan.is_shoppingcart.hook.abstract_display_hook'
public: true
oksydan.is_shoppingcart.hook.display_before_body_closing_tag:
class: Oksydan\IsShoppingcart\Hook\DisplayBeforeBodyClosingTag
parent: 'oksydan.is_shoppingcart.hook.abstract_display_hook'
public: true

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,2 @@
imports:
- { resource: ../common.yml }

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 @@
is_shoppingcart_controller:
path: /is_shoppingcart/configuration
methods: [GET]
defaults:
_controller: 'Oksydan\IsShoppingcart\Controller\IsShoppingCartController::index'
is_shoppingcart_controller_configuration_save:
path: /is_shoppingcart/configuration
methods: [POST, PATCH]
defaults:
_controller: 'Oksydan\IsShoppingcart\Controller\IsShoppingCartController::saveConfiguration'