How To: Create A Custom Export Feature

Hi,



I created a custom export feature that allows me to export orders in such a way that i can import it on a inventory system. This inventory system needs a specific format that’s why i have to create this one and not use the default order export feature of cscart. In this export feature, i have included options like date filter and order status option. However, it doesn’t seem to recognize the option i created. I already checked the other default exim files like products and orders just to make it a reference. I can’t seem to understand thou some of it.



So the question now is that is there an existing tutorial that i can follow for creating an export feature like this one? I already checked the developers guide and it only shows how to create the xml file and functions but it didn’t mention anything about the parameter especially the “options” array, how to use and so on. Im also confused with the “process put” and “process get” and the parameters with pound sign(#) and “at symbol(@)” that is being used in process_get.



Thanks,

Mark

[quote name='mark_cscart_newbie' timestamp='1411280452' post='192592']

Hi,



I created a custom export feature that allows me to export orders in such a way that i can import it on a inventory system. This inventory system needs a specific format that's why i have to create this one and not use the default order export feature of cscart. In this export feature, i have included options like date filter and order status option. However, it doesn't seem to recognize the option i created. I already checked the other default exim files like products and orders just to make it a reference. I can't seem to understand thou some of it.



So the question now is that is there an existing tutorial that i can follow for creating an export feature like this one? I already checked the developers guide and it only shows how to create the xml file and functions but it didn't mention anything about the parameter especially the “options” array, how to use and so on. Im also confused with the “process put” and “process get” and the parameters with pound sign(#) and “at symbol(@)” that is being used in process_get.



Thanks,

Mark

[/quote]



Unfortunately there is no specific guide for the Export/ Import features.



process_get - this function is used when you export data from CS-Cart

process_put - this function is used when you import data to CS-Cart


- this symbol is used to pass required parameters to the functions (e.g. #key means key id (order id or product id, e.t.c.), #this means current parameters value (product price or order total, e.t.c.))

@ - this symbol is used to pass value of the export/ import option (e.g. language code, or category delimiter). These options are defined in the schema

Hi,



Thank you ecomlabs for taking the time to answer my question and i apologize for replying so late. I was busy fixing the export feature. i changed the ‘#’ to ‘@’ and my date input is now readable :) about the tutorial, well that’s sad news. i feel hopeless to be honest. the developers could have just inserted a comment about the parameters. anyway i have a question again. the references array, can i put there a condition something like a ‘BETWEEN’ because all i can see is join type index. for example:


<br />
'references' => array(<br />
	    'product_descriptions' => array(<br />
		    'reference_fields' => array('product_id' => '#key', 'lang_code' => '#lang_code'),<br />
		    'join_type' => 'LEFT',<br />
		    [color=#000080]'condition' => ('WHERE date BETWEEN '@date1' AND '@date 2'')[/color]<br />
	    ),<br />

```<br />
<br />
Thanks,<br />
Mark

[quote name=‘mark_cscart_newbie’ timestamp=‘1411558817’ post=‘192797’]

Hi,



Thank you ecomlabs for taking the time to answer my question and i apologize for replying so late. I was busy fixing the export feature. i changed the ‘#’ to ‘@’ and my date input is now readable :) about the tutorial, well that’s sad news. i feel hopeless to be honest. the developers could have just inserted a comment about the parameters. anyway i have a question again. the references array, can i put there a condition something like a ‘BETWEEN’ because all i can see is join type index. for example:


<br />
'references' => array(<br />
		'product_descriptions' => array(<br />
			'reference_fields' => array('product_id' => '#key', 'lang_code' => '#lang_code'),<br />
			'join_type' => 'LEFT',<br />
			[color=#000080]'condition' => ('WHERE date BETWEEN '@date1' AND '@date 2'')[/color]<br />
		),<br />

```<br />
<br />
Thanks,<br />
Mark<br />
[/quote]<br />
<br />
No, Mark. I am afraid, this functionality is not supported by the current version of the export/ import module