相关疑难解决方法(0)

对不起,没有产品符合您的选择.请选择不同的组合woocommerece

在此输入图像描述

我已使用wc-variations-radio-buttons-master更改下拉到单选按钮 不同的颜色实际上也是单选按钮.

当前的链接产品具有12这样的变化,其具有产品而不是其他产品.有些组合我可以解释如Silver,Matching upholstery,VC,RegularSeatSilver,Matching upholstery,ACC,RegularSeat有产品,同时Silver,Matching upholstery,Regular,RegularSeat也没有产品,现在我想隐藏Regular从当前场景的选择and all other such option which have not product.

我的意思是显示那些有产品的单选按钮,如果他们没有隐藏不相关的单选按钮

产品链接

wordpress woocommerce woothemes hook-woocommerce

25
推荐指数
2
解决办法
1743
查看次数

消除缺货产品变化(WooCommerce)

[编辑:它实际上在functions.php中添加代码并省略代码WC文件中的更改时有效.重要提示:它仅在存在ONE属性时有效.然而,当有2个属性(例如大小和颜色)时,它不起作用,因为它不再是缺货变化,而是变化组合,实际上WooCommerce在这种常见情况下完全无能为力.请注意,目前似乎没有可用的插件来解决这个非常明显的问题.大.]

由于2.0 WooCommerce要么隐藏缺货产品变量(一个明显的问题,因为客户无法知道它们的存在),或者将它们显示为库存变化(也是一个问题,因为客户随后系统地失望地发现单击购买变化缺货).

该主题包括一个解决缺货产品变化的解决方案:

据推测可以添加到functions.php:

add_filter( 'woocommerce_variation_is_active', 'grey_out_variations_when_out_of_stock', 10, 3 );

function grey_out_variations_when_out_of_stock( $grey_out, $variation_id, $id ) {

    $variation = get_product( $variation_id );

    if ( ! $variation->is_in_stock() )
        return false;

    return true;
}
Run Code Online (Sandbox Code Playgroud)

要完成plugins/woocommerce/includes/class-wc-product-variation.php:

更改:

return apply_filters( 'woocommerce_variation_is_active', true, $this->variation_id, $this->id );
Run Code Online (Sandbox Code Playgroud)

至:

return apply_filters( 'woocommerce_variation_is_active', true, $this );
Run Code Online (Sandbox Code Playgroud)

也改变:

return apply_filters( 'woocommerce_variation_is_visible', $visible, $this->variation_id, $this->id );
Run Code Online (Sandbox Code Playgroud)

至:

return apply_filters( 'woocommerce_variation_is_visible', $visible, $this->variation_id, $this->id, $this );
Run Code Online (Sandbox Code Playgroud)

然而,虽然它据报道有效,但在我的情况下,缺货的变化显示与其他变量相同,我也有一个警告:

Warning: Missing argument 3 for grey_out_variations_when_out_of_stock() …
Run Code Online (Sandbox Code Playgroud)

product woocommerce

1
推荐指数
1
解决办法
8086
查看次数

Woocommerce变量保护"没有符合您选择的产品"

最近,我们建造的网站运行得很好,其中一个产品存在问题.查看产品会给出消息Sorry, no products matched your selection. Please choose a different combination.虽然也无法选择新选项.

到目前为止,我做了以下事情:

  1. 检查产品/管理员的每个选项到工作开发站点,没有差异.
  2. 删除了变体,删除了属性,然后重新创建了产品的属性和变体.
  3. 试图创建一个具有相同选项的新产品.
  4. 更新了woocommerce数据库(有一个通知,它需要做,但插件没有更新).

我原以为这是因为最近对wordpress进行了更新,但在报告前几天回到备份,文件之间没有差异.

经过广泛的谷歌搜索后,我可以看到的唯一问题是选择了错误的选项,或者产品没有显示在类别中的类似错误,但产品正在运行,似乎没有对产品或文件进行任何更改.

这是用WordPress 4.3.1WooCommerce 2.4.7发生的

wordpress wordpress-plugin woocommerce

1
推荐指数
1
解决办法
3232
查看次数