feat(main): Get it running
Still need to fix back office display
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<module>
|
||||||
|
<name>ws_customerspecialty</name>
|
||||||
|
<displayName><![CDATA[Customer Specialty]]></displayName>
|
||||||
|
<version><![CDATA[1.0.0]]></version>
|
||||||
|
<description><![CDATA[Adds a manageable specialty/profession field to customer accounts, shown in the back office and exposed to order confirmation emails.]]></description>
|
||||||
|
<author><![CDATA[Isabelle Oving-Anno | De Websmid BV]]></author>
|
||||||
|
<tab><![CDATA[]]></tab>
|
||||||
|
<is_configurable>1</is_configurable>
|
||||||
|
<need_instance>0</need_instance>
|
||||||
|
</module>
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
@@ -150,7 +150,7 @@ class CustomerSpecialtyController extends FrameworkBundleAdminController
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getCommandBus()
|
protected function getCommandBus()
|
||||||
{
|
{
|
||||||
return $this->get('prestashop.core.command_bus');
|
return $this->get('prestashop.core.command_bus');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Websmid\CustomerSpecialty\Form\DataHandler;
|
namespace Websmid\CustomerSpecialty\Form\DataHandler;
|
||||||
|
|
||||||
use PrestaShop\PrestaShop\Core\Form\FormDataHandlerInterface;
|
use PrestaShop\PrestaShop\Core\Form\IdentifiableObject\DataHandler\FormDataHandlerInterface;
|
||||||
use Websmid\CustomerSpecialty\Command\SaveCustomerSpecialtyCommand;
|
use Websmid\CustomerSpecialty\Command\SaveCustomerSpecialtyCommand;
|
||||||
use PrestaShop\PrestaShop\Core\CommandBus\CommandBusInterface;
|
use PrestaShop\PrestaShop\Core\CommandBus\CommandBusInterface;
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Websmid\CustomerSpecialty\Form\DataProvider;
|
namespace Websmid\CustomerSpecialty\Form\DataProvider;
|
||||||
|
|
||||||
use PrestaShop\PrestaShop\Core\Form\FormDataProviderInterface;
|
use PrestaShop\PrestaShop\Core\Form\IdentifiableObject\DataProvider\FormDataProviderInterface;
|
||||||
use Websmid\CustomerSpecialty\Entity\CustomerSpecialty;
|
use Websmid\CustomerSpecialty\Entity\CustomerSpecialty;
|
||||||
use Websmid\CustomerSpecialty\Entity\CustomerSpecialtyLang;
|
use Websmid\CustomerSpecialty\Entity\CustomerSpecialtyLang;
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
@@ -10,7 +10,7 @@ use PrestaShop\PrestaShop\Adapter\SymfonyContainer;
|
|||||||
|
|
||||||
final class CustomerSpecialtyDataProvider implements FormDataProviderInterface
|
final class CustomerSpecialtyDataProvider implements FormDataProviderInterface
|
||||||
{
|
{
|
||||||
public function getDefaultData(): array
|
public function getDefaultData()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'title' => [],
|
'title' => [],
|
||||||
@@ -18,7 +18,7 @@ final class CustomerSpecialtyDataProvider implements FormDataProviderInterface
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getData($id): array
|
public function getData($id)
|
||||||
{
|
{
|
||||||
$entityManager = SymfonyContainer::getInstance()->get('doctrine.orm.entity_manager');
|
$entityManager = SymfonyContainer::getInstance()->get('doctrine.orm.entity_manager');
|
||||||
|
|
||||||
|
|||||||
+3
@@ -70,6 +70,7 @@ class CustomerSpecialtyGridDefinitionFactory extends AbstractGridDefinitionFacto
|
|||||||
->setOptions([
|
->setOptions([
|
||||||
'route' => 'customerspecialty_edit',
|
'route' => 'customerspecialty_edit',
|
||||||
'route_param_name' => 'idCustomerSpecialty',
|
'route_param_name' => 'idCustomerSpecialty',
|
||||||
|
'route_param_field' => 'id_ws_customerspecialty',
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
->add(
|
->add(
|
||||||
@@ -79,6 +80,7 @@ class CustomerSpecialtyGridDefinitionFactory extends AbstractGridDefinitionFacto
|
|||||||
->setOptions([
|
->setOptions([
|
||||||
'route' => 'customerspecialty_move_up',
|
'route' => 'customerspecialty_move_up',
|
||||||
'route_param_name' => 'idCustomerSpecialty',
|
'route_param_name' => 'idCustomerSpecialty',
|
||||||
|
'route_param_field' => 'id_ws_customerspecialty',
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
->add(
|
->add(
|
||||||
@@ -88,6 +90,7 @@ class CustomerSpecialtyGridDefinitionFactory extends AbstractGridDefinitionFacto
|
|||||||
->setOptions([
|
->setOptions([
|
||||||
'route' => 'customerspecialty_move_down',
|
'route' => 'customerspecialty_move_down',
|
||||||
'route_param_name' => 'idCustomerSpecialty',
|
'route_param_name' => 'idCustomerSpecialty',
|
||||||
|
'route_param_field' => 'id_ws_customerspecialty',
|
||||||
])
|
])
|
||||||
),
|
),
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Websmid\CustomerSpecialty\Grid\Filters;
|
namespace Websmid\CustomerSpecialty\Grid\Filters;
|
||||||
|
|
||||||
use PrestaShop\PrestaShop\Core\Grid\Filter\Filters;
|
use PrestaShop\PrestaShop\Core\Search\Filters;
|
||||||
use Websmid\CustomerSpecialty\Grid\Definition\Factory\CustomerSpecialtyGridDefinitionFactory;
|
use Websmid\CustomerSpecialty\Grid\Definition\Factory\CustomerSpecialtyGridDefinitionFactory;
|
||||||
|
|
||||||
class CustomerSpecialtyFilters extends Filters
|
class CustomerSpecialtyFilters extends Filters
|
||||||
|
|||||||
Reference in New Issue
Block a user