Zen Cart Logo
Forums / All Other Contributions/Addons / Installing Super Data Markup, Prices show without tax

Installing Super Data Markup, Prices show without tax

Views: 1,389

Results 1 to 6 of 6
16 Feb 2016, 10:49 AM
#1
istilah avatar

istilah

New Zenner

Join Date:
Jan 2006
Location:
Netherlands
Posts:
48
Plugin Contributions:
0

Installing Super Data Markup, Prices show without tax

I am installing Super Data Markup from the plugin section. Works like a charm, installing is a breeze.
Testing on the Google Structured Data testing tool, everything OK, except I noticed that prices show up without tax.

Do they have to show up excluded of Tax?
I checked a few other websites and they are all inclusive of tax.
How do I get the tax included in the price?

Do I have to change something in the mod, or do I have to add some Og tags like <valueAddedTaxIncluded=false>?
I can not find any setting for it in the admin configuration page.

Any help appreciated!

16 Feb 2016, 3:07 PM
#2
istilah avatar

istilah

New Zenner

Join Date:
Jan 2006
Location:
Netherlands
Posts:
48
Plugin Contributions:
0

Re: Installing Super Data Markup, Prices show without tax

I have been playing around with the code from the plugin, in particular from super_data_head.php line 144:

"price" : "<?php echo $specials_new_products_price = (round(zen_get_products_actual_price($product_info_metatags->fields['products_id']),2)); ?>",

if I replace with:

"price" : "<?php echo $meta_products_price; ?>",

it seems to work fine and also with tax, but only IF metatags are defined AND price in metatags is on AND the SECONDARY_SECTION is blank.

I would like to have it working, but without so many conditions. The price is taken from the modules/metatags.php where I find:

$currencies->display_price($meta_products_price, zen_get_tax_rate($review_metatags->fields['products_tax_class_id']));

How do I mix the tax codeline into the first codeline above?

I hope you can help?

Thanks!

17 Feb 2016, 9:28 AM
#3
istilah avatar

istilah

New Zenner

Join Date:
Jan 2006
Location:
Netherlands
Posts:
48
Plugin Contributions:
0

Re: Installing Super Data Markup, Prices show without tax

Fixed,

code should be:

"price" : "<?php echo $specials_new_products_price = (round(zen_add_tax(zen_get_products_actual_price($product_info_metatags->fields['products_id']),zen_get_tax_rate($product_info_metatags->fields['products_tax_class_id'])),2)); ?>",

I am certainly not a programmer, but for sure I am getting good at copy&paste!

17 Feb 2016, 1:27 PM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Installing Super Data Markup, Prices show without tax

istilah:

Fixed,

code should be:

"price" : "<?php echo $specials_new_products_price = (round(zen_add_tax(zen_get_products_actual_price($product_info_metatags->fields['products_id']),zen_get_tax_rate($product_info_metatags->fields['products_tax_class_id'])),2)); ?>",

> 
> 
> I am certainly not a programmer, but for sure I am getting good at copy&paste!

Would suggest posting the above to the thread applicable to the plugin... Might get adopted as a standard rather than a one-off...
22 Nov 2016, 1:31 PM
#5
csgodeimos avatar

csgodeimos

Zen Follower

Join Date:
May 2016
Posts:
191
Plugin Contributions:
0

Re: Installing Super Data Markup, Prices show without tax

mc12345678:

Would suggest posting the above to the thread applicable to the plugin... Might get adopted as a standard rather than a one-off...

Is there one? I searched for it, nothing shows up.
The plugin worked on my site for a few months and has randomly died. I have no idea how to fix it lol.

26 Jun 2019, 3:23 AM
#6
gernot avatar

gernot

Zen Follower

Join Date:
Feb 2017
Location:
Tokyo, Japan
Posts:
334
Plugin Contributions:
0

Re: Installing Super Data Markup, Prices show without tax

I've been comparing the Super Data Markup and Zen Cart Structured Data modules. The former has no support thread, the latter does (although only v1.0 is free, v1.1 is commercially available from the author's site).
Super Data Markup has a new version v1.1.7 at the link below, still ostensibly (assuming it is legit) maintained by the same authors (PRO-Webs.net), not sure why not updated on this site:
https://zencart.codes/index.php?main_page=product_info&products_id=47

The instructions for v1.1.7 still seem to have the same bug as v1.1.5. Hence my comment on this thread. My thoughts, asssuming I understood the somewhat mangled instructions correctly (no offence to the authors, I know what it is like to write instructions and find they are not clear to others).

  1. 4a: in 1.5.6b, the HTML header is simply <!DOCTYPE html>, the replacement still holds true as is I think.
  2. 4b: in 1.5.6b I could not find any DEBUG line in html_header.php in any of the templates (in 1.5.5a I do find it), including in template_default. I presume adding the required lines directly in front of the ending </head> tag is what is intended (although I seem to recall reading somewhere that some structured data needs to appear near the top of the various meta tags). There is a notifier after the DEBUG in 1.5.5a, so not sure if the addition should be after or before the notifier.
  3. 8: the breadcrumb code to be replaced seems to have octal 221, 222, 224 characters in it (basically extended-ASCII single and double quotes rather than the standard ASCII ones), I don't think these exist in the actual file, maybe an encoding issue from cut/paste in the instruction file?

Aside: In v1.1.7 there is a super_data_head.php in includes/templates/your_templates/templates
and another one in the main folder which has some additional stuff in it, but it is not mentioned why this file exists there or whether it needs to be used instead of the one in the templates file.