Forums Forums Search & Filter Pro Wrong attribute order

Viewing 4 posts - 1 through 4 (of 4 total)
  • Anonymous
    #267873

    Hi

    https://www.thejar.sitiosatumedida.com/menu/?_sft_pa_porcion=1kg,porcion

    In Attirbute “Elige tu Porción”
    I would like the order to be:
    1. 250g
    2. 500g
    3. 1kg
    4. Porción

    I’ve tried to order it in Product Attributes and re-do the cache but it didn’t work
    Please let me know what I should do.

    Thanks!

    Trevor
    #267895

    There is not an easy way to do this. You would need use this filter in some code that you would insert in your child theme functions.php file:

    https://searchandfilter.com/documentation/action-filter-reference/#edit-query-arguments

    As there are only four values, the easiest code would be to create a new array for that field and return that array to the form. This forum search should yield some code snippets:

    https://support.searchandfilter.com/forums/search/function+sf_edit_query_args/

    Anonymous
    #267946

    Hi

    I think I wasn’t clear enough in my request.

    As you can see on this video:
    https://www.loom.com/share/798d2c5f6206480e9c057de8f8c2b305
    I have a “Elige tu Porción” filter that already has those four terms (it’s a woocommerce product attribute called “porcion”).
    However, they are showing up in the incorrect order. I’ve tried ordering them inside the Terms view on Woocommerce Attribute page but that didn’t work.

    Thanks!

    Trevor
    #268016

    I did understand what you asked, and, with a taxonomy (an attribute is a taxonomy), it is not possible to alter the order as you want, and our plugin does not order according to the order on the page you showed.

    The only way to order them is to use PHP as I said.

    IF this was a Custom Field instead (such as can be made with Advanced Custom Fields), then in our Form UI the field object would be a Post Meta, and in the definitions for that you can manually drag and drop the order.

Viewing 4 posts - 1 through 4 (of 4 total)