batchnz / craft-commerce-untitled

A Craft Commerce plugin for minting variants based on field values
MIT License
0 stars 1 forks source link

Implement SKU template parsing #2

Closed moacode closed 3 years ago

moacode commented 3 years ago

We need to support variables in the SKU string so that dynamic SKU's can be generated. Something similar to Craft's convention of {paintColour}-{paintSheen}-{size} or an automatic format based on selected fields would be a nice option.

moacode commented 3 years ago

Estimate: 3–5 hours as I think the relation fields may prove tricky.

moacode commented 3 years ago

@judereid this has been done and is being achieved using the View's renderObjectTemplate() method. It's designed to work with a single relation only so could be improved.