예제 #1
0
 function execute()
 {
     global $request_type, $oscTemplate;
     $form_output = HTML::form('quick_find', OSCOM::link('advanced_search_result.php', '', $request_type, false), 'get', null, ['session_id' => true]) . '<div class="input-group">' . HTML::inputField('keywords', '', 'required aria-required="true" placeholder="' . TEXT_SEARCH_PLACEHOLDER . '"', 'search') . '<span class="input-group-btn"><button type="submit" class="btn btn-search"><i class="glyphicon glyphicon-search"></i></button></span></div>' . HTML::hiddenField('search_in_description', '0') . '</form>';
     ob_start();
     include 'includes/modules/boxes/templates/search.php';
     $data = ob_get_clean();
     $oscTemplate->addBlock($data, $this->group);
 }
예제 #2
0
 function execute()
 {
     global $PHP_SELF, $currencies, $oscTemplate;
     if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
         if (isset($currencies) && is_object($currencies) && count($currencies->currencies) > 1) {
             reset($currencies->currencies);
             $currencies_array = array();
             foreach ($currencies->currencies as $key => $value) {
                 $currencies_array[] = array('id' => $key, 'text' => $value['title']);
             }
             $hidden_get_variables = '';
             foreach ($_GET as $key => $value) {
                 if (is_string($value) && $key != 'currency' && $key != session_name() && $key != 'x' && $key != 'y') {
                     $hidden_get_variables .= HTML::hiddenField($key, $value);
                 }
             }
             $form_output = HTML::form('currencies', OSCOM::link($PHP_SELF, '', false), 'get', null, ['session_id' => true]) . HTML::selectField('currency', $currencies_array, $_SESSION['currency'], 'onchange="this.form.submit();"') . $hidden_get_variables . '</form>';
             ob_start();
             include 'includes/modules/boxes/templates/currencies.php';
             $data = ob_get_clean();
             $oscTemplate->addBlock($data, $this->group);
         }
     }
 }
예제 #3
0
      <tr>
        <td class="formArea"><table border="0" cellspacing="2" cellpadding="2">
          <tr>
            <td class="main"><?php 
    echo OSCOM::getDef('entry_newsletter');
    ?>
</td>
            <td class="main">
<?php 
    if ($processed == true) {
        if ($cInfo->customers_newsletter == '1') {
            echo OSCOM::getDef('entry_newsletter_yes');
        } else {
            echo OSCOM::getDef('entry_newsletter_no');
        }
        echo HTML::hiddenField('customers_newsletter');
    } else {
        echo HTML::selectField('customers_newsletter', $newsletter_array, $cInfo->customers_newsletter == '1' ? '1' : '0');
    }
    ?>
</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td align="right" class="smallText"><?php 
    echo HTML::button(OSCOM::getDef('image_save'), 'fa fa-save') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('action'))));
    ?>
</td>
      </tr></form>
<?php 
function ht_datepicker_jquery_edit_pages($values, $key)
{
    global $PHP_SELF;
    $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.'));
    $files_array = array();
    if ($dir = @dir(OSCOM::getConfig('dir_root', 'Shop'))) {
        while ($file = $dir->read()) {
            if (!is_dir(OSCOM::getConfig('dir_root', 'Shop') . $file)) {
                if (substr($file, strrpos($file, '.')) == $file_extension) {
                    $files_array[] = $file;
                }
            }
        }
        sort($files_array);
        $dir->close();
    }
    $values_array = explode(';', $values);
    $output = '';
    foreach ($files_array as $file) {
        $output .= HTML::checkboxField('ht_datepicker_jquery_file[]', $file, in_array($file, $values_array)) . '&nbsp;' . HTML::output($file) . '<br />';
    }
    if (!empty($output)) {
        $output = '<br />' . substr($output, 0, -6);
    }
    $output .= HTML::hiddenField('configuration[' . $key . ']', '', 'id="htrn_files"');
    $output .= '<script>
                function htrn_update_cfg_value() {
                  var htrn_selected_files = \'\';

                  if ($(\'input[name="ht_datepicker_jquery_file[]"]\').length > 0) {
                    $(\'input[name="ht_datepicker_jquery_file[]"]:checked\').each(function() {
                      htrn_selected_files += $(this).attr(\'value\') + \';\';
                    });

                    if (htrn_selected_files.length > 0) {
                      htrn_selected_files = htrn_selected_files.substring(0, htrn_selected_files.length - 1);
                    }
                  }

                  $(\'#htrn_files\').val(htrn_selected_files);
                }

                $(function() {
                  htrn_update_cfg_value();

                  if ($(\'input[name="ht_datepicker_jquery_file[]"]\').length > 0) {
                    $(\'input[name="ht_datepicker_jquery_file[]"]\').change(function() {
                      htrn_update_cfg_value();
                    });
                  }
                });
                </script>';
    return $output;
}
    echo TEXT_CREATE_NEW_PAYMENT_ADDRESS;
    ?>
    </div>
  </div>

  <?php 
    require 'includes/modules/checkout_new_address.php';
    ?>

<?php 
}
?>

  <div class="contentText">
    <div><?php 
echo HTML::hiddenField('action', 'submit') . HTML::button(IMAGE_BUTTON_CONTINUE, 'glyphicon glyphicon-chevron-right', null, 'primary', null, 'btn-success btn-block');
?>
</div>
  </div>

<?php 
if ($process == true) {
    ?>

  <div>
    <?php 
    echo HTML::button(IMAGE_BUTTON_BACK, 'glyphicon glyphicon-chevron-left', OSCOM::link('checkout_payment_address.php', '', 'SSL'));
    ?>
  </div>

<?php 
예제 #6
0
        <td class="main"><strong><?php 
        echo OSCOM::getDef('entry_rating');
        ?>
</strong>&nbsp;<?php 
        echo HTML::image(OSCOM::linkImage('Shop/stars_' . $rInfo->reviews_rating . '.gif'), OSCOM::getDef('text_of_5_stars', ['reviews_rating' => $rInfo->reviews_rating]));
        ?>
&nbsp;<small>[<?php 
        echo OSCOM::getDef('text_of_5_stars', ['reviews_rating' => $rInfo->reviews_rating]);
        ?>
]</small></td>
      </tr>
<?php 
        if (tep_not_null($_POST)) {
            echo HTML::hiddenField('reviews_rating', $rInfo->reviews_rating);
            echo HTML::hiddenField('reviews_text', $rInfo->reviews_text);
            echo HTML::hiddenField('reviews_status', $rInfo->reviews_status);
            ?>
      <tr>
        <td align="right" class="smallText"><?php 
            echo HTML::button(OSCOM::getDef('image_save'), 'fa fa-save') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id));
            ?>
</td>
      </form></tr>
<?php 
        } else {
            if (isset($_GET['origin'])) {
                $back_url = $_GET['origin'];
                $back_url_params = '';
            } else {
                $back_url = FILENAME_REVIEWS;
                $back_url_params = 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id;
예제 #7
0
            $Qfilter->execute();
        } else {
            $Qfilter = $OSCOM_Db->prepare('select SQL_CALC_FOUND_ROWS distinct m.manufacturers_id as id, m.manufacturers_name as name from :table_products p, :table_products_to_categories p2c, :table_manufacturers m where p.products_status = 1 and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = :categories_id order by m.manufacturers_name');
            $Qfilter->bindInt(':categories_id', $current_category_id);
            $Qfilter->execute();
        }
        if ($Qfilter->getPageSetTotalRows() > 1) {
            echo '<div>' . HTML::form('filter', OSCOM::link('index.php', '', false), 'get', null, ['session_id' => true]) . '<p align="right">' . OSCOM::getDef('text_show') . '&nbsp;';
            if (isset($_GET['manufacturers_id']) && !empty($_GET['manufacturers_id'])) {
                echo HTML::hiddenField('manufacturers_id', $_GET['manufacturers_id']);
                $options = array(array('id' => '', 'text' => OSCOM::getDef('text_all_categories')));
            } else {
                echo HTML::hiddenField('cPath', $cPath);
                $options = array(array('id' => '', 'text' => OSCOM::getDef('text_all_manufacturers')));
            }
            echo HTML::hiddenField('sort', $_GET['sort']);
            while ($Qfilter->fetch()) {
                $options[] = array('id' => $Qfilter->valueInt('id'), 'text' => $Qfilter->value('name'));
            }
            echo HTML::selectField('filter_id', $options, isset($_GET['filter_id']) ? $_GET['filter_id'] : '', 'onchange="this.form.submit()"');
            echo '</p></form></div>' . "\n";
        }
    }
    include 'includes/content/product_listing.php';
    ?>

