Skip to main content

sequence columns of csv

More
11 years 7 months ago #191375 by wilfried
-- url of the page with the problem -- : www.light-swing.com
-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.3.6
-- Browser(s) name and version -- : latest IE, FF and Chrome

Hello,

I have an hourly export from the order data of my orders. I transfer that csv to the packing company and they do the shipping for the client.

Yestarday we had a client who had a different shipping address then the billing address and then the sequence or order of the columns of the csv is also changed.
Where normally the line starts with shipping_address data and after that the shipping_address data it now starts with the billing_address data.
Unfortunatly the packing company doesn't read the order fiields with the firts line with the fieldnames but they read the sequence and so when the shipping address is different then the billing address it is read the wrong way.

Ant way I can change the order ?

Kind regards, Wilfried

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #191392 by nicolas
Replied by nicolas on topic sequence columns of csv
Hi,

How did you configure your CSV export ?
Normally, the order of the columns in a CSV is irrelevant. For example, with the CSV import of HikaShop, you can order the columns any way you want and it will work the same. Is that what you're talking about ?

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #191670 by wilfried
Replied by wilfried on topic sequence columns of csv
I agree that the order shouldn't be relevant but my client uses a packing company who reads the fileds in de csv in the order they are presented and they don't use the first line :-(

kind regards Wilfried

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #191676 by nicolas
Replied by nicolas on topic sequence columns of csv
Hi,

So how did you configure your CSV export ?
Could you do a screenshot of the settings ?

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #191715 by wilfried
Replied by wilfried on topic sequence columns of csv
I have sent you credentials for the test environment.

kind regards Wilfried

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #191767 by Xavier
Replied by Xavier on topic sequence columns of csv
Hi,

I have edited the file "administrator/components/com_hikashop/classes/massaction.php" function "organizeExportColumn()" in order to force the order of the addresses. Now the addresses columns are always starting by the billing one in the csv file.

You can reverse the order if you want, I added a comment in the code for that.

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #191861 by wilfried
Replied by wilfried on topic sequence columns of csv
Thanks Xavier.

I did some testing and billing address comes first all the time.
I changed the order of these two lines to get the shipping address first, or is that not what you mean?

// Reverse the order of these elements to have the shipping address first
if(!isset($action)) $action = array();
if(!isset($action)) $action = array();

Do I have to change something else to change the order?

Hope to hear from you.

Kind regards, Wilfried

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #191908 by Xavier
Replied by Xavier on topic sequence columns of csv
Hi,

I made the change directly on your website, to put the shipping_address first.
That should do the job, if not please tell me and I will do deeper checks.

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago - 11 years 7 months ago #191938 by wilfried
Replied by wilfried on topic sequence columns of csv
Hello Xavier,

Thanks for that. I'll test this later on.

Is it possible to tell me which part you have edited so that I can copy that part to the script on the production server?
Are can I copy that whole function to be sure, or have you edited parts outside that function?

This is also handy when a new version of Hikashop arrives.

Thanks in advance.

Kind regards Wilfried
Last edit: 11 years 7 months ago by wilfried.

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago - 11 years 7 months ago #191981 by wilfried
Replied by wilfried on topic sequence columns of csv
Hello Xavier,

I am sorry, but I have tested it and billing is still the first one.
Can you have another look please?

You may also test it with the massaction "Export naar CSV (Every Hour)", it is all test.
It copies a file to /subdomains/test/media/com_hikashop/upload/confirmed_orders

Thx
Last edit: 11 years 7 months ago by wilfried.

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #192096 by Xavier
Replied by Xavier on topic sequence columns of csv
Hi,

I will have a look at your issue tomorrow morning.
Sorry for the delay.

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #192097 by wilfried
Replied by wilfried on topic sequence columns of csv
No Problem, Thx.

kind regards Wilfried

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #192180 by Xavier
Replied by Xavier on topic sequence columns of csv
Hi,

Problem solved, it was just a ridiculous mistake, I placed the code before the foreach instead of inside.
So it was trying to do a check on a not declared variable so was not taking in account the code.
The following user(s) said Thank You: wilfried

Please Log in or Create an account to join the conversation.

More
11 years 7 months ago #192276 by wilfried
Replied by wilfried on topic sequence columns of csv
Thank you very much.

Please Log in or Create an account to join the conversation.

Time to create page: 0.269 seconds
Powered by Kunena Forum