Can someone please advise how to change the code below to display price inc Tax / VAT
"price": <?php echo round(zen_get_products_actual_price($products_id),2); ?>,
Thanks
Printable View
Can someone please advise how to change the code below to display price inc Tax / VAT
"price": <?php echo round(zen_get_products_actual_price($products_id),2); ?>,
Thanks
This is my temporary fix but not ideal as it requires hard coding the vat multiplyer. Tried calling zen tax rate but it did not work
"price": <?php echo round(zen_get_products_actual_price($products_id) * (1.2),2); ?>,
Do your display prices include VAT? A lot of VAT countries have similar rules to here & all our prices are shown including GST, so zen_get_products_display_price( $products_id) should do what you need.
Tried that but it still showed the price ex VAT.
"price": <?php echo round(zen_get_products_display_price($products_id),2); ?>,
I use the inc ex tax mod so both inc and ex show on the product page to satisfy google
I just need to find out how to call the zen tax rate in the multiplier * (1.2)
First, what are your store's settings for Configuration->My Store->Display Prices with Tax and Display Prices with Tax in Admin? Those settings govern whether or not to include the associated tax in any price's display.
Tried it with inc ex and ex inc. I do thank you for your input but what I would like to know is how to change my multiplier in the code to draw on the zen tax rate so I do not have to update this code if the tax rate changes.
"price": <?php echo round(zen_get_products_actual_price($products_id) * (1.2),2); ?>,
I'm not familiar with the details of the Structured Data plugin; perhaps if you post your questions (with a link back to this thread), someone can better help.
Tnx . I am not sure why you would have to be familiar with the details of the Structured Data plugin to advise on how to pull the zen cart tax rate into that line of code instead of my 1.2 multiplier.
Anyone advise on the code change needed?
That's my point, there are additional fields that can be used to gather a product's specific tax rate and I don't know what product-related fields are available.
If the product's tax_class_id is available (as a $tax_class_id variable for the example below), then you can use something like
Code:round(zen_add_tax(zen_get_products_actual_price($products_id), zen_get_tax_rate($tax_class_id)), 2);
You should always post in the thread relevant to the plugin you are asking about, for obvious reasons.Quote:
if you post your questions (with a link back to this thread), someone can better help.
Use the latest version, it uses prices with tax.
https://github.com/torvista/zen-cart_Structured-Data