Page 1 of 3

Remove / add attributes to the filter

Posted: 10 Apr 2015, 10:36
by aksenovaa
Did not find how to remove the product attributes from the filter...

Re: Remove / add attributes to the filter

Posted: 10 Apr 2015, 10:41
by aimeos
aksenovaa wrote:Did not find how to remove the product attributes from the filter...
Do you want to remove the attribute filter completely or remove one type of attributes only?

Re: Remove / add attributes to the filter

Posted: 10 Apr 2015, 19:01
by aksenovaa
I want to remove some of the attributes. In the settings nothing about it not found.

Re: Remove / add attributes to the filter

Posted: 10 Apr 2015, 19:44
by aimeos
aksenovaa wrote:I want to remove some of the attributes. In the settings nothing about it not found.
The filter attributes are automatically generated from the attributes assigned to the products. Currently, there don't exist a configuration option to hide one or more attribute types. Maybe we can implement one if you need it.

Re: Remove / add attributes to the filter

Posted: 11 Apr 2015, 17:08
by aimeos
We've implemented a configuration option for you that allows you to specify the attribute types that should be displayed. You can also determine an alternative sort order of the attribute types in the catalog filter with this option. The basic usage is:

Code: Select all

plugin.tx_aimeos.settings.client.html.catalog.filter.attribute.types {
  0 = length
  1 = width
  2 = color
# 3 = <attribute code>
}
You need to update the TYPO3 and Core code to the latest version to get this working. Alternatively, you can wait until the next version of the TYPO3 plugin is released (might be in 3-4 weeks).

Re: Remove / add attributes to the filter

Posted: 14 Apr 2015, 05:19
by aksenovaa
Many thanks

Re: Remove / add attributes to the filter

Posted: 15 Apr 2015, 15:01
by aksenovaa
Updated and experimented. For some reason stopped working filter by attributes. Plus, not all attributes are added.
Maybe in my setup that something was wrong, but before that it worked. I ask you to check.

Re: Remove / add attributes to the filter

Posted: 15 Apr 2015, 15:05
by aksenovaa
In HTML code is added to the attribute. But it is not always true. For instance, the attributes code "in stock", then it will be in the code:

Code: Select all

<fieldset class="attr-in stock">
		<legend>наличие</legend>
		<ul class="attr-list" style="display: none;"><!--
			--><li class="attr-item" data-id="57">
				<input class="attr-item" id="attr-57" name="ai[f_attrid][57]" type="checkbox" value="Нет в наличии. Срок изготовления 10-14 дней.">
				<label class="attr-name" for="attr-57"><!--
					--><div class="media-list"><!--
					--></div>
					<span>Нет в наличии. Срок изготовления 10-14 дней.</span><!--
				--></label>
			<span class="attr-count">11</span></li><!--
			--><li class="attr-item" data-id="56">
				<input class="attr-item" id="attr-56" name="ai[f_attrid][56]" type="checkbox" value="в наличии">
				<label class="attr-name" for="attr-56"><!--
					--><div class="media-list"><!--
					--></div>
					<span>в наличии</span><!--
				--></label>
			<span class="attr-count">2</span></li><!--
		--></ul>
</fieldset>
That is, added "attr-in stock", but should be: "attr-in-stock", that is - you need to replace the spaces with hyphens. In addition, I am afraid to assume what would happen if the code I will Cyrillic ...

P.S. I see on the demo site filter does not work: http://typo3.demo.aimeos.org/elegance/

Re: Remove / add attributes to the filter

Posted: 15 Apr 2015, 19:31
by aimeos
aksenovaa wrote: That is, added "attr-in stock", but should be: "attr-in-stock", that is - you need to replace the spaces with hyphens. In addition, I am afraid to assume what would happen if the code I will Cyrillic ...
Yes, that's a limitation due to the HTML attributes. You shouldn't use white spaces in codes and you should prefer alphanumerical characters for them to be save. I don't know if all Cyrillic characters will work but in theory, a wide range of characters is allowed.

Re: Remove / add attributes to the filter

Posted: 15 Apr 2015, 19:45
by aksenovaa
aimeos wrote:Yes, that's a limitation due to the HTML attributes. You shouldn't use white spaces in codes and you should prefer alphanumerical characters for them to be save. I don't know if all Cyrillic characters will work but in theory, a wide range of characters is allowed.
This should be in the documentation and in the tooltip when you type "Attribute type code"