reverbdotcom / reverb-magento

Magento 1.x plugin for syncing with Reverb
Other
7 stars 10 forks source link

Arbitrary field mapping #230

Closed skwp closed 8 years ago

skwp commented 8 years ago

Instead of us implementing a new field release every time there's a new reverb field, I'd like to get an arbitrary mapping option in place.

What this looks like is a mapping between a Dropdown of any magento product field and a textbox where you type in a reverb field name.

For example, we add seller_cost to the API, the customers are instructed to provide a mapping between whatever they want to call seller cost on their side, and type in "seller_cost" for the Reverb API side.

They should be able to add any number of mappings in the settings screen.

skwp commented 8 years ago

see also #222 as an example of something that would be solved by this

zztimur commented 8 years ago

If we could somehow tie in validation..

dunagan5887 commented 8 years ago

I suppose when the admin maps a Magento attribute to a Reverb field, I could validate the Magento attribute's existence locally and we could make an API call to Reverb to ensure that the Reverb field is a valid field.

skwp commented 8 years ago

I don't think that's necessary to start, let's start with just a text box

skwp commented 8 years ago

@dunagan5887 do you think we can get the field mapping done before tomorrow? I'd like to get it into this week's release if possible. if not i'll release just image and description fixes

skwp commented 8 years ago

p.s. you can theoretically read the true list of fields from the swagger definition https://s3.amazonaws.com/swagger.reverb.com/swagger.json

dunagan5887 commented 8 years ago

I don't think tomorrow will be possible. I hadn't started on it yet as I was waiting for confirmation. I was anticipating beginning work on Monday and hoping to complete it by Wednesday

skwp commented 8 years ago

ok thanks I'll plan to ship 0.9.0 without field mapping and save that for the next release

dunagan5887 commented 8 years ago

It makes sense to me to allow the same Magento attribute to multiple Reverb API fields. Should I allow multiple Magento attributes to the same Reverb API field? If so, should I concatenate the values with periods?

dunagan5887 commented 8 years ago

Should I remove the existing mapping fields in the system configuration?

skwp commented 8 years ago

No let's keep the existing fields, this is only to add additional fields that are not mapped by the plugin by default.

skwp commented 8 years ago

I don't think we should allow multiple attribute values to the same reverb values, that will get confusing

dunagan5887 commented 8 years ago

@skwp Something I just thought of, we should ensure that any attributes which are mapped as a part of this field mapping should trigger a listing sync on Mass Product updates, correct?