function LoadData($column_width) { $this->dash_array = array(HTML_MDASH, HTML_NDASH); if (DO_GROUP_CHECK) { $group_check = " c." . $this->group_check_group . SQL_AND; } if (!$this->fsk18_check_condition) { $fsk_lock = ' p.products_fsk18!=1 ' . SQL_AND; } $query = "language_id='" . $this->_pdf_lang . APOS; $query = SELECT . "\n\t\t\t\t\tp.products_id,\n\t\t\t\t\tp.products_model,\n\t\t\t\t\tp.products_image,\n\t\t\t\t\tp.products_fsk18,\n\t\t\t\t\tp.products_shippingtime,\n\t\t\t\t\tp.products_price,\n p.products_uvp,\n p.products_vpe,\n p.products_vpe_status,\n p.products_vpe_value,\n p.products_baseprice_show,\n p.products_baseprice_value,\n\t\t\t\t\tp.products_min_order_quantity,\n\t\t\t\t\tp.products_min_order_vpe,\n p.products_uvp,\n\t\t\t\t\tpd.products_name,\n\t\t\t\t\tpd.products_short_description,\n\t\t\t\t\tcd.categories_name\n\t\t\t\t\tFROM " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd\n\t\t\t\t\tWHERE\n\t\t\t\t\tc.categories_status=1 " . SQL_AND . $group_check . $fsk_lock . "\n\t\t\t\t\tp.products_status=1 AND\n\t\t\t\t\t(cd.categories_id=c.categories_id AND cd." . $query . ") AND\n\t\t\t\t\t(pd.products_id=p.products_id AND pd." . $query . ") AND\n\t\t\t\t\tptc.categories_id=c.categories_id AND\n\t\t\t\t\tp.products_id=ptc.products_id AND\n\t\t\t\t\tp.products_price > 0 AND\n\t\t\t\t\tpd.products_name <> ''\n\t\t\t\t\tORDER BY cd.categories_name, pd.products_name"; $product_query = olc_db_query($query); $this->data = EMPTY_STRING; if (olc_db_num_rows($product_query)) { $show_shipping = ACTIVATE_SHIPPING_STATUS == TRUE_STRING_S; if ($show_shipping) { if (!$this->shipping_status_name) { $this->shipping_status_name = array(); $this->shipping_status_name[] = EMPTY_STRING; $shipping_status_query = olc_db_query(SELECT . "shipping_status_name" . SQL_FROM . TABLE_SHIPPING_STATUS . " where language_id='" . $this->_pdf_lang . APOS); while ($shipping_status = olc_db_fetch_array($shipping_status_query)) { $this->shipping_status_name[] = $shipping_status['shipping_status_name']; } } } $this->two_lines = $this->descr_lines_height + $this->descr_lines_height; $this->spalte = $this->columns; $this->last_header = EMPTY_STRING; $this->new_page = true; $this->new_height = 0; if (NO_STORE) { $this->data_sets = 1; } $lparen = LPAREN; $rparen = RPAREN; $blank_apos = " '"; $xx = 0; while ($product = olc_db_fetch_array($product_query)) { //W. Kaiser - AJAX $data[$xx][$this->item_name] = prepare_string_item($product['products_name'], 2, $column_width); $data[$xx][$this->item_image] = $product['products_image']; $products_id = $product[products_id]; $data[$xx][$this->item_id] = $products_id; $olPrice = $this->olcCheckSpecial($products_id); if (!$olPrice) { $olPrice = $product['products_price']; } $this_array = array(); olc_get_vpe_and_baseprice_info($this_array, $product, $olPrice); $vpe = $this_array['PRODUCTS_BASEPRICE']; if ($vpe) { $vpe = BLANK . prepare_string_item($vpe, 1, 1000); } $data[$xx][$this->item_price] = TEXT_PRICE . olc_format_price($olPrice, true, true, true, true) . $vpe; $vpe = $this_array['PRODUCTS_UVP']; if ($vpe) { $data[$xx][$this->item_uvp] = strip_tags($vpe); $this->have_uvp = true; } $data[$xx][$this->item_cat_name] = TEXT_PRODUCT_GROUP . $blank_apos . trim($product['categories_name']) . APOS; $vpe = $this_array['PRODUCTS_VPE']; if ($vpe) { $vpe = $lparen . $vpe . $rparen; } $data[$xx][$this->item_model] = TEXT_MODEL_NUMBER . $product['products_model'] . $vpe; $products_short_description = str_replace(HTML_NBSP, BLANK, $product['products_short_description']); $data[$xx][$this->item_sd_1] = prepare_string_item($products_short_description, 1, $column_width); $data[$xx][$this->item_sd_2] = prepare_string_item($products_short_description, 2, $column_width); if ($show_shipping) { $data[$xx][$this->item_shippingtime] = TEXT_SHIPPING_TIME . $this->shipping_status_name[$product['products_shippingtime']]; } $data[$xx][$this->item_pict_disc] = TEXT_PICTURE_DISCLAIMER; $min_qty = $this_array['PRODUCTS_MIN_ORDER_QTY']; if ($min_qty) { $data[$xx][$this->item_min_qty] = $min_qty; } //W. Kaiser - AJAX if (STORE) { $xx++; } else { $this->data = $data; $this->format(); } } if (STORE) { $this->data = $data; } } }
$products_price = -$products_price; $products_price = olc_format_price($products_price, true, true); $products_price_real = str_replace(CURRENCY_DECIMAL_POINT, DOT, $products_price_real); $products_price_real = -$products_price_real; $products_price_real = olc_format_price($products_price_real, true, true); } else { require_once DIR_FS_INC . 'olc_get_smarty_config_variable.inc.php'; $info_smarty->assign('PRODUCTS_SOLD_OUT', olc_get_smarty_config_variable($info_smarty, 'product_info', 'product_not_in_stock')); $products_price = str_replace(DASH, EMPTY_STRING, $products_price); } } else { $products_date_available = EMPTY_STRING; } //W. Kaiser - Baseprice require_once DIR_FS_INC . 'olc_get_vpe_and_baseprice_info.inc.php'; olc_get_vpe_and_baseprice_info($info_smarty, $product_info, $products_price); //W. Kaiser - Baseprice $info_smarty->assign('PRODUCTS_MODEL', $product_info['products_model']); $info_smarty->assign('PRODUCTS_DATE_AVAILABLE', $products_date_available); $info_smarty->assign('PRODUCTS_ADDED', sprintf(TEXT_DATE_ADDED, olc_date_short($product_info['products_date_added']))); $info_smarty->assign('PRODUCTS_PRICE_RAW', $products_price_real); $info_smarty->assign('PRODUCTS_PRICE', $products_price); $info_smarty->assign('PRODUCTS_SPECIALPRICE', $price_special_info); $info_smarty->assign('PRODUCTS_ID', $products_id); $info_smarty->assign('PRODUCTS_QUANTITY', $product_info['products_quantity']); $info_smarty->assign('PRODUCTS_WEIGHT', $product_info['products_weight']); $info_smarty->assign('PRODUCTS_STATUS', $products_status); $info_smarty->assign('PRODUCTS_ORDERED', $product_info['products_ordered']); $info_smarty->assign('GENERAL_DISCLAIMER', GENERAL_DISCLAIMER); //W. Kaiser - AJAX $info_smarty->assign('PRODUCTS_DATE_ADDED', $product_info['products_date_added']);
$startprice = min($startprice, abs($special_price)); } $products_tax_rate = olc_get_tax_rate($products_values['products_tax_class_id']); if ((int) $products_tax_rate > 0) { $t = 100 + $products_tax_rate; $startprice = $startprice * $t / 100; } $t = max($quantity, $products_min_order_quantity); $startprice = $startprice * $t; $products_values[$binprice_text] = round($startprice, CURRENCY_DECIMAL_PLACES); $olPrice = round($startprice * 0.5, CURRENCY_DECIMAL_PLACES); $products_values[$startprice_text] = $olPrice; $products_values[$country_text] = $country; include_once DIR_FS_INC . 'olc_get_vpe_and_baseprice_info.inc.php'; $vpe = array(); olc_get_vpe_and_baseprice_info($vpe, $products_values, $olPrice, true); $min_order_quantity = $vpe['PRODUCTS_MIN_ORDER_QTY']; if ($min_order_quantity) { $min_order_quantity = BLANK . $min_order_quantity; } $base_price = $vpe['PRODUCTS_BASEPRICE']; $vpe = $vpe['PRODUCTS_VPE']; if ($vpe) { $vpe = BOX_PRODUCTS_VPE . COLON . $vpe; } $products_values[$bold_text] = ZERO_STRING; $products_values[$highlight_text] = ZERO_STRING; $products_values[$border_text] = ZERO_STRING; $products_values[$transfer_text] = ONE_STRING; $products_values[$cod_text] = ONE_STRING; $products_values[$cop_text] = ONE_STRING;
if (IS_IE) { $title = "\n\n"; } else { $title = " -- "; } $title = $products_name . $title . $s . $title . TEXT_FURTHER_INFO; $image = olc_image(DIR_WS_THUMBNAIL_IMAGES . $image, $title); } if (CUSTOMER_SHOW_PRICE) { $price = abs($best_sellers['products_price']); $tax_class = $best_sellers['products_tax_class_id']; if (OL_COMMERCE) { $olPrice = round($price, CURRENCY_DECIMAL_PLACES); include_once DIR_FS_INC . 'olc_get_vpe_and_baseprice_info.inc.php'; $vpe = array(); olc_get_vpe_and_baseprice_info($vpe, $best_sellers, $olPrice); $vpe = $vpe['PRODUCTS_VPE']; include DIR_FS_INC . 'olc_get_price_disclaimer.inc.php'; $tax_info = $price_disclaimer; if (CUSTOMER_SHOW_PRICE_TAX) { $price = olc_add_tax($price, $tax_class); } $price = olc_format_price($price, true, true); } else { if (!is_object($product)) { $product = new product(); } $vpe = $product->getVPEtext($best_sellers, $price); $price = $xtPrice->xtcFormat($price, true, $tax_class, true, false); $tax_info = $main->getTaxInfo(olc_get_tax_rate($tax_class)); $picture_disclaimer = EMPTY_STRING;
$parameter = 'products_id=' . $products_id; if ($do_slide_show) { $link = 'javascript:slideshow_stop(0);ShowInfo(\'' . $link . QUESTION . $parameter . AMP . 'pop_up=true' . '\', \'\');"'; } $products_link = olc_href_link($products_link, $parameter); } if ($not_do_boxes) { if ($get_price_disclaimer) { $price_disclaimer = sprintf(PRICE_DISCLAIMER_INCL, $price_data['PRODUCTS_TAX_VALUE']); } $price = $special_info['specials_new_products_price']; if (!$price) { $price = $products_price_real; } $this_array = array('BUTTON_DETAIL' => olc_image(CURRENT_TEMPLATE_BUTTONS . 'button_detail.gif', $title), 'PRODUCTS_MODEL' => $products_listing['products_model'], 'PRODUCTS_BUTTON_BUY_NOW' => $buy_now, 'PRODUCTS_BUTTON_NOT_BUY_NOW' => $not_buy_now, 'PRODUCTS_FSK18' => $fsk18, 'SHOW_NEW_MARKER' => $ShowNewMarker, 'SHIPPING_NAME' => $shipping_status_name, 'SHIPPING_IMAGE' => $shipping_status_image, 'PRICE_DISCLAIMER' => $price_disclaimer, 'PICTURE_DISCLAIMER' => PICTURE_DISCLAIMER, 'PRODUCTS_ID' => $products_id); olc_get_vpe_and_baseprice_info($this_array, $products_listing, $price); if (DO_PROMOTION) { if (strpos($products_listing_template, 'promotion') !== false) { $products_promotion_image = $products_listing['products_promotion_image']; if ($products_promotion_image) { $products_image = olc_image(DIR_WS_PROMOTION_IMAGES . $products_promotion_image, $title); } $this_array = array_merge($this_array, array('PRODUCTS_PROMOTION_SHOW_TITLE' => $products_listing['products_promotion_show_title'], 'PRODUCTS_PROMOTION_TITLE' => $products_listing['products_promotion_title'], 'PRODUCTS_PROMOTION_SHOW_DESCRIPTION' => $products_listing['products_promotion_show_desc'], 'PRODUCTS_PROMOTION_DESCRIPTION' => $products_listing['products_promotion_desc'])); } } } $this_array = array_merge($this_array, array('PRODUCTS_IMAGE' => $products_image, 'PRODUCTS_PRICE_RAW' => $products_price_real, 'PRODUCTS_PRICE' => $price_display, 'PRODUCTS_SPECIALPRICE' => $products_price_special_info, 'PRODUCTS_LINK' => $products_link)); } else { if (strlen($products_date_available) > 0) { $products_date_available = olc_date_short($products_date_available); }
} if (DO_GROUP_CHECK) { $group_check = " and p." . SQL_GROUP_CONDITION; } $products_id = (int) $_SESSION[TRACKING][PRODUCTS_HISTORY][$random_last_viewed]; $random_query = SELECT . "\n\tp.products_id,\n\tpd.products_name,\n\tp.products_price,\n\tp.products_tax_class_id,\n\tp.products_image,\n\tp.products_vpe,\n\tp.products_vpe_status,\n\tp.products_vpe_value,\n\tp2c.categories_id,\n\tcd.categories_name\n\tfrom " . TABLE_PRODUCTS . " p,\t" . TABLE_PRODUCTS_DESCRIPTION . " pd," . TABLE_PRODUCTS_TO_CATEGORIES . " p2c,\t" . TABLE_CATEGORIES_DESCRIPTION . " cd\n\twhere\n\tp.products_status = 1\n\tand p.products_id = " . $products_id . "\n\tand pd.products_id = " . $products_id . "\n\tand p2c.products_id = " . $products_id . "\n\tand pd.language_id = " . SESSION_LANGUAGE_ID . "\n\tand cd.categories_id = p2c.categories_id " . $group_check . $fsk_lock . "\n\tand cd.language_id = " . SESSION_LANGUAGE_ID; $random_query = olc_db_query($random_query); $random_product = olc_db_fetch_array($random_query, true); if (CUSTOMER_SHOW_PRICE) { $random_products_price = abs($random_product['products_price']); $tax_class = $random_product['products_tax_class_id']; if (OL_COMMERCE) { $olPrice = round($random_products_price, CURRENCY_DECIMAL_PLACES); include_once DIR_FS_INC . 'olc_get_vpe_and_baseprice_info.inc.php'; $vpe = array(); olc_get_vpe_and_baseprice_info($vpe, $random_product, $olPrice); $vpe = $vpe['PRODUCTS_VPE']; include DIR_FS_INC . 'olc_get_price_disclaimer.inc.php'; $tax_info = $price_disclaimer; if (CUSTOMER_SHOW_PRICE_TAX) { $random_products_price = olc_add_tax($random_products_price, $tax_class); } } else { $random_products_price_real = $random_products_price; if (!is_object($product)) { $product = new product(); } $vpe = $product->getVPEtext($random_product, $random_products_price); $random_products_price = $xtPrice->xtcFormat($random_products_price, true, $tax_class, true, false); $tax_info = $main->getTaxInfo(olc_get_tax_rate($tax_class)); $picture_disclaimer = EMPTY_STRING;