</div>

<?php 
} else {
    // default page
예제 #8
0
            $form_action = 'update';
            $bID = HTML::sanitize($_GET['bID']);
            $Qbanner = $OSCOM_Db->get('banners', ['banners_title', 'banners_url', 'banners_image', 'banners_group', 'banners_html_text', 'status', 'date_format(date_scheduled, "%Y-%m-%d") as date_scheduled', 'date_format(expires_date, "%Y-%m-%d") as expires_date', 'expires_impressions', 'date_status_change'], ['banners_id' => (int) $bID]);
            $bInfo->objectInfo($Qbanner->toArray());
        } elseif (tep_not_null($_POST)) {
            $bInfo->objectInfo($_POST);
        }
        $groups_array = [];
        $Qgroups = $OSCOM_Db->get('banners', 'distinct banners_group', null, 'banners_group');
        while ($Qgroups->fetch()) {
            $groups_array[] = ['id' => $Qgroups->value('banners_group'), 'text' => $Qgroups->value('banners_group')];
        }
        ?>

<?php 
        echo HTML::form('new_banner', OSCOM::link(FILENAME_BANNER_MANAGER, 'page=' . $_GET['page'] . '&action=' . $form_action), 'post', 'enctype="multipart/form-data"') . ($form_action == 'update' ? HTML::hiddenField('banners_id', $bID) : '');
        ?>

<div class="panel panel-info">
  <div class="panel-body">
    <div class="form-group">
      <label for="banners_title"><?php 
        echo OSCOM::getDef('text_banners_title') . OSCOM::getDef('text_field_required');
        ?>
</label>
      <?php 
        echo HTML::inputField('banners_title', $bInfo->banners_title);
        ?>
    </div>

    <div class="form-group">
        ?>
</div>
  </div>

<?php 
    } else {
        if (sizeof($_SESSION['navigation']->snapshot) > 0) {
            $back_link = OSCOM::link($_SESSION['navigation']->snapshot['page'], tep_array_to_string($_SESSION['navigation']->snapshot['get'], array(session_name())), $_SESSION['navigation']->snapshot['mode']);
        } else {
            $back_link = OSCOM::link('address_book.php', '', 'SSL');
        }
        ?>

  <div class="row">
    <div class="col-sm-6 text-right pull-right"><?php 
        echo HTML::hiddenField('action', 'process') . HTML::button(IMAGE_BUTTON_CONTINUE, 'glyphicon glyphicon-chevron-right', null, null, null, 'btn-success');
        ?>
</div>
    <div class="col-sm-6"><?php 
        echo HTML::button(IMAGE_BUTTON_BACK, 'glyphicon glyphicon-chevron-left', $back_link);
        ?>
</div>
  </div>

<?php 
    }
    ?>

</div>

</form>
예제 #10
0
    for ($i = 0, $n = sizeof($products); $i < $n; $i++) {
        $products_name .= '<tr>';
        $products_name .= '  <td valign="top" align="center"><a href="' . OSCOM::link('product_info.php', 'products_id=' . $products[$i]['id']) . '">' . HTML::image(OSCOM::linkImage($products[$i]['image']), $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' . '  <td valign="top"><a href="' . OSCOM::link('product_info.php', 'products_id=' . $products[$i]['id']) . '"><strong>' . $products[$i]['name'] . '</strong></a>';
        if (STOCK_CHECK == 'true') {
            $stock_check = tep_check_stock($products[$i]['id'], $products[$i]['quantity']);
            if (tep_not_null($stock_check)) {
                $any_out_of_stock = 1;
                $products_name .= $stock_check;
            }
        }
        if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
            foreach ($products[$i]['attributes'] as $option => $value) {
                $products_name .= '<br /><small><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i></small>';
            }
        }
        $products_name .= '<br>' . HTML::inputField('cart_quantity[]', $products[$i]['quantity'], 'style="width: 65px;" min="0"', 'number') . HTML::hiddenField('products_id[]', $products[$i]['id']) . ' ' . HTML::button(OSCOM::getDef('text_cart_button_update'), 'fa fa-refresh', null, null, 'btn-info btn-xs') . ' ' . HTML::button(OSCOM::getDef('text_cart_button_remove'), 'fa fa-remove', OSCOM::link('shopping_cart.php', 'products_id=' . $products[$i]['id'] . '&action=remove_product'), null, 'btn-danger btn-xs');
        $products_name .= '</td>';
        $products_name .= '  <td align="right" valign="top"><strong>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</strong></td>' . '</tr>';
    }
    echo $products_name;
    ?>

      </tbody>
    </table>

    <p class="text-right"><strong><?php 
    echo OSCOM::getDef('sub_title_sub_total');
    ?>
 <?php 
    echo $currencies->format($_SESSION['cart']->show_total());
    ?>
