Jump to content

Edit History

Ray UK

Ray UK

That simple hey lol.

Thank you, it is now showing and filling in the column.

agecheck.jpg.b6c82892ece246c5a74c8bd469eb1ffe.jpg

Is there a list of these hooks available? The next one I'm looking for is the orders list page. It needs to show the same on that page.

Ive tried, in the same module the following code (it does nothing)

		// Create hook in Order List
    public function hookActionOrderGridDefinitionModifier(array $params)
    {
        /** @var GridDefinitionInterface $definition */
        $definition = $params['definition'];

        $definition
            ->getColumns()
            ->addAfter(
                'total',
                (new DataColumn('agecheck'))
                    ->setName($this->l('18?'))
                    ->setOptions([
                        'field' => 'agecheck',
                    ])
		)
			 ->addAfter(
                'agecheck',
                (new DataColumn('agecheckdate'))
                    ->setName($this->l('Check Date'))
                    ->setOptions([
                        'field' => 'agecheckdate',
                    ])
		);

		
        // For search filter
        $definition->getFilters()->add(
            (new Filter('agecheck', TextType::class))
                ->setAssociatedColumn('agecheck')
        );
    }

 

Can multiple hooks be done in this one module ?

The 3rd one, and last one, will be on the customer B.O profile page. This will have the 2 following fields which will be editable

		$searchQueryBuilder->addSelect( 'c.`agecheck`' );
		$searchQueryBuilder->addSelect( 'c.`agecheckdate`' );

 

Ray UK

Ray UK

That simple hey lol.

Thank you, it is now showing and filling in the column.

agecheck.jpg.b6c82892ece246c5a74c8bd469eb1ffe.jpg

Is there a list of these hooks available? The next one I'm looking for is the orders list page. It needs to show the same on that page.

Ive tried, in the same module the following code (it does nothing)

		// Create hook in Order List
    public function hookOrderGridDefinitionModifier(array $params)
    {
        /** @var GridDefinitionInterface $definition */
        $definition = $params['definition'];

        $definition
            ->getColumns()
            ->addAfter(
                'total',
                (new DataColumn('agecheck'))
                    ->setName($this->l('18?'))
                    ->setOptions([
                        'field' => 'agecheck',
                    ])
		)
			 ->addAfter(
                'agecheck',
                (new DataColumn('agecheckdate'))
                    ->setName($this->l('Check Date'))
                    ->setOptions([
                        'field' => 'agecheckdate',
                    ])
		);

		
        // For search filter
        $definition->getFilters()->add(
            (new Filter('agecheck', TextType::class))
                ->setAssociatedColumn('agecheck')
        );
    }

 

Can multiple hooks be done in this one module ?

The 3rd one, and last one, will be on the customer B.O profile page. This will have the 2 following fields which will be editable

		$searchQueryBuilder->addSelect( 'c.`agecheck`' );
		$searchQueryBuilder->addSelect( 'c.`agecheckdate`' );

 

Ray UK

Ray UK

That simple hey lol.

Thank you, it is now showing and filling in the column.

agecheck.jpg.b6c82892ece246c5a74c8bd469eb1ffe.jpg

Is there a list of these hooks available? The next one I'm looking for is the orders list page. It needs to show the same on that page.

Ive tried, in the same module the following code (it does nothing)

		// Create hook in Order List
    public function hookOrderGridDefinitionModifier(array $params)
    {
        /** @var GridDefinitionInterface $definition */
        $definition = $params['definition'];

        $definition
            ->getColumns()
            ->addAfter(
                'total',
                (new DataColumn('agecheck'))
                    ->setName($this->l('18?'))
                    ->setOptions([
                        'field' => 'agecheck',
                    ])
		);

		
        // For search filter
        $definition->getFilters()->add(
            (new Filter('agecheck', TextType::class))
                ->setAssociatedColumn('agecheck')
        );
    }

 

Can multiple hooks be done in this one module ?

The 3rd one, and last one, will be on the customer B.O profile page. This will have the 2 following fields which will be editable

		$searchQueryBuilder->addSelect( 'c.`agecheck`' );
		$searchQueryBuilder->addSelect( 'c.`agecheckdate`' );

 

Ray UK

Ray UK

That simple hey lol.

Thank you, it is now showing and filling in the column.

agecheck.jpg.b6c82892ece246c5a74c8bd469eb1ffe.jpg

Is there a list of these hooks available? The next one I'm looking for is the orders list page. It needs to show the same on that page.

Ive tried, in the same module the following code (it does nothing)

		// Create hook in Order List
    public function hookOrderGridDefinitionModifier(array $params)
    {
        /** @var GridDefinitionInterface $definition */
        $definition = $params['definition'];

        $definition
            ->getColumns()
            ->addAfter(
                'total',
                (new DataColumn('agecheck'))
                    ->setName($this->l('18?'))
                    ->setOptions([
                        'field' => 'agecheck',
                    ])
		);

		
        // For search filter
        $definition->getFilters()->add(
            (new Filter('agecheck', TextType::class))
                ->setAssociatedColumn('agecheck')
        );
    }

 

×
×
  • Create New...