Add here your feed generated from Alfie.
Here you can add the colindex and source url generated from Alfie. The final result is product display.
Use the short tag to display the product.. The
Short-tag will be generated when you imported the feed.
Error, all fields are required! Please make sure all fields are correctly filled in!
';
} else {
$data = array();
global $wpdb;
$data["naam"] = $naam;
$data["type"] = $type_feed;
$data["colindex"] = $colindex;
$data["source_url"] = $source_url;
if($wpdb->insert($wpdb->prefix.'alfie_colindex', $data)==true)
{
// doe single product import
if($type_feed=="single")
{
$feedData = updateSingleFeed($colindex,$source_url);
$col_id = mysql_insert_id();
foreach($feedData as $productdata)
{
$wpdb->query("INSERT INTO ".$wpdb->prefix."alfie_producten (col_id,productnaam,prijs,omschrijving,imageurl,producturl)
VALUES ( '".$col_id ."',
'".santinizeInput($productdata["productnaam"])."',
'".santinizeInput($productdata["prijs"])."',
'".santinizeInput($productdata["omschrijving"])."',
'".santinizeInput($productdata["imageurl"])."',
'".santinizeInput($productdata["producturl"])."')") or die (mysql_error());
$teller++;
}
echo " Done!. Products added: ". $teller .". Use the following code in your post to display:
[alfie_single_product id=\"".$col_id."\"]
";
}
if($type_feed=="match")
{
// doe match product import
$col_id = mysql_insert_id();
include 'importmatchfeed.php';
echo "Done!. Matching Products added: ". $teller .". Use the following code in your post to display:
[alfie_matchfeed id=\"".$col_id."\"]
";
}
if($type_feed =="searchfilter")
{
$col_id = mysql_insert_id();
include 'savesearchfilter.php';
echo "Done! (Records Fetched: ".$teller."). Use the following code in your post to display the box
[alfie_search_filter id=\"".$col_id."\"]
";
}
}
}
}
}
function alfie_plugin_menu()
{
add_menu_page('Alfie','Alfie - Main', 'manage_options', 'alfie-feed-plugin', 'alfie_option_page');
add_submenu_page('alfie-feed-plugin', 'Manage feeds', 'Manage Feeds', 'manage_options', 'alfie-manage', 'alfie_manage');
add_submenu_page('alfie-feed-plugin', 'Approve reviews', 'Approve reviews', 'manage_options', 'alfie-review', 'alfie_review');
add_action('admin_menu', 'alfie-manage');
add_action('admin_menu', 'alfie-review');
}
add_action('admin_menu', 'alfie_plugin_menu');