예제 #11
0
                    $heading[] = array('text' => OSCOM::getDef('text_info_heading_delete_order'));
                    $contents = array('form' => HTML::form('orders', OSCOM::link('orders.php', tep_get_all_get_params(array('action')) . '&action=deleteconfirm')));
                    $contents[] = array('text' => OSCOM::getDef('text_info_delete_intro') . '<br /><br /><strong>#' . $order->info['id'] . '</strong> ' . HTML::outputProtected($order->customer['name']) . ' (' . strip_tags($order->info['total']) . ')');
                    $contents[] = array('text' => HTML::checkboxField('restock') . ' ' . OSCOM::getDef('text_info_restock_product_quantity'));
                    $contents[] = array('text' => HTML::button(OSCOM::getDef('image_delete'), 'fa fa-trash', null, null, 'btn-danger') . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link('orders.php', tep_get_all_get_params(array('action'))), null, 'btn-link'));
                }
                break;
        }
        if (tep_not_null($heading) && tep_not_null($contents)) {
            $show_listing = false;
            echo HTML::panel($heading, $contents, ['type' => 'info']);
        }
    }
}
if ($show_listing === true) {
    echo HTML::form('orders', OSCOM::link('orders.php'), 'get', 'class="form-inline"', ['session_id' => true]) . HTML::inputField('oID', null, 'placeholder="' . OSCOM::getDef('heading_title_search') . '"') . HTML::hiddenField('action', 'edit') . '</form>' . HTML::form('status', OSCOM::link('orders.php'), 'get', 'class="form-inline"', ['session_id' => true]) . HTML::selectField('status', array_merge(array(array('id' => '', 'text' => OSCOM::getDef('text_all_orders'))), $orders_statuses), '', 'onchange="this.form.submit();"') . '</form>';
    ?>

<table class="oscom-table table table-hover">
  <thead>
    <tr class="info">
      <th><?php 
    echo OSCOM::getDef('table_heading_customers');
    ?>
</th>
      <th class="text-right"><?php 
    echo OSCOM::getDef('table_heading_order_total');
    ?>
</th>
      <th></th>
      <th class="text-right"><?php 
<?php 
    }
}
if (tep_not_null($order->info['comments'])) {
    ?>
  <hr>

  <h2><?php 
    echo '<strong>' . OSCOM::getDef('heading_order_comments') . '</strong> ' . HTML::button(OSCOM::getDef('text_edit'), 'fa fa-edit', OSCOM::link('checkout_payment.php'), null, 'pull-right btn-info btn-xs');
    ?>
</h2>

  <blockquote>
    <?php 
    echo nl2br(HTML::outputProtected($order->info['comments'])) . HTML::hiddenField('comments', $order->info['comments']);
    ?>
  </blockquote>

<?php 
}
?>

  <div class="buttonSet">
    <div class="text-right">
      <?php 
