Skip Navigation

[Assigned] Toolset views woocommerce sorting by price not working

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 1 replies, has 1 voice.

Last updated by poM 1 day, 21 hours ago.

Assisted by: Christopher Amirian.

Author
Posts
#2821080

poM

Hi,

I am trying to sort by price both simple and variable products displayed by a Toolset views using Toolset Woocommerce Blocks.

It just doesn't work and products are randomly sorted.

The code I use for sorting is :

[wpv-filter-start hide="false"]
[wpv-filter-controls]
<div class="form-group">
<label for="product_cat">[wpml-string context="wpv-views"]Catégories de produits[/wpml-string]</label>
[wpv-control-post-taxonomy taxonomy="product_cat" type="select" default_label="Toutes" url_param="product_cat" hide_empty="false"]
</div>
<div class="sort-by">
<label>Trier par :</label>
[wpv-sort-orderby type="select" options="post_title,post_date,field-views_woo_price" label_for_post_title="Titre" label_for_post_date="Date" label_for_field-views_woo_price="Prix" orderby_as_numeric_for="field-views_woo_price" orderby_ascending_for="post_title,post_date,field-views_woo_price"][wpv-sort-order type="select" options="asc,desc" label_for_asc="Par ordre croissant" label_for_desc="Par ordre décroissant" label_asc_for_post_title="A à Z" label_desc_for_post_title="Z à A" label_asc_for_post_date="Le plus ancien" label_desc_for_post_date="Le plus récent" label_asc_for_field-views_woo_price="Le plus bas" label_desc_for_field-views_woo_price="Le plus élevé"]
</div>
<div class="form-group search">
[wpv-filter-search-box placeholder="Rechercher un produit" output="bootstrap"]<span class="icon_close"></span>
</div>
[wpv-filter-spinner spinner="/wp-content/plugins/wp-views/embedded/res/img/ajax-loader3.svg"][/wpv-filter-spinner]
[/wpv-filter-controls]
[wpv-filter-end]

The issue may be viewed here:
hidden link ( login = mpc, password = mpc25)

Cheers.

#2821085

Christopher Amirian
Supporter

Languages: English (English )

Hi,

Welcome to Toolset support. Would you please double-check if you follow the steps mentioned in the documentation below?

https://toolset.com/documentation/legacy-features/views-plugin/woocommerce-views-calculated-fields-and-batch-update/

If yes, please check if the same issue happens on a minimal installation:

- IMPORTANT STEP! Create a backup of your website. Or better approach will be to test this on a copy/staging version of the website to avoid any disruption of a live website.
- Switch to the default theme such as "TwentyTwenty" by going to "WordPress Dashboard > Appearance > themes".
- Go to "WordPress Dashboard > Plugins" and deactivate all plugins except:
. Toolset Types
. Toolset Views
. Toolset WooCommerce Blocks
. WooCommerce
- Check if you can still recreate the issue.
- If not, re-activate your plugins one by one and check the issue each time to find out the plugin that causes the problem.

If the problem persists, I'd appreciate it if you could give me the URL/User/Pass of your WordPress dashboard after you make sure that you have a backup of your website.
It is absolutely important that you give us a guarantee that you have a backup so if something happens you will have a point of restore.

Make sure you set the next reply as private.

Also tell me which view to check on the dashboard.

Thanks.