Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Wetail

    (@pierrewiberg)

    Hej Chrillep!

    Det man beh?ver f?r att komma ig?ng ?r tv? stycken API-nycklar, en best?ller du utav oss och en h?mtar du i Fortnox admin-panel.

    Datan f?rs ?ver via Fortnox API, om du g?r in p? wp-plugs.com s? finns d?r en liten film som visar hur installationen fungerar samt en FAQ p? de vanligaste fr?gorna.

    Lycka till!

    Thread Starter chrillep

    (@chrillep)

    Tack.
    Om jag i woocommerce kassan best?ller som F?retag s? g?r det inte in i Fortnox.

    /**
         * Creates a n XML representation of an Order
         *
         * @access public
         * @param mixed $arr
         * @param $customerNumber
         * @return mixed
         */
        public function create($arr, $customerNumber){
    
            $order_options = $options = get_option('woocommerce_fortnox_order_settings');
            $options = get_option('woocommerce_fortnox_general_settings');
    
            $root = 'Order';
            $order['DocumentNumber'] = $arr->id;
            $order['AdministrationFee'] = $order_options['admin-fee'];
            $order['OrderDate'] =  substr($arr->order_date, 0, 10);
            $order['DeliveryDate'] = substr($arr->order_date, 0, 10);
            $order['Currency'] = $arr->get_order_currency();
            $order['CurrencyRate'] = '1';
            $order['CurrencyUnit'] = '1';
            $order['Freight'] = $arr->get_total_shipping();
            $order['CustomerNumber'] = $customerNumber;
            $order['Address1'] = $arr->billing_address_1;
            $order['City'] = $arr->billing_city;
            $order['Country'] = $this->countries[$arr->billing_country];
            $order['Phone1'] = $arr->billing_phone;
            $order['DeliveryAddress1'] = $arr->shipping_address_1;
            $order['DeliveryCity'] = $arr->shipping_city;
            $order['DeliveryCountry'] = $this->countries[$arr->shipping_country];
            $order['DeliveryZipCode'] =  $arr->shipping_postcode;
            $order['CustomerName'] = $arr->billing_first_name . " " . $arr->billing_last_name;
            $order['DeliveryName'] = $arr->billing_first_name . " " . $arr->billing_last_name;
            $order['VATIncluded'] = 'true';
    
            $email = array();
            $email['EmailAddressTo'] = $arr->billing_email;
            $order['EmailInformation'] =  $email;

    Ser inte order_company eller delivery_comany n?gonstans.

    Plugin Author Wetail

    (@pierrewiberg)

    Sorry, jag missf?rstod din fr?ga :-/
    Har du m?jlighet att g? in p? https://wp-plugs.com/support/ och skapa ett support?rende?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Best?llning som f?retag’ is closed to new replies.