0
我試圖從API檢索產品,並按價格訂購,但我看到一些奇怪的行爲。 一個例子的結果按順序設置產品價格:WooCommerce訂單不正確
$1.00
$10.00
$110.00
$2.00
$200.00
$2.50
好像它的這些值進行比較的字符串,而不是浮動(或各種各樣的東西)。因此110.00到來之前2.00
UPDATE:
這裏是我打(OAuth信息刪除)的網址:
http://www.example.com/wc-api/v3/products?filter%5Bcategory%5D=all&filter%5Bclass%5D=all&filter%5Blimit%5D=6&filter%5Bmin_price%5D=0&filter%5Border%5D=ASC&filter%5Borderby%5D=meta_value&filter%5Borderby_meta_key%5D=_price&filter%5Bq%5D=&filter%5Btag%5D=all&page=1
更可讀的格式
及參數: filter[category]: all filter[class]: all filter[limit]: 6 filter[min_price]: 0 filter[order]: ASC filter[orderby]: meta_value filter[orderby_meta_key]: _price filter[tag]: all page: 1
你能告訴我們你做了什麼嗎? – Reigel
我已經更新了更多的信息和API集成的代碼。讓我知道是否還有其他我可以提供的幫助。謝謝。 –