标签: woothemes

如何按自定义属性过滤WooCommerce产品

我正在尝试按自定义属性过滤WooCommerce产品归档.

例如,有5个产品属性"color"包含"red",另外3个属性"color"包含"blue".

如何将过滤器应用于产品循环,以便仅显示包含"红色"的产品?

谢谢

wordpress wordpress-plugin woocommerce woothemes

27
推荐指数
1
解决办法
9万
查看次数

对不起,没有产品符合您的选择.请选择不同的组合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 2.1.5中的工具菜单中安装缺少的woocommerce页面

我最近安装了WooCommerce 2.1.5,它在页面安装期间跳过了注销并更改了密码链接.

在WooCommerce文档中,WooCommerce团队提到有一个功能可以从工具菜单中添加缺少的页面,但是当我进入工具菜单时,我看不到任何按钮来安装丢失的页面.

我怎么能完成它?

我有没有错过任何一步?

我是否需要安装插件才能在工具菜单中显示该按钮?

wordpress woocommerce woothemes

19
推荐指数
2
解决办法
6万
查看次数

Wordpress(Woocommerce扩展) - 以编程方式创建新订单

我想以编程方式创建新订单.

工作流程很简单:提交简单表单后,将创建用户以及新订单.

我设法创建了一个新用户并返回了user_id,现在我需要一步一步地分配一个新订单.

我怎么能做到这一点?

php wordpress woocommerce woothemes

14
推荐指数
4
解决办法
2万
查看次数

将自定义css类添加到WooCommerce结帐字段

我希望能够在我的WooCommerce结帐字段中添加自定义CSS类.我正在使用twitter Bootstrap,我希望能够使用他们的.form-control类.

我查看了woocommerce模板文件夹,form-billing.php但我不确定将.form-control类添加到每个文本字段的位置.

这是代码 form-billing.php

<?php
/**
 * Checkout billing information form
 *
 * @author      WooThemes
 * @package     WooCommerce/Templates
 * @version     2.1.2
 */

 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
 ?>
 <div class="woocommerce-billing-fields">
<?php if ( WC()->cart->ship_to_billing_address_only() && WC()->cart->needs_shipping() ) : ?>

    <h3><?php _e( 'Billing &amp; Shipping', 'woocommerce' ); ?></h3>

<?php else : ?>

    <h3><?php _e( 'Billing Details', 'woocommerce' ); ?></h3>

<?php endif; ?>

<?php do_action( 'woocommerce_before_checkout_billing_form', $checkout ); ?> …
Run Code Online (Sandbox Code Playgroud)

wordpress twitter-bootstrap woocommerce woothemes

12
推荐指数
3
解决办法
3万
查看次数

Woocommerce - 是否可以将可变产品添加到分组产品中?

我列出了特定组中的产品......在这种情况下,是一套床.棉被,枕头,假货等.有些是可变产品(棉被尺寸),有些是简单的产品(枕头).

我想创建一个名为XYZ Awesome Bedroom Set的产品组,包括变量和简单产品类型.不幸的是,Woothemes官方只支持向群组添加简单的产品..但我不确定为什么.有任何想法吗?

我可以覆盖核心或WC模板文件中的任何内容以允许访问组中的变量产品吗?我查看了可用的插件,并在核心中尝试了几十个修复,但没有运气!

在这一点上任何事情都会有所帮助.

谢谢.

php wordpress woocommerce woothemes

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

重新安装WooCommerce后如何重新启用入门入门向导

我卸载了我的WooCommerce插件并选择删除所有数据.安装它后,我看不到了Introductory Onboarding Wizard.我需要它来重新创建我的商店和所有页面.我怀疑这是因为第一次安装留下了一些痕迹.我该如何重新启用它?

wordpress woocommerce woothemes

10
推荐指数
2
解决办法
1万
查看次数

如何在jquery flexslider完成加载之前隐藏图像

我试图在我的网站上整合wootheme的Flexslider,它看起来/效果很好,除了加载时.

当您使用滑块刷新页面时,在flexslider加载(大约1秒)之前,第一张幻灯片显得很大并闪烁为黑色然后消失,然后出现轮播.

