<?php
/* ====================
  [BEGIN_COT_EXT]
  Hooks=marketorders.order.tags
  [END_COT_EXT]
  ==================== */

defined('COT_CODE') or die('Wrong URL.');

if($marketorder['order_seller'] != $usr['id']) {
  $adscats = array(
    'item_id' => 0,
    'item_cat' => '',
    'item_catattr' => ''
  );

  if($marketorder['item_id'] > 0) {
    $adscats = array(
      'item_id' => $marketorder['item_id'],
      'item_cat' => $marketorder['item_cat'],
      'item_catattr' => $marketorder['item_catattr']
    );
  } elseif(is_array($item_cache)) {
    $adscats = array(
      'item_id' => $item_cache['item_id'],
      'item_cat' => $item_cache['item_cat'],
      'item_catattr' => $item_cache['item_catattr']
    );
  }

  if($adscats['item_id'] > 0) {
    require_once cot_incfile('ads', 'plug');
    $parcat = $structure['market'][$adscats['item_cat']]['parent'];

    $t->assign(array(
      'ADS_BLOCK_POS_7' => ads_show(7, 0, $parcat, $adscats['item_cat'], $adscats['item_catattr'], $ads_positions[7]['limit'], true)
    ));
  }
}