Download the PHP package sintra/pimcore-shopify-using-ipaas without Composer
On this page you can find all versions of the php package sintra/pimcore-shopify-using-ipaas. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sintra/pimcore-shopify-using-ipaas
More information about sintra/pimcore-shopify-using-ipaas
Files in sintra/pimcore-shopify-using-ipaas
Package pimcore-shopify-using-ipaas
Short Description A Pimcore's bundle for products, prices and translation sync using ipaas
License GPL-3.0-or-later
Informations about the package pimcore-shopify-using-ipaas
Sync Shopify Bundle
Bundle Pimcore 11 per l'integrazione con IPaaS per la sincronizzazione di anagrafica, traduzioni e prezzi dei prodotti.
Installazione
- Eseguire il comando
composer require sintra/pimcore-shopify-using-ipaas
-
Abilitare il bundle nel file
config/bundles.php
- Installare il bundle con il comando eseguito all'interno del
container docker
bin/console pimcore:bundle:install SyncShopifyBundle
Utilizzo
L'installazione del bundle crea il dataobject DefaultProduct
che è sincronizzabile tramite i mapper di default già
presenti nella libreria.
E' possibile creare dei mapper custom per il dataobject specifico che si intende mappare.
Creazione Mapper
Il mapper deve essere registrato come servizio nel services.yaml
, non sono necessari tag perchè già presenti
nell'interfaccia implementata.
Per estendere la libreria con un mapper custom è necessario implementare l'interfaccia del flusso specifico:
SyncShopifyBundle\Service\Product\IShopifyProductMapper
SyncShopifyBundle\Service\Translation\IShopifyTranslationMapper
SyncShopifyBundle\Service\Price\IShopifyPriceMapper
I metodi da implementare sono:
getMapperServiceKey()
: La chiave che lega l'header della chiamata agli endpoint, per scegliere il servizio corretto di mappaturagetProductClassId()
: La classe del dataobject pimcore del prodottogetMappedProduct()
: Il modello specifico del flusso mappato con il prodotto
Query Prodotti
I prodotti sono selezionati in base alla modificationDate
con ordinamento crescente. Onde evitare la selezione dei
medesimi prodotti ogni volta è salvata l'ultima modificationDate
presa nella tabella settings_store a DB.
Sul modello mappato viene effettuato un hash, salvato sulle note del dataObject e confrontato con l'ultimo calcolato per
evitare l'invio di un messaggio duplicato ad IPaaS.
Sicurezza
Nel bundle è configurato un Authenticator Symfony per proteggere gli endpoint tramite un API Key.
-
Inserire l'API Key nel file
.env
oppure nell'environment deldocker-compose.yaml
-
Aggiungere la configurazione nel file
config/packages/security.yaml
All'occorrenza è possibile utilizzare un Authenticator custom sostituendo quello presente.