Dear Sylius-Dev's,
my name is André, 41 years old, coding since I was 16, my first computer:
http://en.wikipedia.org/wiki/TRS-80.
I am a Sylius newbie and not a Symfony expert (yet) ;)
Last week I started with a new project. I am trying to re-orchestrate Sylius services and expose the
new "service combination" with a
new RESTFull Endpoint.
The Sylius services in question are all services, events, etc. responsible for handling CartItems and cart user interaction's. (Add, remove, checkout)
The core feature(s) I need to implement are:
- Find Special-CartItems using a UUID (Request data) with a 3rd Party service (Remote Call) to extract CartItemData from that service.
- Using the 3rd Party provided CartItemData I need to create a valid CartItem compatible and usable by all existing Sylius service implementations.
The aim here is to be able to re-use all existing Sylius services dealing with CartItem's: Checkout, Payment, etc.
My Plan:
- Create a custom itemresolver, who will be responsible for using the 3rd Party service to get CartItemData by UUID and create a valid CartItem wich can be transparently used by all existing sylius services.
- Create a new XYZCart Entity with the ResourceManager to have a new RESTFull Endpoint.
- Create or adopt all test-suites to verify the new features.
Question(1): Is ItemResolver the correct class to do that "transformation"? If not please advice!
Question(2): Do I need to adjust any "events" which trigger add/remove items from the cart in order to "glue" with my new ItemResolver Service?
Question(3): Is my plan complete? ;) Are there any other services, configs, etc I overlooked, who get used later in the order process for example, which I need to adjust?
Thank you in advance,
André