craftcms / shopify

Synchronize and extend product data from your Shopify storefront.
MIT License
44 stars 25 forks source link

Field dropdown not rendering correctly #2

Closed joegra closed 4 years ago

joegra commented 5 years ago

When editing a page with a Shopify Product field selector in it, the dropdown menu for the field does not render correctly. It appears more as a multi-select field that is open, with an extraneous arrow icon in the bar on the right (please see attached). shopify-plugin-field-render

nmaier95 commented 5 years ago

Hello @joegra ,

which OS + browser (-version) are you using to reproduce this behaviour? Does this happen with usual craft multiselect fields as well? Because then I think this might be due to an issue from craft itself.

Greetings.

joegra commented 5 years ago

Hi @nmaier95 , I've been working in Chrome on Windows 10. I tried adding a standard dropdown field, which renders correctly. Looking at the rendered field, it looks like the 'multiple' attribute is being added to the select tag -- is this intentional? If so, would make sense why it's rendering this way... although the stray arrow seems a bit odd (perhaps a bit of stray css from the standard dropdown styling?)...

nmaier95 commented 5 years ago

Fix has been deployed with version 1.0.3

chadspencer commented 5 years ago

@nmaier95 I'm using version 1.0.3 of the plugin and the select field is still broken. Can you confirm the fix got released? Thank you so much.

chadspencer commented 5 years ago

Oh I see the change that got merged. Since only one product can be selected it should use the class name of select and remove the multiple attribute from the select element itself.

nmaier95 commented 5 years ago

Hello @chadspencer,

actually it should be possible to select multiple products. Unfortunately I do not have an active shopify-account at the moment to retest it myself. May you confirm it still not working for you to select multiple products with version 1.0.3? If so, please let me know the browser + version you are using.

Thanks in advance!

chadspencer commented 5 years ago

@nmaier95 Hmm, interesting. I'm using the latest version of both Chrome and Safari on a Mac. The field itself is a multi select field but when I save only the last option I've selected is saved. I assumed you could only choose one product at a time. I've accounted for this by have the selection in a matrix field.

nmaier95 commented 4 years ago

Should be resolved by PR #9