Can anyone tell me how can we extend Base class
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!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Can anyone tell me how can we extend Base class
Hi,
Can anyone tell us how can we extend base class
FYI: We are using aimeos 2020.10
basically we want to modify method available at
We try to extend it with Decorator but unable to do can
Can anyone help below is client config code
Can anyone tell us how can we extend base class
FYI: We are using aimeos 2020.10
basically we want to modify
Code: Select all
getTaxRates
Code: Select all
Aimeos\Client\Html\Common\Client\Summary\Base class
Can anyone help below is client config code
Code: Select all
'html' => [
"common"=>[
"client"=>[
"summary"=>[
"decorators"=>[
"local"=>class_basename(\Aimeos\Client\Html\Common\Client\Summary\Decorator\SummaryDecorator::class)
]
]
]
],
Re: Can anyone tell me how can we extend Base class
In OOP, it's not possible to replace base classes and as the methods in the base class are protected, you can't use decorators either (they require public methods). The only way to replace these methods is to overwrite the classes that extend from it but this is thedios and you have to duplicate the code.
In dev-master, we've move that code to the order base item which is much easier to replace with an own implementation:
https://github.com/aimeos/aimeos-core/b ... #L784-L848
In dev-master, we've move that code to the order base item which is much easier to replace with an own implementation:
https://github.com/aimeos/aimeos-core/b ... #L784-L848
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Can anyone tell me how can we extend Base class
@aimeos thanx for this info
Is there any other way through which we can extend method extended ?
Is there any other way through which we can extend
Code: Select all
getTaxRates
Re: Can anyone tell me how can we extend Base class
Like said, only by extending from the classes that extend from the base class themselves and configuring these classes to be used instead of the original ones.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Can anyone tell me how can we extend Base class
Okay @aimeos
We want to tax should exclude discount amount for example
we have created a plugin that says buy 10 pay for 8 but want to include the tax on 10 product (right now it apply on 8 product total)
can you please give us any idea for this
We want to tax should exclude discount amount for example
we have created a plugin that says buy 10 pay for 8 but want to include the tax on 10 product (right now it apply on 8 product total)
can you please give us any idea for this
Re: Can anyone tell me how can we extend Base class
The easiest way might be to create a decorator attached to the basket and checkout components which overwrites the "summaryNamedTaxes" key assigned to the template by the components with your own computed value.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star