REPLACE INTO catalog_product_entity_datetime (
value_id,
entity_type_id,
attribute_id,
store_id,
entity_id,
value
) VALUES 
(NULL, 4, 93, 0, <@KEY@>, NULL),
(NULL, 4, 94, 0, <@KEY@>, NULL),
(NULL, 4, 77, 0, <@KEY@>, NULL),
(NULL, 4, 78, 0, <@KEY@>, NULL),
(NULL, 4, 104, 0, <@KEY@>, NULL),
(NULL, 4, 105, 0, <@KEY@>, NULL);
@@GO@@
REPLACE INTO catalog_product_entity_decimal (
value_id,
entity_type_id,
attribute_id,
store_id,
entity_id,
value
) VALUES 
(NULL, 4, 80, 0, <@KEY@>, '<@FNETTOWEIGHT@>'),
(NULL, 4, 75, 0, <@KEY@>, <@FSELLINGPRICE1@>),
(NULL, 4, 76, 0, <@KEY@>, NULL),
(NULL, 4, 120, 0, <@KEY@>, NULL);
@@GO@@
REPLACE INTO catalog_product_entity_int (
value_id,
entity_type_id,
attribute_id,
store_id,
entity_id,
value
) VALUES 
(NULL, 4, 96, 0, <@KEY@>, <@STOCKSTATUS@>),
(NULL, 4, 102, 0, <@KEY@>, 4),
(NULL, 4, 121, 0, <@KEY@>, 1),
(NULL, 4, 122, 0, <@KEY@>, <@PROCESS@>@select imp_extid from IMP_LINK where WTaxid = <@WOUTPUTTAXID@> and imp_sourceid =<@SOURCEID@> ##),
(NULL, 4, 100, 0, <@KEY@>, 0);
@@GO@@
REPLACE INTO catalog_product_entity_text (
value_id,
entity_type_id,
attribute_id,
store_id,
entity_id,
value
) VALUES 
(NULL, 4, 72, 0, <@KEY@>, '<@PRODUCT_NAME@>'),
(NULL, 4, 73, 0, <@KEY@>, '<@PRODUCT_NAME@>'),
(NULL, 4, 83, 0, <@KEY@>, NULL),
(NULL, 4, 106, 0, <@KEY@>, NULL);
@@GO@@
REPLACE INTO catalog_product_entity_varchar (
value_id,
entity_type_id,
attribute_id,
store_id,
entity_id,
value
) VALUES 
(NULL, 4, 71, 0, <@KEY@>, '<@PRODUCT_NAME@>'),
(NULL, 4, 97, 0, <@KEY@>, REPLACE(CONCAT('<@PRODUCT_NAME@>'),' ','-')),
(NULL, 4, 117, 0, <@KEY@>, NULL),
(NULL, 4, 118, 0, <@KEY@>, <@PROCESS@>@select substring(IMP_EXTID from 6 for 12) from IMP_LINK where WGROUPID = <@WREPORTINGGROUP1ID@> and imp_sourceid =<@SOURCEID@> ##),
(NULL, 4, 119, 0, <@KEY@>, '4'),
(NULL, 4, 82, 0, <@KEY@>, NULL),
(NULL, 4, 84, 0, <@KEY@>, NULL),
(NULL, 4, 85, 0, <@KEY@>, '<@PROCESS@>@Select substring(m.SDESCRIPTION from 1 for 1) || '/' || substring(m.SDESCRIPTION from 2 for 1) || '/' || m.SDESCRIPTION dest, m.sgroup from MULTIMEDIA m join stock s on m.wrefid = s.KEY where m.WREFID = <@KEY@> and m.STYPE = 'STOCK' and (m.SPATH like 'link:%' or m.SPATH like 'file:%') and (m.SGROUP = 'small_image') ##'),
(NULL, 4, 86, 0, <@KEY@>, '<@PROCESS@>@Select substring(m.SDESCRIPTION from 1 for 1) || '/' || substring(m.SDESCRIPTION from 2 for 1) || '/' || m.SDESCRIPTION dest, m.sgroup from MULTIMEDIA m join stock s on m.wrefid = s.KEY where m.WREFID = <@KEY@> and m.STYPE = 'STOCK' and (m.SPATH like 'link:%' or m.SPATH like 'file:%') and (m.SGROUP = 'small_image') ##'),
(NULL, 4, 87, 0, <@KEY@>, '<@PROCESS@>@Select substring(m.SDESCRIPTION from 1 for 1) || '/' || substring(m.SDESCRIPTION from 2 for 1) || '/' || m.SDESCRIPTION dest, m.sgroup from MULTIMEDIA m join stock s on m.wrefid = s.KEY where m.WREFID = <@KEY@> and m.STYPE = 'STOCK' and (m.SPATH like 'link:%' or m.SPATH like 'file:%') and (m.SGROUP = 'small_image') ##'),
(NULL, 4, 103, 0, <@KEY@>, 'default/default'),
(NULL, 4, 107, 0, <@KEY@>, NULL),
(NULL, 4, 109, 0, <@KEY@>, 'container2'),
(NULL, 4, 123, 0, <@KEY@>, NULL),
(NULL, 4, 98, 0, <@KEY@>, REPLACE(CONCAT('<@PRODUCT_NAME@>','.html'),' ','-')),
(NULL, 4, 98, 1, <@KEY@>, REPLACE(CONCAT('<@PRODUCT_NAME@>','.html'),' ','-')), 
(NULL, 4, 112, 0, <@KEY@>, '<@PRODUCT_NAME@>'),
(NULL, 4, 113, 0, <@KEY@>, '<@PRODUCT_NAME@>'),
(NULL, 4, 114, 0, <@KEY@>, '<@PRODUCT_NAME@>');
@@GO@@
REPLACE INTO catalog_product_flat_1 (
entity_id,
attribute_set_id,
type_id,
cost,
created_at,
enable_googlecheckout,
gift_message_available,
has_options,
image_label,
is_recurring,
links_exist,
links_purchased_separately,
links_title,
msrp,
msrp_display_actual_price_type,
msrp_enabled,
name,
news_from_date,
news_to_date,
price,
price_type,
price_view,
recurring_profile,
required_options,
shipment_type,
short_description,
sku,
sku_type,
small_image,
small_image_label,
special_from_date,
special_price,
special_to_date,
tax_class_id,
thumbnail,
thumbnail_label,
updated_at,
url_key,
url_path,
visibility,
weight,
weight_type
) VALUES (
<@KEY@>,
4,
'simple',
NULL,
now(),
1,
NULL,
0,
'<@PRODUCT_NAME@>',
0,
NULL,
NULL,
NULL,
NULL,
'4',
2,
'<@PRODUCT_NAME@>',
NULL,
NULL,
<@FSELLINGPRICE1@>,
NULL,
NULL,
NULL,
0,
NULL,
'<@PRODUCT_NAME@>',
'<@SSTOCKCODE@>',
<@PROCESS@>@select substring(IMP_EXTID from 6 for 12) from IMP_LINK where WGROUPID = <@WREPORTINGGROUP1ID@> and imp_sourceid =<@SOURCEID@> ##,
'<@PROCESS@>@Select substring(SPATH from 6 for 200) Path , sorgfilename dest FROM MULTIMEDIA where Stype = 'STOCK' and  (SPATH like 'link:%' or SPATH like 'file:%') and WREFID = <@KEY@> ##',
'<@PRODUCT_NAME@>',
NULL,
NULL,
NULL,
<@PROCESS@>@select imp_extid from IMP_LINK where WTaxid = <@WOUTPUTTAXID@> and imp_sourceid =<@SOURCEID@> ##,
'<@PROCESS@>@Select substring(SPATH from 6 for 200) Path , sorgfilename dest FROM MULTIMEDIA where Stype = 'STOCK' and  (SPATH like 'link:%' or SPATH like 'file:%') and WREFID = <@KEY@> ##',
'<@PRODUCT_NAME@>',
now(),
REPLACE('<@PRODUCT_NAME@>',' ','-'),
REPLACE(CONCAT('<@PRODUCT_NAME@>','.html'),' ','-'),
4,
<@FNETTOWEIGHT@>,
NULL
);
@@GO@@
REPLACE INTO cataloginventory_stock_item (
item_id,
product_id,
stock_id,
qty,
min_qty,
use_config_min_qty,
is_qty_decimal,
backorders,
use_config_backorders,
min_sale_qty,
use_config_min_sale_qty,
max_sale_qty,
use_config_max_sale_qty,
is_in_stock,
low_stock_date,
notify_stock_qty,
use_config_notify_stock_qty,
manage_stock,
use_config_manage_stock,
stock_status_changed_auto,
use_config_qty_increments,
qty_increments,
use_config_enable_qty_inc,
enable_qty_increments
) VALUES (
NULL, 
<@KEY@>,
1,
<@FQTYONHAND@>,
'0',
1,
0,
0,
1,
'1',
1,
'0',
1,
1,
now(),
NULL,
1,
0,
1,
1,
1,
'0',
1,
0
);
@@GO@@
REPLACE INTO cataloginventory_stock_status (
product_id,
website_id,
stock_id,
qty,
stock_status
) VALUES (
<@KEY@>,
1,
1,
<@FQTYONHAND@>,
1);
@@GO@@
REPLACE INTO catalogsearch_fulltext (
fulltext_id,
product_id,
store_id,
data_index
) VALUES (
NULL,
<@KEY@>,
1,
CONCAT('<@SSTOCKCODE@>',
    '|Enabled|',
    'Taxable Goods',
    '|',
    '<@PRODUCT_DESCRIPTION@>',
    '|',
    '<@PRODUCT_DESCRIPTION@>',
    '|',
    '<@PRODUCT_DESCRIPTION@>',
    '|',
    '<@FSELLINGPRICE1@>',
    '|0')
);
@@GO@@
REPLACE INTO catalog_category_product (
category_id, 
product_id, 
position
) VALUES (
<@PROCESS@>@select substring(IMP_EXTID from 6 for 12) from IMP_LINK where WGROUPID = <@WREPORTINGGROUP1ID@> and imp_sourceid =<@SOURCEID@> ##, 
<@KEY@>, 
1
);
@@GO@@
REPLACE INTO catalog_category_product_index (
category_id,
product_id,
position,
is_parent,
store_id,
visibility
) VALUES (
<@PROCESS@>@select substring(IMP_EXTID from 6 for 12) from IMP_LINK where WGROUPID = <@WREPORTINGGROUP1ID@> and imp_sourceid =<@SOURCEID@> ##,
<@KEY@>,
1,
1,
1,
4
);
@@GO@@
REPLACE INTO `catalog_product_index_price` (`entity_id`, `customer_group_id`, `website_id`, `tax_class_id`, `price`, `final_price`, `min_price`, `max_price`, `tier_price`) VALUES 
(<@KEY@>, 0, 1, 1, '<@FSELLINGPRICE1@>', '<@FSELLINGPRICE1@>', '<@FSELLINGPRICE1@>', '<@FSELLINGPRICE1@>', NULL),
(<@KEY@>, 1, 1, 1, '<@FSELLINGPRICE1@>', '<@FSELLINGPRICE1@>', '<@FSELLINGPRICE1@>', '<@FSELLINGPRICE1@>', NULL),
(<@KEY@>, 2, 1, 1, '<@FSELLINGPRICE1@>', '<@FSELLINGPRICE1@>', '<@FSELLINGPRICE1@>', '<@FSELLINGPRICE1@>', NULL),
(<@KEY@>, 3, 1, 1, '<@FSELLINGPRICE1@>', '<@FSELLINGPRICE1@>', '<@FSELLINGPRICE1@>', '<@FSELLINGPRICE1@>', NULL);
@@GO@@
REPLACE INTO catalog_product_website (
product_id,
website_id
) VALUES (
<@KEY@>,
1
);
@@GO@@
REPLACE INTO core_url_rewrite (
url_rewrite_id,
store_id,
id_path,
request_path,
target_path,
is_system,
options,
description,
category_id,
product_id
) VALUES (
NULL,
1,
CONCAT('product/',<@KEY@>),
REPLACE(CONCAT('<@PRODUCT_NAME@>','.html'),' ','-'),
CONCAT('catalog/product/view/id/',<@KEY@>),
1,
NULL,
NULL,
<@PROCESS@>@select substring(IMP_EXTID from 6 for 12) from IMP_LINK where WGROUPID = <@WREPORTINGGROUP1ID@> and imp_sourceid =<@SOURCEID@> ##,
<@KEY@>);
@@GO@@
REPLACE INTO `catalog_product_entity_media_gallery` (
value_id, 
attribute_id, 
entity_id, 
value
) VALUES (
'', 
88, 
<@KEY@>, 
'<@IMAGE@><@EXT@>'
);
@@GO@@
REPLACE INTO index_event (
event_id,
type,
entity,
entity_pk,
created_at,
old_data,
new_data
) VALUES (
NULL,
'save',
'cataloginventory_stock_item',
<@KEY@>,
now(),
NULL,
'a:6:{s:35:"cataloginventory_stock_match_result";b:1;s:34:"catalog_product_price_match_result";b:0;s:24:"catalog_url_match_result";b:0;s:33:"catalog_product_flat_match_result";b:0;s:37:"catalog_category_product_match_result";b:0;s:35:"catalogsearch_fulltext_match_result";b:0;}'),
(
NULL,
'save',
'catalog_product',
<@KEY@>,
now(),
NULL,
'a:6:{s:35:"cataloginventory_stock_match_result";b:1;s:34:"catalog_product_price_match_result";b:1;s:24:"catalog_url_match_result";b:1;s:33:"catalog_product_flat_match_result";b:1;s:37:"catalog_category_product_match_result";b:1;s:35:"catalogsearch_fulltext_match_result";b:1;}'),
( NULL,
'catalog_reindex_price',
'catalog_product',
<@KEY@>,
now(),
NULL,
'a:6:{s:35:"cataloginventory_stock_match_result";b:0;s:34:"catalog_product_price_match_result";b:1;s:24:"catalog_url_match_result";b:0;s:33:"catalog_product_flat_match_result";b:0;s:37:"catalog_category_product_match_result";b:0;s:35:"catalogsearch_fulltext_match_result";b:0;}'
);
@@GO@@