简体   繁体   中英

Woocommerce product variations: Change position of „in stock“

As you know, the product variation templates are looking a little bit different as the normal single product template.

The in stock specification is shown under the price on the variations, not in the near of the add-to-cart button as normal.

How can I change the position/order of the in stock? I want to show the in stock after the add-to-cart-button.

The code for the add-to-cart button is in templates/single-product/add-to-cart/variation-add-to-cart-button.php , which is displayed in <div class="single_variation_wrap" /> , line 53 of templates/single-product/add-to-cart/variable.php by the Javascript fired by the dropdown.

You could move <div class="woocommerce-variation-availability" /> from variation.php to under the button, but you'd need to find another way to bring the data to it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM