1. Anonymous User(Jonathan Braom)
  2. Pre-sale questions
  3. Tuesday, 22 September 2020
  4.  Subscribe via email
I've encountered a site using RO CSVI - not seen it before and while I have access to that site thought would have a look. No immediate need for myself but one thought occurred to me about Joomla component / module / plugin parameters.

Joomla stores these parameters as JSON objects in database columns.

Is it possible to extract such parameter values into a CSV file?
Would it need a plugin written to support this?

The JSON parameter data which particularly caught my eye is shown below (related to Hikashop).
If using RO CSVI to export Hikashop order information - could this JSON data be linked to the order status information to provide a StatusGroup column in the CSV?
Or is it better to convert to using an orderstatusgroup table instead and link to that?


{"statusgroups":{"statusgroups0":{"groupname":"Abandoned","groupstatii":["2","1","6"],"groupenabled":1},"statusgroups1":{"groupname":"Complete","groupstatii":["16","9","3","4"],"groupenabled":1},"statusgroups2":{"groupname":"Current","groupstatii":["5","12","13","17","7","8"],"groupenabled":1},"statusgroups3":{"groupname":"New","groupstatii":["15","10","18","11","14"],"groupenabled":1} },"updateto":{"updateto0":{"updatetobtn":"Update Selected to Awaiting Picking","updatetostatus":"5","updatetoemail":0,"updatetoenabled":1}}}
Accepted Answer Pending Moderation
Hello,
If using RO CSVI to export Hikashop order information - could this JSON data be linked to the order status information to provide a StatusGroup column in the CSV?

As much as i know there is no core Status Group Column in HikaShop table so i am thinking you are using some 3rd party extension for HikaShop to have this field. Am i right?

There are two ways to get this field exported to CSV file using RO CSVI.
1. With RO CSVI we only support of HikaShop core tables, you can use RO CSVI Custom table export and link the StatusGroup table and export the needed fields.
2. You can create an override for HikaShop Order export and extend the export to support StatusGroup table.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. Pre-sale questions
  3. # 1
Accepted Answer Pending Moderation
This is not a DB table - it is typical extension parameters stored as JSON data in the params column of the Joomla extension table.

The custom table suggestion is the right direction but would require something like a plugin to convert the JSON data into a pseudo-table.


$pseudotable = aplugin::json2table('myextension', otheroptions...);


In the case of the status group table it would return an array, one row for each status group.

$row[0] = array('groupname', array(of statii in that group));

Maybe an array of objects better, but easier to write using arrays.

The other solution is to change the extension and move the status groups out of the extension config.xml file into a status group DB table - but then have to create a list and edit view in the extension - currently using standard Joomla form fields with subforms in the config.xml file does it all.
  1. more than a month ago
  2. Pre-sale questions
  3. # 2
Accepted Answer Pending Moderation
Hello,
This is not a DB table - it is typical extension parameters stored as JSON data in the params column of the Joomla extension table.

The custom table suggestion is the right direction but would require something like a plugin to convert the JSON data into a pseudo-table.

Yes, In this case custom table will be a good option. You can select a specific table to export using RO CSVI Custom table export. You can create your own RO CSVI rule to convert JSON data on export.

Maybe an array of objects better, but easier to write using arrays.

The data will be exported as it is stored in the database. You need to write custom code to change to arrays. We have a document to create a Custom rule in RO CSVI which would help in such cases.

The other solution is to change the extension and move the status groups out of the extension config.xml file into a status group DB table - but then have to create a list and edit view in the extension - currently using standard Joomla form fields with subforms in the config.xml file does it all.

In any of these scenarios there is no direct solution with RO CSVI. You either need to use RO CSVI Custom table export or create an override for extending HikaShop order export.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. Pre-sale questions
  3. # 3
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!
Jonathan Brain
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,jpeg,zip,rar,pdf,csv,txt,tsv,xml,docx,doc,xls,xlsx,ods,tgz
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
In this section you can provide your site details at here and it visible to the moderators only.