Templates not overwriting
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!
Templates not overwriting
Greetings!
I'm having issues with overwriting the default templates. Here are the steps I took:
Copied the aimeos git repository;
Composer update after creating database
Served up the project. The demo shop appeared, all is well in the world.
Started off by copying the views files from aimeos-laravel into /resources/views/vendor/shop - saw results when messing with these, they seem to work
Then, after reading the documentation for overwriting templates I ran the extension builder and unzipped the project files into the /ext/<myextension>/ folder structure, mimicking the folder structure found in ai-client-html, where /ext is at the root of the project. I copied the template files found in the ai-client-html folder into <myextension> template folder and this is where I get stuck. No matter what change in the templates from <myextension> there seem to be no changes made. Help would be much appreciated!
Laravel Framework 6.20.43
PHP 7.3.31
Aimeos 2021.07
Windows 10
Here is my composer.json found at the root of the project:
I'm having issues with overwriting the default templates. Here are the steps I took:
Copied the aimeos git repository;
Composer update after creating database
Served up the project. The demo shop appeared, all is well in the world.
Started off by copying the views files from aimeos-laravel into /resources/views/vendor/shop - saw results when messing with these, they seem to work
Then, after reading the documentation for overwriting templates I ran the extension builder and unzipped the project files into the /ext/<myextension>/ folder structure, mimicking the folder structure found in ai-client-html, where /ext is at the root of the project. I copied the template files found in the ai-client-html folder into <myextension> template folder and this is where I get stuck. No matter what change in the templates from <myextension> there seem to be no changes made. Help would be much appreciated!
Laravel Framework 6.20.43
PHP 7.3.31
Aimeos 2021.07
Windows 10
Here is my composer.json found at the root of the project:
Code: Select all
{
"name": "aimeos/aimeos",
"description": "Aimeos shop system",
"keywords": ["Aimeos", "e-commerce", "shop", "laravel", "distribution"],
"license": "MIT",
"type": "project",
"prefer-stable": true,
"minimum-stability": "dev",
"repositories": [{
"type": "composer",
"url": "https://packages.aimeos.org/aimeoscom"
}],
"require": {
"php": "^7.2||^8.0",
"composer-runtime-api": "^2.1",
"aimeos/aimeos-laravel": "2021.07.*",
"aimeos/ai-cms-grapesjs": "2021.07.*",
"fideloper/proxy": "^4.0",
"laravel/framework": "^6.20.12",
"laravel/tinker": "^1.0",
"laravel/ui": "^1.0"
},
"require-dev": {
"facade/ignition": "^1.4",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^3.0",
"phpunit/phpunit": "^8.0||^9.0"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": [],
"providers": [
"Aimeos\\asusplus\\ExtensionServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"App\\": "app/"
},
"classmap": [
"database/seeds",
"database/factories",
"ext/asusplus/client/html/src",
"ext/asusplus/client/jsonapi/src",
"ext/asusplus/admin/jqadm/src",
"ext/asusplus/admin/jsonadm/src",
"ext/asusplus/controller/common/src",
"ext/asusplus/controller/frontend/src",
"ext/asusplus/controller/jobs/src",
"ext/asusplus/lib/custom/src",
"ext/asusplus/ExtensionServiceProvider.php"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi",
"App\\Composer::configure",
"@php artisan migrate",
"App\\Composer::setup",
"App\\Composer::account",
"App\\Composer::success"
],
"post-update-cmd": [
"@php artisan vendor:publish --tag=public --force",
"\\Aimeos\\Shop\\Composer::join"
]
}
}
Re: Templates not overwriting
Can you post a concrete example of a template you want to overwrite and where you've stored the copy?
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: Templates not overwriting
For example I want to overwrite the /catalog/detail/body-standard.php, which I copied to /ext/<myextension>/client/html/templates/catalog/detail/body-standard.php. As previously mentioned, /ext is located at the root of the project.
Re: Templates not overwriting
This is perfectly fine, just make sure you clear the cache with:
or disable the cache during development:
https://github.com/aimeos/aimeos-laravel#hints
Code: Select all
php artisan aimeos:clear
https://github.com/aimeos/aimeos-laravel#hints
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