if (is_array($payment_modules->modules)) {
    echo $payment_modules->process_button();
}
echo HTML::button(OSCOM::getDef('image_button_pay_total_now', ['total' => $currencies->format($order->info['total'], true, $order->info['currency'], $order->info['currency_value'])]), 'fa fa-ok', null, array('params' => 'data-button="payNow"'), 'btn-success');
?>
예제 #13
0
<?php 
$radio_buttons = 0;
for ($i = 0, $n = sizeof($selection); $i < $n; $i++) {
    ?>
      <tr>
        <td><strong><?php 
    echo $selection[$i]['module'];
    ?>
</strong></td>
        <td align="right">

<?php 
    if (sizeof($selection) > 1) {
        echo HTML::radioField('payment', $selection[$i]['id'], isset($_SESSION['payment']) && $selection[$i]['id'] == $_SESSION['payment'], 'required aria-required="true"');
    } else {
        echo HTML::hiddenField('payment', $selection[$i]['id']);
    }
    ?>

        </td>
      </tr>

<?php 
    if (isset($selection[$i]['error'])) {
        ?>

      <tr>
        <td colspan="2"><?php 
        echo $selection[$i]['error'];
        ?>
</td>
예제 #14
0
 function confirm()
 {
     $OSCOM_Db = Registry::get('Db');
     $audience = array();
     if (isset($_GET['global']) && $_GET['global'] == 'true') {
         $Qproducts = $OSCOM_Db->get('products_notifications', 'distinct customers_id');
         while ($Qproducts->fetch()) {
             $audience[$Qproducts->valueInt('customers_id')] = '1';
         }
         $Qcustomers = $OSCOM_Db->get('customers_info', 'customers_info_id', ['global_product_notifications' => '1']);
         while ($Qcustomers->fetch()) {
             $audience[$Qcustomers->valueInt('customers_info_id')] = '1';
         }
     } else {
         $chosen = [];
         foreach ($_POST['chosen'] as $id) {
             if (is_numeric($id) && !in_array($id, $chosen)) {
                 $chosen[] = $id;
             }
         }
         $ids = array_map(function ($k) {
             return ':products_id_' . $k;
         }, array_keys($chosen));
         $Qproducts = $OSCOM_Db->prepare('select distinct customers_id from :table_products_notifications where products_id in (' . implode(', ', $ids) . ')');
         foreach ($chosen as $k => $v) {
             $Qproducts->bindInt(':products_id_' . $k, $v);
         }
         $Qproducts->execute();
         while ($Qproducts->fetch()) {
             $audience[$Qproducts->valueInt('customers_id')] = '1';
         }
         $Qcustomers = $OSCOM_Db->get('customers_info', 'customers_info_id', ['global_product_notifications' => '1']);
         while ($Qcustomers->fetch()) {
             $audience[$Qcustomers->valueInt('customers_info_id')] = '1';
         }
     }
     $confirm_string = HTML::form('confirm', OSCOM::link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'] . '&action=confirm_send')) . "\n" . '<table border="0" cellspacing="0" cellpadding="2">' . "\n" . '  <tr>' . "\n" . '    <td class="main"><font color="#ff0000"><strong>' . OSCOM::getDef('text_count_customers', ['audience' => sizeof($audience)]) . '</strong></font></td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td>&nbsp;</td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td class="main"><strong>' . $this->title . '</strong></td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td>&nbsp;</td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td class="main">' . "\n" . '      <ul class="nav nav-tabs" role="tablist">' . "\n" . '        <li role="presentation" class="active"><a href="#html_preview" aria-controls="html_preview" role="tab" data-toggle="tab">' . OSCOM::getDef('email_type_html') . '</a></li>' . "\n" . '        <li role="presentation"><a href="#plain_preview" aria-controls="plain_preview" role="tab" data-toggle="tab">' . OSCOM::getDef('email_type_plain') . '</a></li>' . "\n" . '      </ul>' . "\n" . '      <div class="tab-content">' . "\n" . '        <div role="tabpanel" class="tab-pane active" id="html_preview">' . "\n" . '          <iframe id="emailHtmlPreviewContent" style="width: 100%; height: 400px; border: 0;"></iframe>' . "\n" . '          <script id="emailHtmlPreview" type="x-tmpl-mustache">' . "\n" . '            ' . HTML::outputProtected($this->content_html) . "\n" . '          </script>' . "\n" . '          <script>' . "\n" . '            $(function() {' . "\n" . '              var content = $(\'<div />\').html($(\'#emailHtmlPreview\').html()).text();' . "\n" . '              $(\'#emailHtmlPreviewContent\').contents().find(\'html\').html(content);' . "\n" . '            });' . "\n" . '          </script>' . "\n" . '        </div>' . "\n" . '        <div role="tabpanel" class="tab-pane" id="plain_preview">' . "\n" . '          ' . nl2br(HTML::outputProtected($this->content)) . "\n" . '        </div>' . "\n" . '      </div>' . "\n" . '    </td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td>&nbsp;</td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td class="smallText" align="right">';
     if (sizeof($audience) > 0) {
         if (isset($_GET['global']) && $_GET['global'] == 'true') {
             $confirm_string .= HTML::hiddenField('global', 'true');
         } else {
             for ($i = 0, $n = sizeof($chosen); $i < $n; $i++) {
                 $confirm_string .= HTML::hiddenField('chosen[]', $chosen[$i]);
             }
         }
         $confirm_string .= HTML::button(OSCOM::getDef('image_send'), 'fa fa-envelope');
     }
     $confirm_string .= HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'] . '&action=send')) . '</td>' . "\n" . '  </tr>' . "\n" . '</table>' . "\n" . '</form>';
     return $confirm_string;
 }
예제 #15
0
    echo OSCOM::link(FILENAME_SPECIALS, tep_get_all_get_params(array('action', 'info', 'sID')) . 'action=' . $form_action);
    ?>
" method="post"><?php 
    if ($form_action == 'update') {
        echo HTML::hiddenField('specials_id', $_GET['sID']);
    }
    ?>
        <td><br /><table border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td class="main"><?php 
    echo OSCOM::getDef('text_specials_product');
    ?>
&nbsp;</td>
            <td class="main"><?php 
    echo isset($sInfo->products_name) ? $sInfo->products_name . ' <small>(' . $currencies->format($sInfo->products_price) . ')</small>' : tep_draw_products_pull_down('products_id', 'style="font-size:10px"', $specials_array);
    echo HTML::hiddenField('products_price', isset($sInfo->products_price) ? $sInfo->products_price : '');
    ?>
</td>
          </tr>
          <tr>
            <td class="main"><?php 
    echo OSCOM::getDef('text_specials_special_price');
    ?>
&nbsp;</td>
            <td class="main"><?php 
    echo HTML::inputField('specials_price', isset($sInfo->specials_new_products_price) ? $sInfo->specials_new_products_price : '');
    ?>
</td>
          </tr>
          <tr>
            <td class="main"><?php 
예제 #16
0
    for ($i = 0, $n = sizeof($products); $i < $n; $i++) {
        $products_name .= '<tr>';
        $products_name .= '  <td valign="top" class="hidden-xs"><a href="' . OSCOM::link('product_info.php', 'products_id=' . $products[$i]['id']) . '">' . HTML::image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' . '  <td valign="top"><a href="' . OSCOM::link('product_info.php', 'products_id=' . $products[$i]['id']) . '">' . $products[$i]['name'] . '</a>';
        if (STOCK_CHECK == 'true') {
            $stock_check = tep_check_stock($products[$i]['id'], $products[$i]['quantity']);
            if (tep_not_null($stock_check)) {
                $any_out_of_stock = 1;
                $products_name .= $stock_check;
            }
        }
        if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
            foreach ($products[$i]['attributes'] as $option => $value) {
                $products_name .= '<br /><small><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i></small>';
            }
        }
        $products_name .= '<br>' . HTML::inputField('cart_quantity[]', $products[$i]['quantity'], 'style="width: 65px; display: inline;" min="0"', 'number') . HTML::hiddenField('products_id[]', $products[$i]['id']) . ' ' . HTML::button(NULL, 'glyphicon glyphicon-refresh', NULL, NULL, NULL, 'btn-info btn-sm') . ' ' . HTML::button(NULL, 'glyphicon glyphicon-remove', OSCOM::link('shopping_cart.php', 'products_id=' . $products[$i]['id'] . '&action=remove_product'), NULL, NULL, 'btn-danger btn-sm');
        $products_name .= '</td>';
        $products_name .= '  <td class="text-right" valign="top">' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</td>' . '</tr>';
    }
    echo $products_name;
    ?>

      </tbody>
    </table>

    <p class="text-right"><strong><?php 
    echo SUB_TITLE_SUB_TOTAL;
    ?>
 <?php 
    echo $currencies->format($_SESSION['cart']->show_total());
    ?>
  <div class="alert alert-info"><?php 
    echo OSCOM::getDef('text_create_new_payment_address');
    ?>
</div>

  <?php 
    require 'includes/content/checkout_new_address.php';
    ?>

<?php 
}
?>

  <div class="buttonSet">
    <div class="text-right"><?php 
echo HTML::hiddenField('action', 'submit') . HTML::button(OSCOM::getDef('image_button_continue'), 'fa fa-angle-right', null, null, 'btn-success');
?>
</div>
  </div>

  <div class="clearfix"></div>

  <div class="contentText">
    <div class="stepwizard">
      <div class="stepwizard-row">
        <div class="stepwizard-step">
          <button type="button" class="btn btn-default btn-circle" disabled="disabled">1</button>
          <p><?php 
echo OSCOM::getDef('checkout_bar_delivery');
?>
</p>
예제 #18
0
 function process_button()
 {
     global $order;
     $process_button_string = '';
     $params = array('VPSProtocol' => $this->api_version, 'Vendor' => substr(MODULE_PAYMENT_SAGE_PAY_FORM_VENDOR_LOGIN_NAME, 0, 15));
     if (MODULE_PAYMENT_SAGE_PAY_FORM_TRANSACTION_METHOD == 'Payment') {
         $params['TxType'] = 'PAYMENT';
     } elseif (MODULE_PAYMENT_SAGE_PAY_FORM_TRANSACTION_METHOD == 'Deferred') {
         $params['TxType'] = 'DEFERRED';
     } else {
         $params['TxType'] = 'AUTHENTICATE';
     }
     $crypt = array('ReferrerID' => 'C74D7B82-E9EB-4FBD-93DB-76F0F551C802', 'VendorTxCode' => substr(date('YmdHis') . '-' . $_SESSION['customer_id'] . '-' . $_SESSION['cartID'], 0, 40), 'Amount' => $this->format_raw($order->info['total']), 'Currency' => $_SESSION['currency'], 'Description' => substr(STORE_NAME, 0, 100), 'SuccessURL' => OSCOM::link('checkout_process.php'), 'FailureURL' => OSCOM::link('checkout_payment.php', 'payment_error=' . $this->code), 'CustomerName' => substr($order->billing['firstname'] . ' ' . $order->billing['lastname'], 0, 100), 'CustomerEMail' => substr($order->customer['email_address'], 0, 255), 'BillingSurname' => substr($order->billing['lastname'], 0, 20), 'BillingFirstnames' => substr($order->billing['firstname'], 0, 20), 'BillingAddress1' => substr($order->billing['street_address'], 0, 100), 'BillingCity' => substr($order->billing['city'], 0, 40), 'BillingPostCode' => substr($order->billing['postcode'], 0, 10), 'BillingCountry' => $order->billing['country']['iso_code_2']);
     if ($crypt['BillingCountry'] == 'US') {
         $crypt['BillingState'] = tep_get_zone_code($order->billing['country']['id'], $order->billing['zone_id'], '');
     }
     $crypt['BillingPhone'] = substr($order->customer['telephone'], 0, 20);
     $crypt['DeliverySurname'] = substr($order->delivery['lastname'], 0, 20);
     $crypt['DeliveryFirstnames'] = substr($order->delivery['firstname'], 0, 20);
     $crypt['DeliveryAddress1'] = substr($order->delivery['street_address'], 0, 100);
     $crypt['DeliveryCity'] = substr($order->delivery['city'], 0, 40);
     $crypt['DeliveryPostCode'] = substr($order->delivery['postcode'], 0, 10);
     $crypt['DeliveryCountry'] = $order->delivery['country']['iso_code_2'];
     if ($crypt['DeliveryCountry'] == 'US') {
         $crypt['DeliveryState'] = tep_get_zone_code($order->delivery['country']['id'], $order->delivery['zone_id'], '');
     }
     if (tep_not_null(MODULE_PAYMENT_SAGE_PAY_FORM_VENDOR_EMAIL)) {
         $crypt['VendorEMail'] = substr(MODULE_PAYMENT_SAGE_PAY_FORM_VENDOR_EMAIL, 0, 255);
     }
     switch (MODULE_PAYMENT_SAGE_PAY_FORM_SEND_EMAIL) {
         case 'No One':
             $crypt['SendEMail'] = 0;
             break;
         case 'Customer and Vendor':
             $crypt['SendEMail'] = 1;
             break;
         case 'Vendor Only':
             $crypt['SendEMail'] = 2;
             break;
     }
     if (tep_not_null(MODULE_PAYMENT_SAGE_PAY_FORM_CUSTOMER_EMAIL_MESSAGE)) {
         $crypt['eMailMessage'] = substr(MODULE_PAYMENT_SAGE_PAY_FORM_CUSTOMER_EMAIL_MESSAGE, 0, 7500);
     }
     $contents = array();
     foreach ($order->products as $product) {
         $product_name = $product['name'];
         if (isset($product['attributes'])) {
             foreach ($product['attributes'] as $att) {
                 $product_name .= '; ' . $att['option'] . '=' . $att['value'];
             }
         }
         $contents[] = str_replace(array(':', "\n", "\r", '&'), '', $product_name) . ':' . $product['qty'] . ':' . $this->format_raw($product['final_price']) . ':' . $this->format_raw($product['tax'] / 100 * $product['final_price']) . ':' . $this->format_raw($product['tax'] / 100 * $product['final_price'] + $product['final_price']) . ':' . $this->format_raw(($product['tax'] / 100 * $product['final_price'] + $product['final_price']) * $product['qty']);
     }
     foreach ($this->getOrderTotalsSummary() as $ot) {
         $contents[] = str_replace(array(':', "\n", "\r", '&'), '', strip_tags($ot['title'])) . ':---:---:---:---:' . $this->format_raw($ot['value']);
     }
     $crypt['Basket'] = substr(sizeof($contents) . ':' . implode(':', $contents), 0, 7500);
     $crypt['Apply3DSecure'] = '0';
     $crypt_string = '';
     foreach ($crypt as $key => $value) {
         $crypt_string .= $key . '=' . trim($value) . '&';
     }
     $crypt_string = substr($crypt_string, 0, -1);
     $params['Crypt'] = $this->encryptParams($crypt_string);
     foreach ($params as $key => $value) {
         $process_button_string .= HTML::hiddenField($key, $value);
     }
     return $process_button_string;
 }
예제 #19
0
echo HTML::form('advanced_search', OSCOM::link('advanced_search_result.php', '', false), 'get', 'class="form-horizontal" onsubmit="return check_form(this);"', ['session_id' => true]);
?>

<div class="contentContainer">

  <div class="contentText">
    <div class="form-group has-feedback">
      <label for="inputKeywords" class="control-label col-sm-3"><?php 
echo OSCOM::getDef('heading_search_criteria');
?>
</label>
      <div class="col-sm-9">
        <?php 
echo HTML::inputField('keywords', '', 'required aria-required="true" id="inputKeywords" placeholder="' . OSCOM::getDef('text_search_placeholder') . '"', 'search');
echo OSCOM::getDef('form_required_input');
echo HTML::hiddenField('search_in_description', '1');
?>
      </div>
    </div>

    <div class="buttonSet row">
      <div class="col-xs-6"><a data-toggle="modal" href="#helpSearch" class="btn btn-primary"><?php 
echo OSCOM::getDef('text_search_help_link');
?>
</a></div>
      <div class="col-xs-6 text-right"><?php 
echo HTML::button(OSCOM::getDef('image_button_search'), 'fa fa-search', null, null, 'btn-success');
?>
</div>
    </div>
예제 #20
0
<?php 
    } else {
        if (sizeof($_SESSION['navigation']->snapshot) > 0) {
            $back_link = OSCOM::link($_SESSION['navigation']->snapshot['page'], tep_array_to_string($_SESSION['navigation']->snapshot['get'], array(session_name())));
        } else {
            $back_link = OSCOM::link('address_book.php');
        }
        ?>

  <div class="buttonSet row">
    <div class="col-xs-6"><?php 
        echo HTML::button(OSCOM::getDef('image_button_back'), 'fa fa-angle-left', $back_link);
        ?>
</div>
    <div class="col-xs-6 text-right"><?php 
        echo HTML::hiddenField('action', 'process') . HTML::button(OSCOM::getDef('image_button_continue'), 'fa fa-angle-right');
        ?>
</div>
  </div>

<?php 
    }
    ?>

</div>

</form>

<?php 
}
?>
예제 #21
0
<?php 
if (tep_not_null($order->info['comments'])) {
    ?>

  <div class="page-header">
    <h4><?php 
    echo '<strong>' . HEADING_ORDER_COMMENTS . '</strong> ' . HTML::button(TEXT_EDIT, 'glyphicon glyphicon-edit', OSCOM::link('checkout_payment.php'), NULL, NULL, 'pull-right btn-default btn-xs');
    ?>
</h4>
  </div>

  <div class="contentText">
    <blockquote>
      <small><?php 
    echo nl2br(tep_output_string_protected($order->info['comments'])) . HTML::hiddenField('comments', $order->info['comments']);
    ?>
</small>
    </blockquote>
  </div>

<?php 
}
?>

  <div class="contentText">

<?php 
if (is_array($payment_modules->modules)) {
    echo $payment_modules->process_button();
}
예제 #22
0
function tep_cfg_braintree_cc_set_merchant_accounts($value, $key)
{
    if (!class_exists('currencies')) {
        include DIR_WS_CLASSES . 'currencies.php';
    }
    $data = array();
    foreach (explode(';', $value) as $ma) {
        list($a, $currency) = explode(':', $ma);
        $data[$currency] = $a;
    }
    $currencies = new currencies();
    $c_array = array_keys($currencies->currencies);
    sort($c_array);
    $result = '';
    foreach ($c_array as $c) {
        if ($c == DEFAULT_CURRENCY) {
            $result .= '<strong>';
        }
        $result .= $c . ':';
        if ($c == DEFAULT_CURRENCY) {
            $result .= '</strong>';
        }
        $result .= '&nbsp;' . HTML::inputField('braintree_ma[' . $c . ']', isset($data[$c]) ? $data[$c] : '') . '<br />';
    }
    if (!empty($result)) {
        $result = substr($result, 0, -6);
    }
    $result .= HTML::hiddenField('configuration[' . $key . ']', $value);
    $result .= <<<EOD
<script>
\$(function() {
  \$('form[name="modules"]').submit(function() {
    var ma_string = '';

    \$('form[name="modules"] input[name^="braintree_ma["]').each(function() {
      if ( \$(this).val().length > 0 ) {
        ma_string += \$(this).val() + ':' + \$(this).attr('name').slice(13, -1) + ';';
      }
    });

    if ( ma_string.length > 0 ) {
      ma_string = ma_string.slice(0, -1);
    }

    \$('form[name="modules"] input[name="configuration[{$key}]"]').val(ma_string);
  })
});
</script>
EOD;
    return $result;
}
예제 #23
0
use OSC\OM\HTML;
use OSC\OM\OSCOM;
chdir('../../../../');
require 'includes/application_top.php';
// if the customer is not logged on, redirect them to the login page
if (!isset($_SESSION['customer_id'])) {
    $_SESSION['navigation']->set_snapshot(array('page' => 'checkout_payment.php'));
    OSCOM::redirect('login.php');
}
if (isset($_GET['payment_error']) && tep_not_null($_GET['payment_error'])) {
    $redirect_url = OSCOM::link('checkout_payment.php', 'payment_error=' . $_GET['payment_error'] . (isset($_GET['error']) && tep_not_null($_GET['error']) ? '&error=' . $_GET['error'] : ''));
} else {
    $hidden_params = '';
    if ($_SESSION['payment'] == 'sage_pay_direct') {
        $redirect_url = OSCOM::link('checkout_process.php', 'check=3D');
        $hidden_params = HTML::hiddenField('MD', $_POST['MD']) . HTML::hiddenField('PaRes', $_POST['PaRes']);
    } else {
        $redirect_url = OSCOM::link('checkout_success.php');
    }
}
$OSCOM_Language->loadDefinitions('checkout_confirmation');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html <?php 
echo OSCOM::getDef('html_params');
?>
>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php 
echo OSCOM::getDef('charset');
?>
예제 #24
0
                        echo '&nbsp;';
                    } else {
                        echo $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0));
                        ?>
