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 ) . ' (' . esc_html( $shop->id ) . ')

'; $plugin_name = ATKPTools::get_plugin_name_from_object( $shop->provider ); // Prüfe Lizenz if ( ! ATKPTools::is_license_active_for_plugin( $plugin_name ) ) { ?>

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 ) . ' (' . 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 { // Ermittle Plugin-Namen vom Provider $plugin_name = ATKPTools::get_plugin_name_from_object( $shop->provider ); // Prüfe Lizenz if ( ! ATKPTools::is_license_active_for_plugin( $plugin_name ) ) { ?>

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() ) . '
'; $searched = false; } if ( $searched && isset( $result ) && $result != null && $result->message != '' ) { /* translators: %s: API response 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: , : '; /* translators: %s: product sale price */ 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'] != '' ) { /* translators: %s: shop name */ $cname = sprintf( esc_html__( '%s (shop is not enabled)', 'affiliate-toolkit-starter' ), esc_html( $product['shopname'] ) ); } else if ( $ss != null ) { $cname = $ss->title; } /* translators: %s: shop name */ 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__( 'Imported', 'affiliate-toolkit-starter' ) . ''; echo '' . esc_html__( 'Product imported.', 'affiliate-toolkit-starter' ) . '
'; } if ( $asin == '' ) { echo '' . esc_html__( 'Key is empty', 'affiliate-toolkit-starter' ) . ''; /* translators: %s: product filter key type (e.g. ASIN, EAN) */ echo sprintf( esc_html__( '%s is empty.', 'affiliate-toolkit-starter' ), esc_html( $asintype ) ) . '
'; } /* if($ss == null && $product['shopname'] != '') { echo '' . __( 'Key is empty', 'affiliate-toolkit-starter' ) . ''; echo sprintf(__( 'Shop %s is not enabled.', 'affiliate-toolkit-starter' ) , $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=""/>
getMessage() ); echo '
' . esc_html( $e->getMessage() ) . '
'; $searched = false; } } } } } } if ( $selectedshopid != '' && $searched) { ?>
currentpage > 1 ) { ?> Seite currentpage); ?> von pagecount) ?> (total) ?> Ergebnisse) currentpage < $result->pagecount ) { ?>