Hello Themeco,
can’t get the following dynamic fields to display in Woocommerce Variable Product layout:
{{dc:woocommerce:product_sale_price}}
{{dc:woocommerce:product_regular_price}}
{{dc:woocommerce:product_sale_percentage_off}}
Hello Themeco,
can’t get the following dynamic fields to display in Woocommerce Variable Product layout:
{{dc:woocommerce:product_sale_price}}
{{dc:woocommerce:product_regular_price}}
{{dc:woocommerce:product_sale_percentage_off}}
Hi An,
Thanks for reaching out.
I just checked the dynamic fields below is working fine on my staging environment.
On the other hand, please disable your jetpack plugin so that we can check your setup because it is allowing us to log in to your website.
Hope that helps.
Thank you.
I confirm this issue too:
The green price and the last one in the red list is comming from the working …
{{dc:woocommerce:product_price}}
Greetings
For what reason ever, it seems to work now. Maybe a cache issue?
@Regnalf, could be, or maybe something in the product changed. Here’s a snippet of the source code powering those:
case 'product_price': {
$result = $product->get_price();
break;
}
case 'product_regular_price': {
$result = $product->get_regular_price();
break;
}
case 'product_sale_price': {
$result = $product->get_sale_price();
break;
}
It’s a very low level wrapper around the API provided by WooCommerce on products. So anything in WooCommerce (plugins, settings, etc) would effect that.
@Draxdes, we’re still a bit limited in how we can output and display variable products. In the next release (should be out later today) I’ve added a dynamic content option for “Product Price HTML” which will use the WooCommerce get_price_html
function. You won’t have as much styling control over the individual items but it will at least output everything in a way WooCommerce generates.
I think what
Hello @alexander,
I can confirm that get_price_html is working correctly in an Archive layout. Meaning it is displaying “lowest_variation_price - highest_variation_price” which is exactly what Woo does standard.
Unfortunately, this does not work well in a single product layout. Single products require specification of the variations which have their own regular + sale pricing:
This is not the pricing shown in the general tab for simple products:
I have been trying to find variable product details, but these seem missing…? To create a single layout for variable products, these details are essential. In the image below you see all fields that are available per variation:
Hey Ruud,
The get_price_html
is not for getting each variation price. Please use the Add to Cart Form element for that.
Hope that helps.
Hi @christian & @alexander thanks, get_price_html
is working perfectly.
Anyway the following prices display as Zero (the blue ones in the secure note’s sample product):
{{dc:woocommerce:product_price}}
{{dc:woocommerce:product_regular_price}}
{{dc:woocommerce:product_sale_price}}
Now i’m having problem with product stock too:
i’m using something like ONLY {{dc:woocommerce:product_stock}} LEFT
but can’t get the stock number of the variable product to display, even if the stock is set at the parent level.
Also made a try with a Simple product, and {{dc:woocommerce:product_stock}}
doesn’t show
(deactivated jetpack for you to check)
Hi Ruud,
You need to specify the product id while trying to get the stock for a specific product, like the following one.
{{dc:woocommerce:product_stock product="46"}}
Hope that helps.
Thanks
@tristup sorry but you didn’t answer to my questions:
I need to set {{dc:woocommerce:product_stock}}
for CURRENT PRODUCT (it has to be DYNAMIC, not hardcoded!). Why it doesn’t work?
Even if i set the specific product, eg. {{dc:woocommerce:product_stock product="83"}}
, the stock number doesn’t show up!
{{dc:woocommerce:product_price}}
{{dc:woocommerce:product_regular_price}}
{{dc:woocommerce:product_sale_price}}
all are ZERO in the front end, even if that’s not true. Why?
Hello @Draxdes,
Can you please update the given credentials so we can log in again on your site? We will investigate your issue further.
Thank you in advance.
Hello @Draxdes,
I have investigated the issue and I can confirm that the product stock is not displaying. I suspect that this is a bug in the latest release. I will be adding this to our issue tracker so that @Alexander and @Kory will be informed.
Please bear with us.
Hi @Draxdes,
Although it has been already reported to the issue tracker and queued for investigation and fixing by our development team, regretfully we don’t have any ETA for that currently.
Thanks for understanding
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.