Custom Fields on export of Orders via CSV

  • Posts: 2
  • Thank you received: 0
  • Hikashop Essential
2 years 2 days ago #346733

-- HikaShop version -- : 4.6.2
-- Joomla version -- : 4.2.5

Hello,

I would like to get a custom Field of the Produkt named 'lieferant' on the Export CSV of the orders.
Will this be possible?

Thank You in Advance.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 1 day ago #346735

Hi,

It's possible by customizing the file order / export for your backend template via the menu Display>Views.
There, after the line:

$productFields = array_keys(get_object_vars(reset($order->products)));
add the line:
$productFields[] = 'lieferant';
and after the line:
$prod =& $row->products[$i-1];
add the code:
$class = hikashop_get('class.product');
$p = $class->get($prod->product_id);
$prod->lieferant = $p->lieferant;

The following user(s) said Thank You: FTC-services

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

  • Posts: 2
  • Thank you received: 0
  • Hikashop Essential
2 years 1 day ago #346777

Thank you very much.
Worked great.

Yours sincerely Jürgen Fritz

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

Time to create page: 0.053 seconds
Powered by Kunena Forum