Ejemplo n.º 1
0
 public function display()
 {
     $tools = new idealo_csv_tools();
     $missing_config_db = $tools->getConfigurationValue('MODULE_IDEALO_CSV_MISSING_CONFIG');
     $missing_config_file = '';
     $missing_config_separator = '';
     $missing_config_separator_to_long = '';
     $missing_config_shipping = '';
     $missing_config_payment = '';
     $missing_config_costs_idealo_DE_active = '';
     $missing_config_costs_idealo_DE_active = '';
     $missing_config_format_idealo_AT_shipping = '';
     $missing_config_format_idealo_AT_shipping = '';
     if ($missing_config_db != '') {
         if (strpos($missing_config_db, "file") !== false) {
             $missing_config_file = IDEALO_TEXT_MISSING_CONFIG;
         }
         if (strpos($missing_config_db, "separator") !== false) {
             $missing_config_separator = IDEALO_TEXT_MISSING_SEPARATOR . '<br><br>';
         }
         if (strpos($missing_config_db, "to_long") !== false) {
             $missing_config_separator_to_long = IDEALO_TEXT_MISSING_SEPARATOR_TO_LONG . '<br><br>';
         }
         if (strpos($missing_config_db, "shipping") !== false && strpos($missing_config_db, "shippingDE") === false) {
             $missing_config_shipping = IDEALO_TEXT_MISSING_SHIPPING;
         }
         if (strpos($missing_config_db, "payment") !== false) {
             $missing_config_payment = IDEALO_TEXT_MISSING_PAYMENT;
         }
         if (strpos($missing_config_db, "idealo_DE_active") !== false) {
             $missing_config_costs_idealo_DE_active = IDEALO_TEXT_MISSING_COSTS_IDEALO_DE;
         }
         if (strpos($missing_config_db, "idealo_AT_active") !== false) {
             $missing_config_costs_idealo_AT_active = IDEALO_TEXT_MISSING_COSTS_IDEALO_DE;
         }
         if (strpos($missing_config_db, "shippingDElenght") !== false || strpos($missing_config_db, "shippingDEone") !== false) {
             $missing_config_format_idealo_DE_shipping = '<font color="#FF0000"><b>* ' . IDEALO_TEXT_WRONG_COSTS_FORMAT_DE . '</b></font>';
         }
         if (strpos($missing_config_db, "shippingATlenght") !== false || strpos($missing_config_db, "shippingATone") !== false) {
             $missing_config_format_idealo_AT_shipping = '<font color="#FF0000"><b>* ' . IDEALO_TEXT_WRONG_COSTS_FORMAT_AT . '</b></font>';
         }
     }
     $button_text = 'Exportieren';
     $customers_statuses_array = xtc_get_customers_statuses();
     $ship_text = '';
     $tools->getShipping();
     $this->shipping = $tools->shipping;
     foreach ($this->shipping as $ship) {
         if ($ship['country'] == 'DE') {
             $ship_text .= $this->getDisplayShip($ship, $missing_config_costs_idealo_DE_active, $missing_config_format_idealo_DE_shipping);
         }
         if ($ship['country'] == 'AT') {
             $ship_text .= $this->getDisplayShip($ship, $missing_config_costs_idealo_AT_active, $missing_config_format_idealo_AT_shipping);
         }
     }
     $payment_text = '';
     $tools->getPayment();
     $this->payment = $tools->payment;
     foreach ($this->payment as $payment) {
         $payment_text .= $this->getDisplayPayment($payment);
     }
     $article_filter_array[] = array('id' => 'filter', 'text' => 'filtern');
     $article_filter_array[] = array('id' => 'export', 'text' => 'exportieren');
     $article_filter = IDEALO_CSV_ARTICLE_FILTER . '<br>' . IDEALO_CSV_ARTICLE_FILTER_SELECTION . '<br>' . xtc_draw_pull_down_menu('article_filter', $article_filter_array, $tools->getConfigurationValue('MODULE_IDEALO_CSV_ARTICLE_FILTER')) . '<br><br>' . IDEALO_CSV_ARTICLE_FILTER_TEXT . '<br>' . xtc_draw_input_field('article_filter_value', $tools->getConfigurationValue('MODULE_IDEALO_CSV_ARTICLE_FILTER_VALUE')) . '<br><br>';
     $brand_filter_array[] = array('id' => 'filter', 'text' => 'filtern');
     $brand_filter_array[] = array('id' => 'export', 'text' => 'exportieren');
     $brand_filter = IDEALO_CSV_BRAND_FILTER . '<br>' . IDEALO_CSV_BRAND_FILTER_SELECTION . '<br>' . xtc_draw_pull_down_menu('brand_filter', $brand_filter_array, $tools->getConfigurationValue('MODULE_IDEALO_CSV_BRAND_FILTER')) . '<br><br>' . IDEALO_CSV_BRAND_FILTER_TEXT . '<br>' . xtc_draw_input_field('brand_filter_value', $tools->getConfigurationValue('MODULE_IDEALO_CSV_BRAND_FILTER_VALUE')) . '<br><br>';
     $cat_filter_array[] = array('id' => 'filter', 'text' => 'filtern');
     $cat_filter_array[] = array('id' => 'export', 'text' => 'exportieren');
     $cat_filter = IDEALO_CSV_CAT_FILTER . '<br>' . IDEALO_CSV_CAT_FILTER_SELECTION . '<br>' . xtc_draw_pull_down_menu('cat_filter', $cat_filter_array, $tools->getConfigurationValue('MODULE_IDEALO_CSV_CAT_FILTER')) . '<br><br>' . IDEALO_CSV_CAT_FILTER_TEXT . '<br>' . xtc_draw_input_field('cat_filter_value', $tools->getConfigurationValue('MODULE_IDEALO_CSV_CAT_FILTER_VALUE')) . '<br><br>';
     $tools->getMinorderValues();
     $minOrderDisplay = IDEALO_CSV_MIN_ORDER_TITLE . '<br><br>' . IDEALO_CSV_MIN_ORDER_VALUE . '<br>' . xtc_draw_input_field('idealo_csv_minOrder_input', $tools->minOrder) . '<br>' . IDEALO_CSV_MIN_ORDER_TEXT . '<br><br>' . IDEALO_CSV_MIN_EXTRA_COSTS . '<br>' . xtc_draw_input_field('idealo_csv_minOrderPrice_input', $tools->minOrderPrice) . '<br>' . IDEALO_CSV_MIN_ORDER_PRICE_TEXT . '<br>' . IDEALO_CSV_MIN_ORDER_BORDER_VALUE . '<br>' . xtc_draw_input_field('idealo_csv_minOrderBorder_input', $tools->minorderBorder) . '<br>' . IDEALO_CSV_MIN_ORDER_BORDER_TEXT;
     return array('text' => $missing_config_file . '<br>' . FIELDSEPARATOR . '<br>' . FIELDSEPARATOR_HINT_IDEALO . '<br>' . xtc_draw_small_input_field('idealo_csv_separator_input', IDEALO_CSV_SEPARATOR) . '<br><br>' . $missing_config_separator . $missing_config_separator_to_long . QUOTING . '<br>' . QUOTING_HINT . '<br><br>' . xtc_draw_small_input_field('idealo_csv_quoting_input', IDEALO_CSV_QUOTECHAR) . '<br><br>' . SHIPPING . '<br>' . $missing_config_shipping . '<br><br>' . $ship_text . SHIPPINGCOMMENT . '<br>' . SHIPPINGCOMMENT_HINT . '<br>' . xtc_draw_input_field('shippingcomment_input', $tools->getConfigurationValue('MODULE_IDEALO_CSV_SHIPPINGCOMMENT')) . '<br><br>' . PAYMENT . '<br>' . $missing_config_payment . '<br><br>' . $payment_text . $article_filter . $brand_filter . $cat_filter . $minOrderDisplay . '<br><br>' . $this->displayExportKonfigs() . IDEALO_CSV_EXPORT_TEXT . xtc_button(BUTTON_EXPORT) . '<font size="+1">*</font> ' . '<input id ="export" type="hidden" name="export" value="yes">' . xtc_button_link(BUTTON_CANCEL, xtc_href_link(FILENAME_MODULE_EXPORT, 'set=' . $_GET['set'] . '&module=idealo')) . EXPORT . '<br><br>' . TEXT_WARANTY_IDEALO_CSV);
 }
            }
            ?>
            </div>
            <div align="left" style="padding-left:5px;"><a class="btn btn-default" onclick="W4B_graduated_prices_edit_removerow(this);" href="<?php 
            echo xtc_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&function=delete&quantity=' . $staffel_values['quantity'] . '&statusID=' . $group_data[$col]['STATUS_ID'] . '&action=new_product&pID=' . $_GET['pID']);
            ?>
"><?php 
            echo BUTTON_DELETE;
            ?>
</a></div>
          </div>          
          <?php 
        }
        echo '</table>';
        echo TXT_STK;
        echo xtc_draw_small_input_field('products_quantity_staffel_' . $group_data[$col]['STATUS_ID'], 0);
        echo TXT_PRICE;
        echo xtc_draw_input_field('products_price_staffel_' . $group_data[$col]['STATUS_ID'], 0);
        echo '&nbsp;<input type="submit" name="graduated_prices_edit" class="btn btn-default" onclick="W4B_graduated_prices_edit_addrow(this, ' . $group_data[$col]['STATUS_ID'] . ');" value="' . BUTTON_INSERT . '"/>';
        ?>
        <br />
      </div>
    </div>
  </div>
<?php 
    }
}
W4B_graduated_prices_edit_logic();
?>
  <div class='col-xs-12'>
    <div class='col-sm-6 col-xs-12 main'><?php