Aimeos Create an new extension and Api in it.
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Re: Aimeos Create an new extension and Api in it.
No, that must be part of your Laravel application
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

- TEJASPARMAR
- Posts: 15
- Joined: 20 Mar 2024, 11:53
Re: Aimeos Create an new extension and Api in it.
I just want to create a new page within an extension and load it on some URL/route.
How can we do that in an extension?
How can we do that in an extension?
Re: Aimeos Create an new extension and Api in it.
Only in the Laravel application itself, not in an Aimeos extension.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

- TEJASPARMAR
- Posts: 15
- Joined: 20 Mar 2024, 11:53
Re: Aimeos Create an new extension and Api in it.
Can we modify/override the checkout page within an extension on the same URL, but the content should be changed for the checkout page?
Re: Aimeos Create an new extension and Api in it.
Yes, you can adapt the existing Aimeos pages without problem, e.g. for the checkout page have a look here:
https://aimeos.org/docs/latest/frontend ... omponents/
https://aimeos.org/docs/latest/frontend ... omponents/
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

- TEJASPARMAR
- Posts: 15
- Joined: 20 Mar 2024, 11:53
Re: Aimeos Create an new extension and Api in it.
Can we get products from the basket using code within an extension?
Also, can we add the javascript in an extension?
If yes, where can we add javascript?
Also, can we add the javascript in an extension?
If yes, where can we add javascript?
Re: Aimeos Create an new extension and Api in it.
Sure. Do you need the basket in the frontend, backend or in a job controller?TEJASPARMAR wrote: ↑25 Jun 2024, 13:17 Can we get products from the basket using code within an extension?
Yes. The easiest way is to create a Laravel theme extension where you can customize the CSS/JS completely.TEJASPARMAR wrote: ↑25 Jun 2024, 13:17 Also, can we add the javascript in an extension?
If yes, where can we add javascript?
If you only want to add a few lines of JS to the used theme, add a file to the ./themes/client/html/ directory of your extension. Then, add that file path in the component where you need it by overwriting the header.php file of that component in your own extension. Here you can see how CSS/JS files are inclued:
https://github.com/aimeos/ai-client-htm ... er.php#L83
For your own file, e.g. in ./themes/client/html/custom.js use:
Code: Select all
<script defer src="<?= $enc->attr( $this->content( 'custom.js', 'fs-theme', true ) ) ?>"></script>
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

- TEJASPARMAR
- Posts: 15
- Joined: 20 Mar 2024, 11:53
Re: Aimeos Create an new extension and Api in it.
I have added javascript within an extension. But it is taking path of "public" folder in the web page.
Is there anyway to deploy our extension in the public/vendor or any way to change javascript path to our extension ?
Is there anyway to deploy our extension in the public/vendor or any way to change javascript path to our extension ?
Re: Aimeos Create an new extension and Api in it.
If you copy the existing theme into a new directory besides, you can create a new theme that will be published to ./public/vendor/shop/themes/
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

- TEJASPARMAR
- Posts: 15
- Joined: 20 Mar 2024, 11:53
Re: Aimeos Create an new extension and Api in it.
Refused to execute inline event handler because it violates the following Content Security Policy directive: "default-src 'self' 'nonce-/nqamicZj8GcbZ9UY9FyUQ=='". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution. Note that hashes do not apply to event handlers, style attributes and javascript: navigations unless the 'unsafe-hashes' keyword is present. Note also that 'script-src' was not explicitly set, so 'default-src' is used as a fallback
Getting this error for security policy.
Can please help me for that ?
Getting this error for security policy.
Can please help me for that ?