Error hidding and change mandatory fields

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
YnievesPuntoNet
Posts: 8
Joined: 17 Oct 2022, 14:41

Error hidding and change mandatory fields

Post by YnievesPuntoNet » 04 Nov 2022, 18:57

I modified the file 'config/shop.php' for hidding some fields but i dont show any change.

Code: Select all

            'checkout' => [
                'standard' => [
                    'address' => [
                        'billing' => [
                            'mandatory' => [
                                'order.base.address.firstname',
                                ...
                                'order.base.address.countryid',
                            ],
                            'hidden' => [
                                'order.base.address.salutation',
                                ...
                                'order.base.address.vatid',
                            ]
                        ],
                        'delivery' => [
                            'mandatory' => [
                                'order.base.address.firstname',
                                ...
                                'order.base.address.countryid',
                            ],
                            'hidden' => [
                                'order.base.address.salutation',
                                ...
                                'order.base.address.vatid',
                            ]
                        ],
                    ],
                ],
            ],
Any idea.

Best Regards

YnievesPuntoNet
Posts: 8
Joined: 17 Oct 2022, 14:41

Re: Error hidding and change mandatory fields

Post by YnievesPuntoNet » 05 Nov 2022, 00:52

Well, continue the testing, this changes affect the form in summary checkout, but not in profile.

how I can change this data globally?

User avatar
aimeos
Administrator
Posts: 7907
Joined: 01 Jan 1970, 00:00

Re: Error hidding and change mandatory fields

Post by aimeos » 06 Nov 2022, 19:31

You have to overwrite this file in your own extension because there's no global configuration for that:
https://github.com/aimeos/ai-client-htm ... e/body.php
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

YnievesPuntoNet
Posts: 8
Joined: 17 Oct 2022, 14:41

Re: Error hidding and change mandatory fields

Post by YnievesPuntoNet » 08 Nov 2022, 19:32

Thanks, I work in that then.

Thanks for Aimeos

User avatar
peter69
Posts: 95
Joined: 09 Jun 2022, 19:31

Re: Error hidding and change mandatory fields

Post by peter69 » 06 Dec 2022, 19:34

You could validate whether or not to display the fields according to the billing/delivery configuration of the checkout settings:

Code: Select all

<?php if (!in_array('order.base.address.salutation', $this->config('client/html/checkout/standard/address/delivery/hidden') , true)): ?>
	<div class="form-item form-group row salutation">
		 ...
	</div>
<?php endif; ?>


Post Reply