0

I have three field comment, this can save after order. It work and show on order history comment like this

enter image description here

But when i export xml it not show, i think problem at here, 2 links are the same. 2 comment not show, invoice comment showing.

<xsl:value-of select="../../entity/comment"/><xsl:text>;</xsl:text>
<xsl:value-of select="../../entity/comment"/><xsl:text>;</xsl:text>
<xsl:value-of select="../../invoice_comments/invoice_comment/comment"/><xsl:text>;</xsl:text>
0

This is an indirect answer -- not about the XSL export process. That info is in the sales_flat_invoice_comment column comment. Below is a MySql query which exposed the order comments for me (which I renamed that column to order_note):

SELECT sfo.entity_id, increment_id, customer_id, grand_total, sfo.shipping_amount, tax_amount, discount_amount, subtotal 
, customer_email AS 'email', customer_firstname AS 'firstname', customer_lastname AS 'lastname' 
, sfop.method, cc_type, cc_last4, sfop.additional_information as 'pmt_details', sfic.comment AS 'order_note' 
, total_item_count AS 'order_lines_count', total_qty_ordered, sfo.created_at, sfo.updated_at 
, remote_ip, shipping_description, customer_group_id, billing_address_id, shipping_address_id 
, tm_field1 AS 'year', tm_field2 AS 'make', tm_field3 AS 'model', coupon_code 
, tax_percent, customer_is_guest, customer_note 
FROM sales_flat_order AS `sfo` 
LEFT JOIN sales_flat_order_payment AS `sfop` ON sfop.parent_id = sfo.entity_id 
LEFT JOIN sales_flat_invoice_comment AS `sfic` ON sfic.parent_id = sfo.entity_id 
WHERE sfo.status = 'complete' 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.