Add InPost Pay integration to admin templates
- Created a new template for the cart rule form with custom label, switch, and choice widgets. - Implemented the InPost Pay block in the order details template for displaying delivery method, APM, and VAT invoice request. - Added legacy support for the order details template to maintain compatibility with older PrestaShop versions.
This commit is contained in:
30
modules/inpostizi/config/services/admin/form.php
Normal file
30
modules/inpostizi/config/services/admin/form.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use izi\prestashop\Form\TypeExtension\DatePickerCompatibilityTypeExtension;
|
||||
use izi\prestashop\Form\TypeExtension\DateTimeImmutableTimeTypeExtension;
|
||||
use izi\prestashop\Form\TypeExtension\HelpTextExtension;
|
||||
use izi\prestashop\Form\TypeExtension\UnitTypeExtension;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
|
||||
if (!defined('_PS_VERSION_') || Tools::version_compare(_PS_VERSION_, '8.0.0')) {
|
||||
return;
|
||||
}
|
||||
|
||||
assert(isset($container) && $container instanceof ContainerBuilder);
|
||||
|
||||
$classes = [
|
||||
DateTimeImmutableTimeTypeExtension::class,
|
||||
HelpTextExtension::class,
|
||||
UnitTypeExtension::class,
|
||||
];
|
||||
|
||||
$container->removeDefinition(DatePickerCompatibilityTypeExtension::class);
|
||||
|
||||
foreach ($classes as $class) {
|
||||
$container
|
||||
->getDefinition($class)
|
||||
->setTags([])
|
||||
->setDeprecated();
|
||||
}
|
||||
20
modules/inpostizi/config/services/admin/form.yml
Normal file
20
modules/inpostizi/config/services/admin/form.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
services:
|
||||
izi\prestashop\Form\TypeExtension\DatePickerCompatibilityTypeExtension:
|
||||
class: izi\prestashop\Form\TypeExtension\DatePickerCompatibilityTypeExtension
|
||||
tags:
|
||||
- { name: form.type_extension, extended_type: PrestaShopBundle\Form\Admin\Type\DatePickerType }
|
||||
|
||||
izi\prestashop\Form\TypeExtension\DateTimeImmutableTimeTypeExtension:
|
||||
class: izi\prestashop\Form\TypeExtension\DateTimeImmutableTimeTypeExtension
|
||||
tags:
|
||||
- { name: form.type_extension, extended_type: Symfony\Component\Form\Extension\Core\Type\TimeType }
|
||||
|
||||
izi\prestashop\Form\TypeExtension\HelpTextExtension:
|
||||
class: izi\prestashop\Form\TypeExtension\HelpTextExtension
|
||||
tags:
|
||||
- { name: form.type_extension, extended_type: Symfony\Component\Form\Extension\Core\Type\FormType }
|
||||
|
||||
izi\prestashop\Form\TypeExtension\UnitTypeExtension:
|
||||
class: izi\prestashop\Form\TypeExtension\UnitTypeExtension
|
||||
tags:
|
||||
- { name: form.type_extension, extended_type: Symfony\Component\Form\Extension\Core\Type\IntegerType }
|
||||
Reference in New Issue
Block a user