Attribute sorting [SOLVED]
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Attribute sorting [SOLVED]
Hello!
I have one problem with attribute sorting by position or id!
ID and pos (in db) is correct, but on frontend attributes have incorrect position!
Screenshot in attachment!
Best regards,
Goran
// Typo3 10.4.11 / Aimeos 20.10.4 / PHP 7.3 / Linux //
I have one problem with attribute sorting by position or id!
ID and pos (in db) is correct, but on frontend attributes have incorrect position!
Screenshot in attachment!
Best regards,
Goran
// Typo3 10.4.11 / Aimeos 20.10.4 / PHP 7.3 / Linux //
- Attachments
-
- frontend-sort.png (23.14 KiB) Viewed 1986 times
-
- db-sort.png (131.61 KiB) Viewed 1986 times
Last edited by goransabo on 22 Dec 2020, 19:44, edited 1 time in total.
Re: Attribute sorting
What's the sorting in the attribute subpanel of the product?
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: Attribute sorting
in frontend sorting is incorrect!
Re: Attribute sorting [SOLVED]
Here is fix for the problem with correct sort of attributes on product detail page:
In Resources/Private/Extensions/ai-client-html/slient/html/templates/common/partials/attribute-standard.php you need to find 131 line:
In Resources/Private/Extensions/ai-client-html/slient/html/templates/common/partials/attribute-standard.php you need to find 131 line:
Code: Select all
<?php if( $this->config( 'client/html/catalog/attribute/preselect/' . $code, false ) === false ) : ?>
<option class="select-option" value=""><?= $enc->html( $this->translate( 'client', 'none' ) ); ?></option>
<?php endif; ?>
add this: <?php ksort($attributes);?>
<?php foreach( $attributes as $id => $attribute ) : ?>
<option class="select-option" value="<?= $enc->attr( $id ); ?>">
<?= $enc->html( $this->attrname( $attribute ) ) ?>
</option>
<?php endforeach; ?>
Re: Attribute sorting [SOLVED]
The attributes are sorted by the order you have added them in the product detail panel of the admin backend, not by the position of the attributes themselves. Thus, you can have a different sorting for different products.
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