&nbsp;&nbsp;<?php 
                        echo HTML::radioField('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], null, 'required aria-required="true"');
                    }
                    ?>
        </td>

<?php 
                } else {
                    ?>

        <td align="right"><?php 
                    echo $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0)) . HTML::hiddenField('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id']);
                    ?>
</td>

<?php 
                }
                ?>

        </tr>
<?php 
            }
        }
        ?>

      </tbody>
    </table>
예제 #25
0
function bm_card_acceptance_edit_logos($values, $key)
{
    $files_array = array();
    if ($dir = @dir(OSCOM::getConfig('dir_root', 'Shop') . 'images/card_acceptance')) {
        while ($file = $dir->read()) {
            if (!is_dir(OSCOM::getConfig('dir_root', 'Shop') . 'images/card_acceptance/' . $file)) {
                if (in_array(substr($file, strrpos($file, '.') + 1), array('gif', 'jpg', 'png'))) {
                    $files_array[] = $file;
                }
            }
        }
        sort($files_array);
        $dir->close();
    }
    $values_array = !empty($values) ? explode(';', $values) : array();
    $output = '<h3>' . OSCOM::getDef('module_boxes_card_acceptance_shown_cards') . '</h3>' . '<ul id="ca_logos" style="list-style-type: none; margin: 0; padding: 5px; margin-bottom: 10px;">';
    foreach ($values_array as $file) {
        $output .= '<li style="padding: 2px;">' . HTML::image(OSCOM::linkImage('Shop/card_acceptance/' . $file), $file) . HTML::hiddenField('bm_card_acceptance_logos[]', $file) . '</li>';
    }
    $output .= '</ul>';
    $output .= '<h3>' . OSCOM::getDef('module_boxes_card_acceptance_new_cards') . '</h3><ul id="new_ca_logos" style="list-style-type: none; margin: 0; padding: 5px; margin-bottom: 10px;">';
    foreach ($files_array as $file) {
        if (!in_array($file, $values_array)) {
            $output .= '<li style="padding: 2px;">' . HTML::image(OSCOM::linkImage('Shop/card_acceptance/' . $file), $file) . HTML::hiddenField('bm_card_acceptance_logos[]', $file) . '</li>';
        }
    }
    $output .= '</ul>';
    $output .= HTML::hiddenField('configuration[' . $key . ']', '', 'id="ca_logo_cards"');
    $drag_here_li = '<li id="caLogoEmpty" style="background-color: #fcf8e3; border: 1px #faedd0 solid; color: #a67d57; padding: 5px;">' . addslashes(OSCOM::getDef('module_boxes_card_acceptance_drag_here')) . '</li>';
    $output .= <<<EOD
<script>
\$(function() {
  var drag_here_li = '{$drag_here_li}';

  if ( \$('#ca_logos li').length < 1 ) {
    \$('#ca_logos').append(drag_here_li);
  }

  \$('#ca_logos').sortable({
    connectWith: '#new_ca_logos',
    items: 'li:not("#caLogoEmpty")',
    stop: function (event, ui) {
      if ( \$('#ca_logos li').length < 1 ) {
        \$('#ca_logos').append(drag_here_li);
      } else if ( \$('#caLogoEmpty').length > 0 ) {
        \$('#caLogoEmpty').remove();
      }
    }
  });

  \$('#new_ca_logos').sortable({
    connectWith: '#ca_logos',
    stop: function (event, ui) {
      if ( \$('#ca_logos li').length < 1 ) {
        \$('#ca_logos').append(drag_here_li);
      } else if ( \$('#caLogoEmpty').length > 0 ) {
        \$('#caLogoEmpty').remove();
      }
    }
  });

  \$('#ca_logos, #new_ca_logos').disableSelection();

  \$('form[name="modules"]').submit(function(event) {
    var ca_selected_cards = '';

    if ( \$('#ca_logos li').length > 0 ) {
      \$('#ca_logos li input[name="bm_card_acceptance_logos[]"]').each(function() {
        ca_selected_cards += \$(this).attr('value') + ';';
      });
    }

    if (ca_selected_cards.length > 0) {
      ca_selected_cards = ca_selected_cards.substring(0, ca_selected_cards.length - 1);
    }

    \$('#ca_logo_cards').val(ca_selected_cards);
  });
});
</script>
EOD;
    return $output;
}
예제 #26
0
</h1>
</div>

