verbb / snipcart

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

Improve discount’s product selection UI #25

Closed DidoMarchet closed 1 year ago

DidoMarchet commented 3 years ago

Hi, I've got a question about discounts.

In the control panel we link products and discounts manually, adding ids in the same way as Snipcart dashboard.

Screenshot 2020-10-15 at 16 07 23

Do you know if there's a smart way to match products and discounts? Or if we can modify the template field? The goal is something like craft commerce select field

Screenshot 2020-10-15 at 16 11 00

Thanks in advance and kind regards,

Davide

mattstein commented 3 years ago

This is a nice idea @DidoMarchet, thank you. I think the ability to manually input the product ID would still be important since products could be defined in Craft outside the product details field and not yet known to Snipcart—but offering the ability to choose known products would be much more convenient.

There are template hooks you can use to add your own Twig to the existing control panel views, but not fully override them. In order to do that, you would need to use JavaScript to broadly replace existing UI which would likely be uncomfortable to maintain.

Treating this as a feature request and will implement when I get some time.