Tagged: bug, enfold, sort order, woocommerce
-
AuthorPosts
-
September 19, 2024 at 6:38 am #1467416
We are having a compatibility problem with a premium plugin we use to speed up WooCommerce. See example site below and github issue raised.
https://github.com/superspeedyplugins/issue-tracker/issues/206Is there a way to remove
avia_extended_shop_select=yes&
from the query string?
It is breaking the default filtersavia_extended_shop_select=yes&product_order=price does nothing
avia_extended_shop_select=yes&product_order=price&product_sort=desc does nothing
avia_extended_shop_select=yes&product_order=price&product_sort=asc does nothingI dont quite understand the purpose of this string either as these filters use woocommerce default filtering.
September 19, 2024 at 7:05 am #1467420If you look at the default store front theme
It has two filters not three I think this is the root cause of the problem.
https://themes.woocommerce.com/storefront/shop/?orderby=price-desc
https://themes.woocommerce.com/storefront/shop/?orderby=price-ascWhy are we adding the extra parameter for
?avia_extended_shop_select=yes
and
product_order=price when the default woo filters dont use these queries at all?Is there a way to just use the default woocommerce filters instead of the modified Enfold ones?
- This reply was modified 4 months, 1 week ago by thinkjarvis.
- This reply was modified 4 months, 1 week ago by thinkjarvis.
September 19, 2024 at 7:47 am #1467424Essentially this doesn’t work:
?avia_extended_shop_select=yes&product_order=price – Only works on shop root and not categories or filtered items
?avia_extended_shop_select=yes&product_order=price&product_sort=desc
?avia_extended_shop_select=yes&product_order=price&product_sort=ascBut these work just fine:
?orderby=price-desc – without any extra params – just like storefront theme
?orderby=price-asc – without any extra params – just like storefront themePlease can we change this in Enfold for compatibility?
Why do we even need to alter these from the woocommerce defaults?
?avia_extended_shop_select=yes
&product_order=pricewhen there is a new single parameter query for sorting by price:
?orderby=price-desc
?orderby=price-asc- This reply was modified 4 months, 1 week ago by thinkjarvis.
September 19, 2024 at 12:02 pm #1467443Hi,
As far as I see there are 2 functions involved adding avia_extended_shop_select in ..\config-woocommerce\config.php. You can override them in your child theme:
function avia_woocommerce_frontend_search_params() { return; }
function avia_woocommerce_overwrite_catalog_ordering( $args ) { return $args; }
Can you try that please.
Best regards,
GünterSeptember 30, 2024 at 1:31 pm #1468104Solution: Reinstate the default woo dropdowns – Applies to all Enfold sites:
The default woo filters are dequeued in enfold > config-woocommerce > config.php and config-365.php
We can requeue them and disable the Enfold filters by adding the following to functions.php in the child theme:
// Removes Enfolds sort by dropdowns function avia_woocommerce_frontend_search_params() { return; } // Re-adds the default sortby dropdown add_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 20 );
Styling fixes
Add the following css:@media only screen and (max-width: 767px) { .responsive #top .woocommerce-ordering { position: relative; float: left; clear: both; margin: 0; padding-bottom: 0px; padding-top: 15px; top: 0px; margin-top:60px; } } @media only screen and (min-width: 768px) { .responsive #top .woocommerce-ordering { position: relative; float: left; clear: both; margin: 0; padding-bottom: 15px; padding-top: 15px; top: 0px; margin-top:0px; } } #top.woocommerce-page .woocommerce-ordering select { width: 100%; font-size:16px; padding: 8px; line-height: 1.2em; }
- This reply was modified 3 months, 3 weeks ago by thinkjarvis.
-
AuthorPosts
- You must be logged in to reply to this topic.