lunar
lunar copied to clipboard
Settings - Manage Product Options
See #406 Duplicated Product Feature section to manage product options.

Validation and tests + refactor still to do so opening up this PR in draft.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated |
---|---|---|---|
getcandy-2-docs | ✅ Ready (Inspect) | Visit Preview | Dec 15, 2022 at 0:04AM (UTC) |
lunar-docs | ✅ Ready (Inspect) | Visit Preview | Dec 15, 2022 at 0:04AM (UTC) |
We'll have to manually test this to ensure it's all good, but I do welcome the idea of editing product options globally in the settings area.
Sure there is a still a little more work on this one as currently copied over from manage features should be completed by tomorrow. Would be nice to see both the product options and features at least get merged to the new develop branch.
@glennjacobs Ok this one is ready for review. I removed the manage features and created a few tests so should be good for the next beta. Unless there is anything else you need me to add for this one?
Thanks @markmead I will pull this branch down over the weekend and update those issues you mentioned.
Was thinking about perhaps extracting this to an abstract ListBuilder similar to #481 then setup each list as a component where ever we need it, for example Product features / Product options / Collections as there is currently far too much responsibility handled directly in the blade templates. Would be good to extract the actions as well.
Regarding this question "How do I add options to a variant that already exists?"
Not quite sure what you mean on this one, as this is a global way to manage product options, at this level I don't think we need to be concerned about the variants.
Sorry @adam-code-labx, that question is irrelevant. I was getting confused between options and attributes, my bad!
Hi @adam-code-labx any update on this from @markmead 's review above?
Hi @adam-code-labx any update on this from @markmead 's review above? Unfortunately didn't have time this weekend as I was working on customer and order modifications.
Let's put this one back to draft for now as I feel we can improve by extracting the logic to a new ListBuilder class, see my comments above.
@markmead @adam-code-labx
I've done some tweaks to this this morning to try push it over the line as I think it's good enough to get in and be a useful addition to the hub, we can always improve on it down the line.
Changes:
- Add
handle
input to allow users to specify this manually, rather than auto-generating it. - Addressed style updates as Mark mentioned
- Fixed some translations and the incorrect relationship reference.
Tried to add two options both with the same name

Clicking "Add option value" does nothing

Capitalisation isn't consistent

Can we show a count of the values for each option?
