Quantcast
Viewing all articles
Browse latest Browse all 3201

Custom XML Product taxonomies

I am trying to create a custom xml export using the plugin found at https://algolplus.com/plugins/code-samples/#sample_addons.

The code I am currently using is:

// items
		$products = $xml->addChild("products");
		foreach ( $order->get_items('line_item') as $item_id=>$item ) {
			$product   = $order->get_product_from_item( $item );
			$item_meta = $order->get_item_meta( $item_id );
			$attributes = $product;

			$itemXML = $products->addChild("product");
			$itemXML->addChild("artnr",$item['__pa_art-nr'] );
			$itemXML->addChild("ean",$attributes);
			$itemXML->addChild("quantity",$item['qty']);
		}

The artnr and ean attributes can not be found. These are custom product attributes. How can I display these in my XML Feed?


Viewing all articles
Browse latest Browse all 3201

Trending Articles