overriding Client\Html\Checkout\Standard\Standard.php
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!
overriding Client\Html\Checkout\Standard\Standard.php
I modified the getBody method inside to add new functionality. How and where should I put the new file which originally was in ai-client-html\Client\Html\Checkout\Standard\Standard.php. I have a custom ext/my-client-ext/ and a manifest.php file that includes 'client/html/src'.
Re: overriding Client\Html\Checkout\Standard\Standard.php
Rename the file to e.g. Myproject.php and put it into the same directory structure in your own extension (./ext/myext/client/html/src/Client/Html/Checkout/Standard/Myproject.php). Then, configure the new class name (Myproject): https://aimeos.org/docs/Configuration/C ... ndard/name
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: overriding Client\Html\Checkout\Standard\Standard.php
Hey, thanks for the quick response. I'm getting an error when i tried doing this.
(1/1) Exception
Invalid characters in class name "<not a string>"
in Factory.php (line 76)
at Factory::createClient(object(Standard), array('/Users/laravel/ext/ai-client-html' => array('client/html/templates'), '/Users/public/laravel/ext/myproject' => array('client/html/templates')), array('Mycheckout'))
conf/shop.php
'checkout' => array(
'confirm' => array(
'name'=> array('Mylaststep')
),
'standard' => array(
'name'=> array('Mycheckout'),
-----------------------
namespace Aimeos\Client\Html\Checkout\Standard;
class Mycheckout
--------------------
namespace Aimeos\Client\Html\Checkout\Confirm;
class Mylaststep
(1/1) Exception
Invalid characters in class name "<not a string>"
in Factory.php (line 76)
at Factory::createClient(object(Standard), array('/Users/laravel/ext/ai-client-html' => array('client/html/templates'), '/Users/public/laravel/ext/myproject' => array('client/html/templates')), array('Mycheckout'))
conf/shop.php
'checkout' => array(
'confirm' => array(
'name'=> array('Mylaststep')
),
'standard' => array(
'name'=> array('Mycheckout'),
-----------------------
namespace Aimeos\Client\Html\Checkout\Standard;
class Mycheckout
--------------------
namespace Aimeos\Client\Html\Checkout\Confirm;
class Mylaststep
Re: overriding Client\Html\Checkout\Standard\Standard.php
The "name" parameter must be the name of the class, not an array with its name.
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: overriding Client\Html\Checkout\Standard\Standard.php
Thanks for the quick response. that worked
Re: overriding Client\Html\Checkout\Standard\Standard.php
Is it working right now? I'm trying to override Catalog\Lists\Standard class from ai-client-html.
I added new 'Mystandard' class into my extension (myext\client\html\src\Client\Html\Catalog\Lists\Mystandard) with same code from ai-client-html.
Also i added config:
But it's not working.
I get an exception: Class "\Aimeos\Client\Html\Catalog\Lists\Mystandard" not available
I added new 'Mystandard' class into my extension (myext\client\html\src\Client\Html\Catalog\Lists\Mystandard) with same code from ai-client-html.
Also i added config:
Code: Select all
'client' => [
'html' => [
'catalog' => [
'lists' => [
'name' => 'Mystandard',
]
],
],
]
I get an exception: Class "\Aimeos\Client\Html\Catalog\Lists\Mystandard" not available
Re: overriding Client\Html\Checkout\Standard\Standard.php
Did you forgot the ".php" extension in your file name?
-> myext/client/html/src/Client/Html/Catalog/Lists/Mystandard.php
-> myext/client/html/src/Client/Html/Catalog/Lists/Mystandard.php
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: overriding Client\Html\Checkout\Standard\Standard.php
No, my standard class has correct extension (Mystandard.php).
Re: overriding Client\Html\Checkout\Standard\Standard.php
Please post your source code so we can see if there's something wrong.
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: overriding Client\Html\Checkout\Standard\Standard.php
Here my config:
Here i'm trying to paste my new Standard class:
and exception after:
Aimeos\Client\Html\Exception
Class "\Aimeos\Client\Html\Catalog\Lists\Mystandard" not available
Code: Select all
'client' => [
'html' => [
'catalog' => [
'lists' => [
'name' => 'Mystandard',
]
],
],
]
Aimeos\Client\Html\Exception
Class "\Aimeos\Client\Html\Catalog\Lists\Mystandard" not available