verbb / snipcart

A Craft CMS plugin to integrate with Snipcart.
Other
21 stars 9 forks source link

Order comments - doc link no long working #14

Closed bleepsandblops closed 4 years ago

bleepsandblops commented 4 years ago

Hi there,

I am struggling to find a way to add a text comment linked to an order.

Looking at the doc for Order Comments, the outgoing link to the Snipcart doc doesn't work anymore (maybe since v3?).

Am guessing the way is to use Custom Fields but it looks like it isn't supported by the plugin (cf https://github.com/workingconcept/snipcart-craft-plugin/blob/master/src/templates/fields/front-end/buy-now.twig)

Should I use my own markup in this case?

Thank you!

mattstein commented 4 years ago

Hey @bleepsandblops, thanks for pointing that out!

The link should be to https://docs.snipcart.com/v2/configuration/custom-fields#order-custom-fields and I'll get that updated. (And you're right; the doc structure changed with Snipcart v3.)

The markup actually gets added to the <script> tag that includes Snipcart's JS, not the buy now button. You'll see those supported fields here: https://github.com/workingconcept/snipcart-craft-plugin/blob/master/src/templates/front-end/cart-js.twig

This is totally different for Snipcart v3, which the plugin doesn't yet support: https://docs.snipcart.com/v3/setup/cart-custom-fields

mattstein commented 4 years ago

Also it looks like the docs are intent on stripping out the URL hash, but there's a section at the bottom of Custom Fields called Order Custom Fields.

bleepsandblops commented 4 years ago

Thanks @mattstein , makes sense!

FYI there's also a couple of links in the CP to the old doc: admin/settings/plugins/snipcart#orders

mattstein commented 4 years ago

I should have caught those back in v1.2.1: https://github.com/workingconcept/snipcart-craft-plugin/commit/7849c2db691f21a37a1b115b29471b6a7815471e#diff-8081c822b859c10902ce394cab2d66a9

Are you still seeing older links with a newer version of the plugin?