问题原文
原帖链接 · sleepless · CC BY-SA 3.0
I'd like to start using schema.org markup. At the moment I'm trying to mark up voucher codes but I'm a bit lost. I have seen one website that is showing voucher codes as offers:
<div itemprop="offers" itemtype="https://schema.org/Offer">
<meta itemprop="price" content="40.0%" />
<link itemprop="availability" href="https://schema.org/InStock" />
...
</div>
This approach seems very wrong. How can a coupon code be in stock? And the price can't be forty percent. Funny that this particular website is ranking very well.
But what is the correct way? I can't find a proper item type for this purpose.
已采纳解答
原帖链接 · grg · CC BY-SA 3.0
discount only applies to Order, which is for completed transactions. Thus there's no real schema designed specifically for separate discount codes.
Offer seems to be the closest and most appropriate schema for this as you are offering a voucher code. Voucher codes can be available or unavailable, with LimitedAvailability and an end date set with availabilityEnds. For price, you can set priceSpecification.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
