我想展示通过woo-commerce gravity form附加组件产生的产品变体 在产品名称列之后的表格中的购物车页面上。
意思是我想显示添加到购物车后可以更改或更新的产品选项。 我该怎么办?
请帮我解决问题。
由于
答案 0 :(得分:0)
这需要对模板进行一些繁重的自定义。考虑到你还必须使用AJAX,这并不是那么容易。如果您正在寻找可以开始的地方,请查看/wp-content/plugins/woocommerce/cart/
中的模板编辑并使用模板覆盖。这里不是一个答案,但也不是一件容易回答的事情。
答案 1 :(得分:0)
我的情况是一个模板问题,我修复了这个转换我的主题在20xxx主题的孩子,并在标题的头部添加此代码。
<script type='text/javascript' src='<?php echo get_stylesheet_directory_uri()?>/js/prettyPhoto/jquery.prettyPhoto.js?ver=3.1.5'></script>
<script type='text/javascript' src='<?php echo get_stylesheet_directory_uri()?>/js/prettyPhoto/jquery.prettyPhoto.init.js?ver=2.2.10'></script>
<script type='text/javascript'>
/* <![CDATA[ */
var wc_single_product_params = {"i18n_required_rating_text":"Please select a rating","review_rating_required":"yes"};
var wc_single_product_params = {"i18n_required_rating_text":"Please select a rating","review_rating_required":"yes"};
/* ]]> */
</script>
<script type='text/javascript' src='<?php echo get_stylesheet_directory_uri()?>/js/frontend/single-product.js?ver=2.2.10'></script>
<script type='text/javascript' src='<?php echo get_stylesheet_directory_uri()?>/js/jquery-blockui/jquery.blockUI.js?ver=2.60'></script>
<script type='text/javascript'>
/* <![CDATA[ */
var woocommerce_params = {"ajax_url":"\/wp-admin\/admin-ajax.php","ajax_loader_url":"\/\/ahrf-preview.nettheory.com\/wp-content\/plugins\/woocommerce\/assets\/images\/ajax-loader@2x.gif"};
var woocommerce_params = {"ajax_url":"\/wp-admin\/admin-ajax.php","ajax_loader_url":"\/\/ahrf-preview.nettheory.com\/wp-content\/plugins\/woocommerce\/assets\/images\/ajax-loader@2x.gif"};
/* ]]> */
</script>
<script type='text/javascript' src='<?php echo get_stylesheet_directory_uri()?>/js/frontend/woocommerce.js?ver=2.2.10'></script>
<script type='text/javascript' src='<?php echo get_stylesheet_directory_uri()?>/js/jquery-cookie/jquery.cookie.js?ver=1.3.1'></script>
<script type='text/javascript'>
/* <![CDATA[ */
var wc_cart_fragments_params = {"ajax_url":"\/wp-admin\/admin-ajax.php","fragment_name":"wc_fragments"};
var wc_cart_fragments_params = {"ajax_url":"\/wp-admin\/admin-ajax.php","fragment_name":"wc_fragments"};
/* ]]> */
</script>
<script type='text/javascript' src='<?php echo get_stylesheet_directory_uri()?>/js/frontend/cart-fragments.js?ver=2.2.10'></script>
<script type='text/javascript' src='http://ahrf-preview.nettheory.com/wp-content/themes/twentyfifteen/js/skip-link-focus-fix.js?ver=20141010'></script>
<script type='text/javascript' src='http://ahrf-preview.nettheory.com/wp-includes/js/comment-reply.js?ver=4.1'></script>
<script type='text/javascript'>
/* <![CDATA[ */
var screenReaderText = {"expand":"<span class=\"screen-reader-text\">expand child menu<\/span>","collapse":"<span class=\"screen-reader-text\">collapse child menu<\/span>"};
/* ]]> */
</script>
<script type='text/javascript' src='http://ahrf-preview.nettheory.com/wp-content/themes/twentyfifteen/js/functions.js?ver=20141212'></script>
<script type='text/javascript'>
/* <![CDATA[ */
var wc_add_to_cart_variation_params = {"i18n_no_matching_variations_text":"Sorry, no products matched your selection. Please choose a different combination.","i18n_unavailable_text":"Sorry, this product is unavailable. Please choose a different combination."};
/* ]]> */
</script>
<script type='text/javascript' src='<?php echo get_stylesheet_directory_uri()?>/js/frontend/add-to-cart-variation.js?ver=2.2.10'></script>