Author Topic: CSVI Pro and VM3 Product Cart Variant Custom Field / Attribute Plugin  (Read 2197 times)

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10401
  • VirtueMart Version: 3+

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
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

lindapowers

  • Full Member
  • ***
  • Posts: 1335
  • If you're going through hell, keep going.
    • Los Angeles immigration lawyers
  • Skype Name: manu.gonzalez91
  • VirtueMart Version: Latest avi

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

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10401
  • VirtueMart Version: 3+

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.
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

RolandD

  • Full Member
  • ***
  • Posts: 780
    • Home of CSVI
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:
Code: [Select]
/**
* 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

  • Full Member
  • ***
  • Posts: 1335
  • If you're going through hell, keep going.
    • Los Angeles immigration lawyers
  • Skype Name: manu.gonzalez91
  • VirtueMart Version: Latest avi
Thanks for super fast reply Roland