HIding attributes
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!
HIding attributes
I Add the following line at the bottom of "/client/html/templates/catalog/lists/body-default.php" file as was suggested by Metalics in an earlier post to suppress attributes that do no apply to poducts in the current category but it is not working and I am thinking I've missed something. Any ideas?
I have the override templates located in ./ext/zlcproject/client/... Do I have them in the correct location?
<script type="text/javascript">
$('.attribute-lists fieldset').hide();
$(function(){
$(".attr-count").each(function(){
$(this).parents('.attribute-lists fieldset').show();
});
});
</script>
I have the override templates located in ./ext/zlcproject/client/... Do I have them in the correct location?
<script type="text/javascript">
$('.attribute-lists fieldset').hide();
$(function(){
$(".attr-count").each(function(){
$(this).parents('.attribute-lists fieldset').show();
});
});
</script>
Re: HIding attributes
Yes, the location is correct. Did you've cleared the aimeos content cache or configured to disable caching for development?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,
![Image](https://aimeos.org/fileadmin/aimeos.org/icons/star.png)
Re: HIding attributes
I double checked and cache is disabled in the config.yml with
aimeos_shop:
madmin:
cache:
manager:
name: None
but looking at it I think it should have the something for mshop as well as madmin but I didn't find any docs on that.
I also did a bin/console aimeos:cache
the attributes still show.
aimeos_shop:
madmin:
cache:
manager:
name: None
but looking at it I think it should have the something for mshop as well as madmin but I didn't find any docs on that.
I also did a bin/console aimeos:cache
the attributes still show.
Re: HIding attributes
The configuration is OK, as long as the indentions are correct for YAML (2 spaces for each level).
Is the Javascript available in the template? If yes, maybe it doesn't work with the HTML structure generated by the template.
Is the Javascript available in the template? If yes, maybe it doesn't work with the HTML structure generated by the template.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,
![Image](https://aimeos.org/fileadmin/aimeos.org/icons/star.png)
Re: HIding attributes
It turns out that the body-default.php in my extension is not being executed. I named the extension zlcsymfony which is what the symfony install was named and is the name of the top level directory. Do I need to make some other changes to have my extensions override the aimeos extension?
The path to my body-default.php is ext/zlcsymfony/client/html/templates/catatlog/lists/
The path to my body-default.php is ext/zlcsymfony/client/html/templates/catatlog/lists/
Re: HIding attributes
Did you create your extension using the extension builder in the right version?
https://aimeos.org/developer/extensions/
https://aimeos.org/developer/extensions/
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,
![Image](https://aimeos.org/fileadmin/aimeos.org/icons/star.png)
Re: HIding attributes
Yes I Did. I am running Aimeos Version 2017.10 with Symfony 3.3.11 on a debian linux server. I built the extension with builder 2017.x and unzipped the folder directly into the ext directory. I then copied the desired templates from ai-client-html/client/html/templates/[domain] and placed them in the appropriate directory at zlcsymfony/client/html/templates/[domain] and made my modifications there.
Re: HIding attributes
Works as expected if you save your modifed file as
./ext/zlcsymfony/client/html/templates/catalog/lists/body-default.php
But the suggested config for disabling the cache was wrong. It must be four spaces per level in the ./app/config/config_dev.yml file (development context only):
./ext/zlcsymfony/client/html/templates/catalog/lists/body-default.php
But the suggested config for disabling the cache was wrong. It must be four spaces per level in the ./app/config/config_dev.yml file (development context only):
Code: Select all
aimeos_shop:
madmin:
cache:
manager:
name: None
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,
![Image](https://aimeos.org/fileadmin/aimeos.org/icons/star.png)
Re: HIding attributes
Well it is still not working.
I put 2 modified files in at
./ext/zlcsymfony/client/html/templates/catalog/lists/body-default.php
and
./ext/zlcsymfony/client/html/templates/catalog/detail/body-default.php
I also fixed the /app/config/config_dev.yml file.
For debugging purposes I put in a line of code indicating core file in each of the core versions to verify which version was executing.
My only thought is I must have a typo in the extent name. Where can I find the code to verify that the name in correct and matches the configuration? Is there anything else that could be causing this?
I put 2 modified files in at
./ext/zlcsymfony/client/html/templates/catalog/lists/body-default.php
and
./ext/zlcsymfony/client/html/templates/catalog/detail/body-default.php
I also fixed the /app/config/config_dev.yml file.
For debugging purposes I put in a line of code indicating core file in each of the core versions to verify which version was executing.
My only thought is I must have a typo in the extent name. Where can I find the code to verify that the name in correct and matches the configuration? Is there anything else that could be causing this?
Re: HIding attributes
This problem has been solved! I had to reload the entire extent. After doing so it is working.
Thanks
Thanks