Private Proxies – Buy Cheap Private Elite USA Proxy + 50% Discount!Private Proxies – Buy Cheap Private Elite USA Proxy + 50% Discount!Private Proxies – Buy Cheap Private Elite USA Proxy + 50% Discount!Private Proxies – Buy Cheap Private Elite USA Proxy + 50% Discount!
    0
  •   was successfully added to your cart.
  • Home
  • Buy proxies
  • Extra features
  • Help
  • Contact
  • Login
  • 50% OFF
    BUY NOW!
    50
    PROXIES
    $19
    --------------------
    BUY NOW!
    BUY NOW!
    BUY NOW!
    BUY NOW!
    BUY NOW!
    $29
    $49
    $109
    $179
    $299
    --------------------
    --------------------
    --------------------
    --------------------
    --------------------
    PROXIES
    PROXIES
    PROXIES
    PROXIES
    PROXIES
    100
    200
    500
    1,000
    2,000
    TOP SELLER
    BEST VALUE
    For All Private Proxies!

Всем доброго времени суток! Есть партнёрская программа на Opencart, и есть отчёт – где выводятся все партнёры по уровням. Подскажите, как реализовать следующее: При нажатии к примеру на партнёра первого уровня – показывать всех партнёров второго уровня, которых он привёл лично. При нажатии на одного из показанных партнёров второго уровня показывать партнёров третьего уровня, которых этот второй уровень привёл лично. введите сюда описание изображения То есть по сути при загрузке страницы изначально должен показываться список партнёров первого уровня, а дальше при клике на одного из них, страница будет обновляться, и будут показываться его партнёры и тд. Уровней всего три, и расширение больше не планируется.

Вот код модели данного отчёта:

function affiliateCountUser($ parent_id = 0)     {          $ affiliates = [];          $ firstLevelPartners = "SELECT affiliate_id, CONCAT(firstname, ' ', lastname) AS name FROM `" . DB_PREFIX . "affiliate` where parent=$ parent_id ";          $ query = $ this->db->query($ firstLevelPartners);          if ($ query->num_rows) {             $ results = $ query->rows;              foreach ($ results as $ result) {                 $ affiliates[$ result['affiliate_id']]['affiliate_id'] = $ result['affiliate_id'];                 $ affiliates[$ result['affiliate_id']]['name'] = $ result['name'];                 $ affiliates[$ result['affiliate_id']]['parents'] = $ this->affiliateCountUser($ result['affiliate_id']);                 $ affiliates[$ result['affiliate_id']]['counts'] = count($ affiliates[$ result['affiliate_id']]['parents']);             }         }           return $ affiliates;     }      function affiliateFirstLevelInfo()     {          $ results = $ this->affiliateCountUser();           foreach ($ results as $ result) {             $ affiliates_ids = implode($ this->array_column_recursive($ result, 'affiliate_id'), ',');              $ query = "SELECT count(total) as count_shopping, SUM(total) as sum_shopping FROM `" . DB_PREFIX . "order` WHERE affiliate_id IN ({$ affiliates_ids})";             $ ShoppingQuery = $ this->db->query($ query);              if ($ ShoppingQuery->num_rows) {                 $ Shopping = $ ShoppingQuery->rows;             }              $ resultCount = $ this->array_column_recursive($ result['parents'], 'counts');              $ responseResult[] = [                 'name' => $ result['name'],                 'count_partners_second_level' => $ result['counts'],                 'count_partners_third_level' => array_sum($ resultCount),                 'count_shopping' => $ Shopping[0]['count_shopping'],                 'sum_shopping' => $ this->currency->format($ Shopping[0]['sum_shopping'], $ this->config->get('config_currency')),             ];          }           return $ responseResult;      }       function affiliateSecondLevelInfo()     {         $ secondLevelPartnersParent = "SELECT affiliate_id, CONCAT(firstname, ' ', lastname) AS name FROM `" . DB_PREFIX . "affiliate` where parent = 0";         $ query = $ this->db->query($ secondLevelPartnersParent);          if ($ query->num_rows) {             $ results = $ query->rows;         }         $ responseSecondLevelResult = [];         $ secondLevelIds = [];          foreach ($ results as $ result) {             $ sumFirstLevel1 = "SELECT affiliate_id FROM `" . DB_PREFIX . "affiliate` WHERE parent = {$ result['affiliate_id']}";             $ query1 = $ this->db->query($ sumFirstLevel1);              if ($ query1->num_rows) {                 $ results1 = $ query1->rows;                 foreach ($ results1 as $ item) {                     $ secondLevelIds[] = $ item['affiliate_id'];                 }             }         }          foreach ($ secondLevelIds as $ secondLevelId) {             $ sumSecondLevel1 = "SELECT `" . DB_PREFIX . "customer`.customer_id, SUM(`" . DB_PREFIX . "order`.total) as sum_shopping, count(`" . DB_PREFIX . "order`.total) as count_shopping ,`" . DB_PREFIX . "customer`.date_added, count(`" . DB_PREFIX . "customer`.customer_id) as count_partners, `" . DB_PREFIX . "customer`.affiliate_paid, CONCAT(`" . DB_PREFIX . "customer`.firstname, ' ', `" . DB_PREFIX . "customer`.lastname) AS name, `" . DB_PREFIX . "customer`.affiliate_paid, `" . DB_PREFIX . "customer`.date_added  FROM `" . DB_PREFIX . "customer` INNER JOIN `" . DB_PREFIX . "order` ON `" . DB_PREFIX . "order`.customer_id = `" . DB_PREFIX . "customer`.customer_id WHERE `" . DB_PREFIX . "customer`.affiliate_paid = {$ secondLevelId}";             $ namesDateSecondLevel = "SELECT affiliate_id, parent, CONCAT(firstname, ' ', lastname) AS name , date_added FROM `" . DB_PREFIX . "affiliate` where affiliate_id={$ secondLevelId}";             $ countThirdPartners = "SELECT count(affiliate_id) as count_partners FROM `" . DB_PREFIX . "affiliate` where parent={$ secondLevelId}";             $ sumThirdLevel = "SELECT count(total) as count_shopping, SUM(total) as sum_shopping FROM `" . DB_PREFIX . "order` where affiliate_id={$ secondLevelId}";              $ namesDateSecondLevelQuery = $ this->db->query($ namesDateSecondLevel);             $ sumSecondLevel1Query = $ this->db->query($ sumSecondLevel1);             $ countThirdPartnersQuery = $ this->db->query($ countThirdPartners);             $ sumThirdLevelQuery = $ this->db->query($ sumThirdLevel);              if ($ namesDateSecondLevelQuery->num_rows) {                 $ namesDateSecondLevelResult = $ namesDateSecondLevelQuery->rows;             }              if ($ sumSecondLevel1Query->num_rows) {                 $ sumSecondLevel1Result = $ sumSecondLevel1Query->rows;             }              if ($ countThirdPartnersQuery->num_rows) {                 $ countThirdPartnersResult = $ countThirdPartnersQuery->rows;             }              if ($ sumThirdLevelQuery->num_rows) {                 $ sumThirdLevelResult = $ sumThirdLevelQuery->rows;             }               $ affiliateSecondThirdShoppingResultSum[0]['sum_shopping'] = $ sumSecondLevel1Result[0]['sum_shopping'] + $ sumThirdLevelResult[0]['sum_shopping'];             $ affiliateSecondThirdShoppingResultCount[0]['count_shopping'] = $ sumSecondLevel1Result[0]['count_shopping'] + $ sumThirdLevelResult[0]['count_shopping'];             foreach ($ namesDateSecondLevelResult as $ nameResult) {                 $ secondLevelPartnersParentName = "SELECT CONCAT(firstname, ' ', lastname) AS name FROM `" . DB_PREFIX . "affiliate` where affiliate_id= {$ nameResult['parent']}";                 $ secondLevelPartnersParentNameQuery = $ this->db->query($ secondLevelPartnersParentName);                  if ($ secondLevelPartnersParentNameQuery->num_rows) {                     $ secondLevelPartnersParentNameResult = $ secondLevelPartnersParentNameQuery->rows;                 }             }               $ responseSecondLevelResult[] = [                 'name' => $ namesDateSecondLevelResult[0]['name'],                 'count_partners' => $ countThirdPartnersResult[0]['count_partners'],                 'count_shopping' => $ affiliateSecondThirdShoppingResultCount[0]['count_shopping'],                 'date_linked' => date($ this->language->get('date_format_short'), strtotime($ namesDateSecondLevelResult[0]['date_added'])),                 'sum_shopping' => $ this->currency->format($ affiliateSecondThirdShoppingResultSum[0]['sum_shopping'], $ this->config->get('config_currency')),                 'parent_partner' => $ secondLevelPartnersParentNameResult[0]['name']             ];           }          $ inClause = implode(", ", $ secondLevelIds);          $ thirdLevelPartnersParent = "SELECT affiliate_id, date_added, parent, CONCAT(firstname, ' ', lastname) AS name FROM `" . DB_PREFIX . "affiliate` where parent in ($ inClause)";          $ query3 = $ this->db->query($ thirdLevelPartnersParent);         $ responseThirdLevelResult = [];         if ($ query3->num_rows) {             $ result3 = $ query3->rows;              foreach ($ result3 as $ item) {                 $ ThirdLevelPartnersParentName = "SELECT CONCAT(firstname, ' ', lastname) AS name FROM `" . DB_PREFIX . "affiliate` where affiliate_id = {$ namesDateSecondLevelResult[0]['affiliate_id']}";                 $ ThirdLevelPartnersParentNameQuery = $ this->db->query($ ThirdLevelPartnersParentName);                  if ($ ThirdLevelPartnersParentNameQuery->num_rows) {                     $ ThirdLevelPartnersParentNameResult = $ ThirdLevelPartnersParentNameQuery->rows;                 }                  $ sumThirdLevel = "SELECT SUM(`" . DB_PREFIX . "order`.total) as sum_shopping, count(`" . DB_PREFIX . "order`.total) as count_shopping,  `" . DB_PREFIX . "customer`.affiliate_paid, CONCAT(`" . DB_PREFIX . "customer`.firstname, ' ', `" . DB_PREFIX . "customer`.lastname) AS name, `" . DB_PREFIX . "customer`.date_added  FROM `" . DB_PREFIX . "customer` INNER JOIN `" . DB_PREFIX . "order` ON `" . DB_PREFIX . "order`.customer_id = `" . DB_PREFIX . "customer`.customer_id WHERE `" . DB_PREFIX . "customer`.affiliate_paid = {$ item['affiliate_id']}";                  $ query4 = $ this->db->query($ sumThirdLevel);                  if ($ query4->num_rows) {                     $ result4 = $ query4->rows;                     $ responseThirdLevelResult[] = [                         'name' => $ result3[0]['name'],                         'date_linked' => date($ this->language->get('date_format_short'), strtotime($ result3[0]['date_added'])),                         'sum_shopping' => $ this->currency->format($ result4[0]['sum_shopping'], $ this->config->get('config_currency')),                         'parent_partner' => $ ThirdLevelPartnersParentNameResult[0]['name']                     ];                  }             }         }          return [$ responseSecondLevelResult, $ responseThirdLevelResult];      } 

