- Posts: 20
- Thank you received: 0
Export file choose fields
-- HikaShop version -- : [1403280123]
-- Joomla version -- : 2.5.19
-- PHP version -- :5.3.22
-- Browser(s) name and version -- : Firefox 28.0
-- Error-message(debug-mod must be tuned on) -- : Error_message
Hello to the reader(s),
Looked at the forum and the FAQ and the specifications of the different Hikashop versions but I can't find an answer to my question.
I have used virtuemart before and want tot try hikashop.
So I installed the starter version and created and filled the webshop.
Now I used the export function to create a csv file.
But there are only a very few article fields which I can export to a csv file.
Is this correct for the starter version? Or am I doing something wrong?
So if this is correct what are the possibilities for the paid versions?
I can't find the optons mentioned under compare versions.
Kind regards
Margareth
Please Log in or Create an account to join the conversation.
I'm not sure what you mean ? When you click on the "export" button of the products listing, it's going to give you a CSV of the products data with all the fields in it (tens of them, all of them), even in the Starter edition.
Please Log in or Create an account to join the conversation.
I'm sorry. I didn't look at the right place. :blush:
You are right in the csv I have all the fields of a product.
Can I put another question?
Is it posibble to choose which fields I want in the export when I use the starter edition?
Kind regards
Margareth
Please Log in or Create an account to join the conversation.
You can do it by overriding the view "backend | your_backend_template | product | export" or using a custom plugin for the trigger onBeforeProductExport.
www.hikashop.com/support/support/documen...nBeforeProductExport
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.
Thanks for the answer.
I am going to try to implement it in the shop.
! am new too Hikashop and I have to find my way in the support section.
Super that you woulld give me the anwer.
Thanks.
Kind regards
Margareth
Please Log in or Create an account to join the conversation.
Is it possible to put another question about the export of products?
If I use the Export button for the products I get a csv file and when I open it I can't see a relation between the parent category and the subcategory.
I have created two parent categories 1. Games nieuw en 2. Games gebruikt. In each parent category I have created subcategories as you can see (PS3games and Wii games). But after the export I can't see any relation anymore.
How is this possible.
Am I doing something wrong?
See below the image.
Before I want to try to choose which columns I want to export I need to have this problem fixed.
Kind regards
Margareth
Please Log in or Create an account to join the conversation.
The export only add the category name in the categories column. The system doesn't need to have the parent category mentioned there usually and it would even be a problem when the product is assigned to different categories from different parent categories.
That's why the parent_category column is blank.
Change the code:
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Interesting question.
I don't know if it is possible to choose which colums you want to use in the mass action.
The answer to this question can be told by Jerome or Nichloas I think.
I am curious what the answer will be.
Kind regards
Margareth
Please Log in or Create an account to join the conversation.
Indeed the images are not managed in the mass actions at this time, I add it in the TODO list.
Please Log in or Create an account to join the conversation.
on the export.php I am checking if if the column
if(!empty($product->$column) && is_array($product->$column))
$product->$column = implode($separator,$product->$column);
if( $column != 'product_last_seen_date'){
$data[] = @$product->$column;
}
}
This works to some degree, the values were removed but the column heading still there.
How could I remove a column from the export?
Thanks.
Please Log in or Create an account to join the conversation.
To remove a column from the export, you have to edit the content of the $columns PHP array.
stackoverflow.com/questions/2448964/php-...lement-from-an-array
Please Log in or Create an account to join the conversation.
Ps.: thanks a lot for the link.
Please Log in or Create an account to join the conversation.
Add this to line 52
// Create an Array of columns to be removed
$dontExport = array(
'product_tax_id',
'product_last_seen_date',
'product_waitlist',
'product_sales',
'product_total_vote',
'product_average_score',
'product_created'
);
//Return $columns that don't exist on the 'Dont Export' array
$columns = array_diff($columns, $dontExport);
This will remove the columns header then in line 95 add the following
$products_columns = array_diff($products_columns, $dontExport);
If anyone have a better way, please share.
Cheers
Please Log in or Create an account to join the conversation.