public static function getConfig() { static $config; if (!is_object($config)) { JPluginHelper::importPlugin('jshopping'); $dispatcher = JDispatcher::getInstance(); $db = JFactory::getDBO(); $config = new jshopConfig($db); include dirname(__FILE__) . "/default_config.php"; if (file_exists(dirname(__FILE__) . "/user_config.php")) { include dirname(__FILE__) . "/user_config.php"; } $dispatcher->trigger('onBeforeLoadJshopConfig', array($config)); $config->load($config->load_id); $config->loadOtherConfig(); $config->loadCurrencyValue(); $config->loadFrontLand(); $config->loadLang(); $config->parseConfigVars(); $dispatcher->trigger('onLoadJshopConfig', array(&$config)); } return $config; }
public static function getConfig() { static $config; if (!is_object($config)) { JPluginHelper::importPlugin('jshopping'); $dispatcher = JDispatcher::getInstance(); $db = JFactory::getDBO(); $config = new jshopConfig($db); include dirname(__FILE__) . "/default_config.php"; if (file_exists(dirname(__FILE__) . "/user_config.php")) { include dirname(__FILE__) . "/user_config.php"; } $dispatcher->trigger('onBeforeLoadJshopConfig', array($config)); $config->load($config->load_id); $config->loadOtherConfig(); $config->loadCurrencyValue(); $config->loadFrontLand(); $config->loadLang(); list($config->pdf_header_width, $config->pdf_header_height, $config->pdf_footer_width, $config->pdf_footer_height) = explode(":", $config->pdf_parameters); if (!$config->allow_reviews_prod) { unset($config->sorting_products_field_select[5]); unset($config->sorting_products_name_select[5]); unset($config->sorting_products_field_s_select[5]); unset($config->sorting_products_name_s_select[5]); } if ($config->product_count_related_in_row < 1) { $config->product_count_related_in_row = 1; } if ($config->user_as_catalog) { $config->show_buy_in_category = 0; } if (!$config->stock) { $config->hide_product_not_avaible_stock = 0; $config->hide_buy_not_avaible_stock = 0; $config->hide_text_product_not_available = 1; $config->product_list_show_qty_stock = 0; $config->product_show_qty_stock = 0; } if ($config->hide_product_not_avaible_stock || $config->hide_buy_not_avaible_stock) { $config->controler_buy_qty = 1; } else { $config->controler_buy_qty = 0; } $config->display_price_front_current = $config->getDisplayPriceFront(); // 0 - Brutto, 1 - Netto if ($config->template == "") { $config->template = "default"; } if ($config->show_product_code || $config->show_product_code_in_cart) { $config->show_product_code_in_order = 1; } else { $config->show_product_code_in_order = 0; } if ($config->admin_show_vendors == 0) { $config->vendor_order_message_type = 0; //0 - none, 1 - mesage, 2 - order if not multivendor $config->admin_not_send_email_order_vendor_order = 0; $config->product_show_vendor = 0; $config->product_show_vendor_detail = 0; } $config->copyrightText = '<span id="mxcpr"><a target="_blank" href="https://www.webdesigner-profi.de/">' . $config->getCopyrightText() . '</a></span>'; if ($config->image_resize_type == 0) { $config->image_cut = 1; $config->image_fill = 2; } elseif ($config->image_resize_type == 1) { $config->image_cut = 0; $config->image_fill = 2; } else { $config->image_cut = 0; $config->image_fill = 0; } if (!$config->tax) { $config->show_tax_in_product = 0; $config->show_tax_product_in_cart = 0; $config->hide_tax = 1; } if (!$config->admin_show_delivery_time) { $config->show_delivery_time = 0; $config->show_delivery_time_checkout = 0; $config->show_delivery_time_step5 = 0; $config->display_delivery_time_for_product_in_order_mail = 0; $config->show_delivery_date = 0; } if (!$config->admin_show_product_basic_price) { $config->cart_basic_price_show = 0; } if (!$config->admin_show_weight) { $config->product_show_weight = 0; $config->product_list_show_weight = 0; } $config->use_ssl = intval($config->use_ssl); $dispatcher->trigger('onLoadJshopConfig', array(&$config)); } return $config; }