WordPress教學 – 可變商品價格批次更新

我有一個商品,用款式x尺寸x顏色下去組合,會組合出120種變化,WooCommerce 一次自動產生組合,可以變化出50種,所以按3次組合,就可以全部組合完成。

接著,不可能一筆一筆去設規格品的價格,還好 WooCommerce 很貼心提供批次更新的功能:

 

資料來源:
Apply the price of a WooCommerce product variation to all variations of the same product
https://www.gowp.com/blog/apply-the-price-of-a-woocommerce-product-variation-to-all-variations-of-the-same-product/

If you have a WooCommerce product with a lot of variations that are all the same price, entering/updating the price can be a little frustrating as you must update the price manually for each variation. For a product with three colour and size attributes this is only nine total variations, but if you could update the price for all nine with one click, surely you would? With a little bit of JavaScript added via an action hook, you can.

UPDATE: As it turns out, WooCommerce has added built-in support for the bulk editing of variations. While editing your product, after having added one or more variations, the “Add Variation” drop-down at the top of the Variations tab also includes a number of bulk edit options; you can set both regular and sale prices or modify either, increasing or decreasing by a percentage or set amount, for example.

Variation bulk editing in WooCommerce

Variation bulk editing in WooCommerce

Assuming you’re not using a very old version of WooCommerce, you can use the above and ignore the rest of this article.

相關文章

寫留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *