value="keyword"/> value="asin"/> value="ean"/> value="articlenumber"/> value="gtin"/> value="isbn"/>
list = $list; $result = null; if ( $searched ) { if ( $selectedshopid == '' ) { $shops = atkp_shop::get_list(); foreach ( $shops as $shop ) { if ( $shop->provider == null ) { continue; } echo '

' . esc_html__( $shop->title, 'affiliate-toolkit-starter' ) . ' (' . esc_html( $shop->id ) . ')

'; echo '
type == atkp_shop_type::SUB_SHOPS ? 'disabled' : '' ) . ' class="atkp-backend-livesearch" init="' . esc_attr( ! $searched ? "1" : "0" ) . '" shopid="' . esc_attr($shop->id) . '" keyword="' . esc_attr( $keyword ) . '" searchoption="' . esc_attr( $searchoption ) . '" asintype="' . esc_attr( $asintype ) . '" endpointurl="' . esc_url( ATKPTools::get_endpointurl() ) . '" >
'; foreach ( $shop->children as $child ) { echo '

- ' . esc_html__( $child->title, 'affiliate-toolkit-starter' ) . ' (' . esc_html( $child->id ) . ')

'; echo '
'; } } } else { $shop = atkp_shop::load( $selectedshopid ); if ( $shop == null || $shop->provider == null ) { echo '
' . esc_html__( 'shop extension was not loaded. Check if extension is activated.', 'affiliate-toolkit-starter' ) . '
'; $searched = false; } else { $shop->provider->checklogon( $shop ); $result = null; try { //$result = $shop->provider->retrieve_departments(); $result = $shop->provider->quick_search( $keyword, $searchoption == 'asin' || $searchoption == 'ean' || $searchoption == 'articlenumber' || $searchoption == 'isbn' || $searchoption == 'gtin' ? $searchoption : 'product', $page ); } catch ( Exception $e ) { ATKPLog::LogError( $e->getMessage() ); echo '
' . esc_html__( $e->getMessage(), 'affiliate-toolkit-starter' ) . '
'; $searched = false; } if ( $searched && isset( $result ) && $result != null && $result->message != '' ) { echo '
' . sprintf( esc_html__( 'API returned: %s', 'affiliate-toolkit-starter' ), esc_html($result->message) ) . '
'; $searched = false; } if ( $searched ) { try { ?> products as $product ) { $asin = $product['asin']; $uniqid = uniqid(); ?>
'; } ?>
: , EAN: , : '; echo( isset( $product['saleprice'] ) ? sprintf( esc_html__( 'Price: %s', 'affiliate-toolkit-starter' ), esc_html($product['saleprice']) ) : '-' ); $cname = ''; $ss = isset( $product['shopid'] ) && $product['shopid'] != '' ? atkp_shop::load_shopid( $shop, $product['shopid'] ) : null; if ( $ss == null && isset( $product['shopname'] ) && $product['shopname'] != '' ) { $cname = sprintf( esc_html__( '%s (shop is not enabled)', 'affiliate-toolkit-starter' ), esc_html($product['shopname']) ); } else if ( $ss != null ) { $cname = $ss->title; } echo( $cname != '' ? ', ' . sprintf( esc_html__( 'Shop: %s', 'affiliate-toolkit-starter' ), esc_html($cname) ) : '' ); echo( isset( $product['info'] ) ? ', Information: ' . esc_html( $product['info'] ) : '' ) ?>
'; if ( $post_id > 0 ) { echo '' . esc_attr_e( 'Imported', 'affiliate-toolkit-starter' ) . ''; echo '' . esc_html__( 'Product imported.', 'affiliate-toolkit-starter' ) . '
'; } if ( $asin == '' ) { echo '' . esc_html__( 'Key is empty', 'affiliate-toolkit-starter' ) . ''; echo sprintf( esc_html__( '%s is empty.', 'affiliate-toolkit-starter' ), esc_html($asintype) ) . '
'; } /* if($ss == null && $product['shopname'] != '') { echo '' . __( 'Key is empty', ATKP_PLUGIN_PREFIX ) . ''; echo sprintf(__( 'Shop %s is not enabled.', ATKP_PLUGIN_PREFIX ) , $product['shopname']). '
'; }*/ echo ''; ?> type="button" style="margin-top:5px" id="" name="" data-rowid="" data-shop="" data-asin="" data-asin2="" data-asintype="" data-subshopid="" data-subshopname="" data-status="draft" class="import-button button" title="" value=""/>
type="button" style="margin-top:5px" id="" name="" data-rowid="" data-shop="" data-asin="" data-asin2="" data-asintype="" data-subshopid="" data-subshopname="" data-status="publish" class="import-button button" title="" value=""/>
'; var_dump( $e ); echo ''; $searched = false; } } } } } if ( $selectedshopid != '' && $searched) { ?>
currentpage > 1 ) { ?> Seite currentpage); ?> von pagecount) ?> (total) ?> Ergebnisse) currentpage < $result->pagecount ) { ?>