';
foreach ($this->opt['columns'] as $key => $value){
$html[] = '| 0 ? $this->print_css_as_style($value['css']) : '' ) . '">';
if( $value['td'] == 'checkbox' ){
$html[] = '';
}
elseif( $value['td'] == '%ID%' ){
$html[] = ( $post_id );
}
elseif( $value['td'] == '%parent_id%' ){
$html[] = ( $post->post_parent );
}
elseif( $value['td'] == '%title%' ){
$html[] = 'post_title) ) . '" />';
$html[] = '';
$html[] = ( $post->post_title . ( $post->post_status != 'publish' ? ' - ' . ucfirst($post->post_status) : '') );
$html[] = '';
}
elseif( $value['td'] == '%button%' ){
$value['option']['color'] = isset($value['option']['color']) ? $value['option']['color'] : 'gray';
$html[] = '';
}
elseif( $value['td'] == '%button_publish%' ){
$color = isset($value['option']['color']) ? $value['option']['color'] : 'gray';
$color_change = isset($value['option']['color_change']) ? $value['option']['color_change'] : 'gray';
$html[] = '';
}
elseif( $value['td'] == '%date%' ){
$html[] = '' . ( $post->post_date ) . '';
}
elseif( $value['td'] == '%thumb%' ){
$html[] = get_the_post_thumbnail( $post_id, array(50, 50) );
}
elseif( $value['td'] == '%date%' ){
$html[] = '' . ( $post->post_date ) . '';
}
elseif( $value['td'] == '%hits%' ){
$hits = (int) get_post_meta($post_id, '_amzaff_hits', true);
$html[] = '' . ( $hits ) . '';
}
elseif( $value['td'] == '%added_to_cart%' ){
$addtocart = (int) get_post_meta($post_id, '_amzaff_addtocart', true);
$html[] = '' . ( $addtocart ) . '';
}
elseif( $value['td'] == '%redirected_to_amazon%' ){
$redirect_to_amazon = (int) get_post_meta($post_id, '_amzaff_redirect_to_amazon', true);
$html[] = '' . ( $redirect_to_amazon ) . '';
}
elseif( $value['td'] == '%bad_url%' ){
$html[] = '' . ( $post['url'] ) . '';
}
elseif( $value['td'] == '%asin%' ){
$asin = $prod_asin;
$html[] = '' . ( $asin ) . '';
}
elseif( $value['td'] == '%last_sync_date%' ){
$last_sync_date = get_post_meta($post_id, '_last_sync_date', true);
$html[] = '' . ( $last_sync_date ) . '';
}
elseif( $value['td'] == '%price%' ){
$html[] = ' ';
$localID = $post_id;
$product_meta['product'] = array();
$product_meta['product']['price_update_date'] = get_post_meta($localID, "_price_update_date", true);
$product_meta['product']['sales_price'] = get_post_meta($localID, "_sale_price", true);
$product_meta['product']['regular_price'] = get_post_meta($localID, "_regular_price", true);
$product_meta['product']['price'] = get_post_meta($localID, "_price", true);
if ( empty($product_meta['product']['sales_price']) && empty($product_meta['product']['regular_price']) ) {
$product_meta['product']['variation_price'] = array('min' => get_post_meta($localID, "_min_variation_price", true), 'max' => get_post_meta($localID, "_max_variation_price", true));
}
if ( empty($product_meta['product']['sales_price']) && empty($product_meta['product']['regular_price']) ) {
$html[] = 'From price: ' . (isset($product_meta['product']['variation_price']['min']) && (float)$product_meta['product']['variation_price']['min'] > 0 ? '' . ( woocommerce_price( $product_meta['product']['variation_price']['min'] ) ) . '' : '–');
$html[] = ' ';
$html[] = 'To price: ' . (isset($product_meta['product']['variation_price']['max']) && (float)$product_meta['product']['variation_price']['max'] > 0 ? '' . ( woocommerce_price( $product_meta['product']['variation_price']['max'] ) ) . '' : '–');
} else {
$html[] = 'Regular price: ' . (isset($product_meta['product']['regular_price']) && (float)$product_meta['product']['regular_price'] > 0 ? '' . ( woocommerce_price( $product_meta['product']['regular_price'] ) ) . '' : '–');
$html[] = ' ';
$html[] = 'Sales price (offer): ' . (isset($product_meta['product']['sales_price']) && (float)$product_meta['product']['sales_price'] > 0 ? '' . ( woocommerce_price( $product_meta['product']['sales_price'] ) ) . '' : '–');
}
// – = unicode EN DASH
$html[] = ' ';
}
elseif( $value['td'] == '%last_date%' ){
$html[] = '' . ( $post['data'] ) . '';
}
elseif( $value['td'] == '%preview%' ){
$asin = $prod_asin;
$html[] = "";
$html[] = get_the_post_thumbnail( $post_id, array(150, 150) );
$html[] = " " . ( $post->post_title ) . " ";
$html[] = " ASIN: " . ( $asin ) . " ";
$html[] = " ";
$html[] = " ";
}
elseif( $value['td'] == '%spinn_content%' ){
// first check if you have the original content saved into DB
$post_content = get_post_meta( $post_id, 'WooZone_old_content', true );
// if not, retrive from DB
if( $post_content == false ){
$live_post = get_post( $post_id, ARRAY_A );
$post_content = $live_post['post_content'];
}
$post_content = htmlentities( wpautop( $post_content ) );
$finded_replacements = get_post_meta( $post_id, 'WooZone_finded_replacements', true );
if( $finded_replacements && count($finded_replacements) > 0 ){
foreach ($finded_replacements as $word) {
$post_content = str_replace($word, "" . ( $word ) . "", $post_content);
}
}
$reorder_content = get_post_meta( $post_id, 'WooZone_reorder_content', true );
$html[] = "";
$html[] = " ";
$html[] = "";
$html[] = "";
$html[] = "" . ( __('Fresh (spin) Content', $this->the_plugin->localizationName) ) . "";
$html[] = " | ";
$html[] = "";
$html[] = "" . ( __('Old (original) Content', $this->the_plugin->localizationName) ) . "";
$html[] = " | ";
$html[] = " ";
$html[] = "";
$html[] = "";
$asin = $prod_asin;
$html[] = "";
$html[] = get_the_post_thumbnail( $post_id, array(150, 150) );
$html[] = " " . ( $post->post_title ) . " ";
$html[] = " ASIN: " . ( $asin ) . " ";
$html[] = " ";
$html[] = " ";
$html[] = " | ";
$html[] = "";
$html[] = "";
$html[] = " ";
$html[] = htmlentities( wpautop( $reorder_content ), ENT_QUOTES, "UTF-8" );
$html[] = " ";
if( trim($reorder_content) != "" ){
$html[] = "";
}
$html[] = " ";
$html[] = " ×";
$html[] = "
";
$html[] = " ";
$html[] = " ";
$html[] = " ";
$html[] = " | ";
$html[] = "";
$html[] = " ";
$html[] = $post_content;
$html[] = " ";
$html[] = "";
$html[] = " | ";
$html[] = " ";
$html[] = " ";
$html[] = " ";
}
if( $this->opt["custom_table"] == "amz_products"){
if( $value['td'] == '%post_id%' ){
$html[] = '' . ( $post['post_id'] ) . '';
}
elseif( $value['td'] == '%del_asset%' ) {
$html[] = '';
}
elseif( $value['td'] == '%post_assets%' ){
$in_ids = array();
$in_ids[] = $post['post_id']; // add curent post into in array
$nb_assets = array('total' => 0, 'done' => 0);
$nb_assets['total'] = $post['nb_assets'];
$nb_assets['done'] = $post['nb_assets_done'];
// get variations
$variations = $this->the_plugin->db->get_results( "SELECT * FROM " . $this->the_plugin->db->prefix . ( $this->opt["custom_table"] ) . " WHERE 1=1 AND post_parent='" . ( $post['post_id'] ) . "' AND type='variation'", ARRAY_A);
if( $variations && count( $variations ) > 0 ){
foreach ($variations as $_the_post ) {
$in_ids[] = $_the_post['post_id'];
$nb_assets['total'] += (int) $_the_post['nb_assets'];
$nb_assets['done'] += (int) $_the_post['nb_assets_done'];
}
}
//$this->items_assets_nr['total'] += $nb_assets['total'];
//$this->items_assets_nr['done'] += $nb_assets['done'];
// get the assets
$assets = $this->the_plugin->db->get_results( "SELECT * FROM " . $this->the_plugin->db->prefix . "amz_assets WHERE 1=1 AND post_id IN (" . ( implode(",", $in_ids) ) . ")", ARRAY_A);
//var_dump('',$assets, $this->the_plugin->db,' '); die;
$html[] = '';
$html[] = '';
$html[] = '';
$html[] = '';
$html[] = ' ' . ( $post['title'] ) . '';
$html[] = ' ';
$html[] = '';
$html[] = '| ' . __('Number of variation:', $this->the_plugin->localizationName) . ' | ';
$html[] = '' . count( $variations ) . ' | ';
$html[] = ' ';
$html[] = '';
$html[] = '| ' . __('Assets:', $this->the_plugin->localizationName) . ' | ';
$html[] = '' . $nb_assets['total'] . ' (' . __('new', $this->the_plugin->localizationName) . ') | ' . $nb_assets['done'] . ' (' . __('done', $this->the_plugin->localizationName) . ') | ';
$html[] = ' ';
/*
$html[] = '';
$html[] = '| Product status: | ';
$html[] = '' . ( get_post_field( 'post_status', $post['post_id'] ) ) . ' | ';
$html[] = ' ';
*/
$html[] = '';
$html[] = '| ';
$html[] = '' . __('Download assets NOW!', $this->the_plugin->localizationName) . '';
$html[] = '' . __('Edit product', $this->the_plugin->localizationName) . '';
$html[] = '' . __('View product', $this->the_plugin->localizationName) . '';
$html[] = ' | ';
$html[] = ' ';
$html[] = ' ';
$html[] = ' ';
$html[] = ' | ';
$html[] = '';
// the post assets
$html[] = '';
$html[] = ' ';
// loop the assets
if( $assets && count($assets) > 0 ){
foreach ($assets as $asset) {
if( $post['post_id'] == $asset['post_id'] ){
$html[] = ' ';
$html[] = '  . ') ';
$html[] = ' ';
}
}
}
$html[] = ' ';
$html[] = ' ';
// the variatios assets
if( $variations && count( $variations ) > 0 ){
$html[] = 'Show (' . ( count( $variations ) ). ') variations';
$html[] = '';
$html[] = ' ';
$html[] = ' ' . __('Variations:', $this->the_plugin->localizationName) . '';
$html[] = ' ';
foreach ($variations as $variation) {
// loop the assets
if( $assets && count($assets) > 0 ){
foreach ($assets as $asset) {
if( $variation['post_id'] == $asset['post_id'] ){
$html[] = ' ';
$html[] = '  . ') ';
$html[] = ' ';
}
}
}
}
$html[] = ' ';
$html[] = ' ';
$html[] = ' ';
}
$html[] = ' | ';
$html[] = ' ';
$html[] = ' ';
}
}
else if( $this->opt["custom_table"] == "amz_queue"){
if( $value['td'] == '%nb_tries%' ){
$html[] = '' . $post['nb_tries'] . '';
$html[] = '';
}
elseif( $value['td'] == '%created_date%' ){
$created_date = $this->the_plugin->last_update_date('true', strtotime($post['created_date']));
$html[] = '' . ( $created_date ) . '';
}
elseif( $value['td'] == '%imported_date%' ){
if ( !empty($post['imported_date']) && '0000-00-00 00:00:00' == $post['imported_date'] ) {
$post['imported_date'] = '';
}
$imported_date = '';
if ( !empty($post['imported_date']) ) {
$imported_date = $this->the_plugin->last_update_date('true', strtotime($post['imported_date']));
$html[] = '' . ( $imported_date ) . '';
}
}
elseif( $value['td'] == '%imported_created_date%' ){
$created_date = $this->the_plugin->last_update_date('true', strtotime($post['created_date']));
$html[] = '' . ( $created_date ) . '';
if ( !empty($post['imported_date']) && '0000-00-00 00:00:00' == $post['imported_date'] ) {
$post['imported_date'] = '';
}
$imported_date = '';
if ( !empty($post['imported_date']) ) {
$imported_date = $this->the_plugin->last_update_date('true', strtotime($post['imported_date']));
$html[] = ' ' . ( $imported_date ) . '';
}
}
elseif( $value['td'] == '%from_op%' ) {
$html[] = $post['from_op'];
}
elseif( $value['td'] == '%status%' ) {
$provider = $post['provider'];
$provider_logo = $this->the_plugin->cfg['paths']['freamwork_dir_url'] . 'images/providers/' . $provider . '-logo.png';
$html[] = ' ';
$status_values = array(
'new' => __('New', $this->the_plugin->localizationName),
'done' => __('Done (success)', $this->the_plugin->localizationName),
'error' => __('Error', $this->the_plugin->localizationName),
'already' => __('Already imported', $this->the_plugin->localizationName),
);
$status = $post['status'];
$status_html = isset($status_values["$status"]) ? $status_values["$status"] : '';
$status_msg = isset($post['status_msg']) && !empty($post['status_msg'])
? $post['status_msg'] : $status_html;
//$status_html = '' . $status_html . '';
$status_html = '' . $status_html . '';
$html[] = $status_html;
}
elseif( $value['td'] == '%product_links%' ) {
if ( isset($post['product_id']) && !empty($post['product_id']) ) {
$html[] = '' . __('View', $this->the_plugin->localizationName) . '';
$html[] = '' . __('Edit', $this->the_plugin->localizationName) . '';
}
}
elseif( $value['td'] == '%asin_with_details%' ) {
$asin = $prod_asin;
$from_op = $post['from_op'];
$prod_search_id = str_replace('search#', '', $from_op);
$product_id = isset($post['product_id']) ? $post['product_id'] : 0;
$prod_search = array();
if ( isset($this->search_ids["search#$prod_search_id"]) ) {
$prod_search = $this->search_ids["search#$prod_search_id"];
}
$prod_country = $post['country'];
if ( empty($prod_country) && isset($prod_search['country']) ) {
$prod_country = $prod_search['country'];
}
//var_dump('',$prod_country ,' ');
$prod_title = isset($post['product_title']) ? $post['product_title'] : '';
if ( empty($prod_title) && isset($post['post_title']) ) {
$prod_title = $post['post_title'];
}
//var_dump('', $prod_country, $prod_search, $post, ' ');
$country_flag = $this->the_plugin->get_product_import_country_flag( array(
'product_id' => $product_id,
'asin' => $asin,
'country' => $prod_country,
));
$prod_url = $this->the_plugin->_product_buy_url( $product_id, $asin, $prod_country );
if ( ! empty($prod_title) ) {
$html[] = '' . $prod_title . ' ';
}
$provider = $post['provider'];
$provider_logo = $this->the_plugin->cfg['paths']['freamwork_dir_url'] . 'images/providers/' . $provider . '-logo.png';
$html[] = ' ';
$html[] = $country_flag['image_link'];
$html[] = '' . ( $asin ) . '';
$html[] = ' || ';
$html[] = $from_op;
if ( $product_id ) {
$html[] = ' || ';
$html[] = '' . __('View', $this->the_plugin->localizationName) . '';
$html[] = '' . __('Edit', $this->the_plugin->localizationName) . '';
}
}
}
else if( $this->opt["custom_table"] == "amz_search"){
if( $value['td'] == '%nb_tries%' ){
$html[] = '' . $post['nb_tries'] . '';
$html[] = '';
}
elseif( $value['td'] == '%search_title%' ){
// edit inline
$html[] = '' . $post['search_title'] . '';
$html[] = '';
}
elseif( $value['td'] == '%created_date%' ){
$created_date = $this->the_plugin->last_update_date('true', strtotime($post['created_date']));
$html[] = '' . ( $created_date ) . '';
}
elseif( $value['td'] == '%status%' ) {
$provider = $post['provider'];
$provider_logo = $this->the_plugin->cfg['paths']['freamwork_dir_url'] . 'images/providers/' . $provider . '-logo.png';
$html[] = ' ';
$status_values = array(
'new' => __('New', $this->the_plugin->localizationName),
'done' => __('Done (success)', $this->the_plugin->localizationName),
'error' => __('Error', $this->the_plugin->localizationName),
);
$status = $post['status'];
$status_html = isset($status_values["$status"]) ? $status_values["$status"] : '';
$status_msg = isset($post['status_msg']) && !empty($post['status_msg'])
? $post['status_msg'] : $status_html;
$status_msg = preg_replace('#.*?#i', '', $status_msg);
//$status_html = '' . $status_html . '';
$status_html = '' . $status_html . '';
$html[] = $status_html;
}
elseif( $value['td'] == '%params_box%' ){
$provider = $post['provider'];
$theHelper = $this->the_plugin->get_ws_object( $provider );
$recurrency = $this->moduleparams['auto_import']->recurrency;
$countries = $this->moduleparams['auto_import']->providers_countries->countries["$provider"];
$main_aff_ids = $this->moduleparams['auto_import']->providers_countries->main_aff_ids["$provider"];
$status_html = __('View all', $this->the_plugin->localizationName);
$status_msg = $this->moduleparams['auto_import']->show_search_params( $post['params'] );
$fields = array(
//'provider' => array(
// 'title' => __('Provider', $this->the_plugin->localizationName),
// 'value' => $post['provider'],
// 'options' => array(),
//),
'recurrency' => array(
'title' => __('Recurrency', $this->the_plugin->localizationName),
'value' => $post['recurrency'],
'options' => $recurrency,
),
'country' => array(
'title' => __('Country', $this->the_plugin->localizationName),
'value' => $post['country'],
'options' => $countries,
),
'main_aff_id' => array(
'title' => __('Main Aff Id', $this->the_plugin->localizationName),
'value' => $post['params']['extra_params']['main_aff_id'],
'options' => $main_aff_ids,
),
'category' => array(
'title' => __('Category', $this->the_plugin->localizationName),
'value' => '',
),
'keyword' => array(
'title' => __('Keyword', $this->the_plugin->localizationName),
'value' => '',
),
'BrowseNode' => array(
'title' => __('Node', $this->the_plugin->localizationName),
'value' => '',
),
'nbpages' => array(
'title' => __('Nb Pages', $this->the_plugin->localizationName),
'value' => '',
),
'to_category' => array(
'title' => __('Import in', $this->the_plugin->localizationName),
'value' => '',
),
'view_all' => array(
'title' => '' . $status_html . '',
'value' => '',
),
);
$__ptmp = array(
//'main_aff_id' => 'extra_params',
'category' => 'params',
'keyword' => 'params',
'BrowseNode' => 'params',
'nbpages' => 'params',
'to_category' => 'import_params',
);
foreach ($__ptmp as $param_key => $param_group) {
if ( isset(
$post['params'],
$post['params']["$param_group"],
$post['params']["$param_group"]["$param_key"]
) ) {
if ( isset($post['params']["$param_group"]["$param_key"]) ) {
$fields["$param_key"]['value'] = $post['params']["$param_group"]["$param_key"];
}
if ( isset($post['params']["$param_group"]["_$param_key"]) ) {
$fields["$param_key"]['value'] = $post['params']["$param_group"]["_$param_key"];
}
}
}
foreach ($fields as $field_key => $field_info) {
$__ftmp = isset($field_info['value']) ? $field_info['value'] : '';
$__ftmp2 = isset($field_info['options']) ? $field_info['options'] : array();
if ( !empty($__ftmp) && isset($__ftmp2["$__ftmp"]) ) {
$fields["$field_key"]['value'] = $__ftmp2["$__ftmp"];
}
if ( ('view_all' != $field_key) && empty($fields["$field_key"]['value']) ) {
unset($fields["$field_key"]);
}
}
$html[] = '';
foreach ($fields as $field_key => $field_info) {
$field_css = '"';
if ( 'recurrency' == $field_key ) {
$field_css = ' WooZone-edit-inline"';
}
$html[] = ' ';
$html[] = ' ';
$html[] = isset($field_info['title']) ? $field_info['title'] : '';
$html[] = ' ';
if ( isset($field_info['value']) && !empty($field_info['value'])
&& 'view_all' != $field_key ) {
$html[] = ' : ';
}
$html[] = ' ';
}
$html[] = ' ';
}
$html[] = ' ';
} // end params_box
elseif( $value['td'] == '%info_set2%' ){
//$status_html = __('View all', $this->the_plugin->localizationName);
$fields = array(
'created_at' => array(
'title' => __('Created at', $this->the_plugin->localizationName),
'value' => $post['created_date'],
),
'started_at' => array(
'title' => __('Started at', $this->the_plugin->localizationName),
'value' => $post['started_at'],
),
'ended_at' => array(
'title' => __('Ended at', $this->the_plugin->localizationName),
'value' => $post['ended_at'],
),
'run_date' => array(
'title' => __('Next run', $this->the_plugin->localizationName),
'value' => $post['run_date'],
),
);
foreach ($fields as $field_key => $field_info) {
if ( !empty($field_info['value']) && '0000-00-00 00:00:00' == $field_info['value'] ) {
$fields["$field_key"]['value'] = '';
}
if ( !empty($fields["$field_key"]['value']) ) {
$fields["$field_key"]['value'] = $this->the_plugin->last_update_date('true', strtotime($fields["$field_key"]['value']));
}
}
$html[] = '';
foreach ($fields as $field_key => $field_info) {
$html[] = ' ';
$html[] = ' ';
$html[] = isset($field_info['title']) ? $field_info['title'] : '';
$html[] = ' ';
if ( isset($field_info['value']) && !empty($field_info['value'])
&& 'view_all' != $field_key ) {
$html[] = ' : ';
}
$html[] = ' ';
$html[] = isset($field_info['value']) ? '' . $field_info['value'] . '' : '';
$html[] = ' ';
$html[] = ' ';
}
$html[] = ' ';
} // end info_set2
elseif( $value['td'] == '%info_set1%' ){
$queue_statuses = array(
'new' => __('New', $this->the_plugin->localizationName), //New
'done' => __('Done', $this->the_plugin->localizationName), //Done successfully
'error' => __('Error', $this->the_plugin->localizationName), //Error
'already' => __('Already', $this->the_plugin->localizationName), //Already imported
);
$fields = array();
foreach ($queue_statuses as $field_key => $field_info) {
$fields["$field_key"] = array(
'title' => $field_info,
'value' => isset($post['queue']["$field_key"])
? (int)$post['queue']["$field_key"] : 0,
'options' => array(),
);
}
foreach ($fields as $field_key => $field_info) {
$__ftmp = isset($field_info['value']) ? $field_info['value'] : '';
$__ftmp2 = isset($field_info['options']) ? $field_info['options'] : array();
if ( !empty($__ftmp) && isset($__ftmp2["$__ftmp"]) ) {
$fields["$field_key"]['value'] = $__ftmp2["$__ftmp"];
}
}
foreach ($fields as $field_key => $field_info) {
if ( empty($field_info['value']) ) {
unset($fields["$field_key"]);
}
}
$html[] = '';
foreach ($fields as $field_key => $field_info) {
$field_css = 'done' == $field_key ? 'success' : $field_key;
$html[] = ' ';
$html[] = ' ';
$html[] = isset($field_info['title']) ? $field_info['title'] : '';
$html[] = ' ';
if ( isset($field_info['value']) && !empty($field_info['value'])
&& 'view_all' != $field_key ) {
$html[] = ' : ';
}
$html[] = ' ';
$html[] = isset($field_info['value']) ? ''.$field_info['value'].'' : '';
$html[] = ' ';
$html[] = ' ';
}
$html[] = ' ';
} // end info_set1
}
else if( $this->opt["custom_table"] == "amz_import_stats"){
if( $value['td'] == '%imported_date%' ){
if ( !empty($post['imported_date']) && '0000-00-00 00:00:00' == $post['imported_date'] ) {
$post['imported_date'] = '';
}
$imported_date = '';
if ( !empty($post['imported_date']) ) {
$imported_date = $this->the_plugin->last_update_date('true', strtotime($post['imported_date']));
$html[] = '' . ( $imported_date ) . '';
}
}
elseif( $value['td'] == '%from_op%' ) {
$html[] = $post['from_op'];
}
elseif( $value['td'] == '%product_links%' ) {
if ( isset($post['product_id']) && !empty($post['product_id']) ) {
$html[] = '' . __('View', $this->the_plugin->localizationName) . '';
$html[] = '' . __('Edit', $this->the_plugin->localizationName) . '';
}
}
elseif( $value['td'] == '%status%' ) {
$provider = $post['provider'];
$provider_logo = $this->the_plugin->cfg['paths']['freamwork_dir_url'] . 'images/providers/' . $provider . '-logo.png';
$html[] = ' ';
$status_msg = isset($post['import_status_msg']) && !empty($post['import_status_msg'])
? $post['import_status_msg'] : '';
//$status_html = '' . $status_html . '';
$status_html = '' . __('Import details', 'WooZone') . '';
$html[] = $status_html;
}
elseif( $value['td'] == '%asin_with_details%' ) {
$asin = $prod_asin;
$from_op = $post['from_op'];
$product_id = isset($post['post_id']) ? $post['post_id'] : 0;
$prod_country = $post['country'];
if ( empty($prod_country) && isset($prod_search['country']) ) {
$prod_country = $prod_search['country'];
}
//var_dump('',$prod_country ,' ');
$prod_title = isset($post['post_title']) ? $post['post_title'] : '';
//var_dump('', $prod_country, $post, ' ');
$country_flag = $this->the_plugin->get_product_import_country_flag( array(
'product_id' => $product_id,
'asin' => $asin,
'country' => $prod_country,
));
$prod_url = $this->the_plugin->_product_buy_url( $product_id, $asin, $prod_country );
if ( ! empty($prod_title) ) {
$html[] = '' . $prod_title . ' ';
}
$provider = $post['provider'];
$provider_logo = $this->the_plugin->cfg['paths']['freamwork_dir_url'] . 'images/providers/' . $provider . '-logo.png';
$html[] = ' ';
$html[] = $country_flag['image_link'];
$html[] = '' . ( $asin ) . '';
$html[] = ' || ';
$html[] = $from_op;
if ( $product_id ) {
$html[] = ' || ';
$html[] = '' . __('View', $this->the_plugin->localizationName) . '';
$html[] = '' . __('Edit', $this->the_plugin->localizationName) . '';
}
}
elseif( $value['td'] == '%duration%' ) {
$status_msg = isset($post['import_status_msg']) && !empty($post['import_status_msg'])
? $post['import_status_msg'] : '';
//$status_html = '' . $status_html . '';
$status_html = '' . __('Show more details', 'WooZone') . '';
$html[] = $this->_show_import_stats_duration( $post, array(
'css_main_class' => 'amz_import_stats_col',
));
$html[] = $status_html;
}
elseif( $value['td'] == '%db_calc%' ) {
$db_calc = isset($post['db_calc']) && !empty($post['db_calc'])
? (array) $post['db_calc'] : array();
$status_msg = '';
if ( ! empty($db_calc) ) {
$status_msg = $this->_show_import_stats_db_calc( $db_calc, array(
'css_main_class' => 'amz_import_stats_col',
'full_details' => true,
));
}
$status_html = '';
if ( '' !== $status_msg ) {
//$status_html = '' . $status_html . '';
$status_html = '' . __('Show more details', 'WooZone') . '';
}
$html[] = $this->_show_import_stats_db_calc( $db_calc, array(
'css_main_class' => 'amz_import_stats_col',
));
$html[] = $status_html;
}
}
$html[] = ' | ';
}
$html[] = '
';
}
}
$html[] = '