Код tpl :

<?php echo $ header; ?><?php echo $ column_left; ?> <div id="content">   <div class="page-header">     <div class="container-fluid">       <h1><?php echo $ heading_title; ?></h1>       <ul class="breadcrumb">         <?php foreach ($ breadcrumbs as $ breadcrumb) { ?>         <li><a href="<?php echo $ breadcrumb['href']; ?>"><?php echo $ breadcrumb['text']; ?></a></li>         <?php } ?>       </ul>     </div>   </div>   <div class="container-fluid">     <div class="panel panel-default">       <div class="panel-heading">         <h3 class="panel-title"><i class="fa fa-bar-chart"></i> <?php echo $ text_list; ?></h3>       </div>       <div class="panel-body">           <span>Партнеры первого уровня</span>           <div class="table-responsive">               <table class="table table-striped table-bordered table-hover">                   <thead>                   <tr align="center">                       <td>Партнер</td>                       <td>Количество партнеров второго уровня</td>                       <td>Количество партнеров третьего уровня</td>                       <td>Общее количество выполненных заказов по всем партнерам</td>                       <td>Оборот по выполненным заказам всех партнеров</td>                   </tr>                   </thead>                   <tbody>                   <?php if (isset($ data['first_level_info'])) { ?>                   <?php foreach ($ data['first_level_info'] as $ affiliate_info) { ?>                   <tr align="center">                       <td><a href=""><?php echo($ affiliate_info['name']);  ?></a></td>                       <td><?php echo($ affiliate_info['count_partners_second_level']);  ?></td>                       <td><?php echo($ affiliate_info['count_partners_third_level']);  ?></td>                       <td><?php echo($ affiliate_info['count_shopping']);  ?></td>                       <td><?php echo($ affiliate_info['sum_shopping']);  ?></td>                   </tr>                   </tr>                   <?php } ?>                   <?php } else { ?>                   <tr>                       <td class="center" colspan="7"><?php echo $ text_no_results; ?></td>                   </tr>                   <?php } ?>                    </tbody>               </table>           </div>           <span>Партнеры второго уровня</span>           <div class="table-responsive">               <table class="table table-striped table-bordered table-hover">                   <thead>                   <tr align="center">                       <td>Партнер</td>                       <td>Количество партнеров третьего уровня</td>                       <td>Общее количество выполненных заказов</td>                       <td>Оборот по выполненным заказам всех партнеров</td>                       <td>Дата привязки</td>                       <td>Пригласивший партнёр</td>                   </tr>                   </thead>                   <tbody>                   <?php if (isset($ data['second_level_info'])) { ?>                   <?php foreach ($ data['second_level_info'] as $ affiliate_info_second) { ?>                   <tr align="center">                       <td><a href=""><?php echo($ affiliate_info_second['name']);  ?></a></td>                       <td><?php echo($ affiliate_info_second['count_partners']);  ?></td>                       <td><?php echo($ affiliate_info_second['count_shopping']);  ?></td>                       <td><?php echo($ affiliate_info_second['sum_shopping']);  ?></td>                       <td><?php echo($ affiliate_info_second['date_linked']);  ?></td>                       <td><?php echo($ affiliate_info_second['parent_partner']);  ?></td>                     </tr>                    <?php } ?>                   <?php } else { ?>                   <tr>                       <td class="center" colspan="7"><?php echo $ text_no_results; ?></td>                   </tr>                   <?php } ?>                    </tbody>               </table>           </div>           <span>Партнеры третьего уровня</span>           <div class="table-responsive">               <table class="table table-striped table-bordered table-hover">                   <thead>                   <tr align="center">                       <td>Партнер</td>                       <td>Оборот по выполненным заказам</td>                       <td>Дата привязки</td>                       <td>Пригласивший партнёр</td>                   </tr>                   </thead>                   <tbody>                   <?php if (isset($ data['third_level_info'])) { ?>                   <?php foreach ($ data['third_level_info'] as $ affiliate_info_third) { ?>                   <tr align="center">                       <td><?php echo($ affiliate_info_third['name']);  ?></td>                       <td><?php echo($ affiliate_info_third['sum_shopping']);  ?></td>                       <td><?php echo($ affiliate_info_third['date_linked']);  ?></td>                       <td><?php echo($ affiliate_info_third['parent_partner']);  ?></td>                   </tr>                   <?php } ?>                   <?php } else { ?>                   <tr>                       <td class="center" colspan="7"><?php echo $ text_no_results; ?></td>                   </tr>                   <?php } ?>                    </tbody>               </table>           </div>    <?php echo $ footer; ?> 

