Exemplo n.º 1
0
      }
    });
  }
</script>

<?php 
echo $html->form('index');
?>
  <input type="submit" value="<?php 
echo MODULE_EASY_ADMIN_PRODUCTS_LIST;
?>
">
</form>
<div>
<?php 
echo TEXT_INFO_ID . $products_id . ' ' . zen_get_products_model($products_id) . ' - ' . zen_get_products_name($products_id);
?>
</div>
<?php 
global $zco_notifier;
$zco_notifier->notify('NOTIFY_EASY_ADMIN_PRODUCTS_FINISH_DISPLAY_SEARCH_FORM');
?>


<div class="listBox">
<table border="0" class="tableLayout3" width="100%" cellspacing="0" cellpadding="0">
  <?php 
require dirname(__FILE__) . '/products_attributes_list.php';
?>
</table>
</div>
Exemplo n.º 2
0
          <tr class="attributeBoxContent"><td><table><tr>
            <td class="attributeBoxContent" width="40">&nbsp;<?php 
            echo $next_id;
            ?>
&nbsp;</td>
      	    <td class="pageHeading" valign="top">&nbsp;
              <input type="hidden" name="products_id" value="<?php 
            echo $products_filter;
            ?>
">
              <input type="hidden" name="current_category_id" value="<?php 
            echo $current_category_id;
            ?>
">
      	      <?php 
            $show_model = zen_get_products_model($products_filter);
            if (!empty($show_model)) {
                $show_model = " - (" . $show_model . ")";
            }
            echo zen_clean_html(zen_get_products_name($products_filter)) . $show_model;
            ?>
      	    </td>
          </tr></table></td></tr>
          <tr class="attributeBoxContent"><td><table><tr>
            <td class="attributeBoxContent" width="40">&nbsp;</td>
            <td class="attributeBoxContent">&nbsp;<?php 
            echo TABLE_HEADING_OPT_NAME . '<br />';
            ?>
              <select name="options_id" id="OptionName" onChange="update_option(this.form)" size="<?php 
            echo $action != 'delete_attribute' ? "15" : "1";
            ?>
$stock = new easy_admin_products_with_attributes_stock();
if (isset($_GET['easy_admin_products_page'])) {
    $_SESSION['easy_admin_products_page'] = $_GET['easy_admin_products_page'];
}
$language_id = 2;
if (isset($_SESSION['languages_id'])) {
    $language_id = (int) $_SESSION['languages_id'];
}
$html = new easy_admin_products_html();
$action = $_REQUEST['action'];
$products_id = (int) $_REQUEST['products_id'];
if (!zen_products_id_valid($products_id)) {
    zen_redirect(zen_href_link(FILENAME_ADDON_MODULES_ADMIN, 'module=easy_admin_products&page=' . $_SESSION['easy_admin_products_page']));
}
$products_name = zen_get_products_name($products_id);
$products_model = zen_get_products_model($products_id);
$products_quantity = $stock->get_products_quantity($products_id);
$hidden_form = '';
switch ($action) {
    case 'add':
        $product_attributes = $stock->get_products_attributes($products_id, $language_id);
        $hidden_form .= zen_draw_hidden_field('products_id', $products_id) . "\n";
        break;
    case 'edit':
        $stock_id = (int) $_REQUEST['stock_id'];
        $stock_attributes = $stock->get_stock_attributes($products_id, $stock_id);
        if ($stock_attributes === false) {
            zen_redirect(zen_href_link(FILENAME_ADDON_MODULES_ADMIN, 'module=easy_admin_products/attributes_stock&products_id=' . $products_id, 'NONSSL'));
        }
        $attributes = explode(",", $stock_attributes['stock_attributes']);
        foreach ($attributes as $attribute_id) {