News:

Support the VirtueMart project and become a member

Main Menu

CSVI Pro and VM3 Product Cart Variant Custom Field / Attribute Plugin

Started by PRO, May 03, 2016, 22:03:16 PM

Previous topic - Next topic

PRO

Quote from: lindapowers on May 03, 2016, 19:00:45 PM

The only downside is that the custom field values can't be exported with CSVIpro thats why we can't use it, the plugin works great once you understand it and is a pitty cause it does exactly what we required but I doubt CSVIpro will add support for non commercial or core plugin.


I use csvpro   for a version of this same plugin.

I use csvpro for another product plugin I created as well



To use csv I use these fields
product_sku,product_name,custom,custom_param,custom_price,custom_title,custom_value


1 thing I will tell you though about csvi, I had problems before with it creating "new customs"
SO: when I update the customs via csvi, I make sure the "Skip New Items" is unchecked

lindapowers

Quote from: PRO on May 03, 2016, 22:03:16 PM
Quote from: lindapowers on May 03, 2016, 19:00:45 PM

The only downside is that the custom field values can't be exported with CSVIpro thats why we can't use it, the plugin works great once you understand it and is a pitty cause it does exactly what we required but I doubt CSVIpro will add support for non commercial or core plugin.


I use csvpro   for a version of this same plugin.

I use csvpro for another product plugin I created as well



To use csv I use these fields
product_sku,product_name,custom,custom_param,custom_price,custom_title,custom_value


1 thing I will tell you though about csvi, I had problems before with it creating "new customs"
SO: when I update the customs via csvi, I make sure the "Skip New Items" is unchecked

Thanks, sounds like a product export in CSVIpro but not possible in an order export, not detected as a product attribute but ill ask them.

PRO

Quote from: lindapowers on May 04, 2016, 13:38:02 PM

Thanks, sounds like a product export in CSVIpro but not possible in an order export, not detected as a product attribute but ill ask them.

Ok, I just checked the order export.
You are right, it does not.


The product_attribute is in the database table. But the format is not standard format, because its a plugin

for example it is stored like this
{"986":{"drop":{"custom_drop":"Blue"}}}

with "BLUE"   being the chosen option.

RolandD

Hello,

I was pointed to this forum thread, so decided to respond here as well. In CSVI 6, all extension data is exported by means of plugins, so plugins can export the data the way they see fit. You can create a plugin with the trigger exportCustomValues() that has this signature:

/**
* Export the values.
*
* @param   string         $plugin                     The ID of the plugin.
* @param   string         $custom_param               The custom parameter values.
* @param   int            $virtuemart_product_id      The product ID.
* @param   int            $virtuemart_custom_id       The custom ID.
* @param   int            $virtuemart_customfield_id  The custom field ID.
* @param   CsviHelperLog  $log                        The CSVI logger.
*
* @return  array  List of values to export.
*
* @since   6.0
*
* @throws  RuntimeException
*/
public function exportCustomValues($plugin, $custom_param, $virtuemart_product_id, $virtuemart_custom_id, $virtuemart_customfield_id, $log)


Perhaps it's an idea to add the class to the plugin so you have all in 1 file and you have control over how the data is exported. Any existing extension plugin can be used as an example.
Regards,

RolandD

CSVI
http://www.csvimproved.com/

lindapowers