Export Custom CSV

  • Posts: 5
  • Thank you received: 0
11 years 2 months ago #123178

Hi,

I'd like to export our Affiliate Sales csv with columns we don't need (for example, order_tax_info) removed, but also include the following columns
- Partner email
- Partner name
- The User Group that the Partner belongs to

Is that possible via code customization/plugins? Thanks.

-- HikaShop version -- : 2.2.1 (Business)
-- Joomla version -- : 2.5.14
-- PHP version -- : 5.2

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

  • Posts: 12953
  • Thank you received: 1778
11 years 2 months ago #123185

Hi,

I think that one solution will be to do it through your Phpmyadmin, by using an SQL request which will display your affiliate information with the good columns, and then export this result.

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

  • Posts: 5
  • Thank you received: 0
11 years 2 months ago #123234

This is for a client, so phpMyAdmin is out of the question. Is there a way to do this in the code? Thanks.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
11 years 2 months ago #123276

Hi,

Well at this moment I will recommend you to create a custom joomla plugin with a manual trigger action.
So in the backend, you will be able to call a special function of the plugin and create the CSV file.
You can use the HikaShop Spreadsheet helper to create the CSV file.

Otherwise, the view override is still possible.
By overriding a specific view, you can read a parameter in the url and generate the CSV if there.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 5
  • Thank you received: 0
11 years 2 months ago #123304

Which view should I override?

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
11 years 2 months ago #123328

Hi,

I don't know... What you want !
We are talking about integrating a new feature. So YOU have to know where you want to integrate the feature. It could be the HikaShop user listing in the backend when the right parameter is passed.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 5
  • Thank you received: 0
11 years 2 months ago #123329

I'm talking about the Affiliate Sales listing, where you can export CSV. I just want to customize the CSV output. Can you point me in the right direction?

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
11 years 2 months ago #123446

Hi,

Oh ! Okay I see.

Well it's a customization of the order export.
The "affiliate sales" export is just a "order export" with some filters in order to select which order has to be exported.

All the code which generate the CSV file is in the view " backend | your_backend_template | order | export ".
You can edit the view in order to change how the export is made. Removing or adding new columns.

The first part of the view create the first line with the column title and after, there is a loop (a "foreach") on every selected orders to export their content.

Hope it will help you.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 5
  • Thank you received: 0
11 years 2 months ago #123469

Got it. Thanks!

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

Time to create page: 0.088 seconds
Powered by Kunena Forum