ssossossossosso

Forums

Forums OroCRM OroCRM – Programming Questions Create an order via API

This topic contains 6 replies, has 3 voices, and was last updated by  Paul Clarkin 2 years, 1 month ago.

  • Creator
    Topic
  • #22387

    salex
    Participant

    Can someone help with information about creating orders via API? Couldn’t find appropriate documentation.. thanks in advance!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #22388

    Jaimy
    Participant

    Hi @salex,

    You couldn’t find any documentation since there is no functionality yet to create Magento order, assuming the orders you’re talking about are Magento orders, via the OroCRM api. You could go ahead and create an Api (Rest/SOAP) Order controller and add this functionality yourself 🙂

    The OroCRMSalesBundle has some great examples for creating your own Api controllers https://github.com/orocrm/crm/tree/master/src/OroCRM/Bundle/SalesBundle/Controller/Api/Rest hope this helps to get you started!

    Kind Regards,

    Jaimy Casteleijn

    #22389

    salex
    Participant

    Hi Jaimy,

    thank you for the answer, do I understand correctly that ORO doesn’t have ‘own storage’ for orders and the only one way is installing additionally Magento for this purpose? If so, could you please clarify any other alternative approaches for handling orders in ORO, presently we have own custom e-commerce application written on php framework with custom DB (where stored customers, products, orders etc).

    Thanks,
    Alex

    #22390

    Jaimy
    Participant

    Hi @salex,

    You understand correctly! Oro doesn’t store “basic orders” if you will. It will only store orders for the entities you create. You could use a BaseOrder entity as a start and work from there. This is what I would advise:

    – Create an entity which will store you’re Order (if you want could map it 1on1);
    – The Order could extend the BaseOrder (BaseOrder) which will give you a nice set of fields to start from;
    – Create the related entities, such as OrderItems, Customers, OrderAddress etc..;
    – After you’ve done all that, you could create an ApiController to push Orders to your CRM instance.

    There is no out of the box Order for all platforms so you are stuck with writing some entities on your own, sorry :< . Hope this helps!

    Kind Regards,

    Jaimy Casteleijn

    #22391

    salex
    Participant

    Hi Jaimy,

    thank you for such detailed explanation, now technical side is clear 🙂
    will think about the best approach.

    Alex

    #22392

    Jaimy
    Participant

    Hi @salex,

    No problem, hopefully this will help and guide you (in some way) to the right approach. Good luck and have fun with Oro(CRM)!

    Kind Regards,

    Jaimy Casteleijn

    #22393

    Paul Clarkin
    Participant

    Hi, @salex is this something you solved? I want to do the same. Is your solution something you could share?

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.