Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2015-05-13 13:02:36

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,453
Website GitHub

Prices inc/ex-tax

Can I please canvas opinion on the ways people have approached e-commerce sites that display prices inclusive or exclusive of Tax (UK VAT). The site I’m working on has a need for both: one for business customers, one for the rest. A few ways I can see to do it:

  1. Extract both prices from the database and put them both on the page with a class indicating which is which. The “inclusive/exclusive tax” toggle link would then just swap classes over via jQuery and set a cookie to indicate the preference for next time.
  2. Extract only the prices needed for display based on the current system “in force” that the user has chosen (or a system-wide default if the cookie hasn’t yet been set). The toggle link would then either refresh the page passing the intended scheme as a URL param, or do some AJAX magic to effect the same thing.

Each has relative merits and drawbacks. A few specific questions and observations to consider:

  • If displaying both on the page (even though one’s hidden from view), can a price be marked up as inclusive or exclusive of Tax using schema.org markup? I can’t find it if so. Don’t want to confuse shopping spiders by having two prices available, because they might think the values are a ‘range’ of prices for the product or something weird like that.
  • If using separate pages, each product or category list page would be identical except for the price. Is that an SEO / duplicate content nightmare waiting to happen?
  • Again, under the separate page system, do I need to use a canonical tag to mark one page as “gospel” and the other as an alternative version of the same content?
  • To satisfy Google Shopping guidelines, the site must only present prices inclusive of tax, so the feed supplied to them will have something like showtax=1 in all URLs which will override anything else. Kinda messy, but it’s not possible to rely on a cookie being set.

ebuyer show both on the page in separate <div> tags with suitable class names so only one is visible at a time. They only ever mark up the inclusive-tax using shema.org’s “price” attribute, regardless of which is being displayed to the user.

ScrewFix only show one price, marking up whichever happens to be visible using schema.org’s “price” attribute. Their toggle link does some AJAX stuff to swap prices over and reload portions of the content with new values.

Dunno which way to jump. Or, indeed if there’s a third (fourth…) way I haven’t considered. Thoughts? Ideas? Thanks in advance.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#2 2015-05-13 13:09:43

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Prices inc/ex-tax

If the webshop also delivers to other countries, you may also want to read this

Offline

#3 2015-05-13 13:18:07

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: Prices inc/ex-tax

ruud wrote #290736:

If the webshop also delivers to other countries, you may also want to read this

This is indeed very cool and the first step towards a law which I understand that it will be made active soon where Europe will abolish geo-blocking and other copyright restrictions within its member states. This means that content will/and should be made available across Europe as it will in effect function as one geo-location.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#4 2015-05-13 13:20:51

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,453
Website GitHub

Re: Prices inc/ex-tax

ruud wrote #290736:

If the webshop also delivers to other countries

Thankfully we’re not, so we’ve avoided #VATMESS for now. Noble intentions, but an absolute bloody minefield.

shakes fist at EU


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#5 2015-05-13 13:22:54

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,453
Website GitHub

Re: Prices inc/ex-tax

Interesting. Just found valueAddedTaxIncluded but I’m not quite sure how best to add it to the markup, or where. More research required…


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#6 2015-05-13 15:13:05

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,453
Website GitHub

Re: Prices inc/ex-tax

Continuing the monologue, further research indicates one approach is:

<div itemscope itemtype="http://schema.org/Offer">
   <span itemprop="priceSpecification" itemscope itemtype="http://www.schema.org/PriceSpecification">
     <span itemprop="price">10</span>
     <span itemprop="priceCurrency>GBP</span>
     <meta itemprop="valueAddedTaxIncluded" content="true "/>
  </span>
</div>

Unsure whether this can be repeated for both the inclusive and exclusive tax situations with the valueAddedTaxIncluded bool toggled accordingly, or if it’s a bad idea to indicate that both prices on the page are “offers”. Insights appreciated.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB