• Resolved cr2801

    (@cr2801)


    I have a sorting problem in my woocommerce shop. I’m selling shoes in my shop and I have some filters which shows users shoes they like, for example: shoe type, brand, size, color.

    All of them work well with the orderby dropdown selection even if I combine them all. But when a size is selected and for example “order by price” the filter value of size is overwritten by the selected orderby value and sorting/filtering breaks…

    Selected filter size 10:

    ../shop/?filter_groesse=10

    Selected filter size 10 and orderby price:

    ../shop/?orderby=price&filter_groesse=price

    Edit:

    If I choose first orderby price and then size 10 there is no problem:

    shop/?filter_groesse=10&orderby=price

    I use: WooCommerce Standard Widget Filter: “Products by Attribute”.

    Maybe the error occurs, because sizes are variations and Woocommerce standard orderby function has a problem with sorting variations?

    Some ideas where this error could come from?

    • This topic was modified 3 years, 10 months ago by cr2801.
    • This topic was modified 3 years, 10 months ago by cr2801.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support RK a11n

    (@riaanknoetze)

    Hi there,

    In order to troubleshoot this further, can you share a copy of your status report found under **WooCommerce > Status**? Also, are you seeing the same thing after temporarily switching to a default theme like Storefront or TwentyTwentyOne?

    Thread Starter cr2801

    (@cr2801)

    Hi there,

    Thank you for your answer.

    I switch to standard theme tomorrow and give you asap a reply.

    Here is the status:

    
    ### WordPress Environment ###
    
    WordPress address (URL): https://schweizer.attacke.wtf
    Site address (URL): https://schweizer.attacke.wtf
    WC Version: 4.9.0
    REST API Version: ? 4.9.0
    WC Blocks Version: ? 4.0.0
    Action Scheduler Version: ? 3.1.6
    WC Admin Version: ? 1.8.3
    Log Directory Writable: ?
    WP Version: 5.6
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: –
    WP Cron: ?
    Language: de_DE_formal
    External object cache: –
    
    ### Server Environment ###
    
    Server Info: Apache
    PHP Version: 7.3.26
    PHP Post Max Size: 10 MB
    PHP Time Limit: 30
    PHP Max Input Vars: 1000
    cURL Version: 7.64.0
    OpenSSL/1.1.1d
    
    SUHOSIN Installed: –
    MySQL Version: 5.7.32-1
    Max Upload Size: 10 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?
    
    ### Database ###
    
    WC Database Version: 4.9.0
    WC Database Prefix: wp_
    Datenbank-Gesamtgr??e: 87.05MB
    Datenbank-Datengr??e: 54.89MB
    Datenbank-Indexgr??e: 32.16MB
    wp_woocommerce_sessions: Daten: 0.06MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_api_keys: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_attribute_taxonomies: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_downloadable_product_permissions: Daten: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_woocommerce_order_items: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_order_itemmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_tax_rates: Daten: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_woocommerce_tax_rate_locations: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_shipping_zones: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_woocommerce_shipping_zone_locations: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_shipping_zone_methods: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_woocommerce_payment_tokens: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_payment_tokenmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_log: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_actionscheduler_actions: Daten: 0.08MB + Index: 0.11MB + Engine InnoDB
    wp_actionscheduler_claims: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_actionscheduler_groups: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_actionscheduler_logs: Daten: 0.08MB + Index: 0.03MB + Engine InnoDB
    wp_commentmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_comments: Daten: 0.05MB + Index: 0.09MB + Engine InnoDB
    wp_duplicator_packages: Daten: 1.52MB + Index: 0.02MB + Engine InnoDB
    wp_links: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_options: Daten: 4.13MB + Index: 0.36MB + Engine InnoDB
    wp_postmeta: Daten: 28.06MB + Index: 17.48MB + Engine InnoDB
    wp_posts: Daten: 5.44MB + Index: 3.39MB + Engine InnoDB
    wp_storeabill_documentmeta: Daten: 0.08MB + Index: 0.06MB + Engine InnoDB
    wp_storeabill_documents: Daten: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_storeabill_document_itemmeta: Daten: 0.09MB + Index: 0.09MB + Engine InnoDB
    wp_storeabill_document_items: Daten: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_storeabill_document_noticemeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_storeabill_document_notices: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_storeabill_journals: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_termmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_terms: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_term_relationships: Daten: 1.02MB + Index: 0.25MB + Engine InnoDB
    wp_term_taxonomy: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_tinvwl_analytics: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_tinvwl_items: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_tinvwl_lists: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_usermeta: Daten: 1.02MB + Index: 0.03MB + Engine InnoDB
    wp_users: Daten: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_wc_admin_notes: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wc_admin_note_actions: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wc_category_lookup: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wc_customer_lookup: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_wc_download_log: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_wc_order_coupon_lookup: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_wc_order_product_lookup: Daten: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_wc_order_stats: Daten: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_wc_order_tax_lookup: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_wc_product_meta_lookup: Daten: 2.30MB + Index: 2.13MB + Engine InnoDB
    wp_wc_reserved_stock: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wc_tax_rate_classes: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wc_webhooks: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_gzd_dhl_im_products: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_gzd_dhl_im_product_services: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_gzd_dhl_labelmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_gzd_dhl_labels: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_gzd_packaging: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_woocommerce_gzd_packagingmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_gzd_shipmentmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_gzd_shipments: Daten: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_woocommerce_gzd_shipment_itemmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_gzd_shipment_items: Daten: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_woocommerce_gzd_shipping_provider: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_woocommerce_gzd_shipping_providermeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_pickup_locations_geodata: Daten: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_wpgmza: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wpgmza_circles: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wpgmza_maps: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wpgmza_polygon: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wpgmza_polylines: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wpgmza_rectangles: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_yoast_indexable: Daten: 8.52MB + Index: 6.19MB + Engine InnoDB
    wp_yoast_indexable_hierarchy: Daten: 1.13MB + Index: 0.36MB + Engine InnoDB
    wp_yoast_migrations: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_yoast_primary_term: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_yoast_seo_links: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_yoast_seo_meta: Daten: 0.05MB + Index: 0.00MB + Engine InnoDB
    
    ### Post Type Counts ###
    
    acf-field: 200
    acf-field-group: 11
    attachment: 2157
    customize_changeset: 2
    document_template: 4
    oembed_cache: 95
    page: 18
    post: 2
    product: 283
    product_variation: 2569
    revision: 525
    shop_coupon: 1
    shop_order: 8
    shop_order_refund: 8
    wc_pickup_location: 58
    wpsl_stores: 58
    
    ### Security ###
    
    Secure connection (HTTPS): ?
    Hide errors from visitors: ?
    
    ### Active Plugins (16) ###
    
    ACF Content Analysis for Yoast SEO: von Thomas Kr?ftner
    ViktorFroberg
    marol87
    pekz0r
    angrycreative
    Team Yoast – 3.0.1
    
    Advanced Custom Fields PRO: von Elliot Condon – 5.9.4
    AWEOS Google Maps iframe Load per Click: von AWEOS GmbH – 1.7
    Duplicator: von Snap Creek – 1.3.40.1
    TI WooCommerce Wishlist: von TemplateInvaders – 1.22.1
    Vendidero Helper: von Vendidero – 1.3.0
    WooCommerce PayPal Checkout Gateway: von WooCommerce – 2.1.1
    WooCommerce Stripe-Gateway: von WooCommerce – 4.7.0
    Germanized für WooCommerce Pro: von vendidero – 3.1.2
    Germanized für WooCommerce: von vendidero – 3.3.4
    WooCommerce Abholung vor Ort Plus: von SkyVerge – 2.9.3
    WooCommerce: von Automattic – 4.9.0 (Update auf Version 4.9.2 ist verfügbar)
    Yoast SEO: von Team Yoast – 15.6.2
    WP Store Locator - CSV Manager: von Tijmen Smit – 1.2.1
    WP H?ndlersuche: von Tijmen Smit – 2.2.233
    WPFront Scroll Top: von Syam Mohan – 2.0.2
    
    ### Inactive Plugins (1) ###
    
    Registered Users Only: von Alex Mills (Viper007Bond) – 1.2.0
    
    ### Must Use Plugins (1) ###
    
    rms_unique_wp_mu_pl_fl_nm.php: von  –
    
    ### Settings ###
    
    API Enabled: –
    Force SSL: –
    Currency: EUR (€)
    Currency Position: right
    Thousand Separator: .
    Decimal Separator: ,
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
    exclude-from-search (exclude-from-search)
    featured (featured)
    outofstock (outofstock)
    rated-1 (rated-1)
    rated-2 (rated-2)
    rated-3 (rated-3)
    rated-4 (rated-4)
    rated-5 (rated-5)
    
    Connected to WooCommerce.com: –
    
    ### WC Pages ###
    
    Shop-Basis: #15 - /shop/
    Warenkorb: #16 - /warenkorb/
    Kasse: #17 - /kasse/
    Mein Konto: #18 - /mein-konto/
    Allgemeine Gesch?ftsbedingungen: #678 - /agb/
    
    ### Theme ###
    
    Name: Schuh Schweizer GmbH
    Version: 1.0
    Author URL: https://attacke-ulm.de/
    Child Theme: ? – Wenn Sie WooCommerce mit einem Theme
    das Sie nicht selbst entwickelt haben
    an eigene Bedürfnisse anpassen
    dann empfehlen wir die Verwendung eines Child-Themes. Siehe Wie Sie ein Child-Theme erstellen (engl.)
    
    WooCommerce Support: ?
    
    ### Templates ###
    
    Overrides: schweizer/woocommerce/archive-product.php
    schweizer/woocommerce/cart/cart.php
    schweizer/woocommerce/checkout/form-checkout.php
    schweizer/woocommerce/checkout/review-order.php
    schweizer/woocommerce/content-product.php
    schweizer/woocommerce/content-single-product.php
    schweizer/woocommerce/emails/email-order-details.php
    schweizer/woocommerce/emails/email-order-items.php
    schweizer/woocommerce/loop/orderby.php
    schweizer/woocommerce/loop/pagination.php
    schweizer/woocommerce/loop/price.php
    schweizer/woocommerce/myaccount/my-address.php
    schweizer/woocommerce/myaccount/navigation.php
    schweizer/woocommerce/order/order-details-customer.php
    schweizer/woocommerce/order/order-details-item.php
    schweizer/woocommerce/single-product/add-to-cart/external.php
    schweizer/woocommerce/single-product/add-to-cart/grouped.php
    schweizer/woocommerce/single-product/add-to-cart/simple.php
    schweizer/woocommerce/single-product/add-to-cart/variable.php
    schweizer/woocommerce/single-product/add-to-cart/variation-add-to-cart-button.php
    schweizer/woocommerce/single-product/add-to-cart/variation.php
    schweizer/woocommerce/single-product/meta.php
    schweizer/woocommerce/single-product/photoswipe.php
    schweizer/woocommerce/single-product/price.php
    schweizer/woocommerce/single-product/product-attributes.php
    schweizer/woocommerce/single-product/product-image.php
    schweizer/woocommerce/single-product/product-thumbnails.php
    schweizer/woocommerce/single-product/rating.php
    schweizer/woocommerce/single-product/related.php
    schweizer/woocommerce/single-product/review-meta.php
    schweizer/woocommerce/single-product/review-rating.php
    schweizer/woocommerce/single-product/review.php
    schweizer/woocommerce/single-product/sale-flash.php
    schweizer/woocommerce/single-product/share.php
    schweizer/woocommerce/single-product/short-description.php
    schweizer/woocommerce/single-product/stock.php
    schweizer/woocommerce/single-product/tabs/additional-information.php
    schweizer/woocommerce/single-product/tabs/description.php
    schweizer/woocommerce/single-product/tabs/tabs.php
    schweizer/woocommerce/single-product/up-sells.php
    schweizer/woocommerce/single-product.php
    
    ### Local Pickup Plus ###
    
    Status: Deaktiviert
    Geocoding: ?
    Pickup Locations: 58
    Pickup Appointments: ? Erforderlich
    Pickup Location Tax: –
    Checkout Display: Auswahlmodus für die Aufnahme: per orderHandhabungsmodus für Warenkorbartikel: customer selectionStandardhandhabung von Warenkorbartikeln: ship items
    
    ### TI WooCommerce Favoriten Vorlagen ###
    
    überschreibungen: –
    
    ### Action Scheduler ###
    
    Abgeschlossen: 227
    Oldest: 2021-01-12 17:36:53 +0100
    Newest: 2021-01-28 11:43:13 +0100
    
    Ausstehend: 1
    Oldest: 2021-01-29 09:10:47 +0100
    Newest: 2021-01-29 09:10:47 +0100
    
    
    Thread Starter cr2801

    (@cr2801)

    Hi RK,

    I switched to Storefront and all filters are invisible. Only sorting with orderby dropdown is visible and this works well. So I couldnt test if the error comes from my theme.

    Here is my code:

    functions.php

    function produktfilter_kategorien() {
    
    	register_sidebar( array(
    		'name'          => 'Produktfilter Kategorien',
    		'id'            => 'produktfilter_kategorien',
    		'before_widget' => '<div class="col-6 col-sm-2 col-md-2 col-lg-2 col-xl-2 killpadding schweizer_shop_filter">',
    		'after_widget'  => '</div>',
    		'before_title'  => '<span style="display:none">',
    		'after_title'   => '</span>',
    	) );
    
    }
    add_action( 'widgets_init', 'produktfilter_kategorien' );

    archive.php

    if ( is_active_sidebar( 'produktfilter_kategorien' ) ) : 
        dynamic_sidebar( 'produktfilter_kategorien' ); 
     endif;

    And in backend I use Standard Widget Filter: “Products by Attribute”. The attributes I use are: shoe type, brand, size, color. (German: Schuhart, Marke, Groesse, Farbe)

    Any ideas where this error could come from?

    Thanks for any help!

    • This reply was modified 3 years, 10 months ago by cr2801.
    Thread Starter cr2801

    (@cr2801)

    Nobody an idea? I am thankful for every help!

    Thread Starter cr2801

    (@cr2801)

    I forgot to set the “filters by attribute” in widgets area when I switched to storefront. Sorry, my fault. So now I know in storefront theme everything works fine and my theme generates this super strange sorting behavior.

    Does anyone have any idea where this error could come from or has someone ever had such an error?

    I am really thankful for every help!

    Thread Starter cr2801

    (@cr2801)

    Problem solved. I had a copy of orderby.php in my child theme woocommerce folder which caused this error. After I deleted it everything was fine.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WooCommerce: Sorting problem: Selected orderby value overwrites filter value’ is closed to new replies.