<?php 
if ($messageStack->size('account_password') > 0) {
    echo $messageStack->output('account_password');
}
?>

<?php 
echo HTML::form('account_password', OSCOM::link('account_password.php'), 'post', 'class="form-horizontal"', ['tokenize' => true, 'action' => 'process']);
?>

<?php 
$Qcustomer = $OSCOM_Db->get('customers', 'customers_email_address', ['customers_id' => (int) $_SESSION['customer_id']]);
echo HTML::hiddenField('username', $Qcustomer->value('customers_email_address'), 'readonly autocomplete="username"');
?>

<div class="contentContainer">
  <p class="text-danger text-right"><?php 
echo OSCOM::getDef('form_required_information');
?>
</p>

  <div class="contentText">
    <div class="form-group has-feedback">
      <label for="inputCurrent" class="control-label col-sm-3"><?php 
echo OSCOM::getDef('entry_password_current');
?>
</label>
      <div class="col-sm-9">
예제 #27
0
    $Qr->bindInt(':products_id', $Qproduct->valueInt('products_id'));
    $Qr->bindInt(':languages_id', $OSCOM_Language->getId());
    $Qr->execute();
    if ($Qr->fetch() !== false) {
        $has_rating = true;
        echo '<span itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"><meta itemprop="ratingValue" content="' . $Qr->value('avgrating') . '" /><meta itemprop="ratingCount" content="' . $Qr->value('count') . '" /></span>';
    }
    ?>

  <div class="buttonSet row">
    <div class="col-xs-6"><?php 
    echo HTML::button(OSCOM::getDef('image_button_reviews') . ($has_rating === true ? ' (' . $Qr->value('count') . ')' : ''), 'fa fa-commenting', OSCOM::link('product_reviews.php', tep_get_all_get_params()));
    ?>
