Weitere Shortcodes
Geringster oder höchster Preis in Taxonomy (in Kategorie, Tag, Attribut etc.)
Zum Abfragen des geringsten oder höchsten Preises in einer Taxonomy. Die Taxonomy kann z. B. eine Kategorie (product_cat), ein Schlagwort (product_tag) oder ein Produkt-Attribut (pa_XXX) sein. Pro Taxonomy können ein oder mehrere Terms (kommagetrennt) angegeben werden.
So kann z. B. nach dem günstigsten Preis in der Kategorie "Standfuß" (taxonomy = "product_cat", terms = "standfuesse") gesucht werden, aber auch nach dem günstigsten Preis aller Kabel mit 5 Meter Länge (taxonomy = "pa_laenge_kabel", terms = "5m")
Shortcode:
[get_min_or_max_price_for_taxonomy price="" taxonomy="" terms="" prepend="" append=""]Parameter:
price: Ob der geringste (min) oder höchste Preis (max) gesucht ist
taxonomy: Suche innerhalb z. B. product_cat, tag, pa_hersteller, pa_ladeleistung, pa_laenge_kabel, pa_XXXX
terms: Suche innerhalb z. B. "typ-2-kabel" oder "standfuesse" oder mehrere Terms mit Komma getrennt: "typ-2-kabel, adac-wallbox-test"
prepend: Zeichen, die bei der Ausgabe vorangestellt werden sollen (z. B. €)
append: Zeichen, die bei der Ausgabe angehängt werden sollen (z. B. ,-)
Beispiele:
Günstigster Preis in Produktkategorie "Typ 2 Ladekabel":
[get_min_or_max_price_for_taxonomy price="min" taxonomy="product_cat" terms="typ-2-kabel" prepend="€ " append=""]Ergebnis: € 75,90
Günstigster Preis mit Produkt-Tag / Schlagwort "ADAC Wallbox-Test":
[get_min_or_max_price_for_taxonomy price="min" taxonomy="product_tag" terms="adac-wallbox-test" prepend="€ " append=""]Ergebnis: € 319,00
Günstigster Preis mit Produkt-Attribut "Ladeleistung einstellbar":
[get_min_or_max_price_for_taxonomy price="min" taxonomy="pa_funktionen" terms="ladeleistung-einstellbar" prepend="€ " append=""]Ergebnis: € 114,95
Günstigster Preis in den Produktkategorien "Typ 2 Ladekabel" und "Wallboxen Typ 2″
[get_min_or_max_price_for_taxonomy price="min" taxonomy="product_cat" terms="typ-2-kabel, wallboxen-typ-2" prepend="€ " append=""]Ergebnis: € 75,90
