Modify/create new template structure
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!
Modify/create new template structure
Hi,
In the docs you say
I've created a file located at
Is there any place where I am supposed to "register" which extension should be loaded?
In the docs you say
Well, in the ./ext folder, I see that you have by default ai-client-html extension. I am trying to create a new extension but creating a file with same path won't overwrite the html structure.Extensions that depend on the core and contain PHP template files in the client/html/templates/ directory named the same as existing ones are used first. Only if no extension contain a appropriate PHP template, the default one from the core is used.
I've created a file located at
Code: Select all
./ext/my-ext/client/html/templates/commom/summary/detail-body-default.php
Re: Modify/create new template structure
No, you don't have to register new extensions in the ./ext/ directory.
I've created a new extension, added the same template in the ./client/html/templates/common/summery/ directory, modified that template and it worked out of the box.
Did you clear the cache (artisan aimeos:cache) or configured your Aimeos installation to use no content cache?
I've created a new extension, added the same template in the ./client/html/templates/common/summery/ directory, modified that template and it worked out of the box.
Did you clear the cache (artisan aimeos:cache) or configured your Aimeos installation to use no content cache?
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: Modify/create new template structure
Code: Select all
./client/html/templates/common/summery/
You spelled `summery`. Is this right?
Does yours installation has ai-client-html extension?
Re: Modify/create new template structure
The full path relative to the Laravel base directory would be
The "summery" was a misspelling of mine because I didn't copy the path but wrote it from my mind.
Yes, the ai-client-html extension is always installed. Otherwise, the templates won't be used anyway.
Can you please check if the manifest.php file of your extension contains this section:
My guess is that you've created the wrong extension version for your Aimeos version (2015.x instead of 2016.x).
Code: Select all
./ext/my-ext/client/html/templates/common/summary/detail-body-default.php
Yes, the ai-client-html extension is always installed. Otherwise, the templates won't be used anyway.
Can you please check if the manifest.php file of your extension contains this section:
Code: Select all
'custom' => array(
// ...
'client/html/templates' => array(
'client/html/templates',
),
// ...
),
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: Modify/create new template structure
How can I check the extension version? and how can I be sure that I am downloading the latest version?
btw, do you know any repository that contains a store that used aimeos? This would a huge game changer for me now!
Thanks!
btw, do you know any repository that contains a store that used aimeos? This would a huge game changer for me now!
Thanks!
Re: Modify/create new template structure
Create a new extension (https://aimeos.org/developer/extensions/) and make sure the chosen version is "Aimeos 2016.x extension". Copy the modified template to the same location and try again.
Also make sure that you've cleared the Aimeos content cache (./artisan aimeos:cache) or configured to use no cache (https://github.com/aimeos/aimeos-laravel#hints).
We don't know any public implementation besides the Aimeos demo you get when installing the Aimeos Laravel package like described in the docs.
Also make sure that you've cleared the Aimeos content cache (./artisan aimeos:cache) or configured to use no cache (https://github.com/aimeos/aimeos-laravel#hints).
We don't know any public implementation besides the Aimeos demo you get when installing the Aimeos Laravel package like described in the docs.
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: Modify/create new template structure
Reinstalled the whole thing an now it is working... I'm still getting used to the architecture but I'm evolving!
Thank you!
Thank you!
Re: Modify/create new template structure
I need to add some custom JS to payment step on checkout process.
I tried to:
But the `sender_hash` variable is set to undefined. When I run the same command via chrome's console I get the valid response.
I need to add this code "later" to make it work, I just don't know how to do it. Can you help me?
I tried to:
Code: Select all
<?php $this->block()->start('checkout/standard/payment'); ?>
<script type="text/javascript">
var sender_hash = '';
window.onload = function () {
console.log("Setting session ID to: <?php echo $session_id; ?>");
PagSeguroDirectPayment.setSessionId("<?php echo $session_id; ?>");
console.log("Getting hash");
sender_hash = PagSeguroDirectPayment.getSenderHash();
console.log(sender_hash);
};
</script>
<?php $this->block()->stop(); ?>
I need to add this code "later" to make it work, I just don't know how to do it. Can you help me?
Re: Modify/create new template structure
The first thing is to add your JS code to the payment-header-default.php file and not to the HTML body. Then you should check what getSenderHash() does so you know what must be available in the URL/environment/etc.
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