API Forum

This forum is in read-only mode.
Please refer to our API support in case you have any questions.
We can be reached at api@e-conomic.com
e-conomic API developer forum

What is order Line() and vat parameter in order_create

hi experts,

Q1)How to get the product details and order related information for particular customer which is purchased goods in website and connnected to e-conomic.???

Q2)what is orderLine(),createorder Form data()??
Q3)if suppose the customer purchase more than 1 item ,how to show the product information on the pdf format of order sheet.

This the code which is i wrote ...

$debtorGroupHandles = $client-debtorGroup_GetAll()-DebtorGroup_GetAllResult-DebtorGroupHandle;

            $firstDebtorGroup = $debtorGroupHandles[0];
            // print_r($text_logged);

            $newDebtorHandle = $client-Debtor_Create(array(

                'number'            =  $row['customer_id'],

                'debtorGroupHandle' = $firstDebtorGroup,

                'name'              = $row['firstname'],

                'vatZone'           = $vat_zone))-Debtor_CreateResult;
            echo'debtor created';
                $orderno = $client-Order_Create(array('debtorHandle' = $newDebtorHandle))-Order_CreateResult;
                $orderline = $client-OrderLine_Create(array(orderHandle = $orderno))-OrderLine_CreateResult;
                //for setting postal code delivary location etc..
                $client -Order_SetDeliveryPostalCode(array('orderHandle'= $orderline, 'value' = $row['shipping_postcode']));
                $client -Order_SetDeliveryCity(array('orderHandle'= $orderline, 'value' = $row['shipping_city']));
                $client -Order_SetDeliveryCountry(array('orderHandle'= $orderline, 'value' = $row['shipping_country']));
                $client -Order_SetTermsOfDelivery(array('orderHandle'= $orderline, 'value' = 'Once Deliveried,Cont return Money Back'));
                $client -Order_SetDeliveryDate(array('orderHandle'= $orderline, 'value' = date('Y-m-d\TH:i:s')));
                $client -Order_SetDeliveryAddress(array('orderHandle'= $orderline,  'value' = $row['shipping_address_1']));
                $client -Order_SetDeliveryAddress(array('orderHandle'= $orderline, 'value' = $row['shipping_address_2']));
           // for getting products of a customer in e-conomic......

it works when one product purchase by customer..but more than one products its showing error on 'vatZone'           = $vat_zone  line..

can any one help me out please..??
created Mar 8, 2013 by sudheerphp
22% Accept Rate
Q 14 A 10 C 0

1 Answer

Which error are you getting?

OrderLine_CreateFromData is a way for you to create the order in one service instead of in many as your code is doing now.
answered Mar 10, 2013 by nkn
Visma e-conomic A/S