• dune1982

    (@dune1982)


    Hello

    I use woocommerce and the XML order Export plugin, wich I adapted to the Output i Need. The following lines of code

    'REMARK' => array(
    					'@attributes' => array( 'type' => 'arbitrary_data' ),
    					$order->get_item_total( $item_data, false ),
    				),

    produce this part in XML Export

    <REMARK type=”arbitrary_data”>527.41</REMARK>

    But what I Need is
    <REMARK type=”arbitrary_data”>0;527.41</REMARK>

    so I tried to just add the 0; in front of the $order->get_item_total( $item_data, false ),

    like this

    'REMARK' => array(
    					'@attributes' => array( 'type' => 'arbitrary_data' ),
    					'0;'$order->get_item_total( $item_data, false ),
    				),

    But that Ends in an errormessage, any one got an Idea how i can add the 0;

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    Try this:
    '0;' . $order->get_item_total( $item_data, false ),

    If that still throws a warning, do this:
    '0;' . (string)$order->get_item_total( $item_data, false ),

    Thread Starter dune1982

    (@dune1982)

    thank you bcworkz,
    ‘0;’ . $order->get_item_total( $item_data, false ),
    this works great.
    super

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

The topic ‘xml order export, adding string in front of a variable’ is closed to new replies.