lunar icon indicating copy to clipboard operation
lunar copied to clipboard

Settings - Manage Product Options

Open adam-code-labx opened this issue 2 years ago • 4 comments

See #406 Duplicated Product Feature section to manage product options.

Screenshot 2022-07-26 at 00 32 54

Validation and tests + refactor still to do so opening up this PR in draft.

adam-code-labx avatar Jul 25 '22 23:07 adam-code-labx

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)

vercel[bot] avatar Jul 25 '22 23:07 vercel[bot]

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.

glennjacobs avatar Jul 26 '22 10:07 glennjacobs

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.

adam-code-labx avatar Jul 26 '22 11:07 adam-code-labx

@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?

adam-code-labx avatar Jul 26 '22 22:07 adam-code-labx

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.

adam-code-labx avatar Sep 02 '22 10:09 adam-code-labx

Sorry @adam-code-labx, that question is irrelevant. I was getting confused between options and attributes, my bad!

markmead avatar Sep 02 '22 13:09 markmead

Hi @adam-code-labx any update on this from @markmead 's review above?

glennjacobs avatar Sep 05 '22 09:09 glennjacobs

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.

adam-code-labx avatar Sep 05 '22 09:09 adam-code-labx

@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.

alecritson avatar Oct 07 '22 08:10 alecritson

Tried to add two options both with the same name

image

glennjacobs avatar Dec 15 '22 09:12 glennjacobs

Clicking "Add option value" does nothing

image

glennjacobs avatar Dec 15 '22 09:12 glennjacobs

Capitalisation isn't consistent

image

glennjacobs avatar Dec 15 '22 10:12 glennjacobs

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

image

glennjacobs avatar Dec 15 '22 10:12 glennjacobs