1. eliotrayner
  2. RO CSVI
  3. Monday, 30 November 2020
  4.  Subscribe via email
Hi Support

re: CSVi Order Export

When creating an Order export template, is it possible to add a single extra row for each order for a shipping cost line?

regards
Eliot
Accepted Answer
Accepted Answer Pending Moderation
Hi RolandD

Thats what i figured, i'd already done some overrides so will continue along that track. Thanks for your help

regards
Eliot
  1. more than a month ago
  2. RO CSVI
  3. # Permalink
Accepted Answer Pending Moderation
Hello Eliot,
You can use shipping_ template fields for an order to get the shipping details in the same row instead of having an extra row.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
Hi Tharuna

I'm already using shipping_ template fields to do that.

The system the export is going into requires a shipping 'sku' line for each order to allocate the shipping cost.

Is that possible?

thanks
Eliot
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello Eliot,
The system the export is going into requires a shipping 'sku' line for each order to allocate the shipping cost.

In such a case use fields without shipping_ or billing_ prefix as template fields for user address details and on Fields tab add virtuemart_order_userinfo_id as Group fields. That should get billing and shipping details as two rows in export. Let me know if that works.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
Hi Tharuna

That wont work if they dont have a shipping address, plus that would 'double' up every orderline?

regards
Eliot
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello Eliot,
That wont work if they dont have a shipping address,

Oh yes, it won't work if there is no shipping address. What is in database is what exported. RO CSVI cannot add an extra empty line if there is no shipping details.

plus that would 'double' up every orderline?

Try adding virtuemart_order_item_id field to Group by field and see if that solves the issue.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation
Hi Tharuna

Nope that wont help, I guess I'll have to create an override.

thanks
Eliot
  1. more than a month ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
Hello Eliot,

As I understand you want the order on row 1 and an empty line on row 2, then an order on row 3 and an empty line on row 4, etc. Is that correct?

If so, you are going to need an override to add that empty row as that is not something RO CSVI can do. One other way to do that is to "abuse" the XML export :) In the XML export you must define your layout. Nobody is saying this should be the XML format, it can also be a CSV format. Basically it is as described in the Advanced order XML export document, you can add a second row to your template that never gets filled as it is empty row. One advantage is that you determine where what field goes instead of all in a single row column.

The address fields are added as columns behind the other fields you export, so you could setup your template to use them on the second row. If there is no data in them, you would get an empty row.

Let me know if that helps.

As for duplicate rows, check what Tharuna mentioned, you need to group the fields on uniqueness. We have this covered in the Use of Group by and Sort by fields document.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 7
Accepted Answer Pending Moderation
Hi RolandD

As I understand you want the order on row 1 and an empty line on row 2, then an order on row 3 and an empty line on row 4, etc. Is that correct?


No thats not correct. Also no problem with duplicates I'm already using GROUPing.

What I'd like is to have the order on row1, row2, row3 etc for as many order line items there are in the order. Then add a single row for each order containing a 'shipping line item' (made up) then no empty lines ... just repeat for further orders. i.e.

order 1 line 1
order 1 line 2
order 1 line3
order 1 shipping line
order 2 line 1
order 2 line 2
order 2 shipping line

thanks for your suggestions

regards
Eliot
  1. more than a month ago
  2. RO CSVI
  3. # 8
Accepted Answer Pending Moderation
Hello Eliot,

I have misunderstood in that case. My suggestions are not going to work either then because there is no way of knowing when an order ends. Somewhere in the code you need to keep track of the order and when needed insert that shipping line.

The override is the only way in that case as you can track the order details being exported in that file.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 9
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!