✓ Extra quality

ExtraProxies brings the best proxy quality for you with our private and reliable proxies

✓ Extra anonymity

Top level of anonymity and 100% safe proxies – this is what you get with every proxy package

✓ Extra speed

1,ooo mb/s proxy servers speed – we are way better than others – just enjoy our proxies!

50 proxies

$19/month

50% DISCOUNT!
$0.38 per proxy
✓ Private
✓ Elite
✓ Anonymous
Buy now

100 proxies

$29/month

50% DISCOUNT!
$0.29 per proxy
✓ Private
✓ Elite
✓ Anonymous
Buy now

200 proxies

$49/month

50% DISCOUNT!
$0.25 per proxy
✓ Private
✓ Elite
✓ Anonymous
Buy now

500 proxies

$109/month

50% DISCOUNT!
$0.22 per proxy
✓ Private
✓ Elite
✓ Anonymous
Buy now

1,000 proxies

$179/month

50% DISCOUNT!
$0.18 per proxy
✓ Private
✓ Elite
✓ Anonymous
Buy now

2,000 proxies

$299/month

50% DISCOUNT!
$0.15 per proxy
✓ Private
✓ Elite
✓ Anonymous
Buy now

USA proxy location

We offer premium quality USA private proxies – the most essential proxies you can ever want from USA

100% anonymous

Our proxies have TOP level of anonymity + Elite quality, so you are always safe and secure with your proxies

Unlimited bandwidth

Use your proxies as much as you want – we have no limits for data transfer and bandwidth, unlimited usage!

Superfast speed

Superb fast proxy servers with 1,000 mb/s speed – sit back and enjoy your lightning fast private proxies!

99,9% servers uptime

Alive and working proxies all the time – we are taking care of our servers so you can use them without any problems

No usage restrictions

You have freedom to use your proxies with every software, browser or website you want without restrictions

Perfect for SEO

We are 100% friendly with all SEO tasks as well as internet marketing – feel the power with our proxies

Big discounts

Buy more proxies and get better price – we offer various proxy packages with great deals and discounts

Premium support

We are working 24/7 to bring the best proxy experience for you – we are glad to help and assist you!

Satisfaction guarantee

24/7 premium support, free proxy activation and 100% safe payments! Best reliability private proxies for your needs!

Best Proxy Packs

  • 2,000 Private Proxies $600.00 $299.00 / month
  • 1,000 Private Proxies $360.00 $179.00 / month

Quick Links

  • More information
  • Contact us
  • Privacy Policy
  • Terms and Conditions

Like And Follow Us


Copyright ExtraProxies.com | All Rights Reserved.
  • Checkout
  • Contact
  • Help
  • Home
  • My Account
  • My Cart
  • News
  • Privacy Policy
  • Proxy features
  • Proxy packs
  • Terms and Conditions
Private Proxies – Buy Cheap Private Elite USA Proxy + 50% Discount!
    0 items