How to export custom fields

This tutorial is only for Professional version of component!

If you need to export custom fields open the component setting a choose the requested custom fields for export:

The custom fields will be available in the variables $product->custom_field_X where X=id of custom field.

(If more fields of one custom fields are in one product, then they are imploded with binnary character 0.)

Then open the setting of your server and put there PHP code which is responsible for output.

Example of such code is:

if (isset($component->custom_fields)) {
	foreach ($component->custom_fields as $custom_id=>$custom) {
		$custom_var = 'custom_field_'.$custom_id;
		if ($product->$custom_var) {
			list($value)=explode(chr(0),$product->$custom_var);
			echo "<PARAM>\n";
			echo "<PARAM_NAME>".$custom->custom_title."</PARAM_NAME>\n";
			echo "<VAL>".$value."</VAL>\n";
			echo "</PARAM>\n";
		}
	}
}

You can use this one or write another if you need another format.

Cart

 x 

Cart empty