woocommerce前端,如何设置“_sold_individually”字段为true

时间:2014-01-10 08:56:22

标签: wordpress woocommerce

我使用CRED框架(http://wp-types.com/documentation/user-guides/using-cred-to-create-and-edit-content-from-front-pages/)创建了一个前端条目表单。

我的代码如下所示:

[credform class="cred-form cred-keep-original"]

[cred_field field="form_messages" value=""]

<div class="cred-field cred-field-post_title">
    <div class="cred-label">Producto Name</div>
    [cred_field field="post_title" post="product" value="" urlparam=""]
</div>

<div class="cred-field cred-field-_regular_price">
    <div class="cred-label">Precio</div>
    [cred_field field="_regular_price" post="product" value="" urlparam=""]
</div>

<div class="cred-field cred-field-post_content">
    <div class="cred-label">Producto Description</div>
    [cred_field field="post_content" post="product" value="" urlparam=""]
</div>

<div class="cred-field cred-field-post_excerpt">
    <div class="cred-label">Producto Excerpt</div>
    [cred_field field="post_excerpt" post="product" value="" urlparam=""]
</div>

<div class="cred-field cred-field-_featured_image">
    <div class="cred-label">Imagen destacada</div>
    [cred_field field="_featured_image" value="" urlparam=""]
</div>

<div class="cred-group cred-group-taxonomies">
    <div class="cred-taxonomy cred-taxonomy-product_type">
        <div class="cred-label"><h2>Etiquetas</h2></div>
        [cred_field field="product_type"]
        <div class="cred-taxonomy-auxilliary cred-taxonomy-auxilliary-product_type_popular">
            [cred_field field="product_type_popular" taxonomy="product_type" type="show_popular"]
        </div>
    </div>
    <div class="cred-taxonomy cred-taxonomy-product_cat">
        <div class="cred-label"><h2>Categorías de los productos</h2></div>
        [cred_field field="product_cat" display="checkbox"]
        <div class="cred-taxonomy-auxilliary cred-taxonomy-auxilliary-product_cat_add_new">
            [cred_field field="product_cat_add_new" taxonomy="product_cat" type="add_new"]
        </div>
    </div>
    <div class="cred-taxonomy cred-taxonomy-product_tag">
        <div class="cred-label"><h2>Etiquetas de los productos</h2></div>
        [cred_field field="product_tag"]
        <div class="cred-taxonomy-auxilliary cred-taxonomy-auxilliary-product_tag_popular">
            [cred_field field="product_tag_popular" taxonomy="product_tag" type="show_popular"]
        </div>
    </div>
    <div class="cred-taxonomy cred-taxonomy-product_shipping_class">
        <div class="cred-label"><h2>Clases de envío</h2></div>
        [cred_field field="product_shipping_class" display="checkbox"]
        <div class="cred-taxonomy-auxilliary cred-taxonomy-auxilliary-product_shipping_class_add_new">
            [cred_field field="product_shipping_class_add_new" taxonomy="product_shipping_class" type="add_new"]
        </div>
    </div>
    <div class="cred-taxonomy cred-taxonomy-pa_tamano">
        <div class="cred-label"><h2>tamaño</h2></div>
        [cred_field field="pa_tamano" display="checkbox"]
        <div class="cred-taxonomy-auxilliary cred-taxonomy-auxilliary-pa_tamano_add_new">
            [cred_field field="pa_tamano_add_new" taxonomy="pa_tamano" type="add_new"]
        </div>
    </div>
    <div class="cred-taxonomy cred-taxonomy-shop_vendor">
        <div class="cred-label"><h2>Product Vendors</h2></div>
        [cred_field field="shop_vendor"]
        <div class="cred-taxonomy-auxilliary cred-taxonomy-auxilliary-shop_vendor_popular">
            [cred_field field="shop_vendor_popular" taxonomy="shop_vendor" type="show_popular"]
        </div>
    </div>

</div>

<div class="cred-group cred-group-parents">
    <div class="cred-field cred-field-post_parent">
        <div class="cred-label">product Parent</div>
        [cred_field field="post_parent" value=""]
    </div>

</div>

<div class="cred-field cred-field-_sold_individually">
  <div class="cred-label">Yo vendo exactamente un ejemplar de este articulo: </div>
        [cred_field field="_sold_individually" post="product" value="" urlparam=""]
    </div>



[cred_field field="form_submit" value="Enviar" urlparam=""]

[/credform]

问题在于[cred_field field =“_ sold_individually”post =“product”value =“”urlparam =“”]

似乎不会发布带有此选项的产品......我需要实现这一目标。请帮忙。

感谢!!!

1 个答案:

答案 0 :(得分:0)

我在@ wp-types的帮助下找到了解决方案!谢谢阿德里亚诺:

http://wp-types.com/forums/topic/woocommerce-cred-can-you-help-me/#post-185265