简体   繁体   English

Woocommerce产品变化:更改“库存”的位置

[英]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. 添加到购物车按钮的代码位于templates/single-product/add-to-cart/variation-add-to-cart-button.php ,该代码显示在<div class="single_variation_wrap" /> ,下拉菜单中触发的Javascript的templates/single-product/add-to-cart/variable.php的第53行。

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. 您可以移动<div class="woocommerce-variation-availability" />variation.php到下的按钮,但你需要找到另一种方式来把数据给它。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 WooCommerce 产品变化:自动启用管理库存和设置库存数量 - WooCommerce product variations: Auto enable Manage Stock and set stock quantity 获取Woocommerce中可变产品的“库存”产品变量 - Get the count of “in stock” product variations for a variable product in Woocommerce 在产品管理页面上显示 woocommerce 产品变体和库存数量 - show woocommerce product variations and stock qty on product admin page 显示用于 woocommerce 缺货产品变体的自定义 div 块 - Display a custom div block for woocommerce out of stock product variations 显示 现货 WooCommerce 单品简短描述 - Display In stock available variations in WooCommerce single product short description 检查 WooCommerce 产品(简单或变体)是否有库存并将标签显示为短代码 - Check if WooCommerce product (simple or variations) are in stock and display label as shortcode Woocommerce 中可变产品的所有变体的总库存 - Total stock of all variations from a variable product In Woocommerce 如果所有变体都缺货,则从目录中隐藏 WooCommerce 可变产品 - Hide WooCommerce variable product from catalog if all variations are out of stock 基于 Woocommerce 产品变体库存数据复选框选项的自定义显示 - Custom display based on Woocommerce product variations stock data checkbox option 从可变产品中获取所有变体的总库存 In Woocommerce - Get the total stock of all variations from a variable product In Woocommerce
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM