Problem:
The user configured the products archive template to be ordered by the price but that did not work for him.
Solution:
It turns out that the price was ordered as a string instead of a number, I updated the wpv-sort-orderby to include the following argument orderby_as_numeric_for="field-views_woo_price" and it is giving correct results.
[wpv-sort-orderby type="select" options="post_date,post_title,field-views_woo_price" label_for_post_date="Newest" label_for_post_title="A to Z" label_for_field-views_woo_price="Price" orderby_as_numeric_for="field-views_woo_price" orderby_ascending_for="post_date,post_title,field-views_woo_price"]
Note, that a product does not have a price, it is considered to have a price equals to 0.
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.
Dieses Thema wurde abgetrennt von https://toolset.com/de/forums/topic/woocommerce-archive-order-and-views-sorting-controls/
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | - | - | 9:00 – 13:00 |
14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - | - | 14:00 – 18:00 |
Zeitzone des Unterstützers: Africa/Casablanca (GMT+01:00)
Dieses Thema enthält 3 Antworten, hat 2 Stimmen.
Zuletzt aktualisiert von vor 4 Jahre, 9 Monaten.
Assistiert von: Jamal.