Overwrite existing templates (Laravel)

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!
anilsharma
Posts: 5
Joined: 19 Jan 2016, 19:45

Re: Overwrite existing templates (Laravel)

Post by anilsharma » 26 Jan 2016, 20:19

Well there is nothing wrong with extension . Problem was extension was not getting autoloaded . so i added

Code: Select all

  "psr-0": {
            "Client_Html": "ext/extension-name/client/html/src"
           }
to composer.json file . And it started working , But it gives Ambiguous class resolution Warning in on composer update . So let me know if you have any thoughts about it . Thanks

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

Re: Overwrite existing templates (Laravel)

Post by aimeos » 27 Jan 2016, 16:56

Did you've copied the client/html/src/ directory too? If yes, you must not do this!
Remove the classes and if you want to overwrite one, create that class with a different name and extend from the original class. Then you can configure the name of your new class.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

anilsharma
Posts: 5
Joined: 19 Jan 2016, 19:45

Re: Overwrite existing templates (Laravel)

Post by anilsharma » 01 Feb 2016, 21:08

please see attachment
Attachments
this is how extension is inside extension folder . ext/mnamr and then files can be seen in screenshot . let me know how it should be ? thanks
this is how extension is inside extension folder . ext/mnamr and then files can be seen in screenshot . let me know how it should be ? thanks
Screen Shot 2016-02-02 at 2.33.15 AM.png (27.81 KiB) Viewed 2913 times

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

Re: Overwrite existing templates (Laravel)

Post by aimeos » 01 Feb 2016, 21:42

As I can see no files, it's difficult to say if everything is correct.

You should check this again:
- Do you use Laravel 5.1 LTS (5.2 made some problems up to last week)
- Do you use the Aimeos Laravel 1.x package for Laravel 5.1
- Did you create the right extension version (2015.x) at https://aimeos.org/developer/extensions/
- Only copy the "catalog/detail/body-default.html" template to the same location in your extension ("client/html/layouts/catalog/detail/body-default.html") and make a test change in the HTML code
- Clear your cache with "./artisan aimeos:cache"
- Check if the test change is visible in the catalog detail view

Laravel 5.2 works with Aimeos Laravel 2016.01 since last week.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply