aimeos / aimeos-laravel

Laravel ecommerce package for ultra fast online shops, scalable marketplaces, complex B2B applications and #gigacommerce
https://aimeos.org/Laravel
MIT License
7.1k stars 1.04k forks source link

ERROR Can't locate path: <ext/custom/client/html/> #474

Closed Arturbox closed 1 year ago

Arturbox commented 1 year ago

aimeos/aimeos-laravel: 2022.10

In Aimeos\Shop\ShopServiceProvider boot method add slash in 'themes/client/html/' Result '/themes/client/html/'

if( file_exists( $basepath = base_path( 'ext' ) ) ) { foreach( new \DirectoryIterator( $basepath ) as $entry ) { if( $entry->isDir() && !$entry->isDot() && file_exists( $entry->getPathName() . '/themes/client/html' ) ) { $this->publishes( [$entry->getPathName() . 'themes/client/html/' => public_path( 'vendor/shop/themes' )], 'public' ); } } }

aimeos commented 1 year ago

$entry->getPathName() shouldn't add a slash by default so the resulting absolute path should be: /.../laravelapp/ext/testext/themes/client/html

If it's not, try to find out why so we can fix it if possible.

Arturbox commented 1 year ago

Custom extension name created with aimeos => optimize During composer update I am getting this error => ERROR Can't locate path: <ext/optimizethemes/client/html/>.

Arturbox commented 1 year ago

And the second question. I tried to redefine one of the Base abstract classes in different ways, but it doesn't work. If you help I will be grateful))

Here is manifest.php Screenshot from 2022-11-03 03-58-26

Here is the structure Screenshot from 2022-11-03 04-05-45

Tried to redefine as abstract class Screenshot from 2022-11-03 04-07-21

I even tried to create a simple class that does extend from an abstract class but still does not redefine

Thanks in advance!

aimeos commented 1 year ago

Custom extension name created with aimeos => optimize During composer update I am getting this error => ERROR Can't locate path: <ext/optimizethemes/client/html/>.

This usually happens if you add the files to Git and make a checkout of the repo afterwards (or use composer to install it) because Git doesn't add empty directories. Place a .gitkeep file inside the empty directory and commit to Git to fix this.

Arturbox commented 1 year ago

gitkeep didn't help. I did everything again and moved the extension from the ext folder to packages and everything worked)) Thanks

aimeos commented 1 year ago

Regarding your second question: You can't overwrite base classes, only the classes that uses that class.