DivanteLtd / magento1-vsbridge

Run the Progressive Web App (PWA) on top of Magento 1.9. This is a Vue Storefront bridge for Magento 1.x. MIT License
https://vuestorefront.io
MIT License
57 stars 49 forks source link

Add mapper to fit response with needed schema #25

Closed mtarld closed 4 years ago

mtarld commented 5 years ago

Add mapper in order to be able to format response according to VSF required schema. In order to resolve: https://github.com/DivanteLtd/magento1-vsbridge/issues/24

pkarw commented 5 years ago

I think that the best person to review this mappers is @afirlejczyk

nhp commented 5 years ago

Shouldn't there be at least some kind of possibility to then add custom attributes to the cast maps? Or is this then left to the user to override?

cewald commented 4 years ago

Is there work in progress? I ran into this problem with german postcodes which could contain a leading zero. It obviously won't work without a specific mapping.

cewald commented 4 years ago

Shouldn't there be at least some kind of possibility to then add custom attributes to the cast maps? Or is this then left to the user to override?

You could easily use the Magento module system to overwrite a mapper classes you need to extend.

cewald commented 4 years ago

@sandermangel @nhp I added an updated version of this PR (#49) with an approach to extend the mapping without class overwrites. It works like in the DivanteLtd/magento1-vsbridge-indexer and its custom data-sources.