No Category id and cat parent id when export csv

  • Posts: 101
  • Thank you received: 12
9 years 4 months ago #183943

-- HikaShop version -- : 2.3.4
-- Joomla version -- : 2.5.27
-- PHP version -- : 5.4

Hi,

As you can see in the printscreen I've selected category id and category parent id but they are not exported (see second printscreen).
As you can see I'm filtering out categories that have an id bigger or equal to 154.
I selected: product_name, product_code, category_id, category_parent_id.




Export generated:



As you can see, the product_id is also exported although I didn't select it.

What Could be the reason? Is there a fix?
Questions:
1) Why aren't the category id and category parent id exported? Edit: actually none of the category fields except for CATEGORIES are exported.

2) Why are the product id exported when NOT selected?

3) Why are products exported multiple times when they belong to more than one category? This generates doubles. Is there a way to only export one line per product. (see picture below for example of doubles)




Thanks in advance

Cheers

Last edit: 9 years 4 months ago by SG. Reason: added EDIT to question 1)

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

  • Posts: 13201
  • Thank you received: 2322
9 years 4 months ago #184092

Hi,

The export is indeed working like that, it allow to have the correct format to import back the products in HikaShop.
To import, you need the product_id and the category name, so that's why we export it this way.

I understand that you want to have the checked columns data in the csv file, so you can edit the file "administrator/components/com_hikashop/classes/massaction.php" and in the function "_exportCSV()" comment the line:

$this->organizeExportColumn($params->table,$keyTable,$params->elements,$params->action,$params->types);
This will let the category_id and category_parent_id columns, to remove the "product_id" you can edit the file "plugins/hikashop/massaction_product/massaction_product.php" and in the function "onProcessProductMassActionexportCsv()" remove the line:
$action['product']['product_id'] = 'product_id';

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

Time to create page: 0.067 seconds
Powered by Kunena Forum