I found #2062799: Add support for Drupal Commerce/product tags about adding commerce support for price:amount and price:currency. I'm curious about adding those tags for non-commerce environments.

Comments

greggles’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new1.49 KB

Here's a patch if you're interested.

Status: Needs review » Needs work

The last submitted patch, 1: 2400529_metatag_produce_price_attributes.patch, failed testing.

greggles’s picture

Title: Add support for og product data (specifically for og price:amount price:currency for pinterest rich pints) » Add support for og product data (specifically for og price:amount price:currency for pinterest rich pins)
Status: Needs work » Needs review
StatusFileSize
new1.36 KB

With a proper path so it will apply.

greggles’s picture

Title: Add support for og product data (specifically for og price:amount price:currency for pinterest rich pins) » Add support for og product data (specifically for og product price:amount price:currency for pinterest rich pins)
StatusFileSize
new1.38 KB
new565.45 KB

So...

Updated patch attached uses product:price: prefix

damienmckenna’s picture

Status: Needs review » Needs work
Parent issue: » #2376921: META: Plan for Metatag 7.x-1.5 release

Happy to add this quick patch to the next release, but the default values aren't needed.

greggles’s picture

Sorry to be daft. You're saying:

+          'product:price:currency' => array('value' => ''),

Should be...what?

damienmckenna’s picture

I'm saying that you don't need to include anything in metatag_opengraph_metatag_bundled_config_alter() unless you specifically need a default assigned for one of the configuration instances.

greggles’s picture

Status: Needs work » Needs review
StatusFileSize
new1.58 KB

OK, updated patch to remove the empty defaults.

I also added the "xmlns" entry for products per https://developers.facebook.com/docs/payments/product

I unhid the file about prefixes b/c I used that to explain to pinterest how their docs are inaccurate - hope that's OK :)

dpintats’s picture

Disclosure: I work with Greg and conducted tests and code review relating to work.

I've reviewed this patch and it works as expected when adding product price values in my particular content type. Works for me and I'll +1 this.

damienmckenna’s picture

@dpintats: Thanks. I trust Greg's coding skills very highly, but your review is appreciated.

damienmckenna’s picture

Status: Needs review » Fixed

Committed. Thanks Greg, and dpintats.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.