</div>
    <div class="col-xs-6 text-right"><?php 
    echo HTML::hiddenField('products_id', $Qproduct->valueInt('products_id')) . HTML::button(OSCOM::getDef('image_button_in_cart'), 'fa fa-shopping-cart', null, null, 'btn-success btn-product-info btn-buy');
    ?>
</div>
  </div>

  <div class="row">
    <?php 
    echo $oscTemplate->getContent('product_info');
    ?>
  </div>

<?php 
    include 'includes/content/also_purchased_products.php';
    if ($Qproduct->valueInt('manufacturers_id') > 0) {
        $Qm = $OSCOM_Db->get('manufacturers', 'manufacturers_name', ['manufacturers_id' => $Qproduct->valueInt('manufacturers_id')]);
        if ($Qm->fetch() !== false) {
예제 #28
0
<?php 
    }
    $has_rating = false;
    $Qr = $OSCOM_Db->prepare('select count(*) as count, avg(reviews_rating) as avgrating from :table_reviews r, :table_reviews_description rd where r.products_id = :products_id and r.reviews_id = rd.reviews_id and rd.languages_id = :languages_id and reviews_status = 1');
    $Qr->bindInt(':products_id', $Qproduct->valueInt('products_id'));
    $Qr->bindInt(':languages_id', $_SESSION['languages_id']);
    $Qr->execute();
    if ($Qr->fetch() !== false) {
        $has_rating = true;
        echo '<span itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"><meta itemprop="ratingValue" content="' . $Qr->value('avgrating') . '" /><meta itemprop="ratingCount" content="' . $Qr->value('count') . '" /></span>';
    }
    ?>

  <div class="row">
    <div class="col-sm-6 text-right pull-right"><?php 
    echo HTML::hiddenField('products_id', $Qproduct->valueInt('products_id')) . HTML::button(IMAGE_BUTTON_IN_CART, 'glyphicon glyphicon-shopping-cart', null, 'primary', null, 'btn-success');
    ?>
</div>
    <div class="col-sm-6"><?php 
    echo HTML::button(IMAGE_BUTTON_REVIEWS . ($has_rating === true ? ' (' . $Qr->value('count') . ')' : ''), 'glyphicon glyphicon-comment', OSCOM::link('product_reviews.php', tep_get_all_get_params()));
    ?>
</div>
  </div>

  </form>

  <div class="row">
    <?php 
    echo $oscTemplate->getContent('product_info');
    ?>
  </div>
예제 #29
0
        <label for="webRoot">Webserver Root Directory</label>
        <?php 
echo HTML::inputField('DIR_FS_DOCUMENT_ROOT', str_replace('\\', '/', FileSystem::displayPath($dir_fs_www_root)), 'required aria-required="true" id="webRoot"');
?>
        <span class="help-block">The directory where the online store is installed on the server.</span>
      </div>

      <p><?php 
echo HTML::button('Continue to Step 3', 'triangle-1-e', null, null, 'btn-success');
?>
</p>

<?php 
foreach ($_POST as $key => $value) {
    if ($key != 'x' && $key != 'y') {
        echo HTML::hiddenField($key, $value);
    }
}
?>

    </form>
  </div>

  <div class="col-xs-12 col-sm-pull-9 col-sm-3">
    <div class="panel panel-success">
      <div class="panel-heading">
        <div class="panel-title">
          Step 2: Web Server
        </div>
      </div>
예제 #30
0
                    $product_categories_string = substr($product_categories_string, 0, -4);
                    $contents[] = array('text' => $product_categories_string);
                    $contents[] = array('text' => HTML::button(OSCOM::getDef('image_delete'), 'fa fa-trash', null, null, 'btn-danger') . HTML::button(OSCOM::getDef('image_cancel'), null, OSCOM::link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id), null, 'btn-link'));
                }
                break;
            case 'move_product':
                $heading[] = array('text' => OSCOM::getDef('text_info_heading_move_product'));
                $contents = array('form' => HTML::form('products', OSCOM::link(FILENAME_CATEGORIES, 'action=move_product_confirm&cPath=' . $cPath)) . HTML::hiddenField('products_id', $pInfo->products_id));
                $contents[] = array('text' => OSCOM::getDef('text_move_products_intro', ['products_name' => $pInfo->products_name]));
                $contents[] = array('text' => OSCOM::getDef('text_info_current_categories') . '<br /><strong>' . tep_output_generated_category_path($pInfo->products_id, 'product') . '</strong>');
                $contents[] = array('text' => OSCOM::getDef('text_move', ['item_name' => $pInfo->products_name]) . '<br />' . HTML::selectField('move_to_category_id', tep_get_category_tree(), $current_category_id));
                $contents[] = array('text' => HTML::button(OSCOM::getDef('image_move'), 'fa fa-share', null, null, 'btn-success') . HTML::button(OSCOM::getDef('image_cancel'), null, OSCOM::link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id), null, 'btn-link'));
                break;
            case 'copy_to':
                $heading[] = array('text' => OSCOM::getDef('text_info_heading_copy_to'));
                $contents = array('form' => HTML::form('copy_to', OSCOM::link(FILENAME_CATEGORIES, 'action=copy_to_confirm&cPath=' . $cPath)) . HTML::hiddenField('products_id', $pInfo->products_id));
                $contents[] = array('text' => OSCOM::getDef('text_info_copy_to_intro'));
                $contents[] = array('text' => OSCOM::getDef('text_info_current_categories') . '<br /><strong>' . tep_output_generated_category_path($pInfo->products_id, 'product') . '</strong>');
                $contents[] = array('text' => OSCOM::getDef('text_categories') . '<br />' . HTML::selectField('categories_id', tep_get_category_tree(), $current_category_id));
                $contents[] = array('text' => OSCOM::getDef('text_how_to_copy') . '<br />' . HTML::radioField('copy_as', 'link', true) . ' ' . OSCOM::getDef('text_copy_as_link') . '<br />' . HTML::radioField('copy_as', 'duplicate') . ' ' . OSCOM::getDef('text_copy_as_duplicate'));
                $contents[] = array('text' => HTML::button(OSCOM::getDef('image_copy'), 'fa fa-copy', null, null, 'btn-success') . HTML::button(OSCOM::getDef('image_cancel'), null, OSCOM::link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id), null, 'btn-link'));
                break;
        }
        if (tep_not_null($heading) && tep_not_null($contents)) {
            $show_listing = false;
            echo HTML::panel($heading, $contents, ['type' => 'info']);
        }
    }
}
if ($show_listing === true) {
    ?>