Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

How To: Create A Custom Export Feature. Rate Topic   - - - - -

 

Posted 21 September 2014 - 06:20 AM #1

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

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 22894 posts

Posted 22 September 2014 - 08:27 AM #2

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


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

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 1210     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 4025     CS-Cart + YOUPI      USD 1459      Multi-Vendor Ultimate       USD 7500 (6000)


 

Posted 24 September 2014 - 11:40 AM #3

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:

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

Thanks,
Mark

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 22894 posts

Posted 24 September 2014 - 12:51 PM #4

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:

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

Thanks,
Mark


No, Mark. I am afraid, this functionality is not supported by the current version of the export/ import module

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 1210     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 4025     CS-Cart + YOUPI      USD 1459      Multi-Vendor Ultimate       USD 7500 (6000)