Change Billing Address class

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!
krzysiekp
Posts: 85
Joined: 05 Nov 2021, 16:19

Change Billing Address class

Post by krzysiekp » 11 May 2022, 08:39

I want overwrite

Code: Select all

\vendor\aimeos\ai-client-html\client\html\src\Client\Html\Checkout\Standard\Address\Billing\Standard.php
How to do ? Do I need to write a decorator ?

Or maybe just copy this class to

Code: Select all

\packages\new-ext\client\html\src\Client\Html\Checkout\Standard\Address\Billing\Billing.php
and change its name and file name to

Code: Select all

Billing.php
and then I will be able to change it ?

And how to assign such a class to a specific shop later ?

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

Re: Change Billing Address class

Post by aimeos » 12 May 2022, 11:16

Using a decorator is preferred if you want to add or modify data assigned to the view.
Overwriting the class is only necessary if you need to change the implementation of protected methods and then you give your new class another name (not "Billing" but e.g. "Myproject") and configure the new class name.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply