- Posts: 69
- Thank you received: 1
How can I export custom field titles vs. values?
- dkmetz@taylorbruce.com
-
Topic Author
- Offline
Less
More
11 years 9 months ago #182819
by dkmetz@taylorbruce.com
______________
Dennis Kmetz
-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.6
Hi,
I have a radio button custom field with values and titles.
My custom field values are a, b, c... x, y, z, aa, ab, ac etc.
My custom field titles are "cotton", "cotton terrycloth", "
I use these fields as filters, and match them to inventory items.
When I export an inventory item, I get values like a,b,c etc. for my custom field values, but I would like to see the custom field titles and not the values.
How can I export the custom field titles instead of the value?
Thanks,
Dennis
-- Joomla version -- : 3.3.6
Hi,
I have a radio button custom field with values and titles.
My custom field values are a, b, c... x, y, z, aa, ab, ac etc.
My custom field titles are "cotton", "cotton terrycloth", "
I use these fields as filters, and match them to inventory items.
When I export an inventory item, I get values like a,b,c etc. for my custom field values, but I would like to see the custom field titles and not the values.
How can I export the custom field titles instead of the value?
Thanks,
Dennis
______________
Dennis Kmetz
Please Log in or Create an account to join the conversation.
11 years 9 months ago #183024
by Xavier
Replied by Xavier on topic How can I export custom field titles vs. values?
Hi,
Why not change the values directly in the custom fields in order to have more explicit values ?
For the product which already have the value, we don't have exports like that, it will require some modifications in the code.
Why not change the values directly in the custom fields in order to have more explicit values ?
For the product which already have the value, we don't have exports like that, it will require some modifications in the code.
Please Log in or Create an account to join the conversation.
- dkmetz@taylorbruce.com
-
Topic Author
- Offline
Less
More
- Posts: 69
- Thank you received: 1
11 years 9 months ago #183038
by dkmetz@taylorbruce.com
______________
Dennis Kmetz
Replied by dkmetz@taylorbruce.com on topic How can I export custom field titles vs. values?
Hi Xavier,
The issue is that I have existing products... as you indicated. Can you give me a little help on how I would alter the export.php view?
Thanks,
Dennis
The issue is that I have existing products... as you indicated. Can you give me a little help on how I would alter the export.php view?
Thanks,
Dennis
______________
Dennis Kmetz
Please Log in or Create an account to join the conversation.
11 years 9 months ago #183068
by Xavier
Replied by Xavier on topic How can I export custom field titles vs. values?
Hi,
If you use the mass actions to export the product data, so you can edit the file "plugins/hikashop/massaction_product/massaction_product.php" and at the top of the function "onProcessProductMassActionexportCsv()" add code like:
This way, in the csv file you will have the title and not the value exported.
If you use the mass actions to export the product data, so you can edit the file "plugins/hikashop/massaction_product/massaction_product.php" and at the top of the function "onProcessProductMassActionexportCsv()" add code like:
Code:
// In this example the custom field is "textil" and its id is "20", so just replace it by your values.
$fieldClass = hikashop_get('class.field');
$textil = $fieldClass->getField('20');
foreach($elements as $k => $element){
$elements[$k]->textil= $textil->field_value[$element->textil]->value;
}
This way, in the csv file you will have the title and not the value exported.
Please Log in or Create an account to join the conversation.
Time to create page: 0.176 seconds