Variable product price not displaying in custom single product template
-
I’ve got my own single-product.php template, where i call the
do_action( 'woocommerce_single_product_summary' )
hook. However, when choosing an attribute (in my case a custom attribute, ‘contents’), the price of the variation is not shown. So I dived in to this and found that the javascript (add-to-cart-variation.js) is not loading. When I add this file manually, to check if that’s causing the problem, price still isn’t showing up.
The from-to-price however, is showing (€25 – €100). The html that is responsible, is this:
<div class="woocommerce-variation single_variation"></div>
Which should be:
<div class="woocommerce-variation single_variation" style="display:block;"> <div class="woocommerce-variation-description"></div> <div class="woocommerce-variation-price"> <span class="price"> <span class="amount">€25.00</span> </span> </div> <div class="woocommerce-variation-availability"></div> </div>
I’ve got
wp_footer()
andwp_head()
where they should be, and no plugins except for one which I disabled.I’ve also copied the single-product/add-to-cart templates (variable.php, varation-add-to-cart-button.php, variation.php) to my theme folder.
WC version = 2.5.5. What am I missing? Thanks for your support!
- The topic ‘Variable product price not displaying in custom single product template’ is closed to new replies.