我认为图像的加载速度比jquery快?我怎样才能隐藏图像,而不是jquery加载(就像在演示网站上一样,即使我刷新30亿次,问题也不会在他们的网站上重复出现,它们都能正常加载! - http://flexslider.woothemes.com/carousel -min-max.html)

我在jquery之后加载了flexlisder.js并从demo中复制了相同的html代码(以匹配同时加载的.css文件.这里是我正在使用的init代码 - 来自演示站点:

$(document).ready(function() {

  $('.flexslider').flexslider({
    animation: "slide",
    animationLoop: false,
    itemWidth: 210,
    itemMargin: 5,
    minItems: 2,
    maxItems: 4
  });
});
Run Code Online (Sandbox Code Playgroud)

javascript jquery flexslider woothemes

9
推荐指数
2
解决办法
2万
查看次数

按可用日期查询woocommerce预订

我使用Woothemes预订我的woocommerce网站

当我构建自定义搜索产品时,我也必须搜索可用性,这里是我应该如何管理BO的可用性 预订插件BO 以及插件如何存储到数据库

a:8:{i:0;a:4:{s:4:"type";s:4:"days";s:8:"bookable";s:3:"yes";s:4:"from";s:1:"3";s:2:"to";s:1:"3";}i:1;a:4:{s:4:"type";s:6:"custom";s:8:"bookable";s:3:"yes";s:4:"from";s:10:"2015-07-09";s:2:"to";s:10:"2015-07-09";}i:2;a:4:{s:4:"type";s:6:"custom";s:8:"bookable";s:3:"yes";s:4:"from";s:10:"2015-07-08";s:2:"to";s:10:"2015-07-08";}i:3;a:4:{s:4:"type";s:6:"custom";s:8:"bookable";s:3:"yes";s:4:"from";s:10:"2015-07-10";s:2:"to";s:10:"2015-07-10";}i:4;a:4:{s:4:"type";s:6:"custom";s:8:"bookable";s:3:"yes";s:4:"from";s:10:"2015-07-15";s:2:"to";s:10:"2015-07-15";}i:5;a:4:{s:4:"type";s:6:"custom";s:8:"bookable";s:3:"yes";s:4:"from";s:10:"2015-07-16";s:2:"to";s:10:"2015-07-16";}i:6;a:4:{s:4:"type";s:6:"custom";s:8:"bookable";s:3:"yes";s:4:"from";s:10:"2015-07-17";s:2:"to";s:10:"2015-07-17";}i:7;a:4:{s:4:"type";s:6:"months";s:8:"bookable";s:2:"no";s:4:"from";s:1:"8";s:2:"to";s:1:"8";}}
Run Code Online (Sandbox Code Playgroud)

我可以从wordpress内置函数get_post_meta中检索这些值,

$avail = get_post_meta($product->id, '_wc_booking_availability');
Run Code Online (Sandbox Code Playgroud)

结果是:

Array
(
[0] => Array
    (
        [type] => days
        [bookable] => yes
        [from] => 3
        [to] => 3
    )

[1] => Array
    (
        [type] => custom
        [bookable] => yes
        [from] => 2015-07-09
        [to] => 2015-07-09
    )

[2] => Array
    (
        [type] => custom
        [bookable] => yes
        [from] => 2015-07-08
        [to] => 2015-07-08
    )

[3] => Array
    (
        [type] => custom
        [bookable] => yes
        [from] => 2015-07-10
        [to] => …
Run Code Online (Sandbox Code Playgroud)

php mysql wordpress woothemes

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

woocommerce_checkout_update_order_meta 操作不起作用

嗨,今天我正在与 woo-commerce 合作,我已经根据用户要求成功创建了一些自定义结帐字段,但我无法将它们保存在数据库中。

在这里我如何创建自定义结帐字段......它在子主题中 functions.php

add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
// Over Ridding, Removing, Creating New Fields.
function custom_override_checkout_fields( $fields ) {
     unset($fields['billing']['billing_company']);
     unset($fields['billing']['billing_address_2']);    
     unset($fields['order']['order_comments']);
     unset($fields['billing']['billing_address_1']);
     unset($fields['billing']['billing_city']);
     unset($fields['billing']['billing_postcode']);
     unset($fields['billing']['billing_email']);


     $fields['billing']['your_name'] = array(
    'type'      => 'text',
    'label'     => __('Full Name', 'woocommerce'),
    'placeholder'   => _x('Full Name', 'placeholder', 'woocommerce'),
    'required'  => false,
    'class'     => array('form-row-wide'),
    'clear'     => true
     );

     $fields['billing']['your_phone_number'] = array(
    'type'      => 'text',
    'label'     => __('Your Phone Number', 'woocommerce'),
    'placeholder'   => _x('Your Phone Number', 'placeholder', 'woocommerce'),
    'required'  => false,
    'class'     => …
Run Code Online (Sandbox Code Playgroud)

wordpress woocommerce woothemes hook-woocommerce

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