Thanks a lot, but a couple of things are not clear:
1) Well, you talk about the commant line: php ./addons/obj_feed/cron_iface.php --pw=<password>
I assume i need to save your code as "/addons/obj_feed/cron_iface.php"
2) You said :
"where <password> is the password used for password reminders in Administration/Settings/Security Settings
"
I have a modded cs-cart with version 2.03 and I do not have the structure: "Administration/Settings/Security Settings"
It only comes with later versions.
How can i get passed this?
3) obj_feed/func.php does not exist. What should i create here?
I get the warning:
Quote
Warning: require_once(/home/divers/domains/fmwebstore.nl/public_html/addons/obj_feed/func.php): failed to open stream: No such file or directory in /home/divers/domains/dname.nl/public_html/addons/obj_feed/cron_iface.php on line 12
Fatal error: require_once(): Failed opening required '/home/divers/domains/fmwebstore.nl/public_html/addons/obj_feed/func.php' (include_path='/home/divers/domains/dname.nl/public_html/lib/pear/.:/usr/local/lib/php') in /home/divers/domains/fmwebstore.nl/public_html/addons/obj_feed/cron_iface.php on line 12
Don't u mean the path to this file? /addons/access_restrictions/func.php ??
Do you need this should be the complete cron_iface.php ?
Quote
define('AREA', 'A');
define('AREA_NAME', 'admin');
require_once("./prepare.php");
require_once("./init.php");
if( !function_exists('obj_check_create') ) {
require_once(DIR_ADDONS."obj_feed/func.php");
}
$cron_password = Registry::get('settings.Security.cron_password');
if( !$cron_password )
die('Bad pass');
if ((!isset($_REQUEST['pw']) || $cron_password != $_REQUEST['pw']) ) {
die(fn_get_lang_var('access_denied'));
}
//mycode
fn_init_yaml();
$import_options = array('lang_code' => 'EN', 'category_delimiter'=>'///', 'images_path'=>'images/backup', 'delimiter'=>'C');
$data = fn_get_csv('products', $your_file_path, $import_options);
if( $data !== false )
fn_import('products', $data, $import_options);
exit;
6) when i remove the password fields, and i continue the function "fn_get_csv" is not defined.
I guess i need to add this line:
require_once("./controllers/admin/exim.php");
but then i get an error on this line in exim.php:
Warning: Invalid argument supplied for foreach() in
" foreach ($pattern['#export_fields'] as $field => $data) {"
I am using 2.03. I did not upgrade since i have modded this version manually a lot, with the upgrades it will all be lost.