function olc_create_navigation_links($cart_is_filled, $is_logogff) { global $smarty; $sep = HTML_NBSP . "|" . HTML_NBSP; $a_end = '">'; $index = "index"; if ($cart_is_filled) { require_once DIR_FS_INC . 'olc_get_smarty_config_variable.inc.php'; $my_navigation = HTML_A_START . olc_href_link(FILENAME_SHOPPING_CART) . $a_end . olc_get_smarty_config_variable($smarty, $index, "link_cart") . HTML_A_END; $my_navigation .= $sep . HTML_A_START . olc_href_link(FILENAME_CHECKOUT_SHIPPING) . $a_end . olc_get_smarty_config_variable($smarty, $index, "link_checkout") . HTML_A_END; } $login_link = HTML_A_START . olc_href_link(FILENAME_LOGIN) . $a_end . olc_get_smarty_config_variable($smarty, $index, "link_login") . HTML_A_END; if ($my_navigation) { $my_navigation .= $sep; } if ($is_logogff) { $my_navigation .= $login_link; } else { if (ISSET_CUSTOMER_ID) { $my_navigation .= HTML_A_START . olc_href_link(FILENAME_LOGOFF) . $a_end . olc_get_smarty_config_variable($smarty, $index, "link_logoff") . HTML_A_END; if (CUSTOMER_STATUS_ID != DEFAULT_CUSTOMERS_STATUS_ID_GUEST) { $my_navigation .= $sep . HTML_A_START . olc_href_link(FILENAME_ACCOUNT) . $a_end . olc_get_smarty_config_variable($smarty, $index, "link_account") . HTML_A_END; } } else { $my_navigation .= $login_link; } } $my_navigation .= HTML_NBSP; $smarty->assign(BOX_NAVIGATION, $my_navigation); }
$module_content_save = $module_content; include_once DIR_WS_MODULES . 'order_details_cart.php'; $module_content = $module_content_save; $show_saved_cart = false; } } else { $parameters = 'basket_id=' . $basket_id; $cart_content = EMPTY_STRING; } $link = olc_href_link(CURRENT_SCRIPT, $parameters); $date = $basket['basket_date_added']; $date = substr($date, 6, 2) . DOT . substr($date, 4, 2) . DOT . substr($date, 0, 4); $module_content[] = array('show_order_details' => $show_order_details, 'BOX_SELECT' => olc_draw_radio_field('cart_select[]', $basket_id, $selected), 'NAME' => $basket['basket_name'], 'DATE' => $date, 'BOX_DELETE' => olc_draw_checkbox_field('cart_delete[]', $basket_id), 'LINK' => $link); } } else { $error_message = olc_get_smarty_config_variable($smarty, 'shopping_cart', 'text_no_saved_cart'); } $cart_restore_text = 'cart_restore'; if ($error_message) { $module_smarty->assign('ERROR_MESSAGE', $error_message); } else { $module_smarty->assign(MODULE_CONTENT, $module_content); if ($bid) { $MODULE_order_details_text = 'MODULE_order_details'; $module_smarty->assign($MODULE_order_details_text, $smarty->_tpl_vars[$MODULE_order_details_text]); $smarty->assign($MODULE_order_details_text, EMPTY_STRING); } } $module_smarty->assign('FORM_ACTION', olc_draw_form($cart_restore_text, $cart_restore_text . PHP . '?process=true')); $module_smarty->assign('BUTTON_CONTINUE', olc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE)); $main_content = $module_smarty->fetch(CURRENT_TEMPLATE_MODULE . $cart_restore_text . HTML_EXT, $cache_id);
if ($next_id != sizeof($p_data) - 1) { $last_link = olc_href_link(FILENAME_PRODUCT_INFO, $products_id_param_text . $p_data[sizeof($p_data) - 1]['pID'], NONSSL, false); } } $s1 = '">' . HASH . HTML_A_END . HTML_NBSP; $s2 = '" title="'; $first_link = HTML_A_START . $first_link . $s2 . TEXT_NAVIGATION_FIRST . $s1; $prev_link = HTML_A_START . $prev_link . $s2 . TEXT_NAVIGATION_PREVIOUS . $s1; $next_link = HTML_A_START . $next_link . $s2 . TEXT_NAVIGATION_NEXT . $s1; $last_link = HTML_A_START . $last_link . $s2 . TEXT_NAVIGATION_LAST . $s1; $s = CURRENT_TEMPLATE_BUTTONS . 'button_product_'; $first_image = $s . 'first.gif'; if (file_exists($first_image)) { $first_link = str_replace(HASH, olc_image($first_image), $first_link); $prev_link = str_replace(HASH, olc_image($s . 'previous.gif'), $prev_link); $next_link = str_replace(HASH, olc_image($s . 'next.gif'), $next_link); $last_link = str_replace(HASH, olc_image($s . 'last.gif'), $last_link); } else { $s = 'product_navigator'; $first_link = str_replace(HASH, olc_get_smarty_config_variable($module_smarty, $s, 'first'), $first_link); $prev_link = str_replace(HASH, olc_get_smarty_config_variable($module_smarty, $s, 'back'), $prev_link); $next_link = str_replace(HASH, olc_get_smarty_config_variable($module_smarty, $s, 'next'), $next_link); $last_link = str_replace(HASH, olc_get_smarty_config_variable($module_smarty, $s, 'last'), $last_link); } $module_smarty->assign('FIRST', $first_link); $module_smarty->assign('PREVIOUS', $prev_link); $module_smarty->assign('NEXT', $next_link); $module_smarty->assign('LAST', $last_link); $module_smarty->assign('PRODUCTS_COUNT', count($p_data)); $product_navigator = $module_smarty->fetch(CURRENT_TEMPLATE_MODULE . 'product_navigator' . HTML_EXT, $cacheid); $info_smarty->assign('PRODUCT_NAVIGATOR', $product_navigator);
function ProductsDataSheet($languages_id, $products_id) { global $currencies; global $docfilename; //Convertion pixels -> mm $this->pdf_to_mm_faktor = 1 / $this->k; $imagewidth = PRODUCT_IMAGE_INFO_WIDTH * $this->pdf_to_mm_faktor; $imageheight = PRODUCT_IMAGE_INFO_HEIGHT * $this->pdf_to_mm_faktor; //W. Kaiser -- AJAX //Use 'product_info.php' also for printing!! $isprint_version = true; $is_pdf = true; include DIR_WS_MODULES . 'product_info.php'; //W. Kaiser -- AJAX global $products_data; //Get Data fram Smarty $products_data = array(); $products_data[] = $imagewidth; $products_data[] = $imageheight; while (list($key, $value) = each($info_smarty->_tpl_vars)) { $products_data[$key] = $value; } require_once DIR_FS_INC . 'olc_get_smarty_config_variable.inc.php'; $products_data['SHIPPING_DESC'] = olc_get_smarty_config_variable($info_smarty, 'product_info', 'text_shippingtime'); $this->AddPage(); $this->DrawCells($products_data); $this->SetY(max($this->y_after_description, $this->y_after_image) + $this->cells_height); if (PDF_SHOW_OPTIONS) { $products_options_name_sql = "\n\t\t\t\tselect distinct\n\t\t\t\tpopt.products_options_id,\n\t\t\t\tpopt.products_options_name\n\t\t\t\tfrom " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib\n\t\t\t\twhere\n\t\t\t\tpatrib.products_id='" . $products_id . "' and\n\t\t\t\tpatrib.options_id = popt.products_options_id and\n\t\t\t\tpopt.language_id = '" . SESSION_LANGUAGE_ID . APOS; $products_options_name = olc_db_query($products_options_name_sql); if (olc_db_num_rows($products_options_name)) { $this->DrawSeparatorLine(); //pov.products_options_values_thumbnail, $products_options_sql0 = "\n\t\t\t\tselect\n\t\t\t\tpov.products_options_values_id,\n\t\t\t\tpov.products_options_values_name,\n\t\t\t\tpa.options_values_price,\n\t\t\t\tpa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where\n\t\t\t\tpa.products_id = '" . $products_id . "'\n\t\t\t\tand pa.options_id = '#'\n\t\t\t\tand pa.options_values_id = pov.products_options_values_id\n\t\t\t\tand pov.language_id = '" . SESSION_LANGUAGE_ID . "'\n\t\t\t\torder by pov.products_options_values_name"; $this->SetFont($this->font, BOLD, 10); $special_price_color_text = explode(COMMA, PDF_SPECIAL_PRICE_COLOR_TEXT); $this->SetTextColor($special_price_color_text[0], $special_price_color_text[1], $special_price_color_text[2]); $this->MultiCell(0, 8, TEXT_PRODUCTS_OPTIONS . $print_catalog_array['name'], 0, LEFT, 0); $this->SetFont($this->font, EMPTY_STRING, 8); $options_color_text = explode(COMMA, PDF_OPTIONS_COLOR); $this->SetTextColor($options_color_text[0], $options_color_text[1], $options_color_text[2]); $options_color_text = explode(COMMA, PDF_OPTIONS_BG_COLOR); $this->SetFillColor($options_color_text[0], $options_color_text[1], $options_color_text[2]); if (PDF_OPTIONS_AS_IMAGES_ENABLED == TRUE_STRING_S) { //OAI query if (PDF_SHOW_OPTIONS_VERTICAL != 0) { while ($products_options_name_values = olc_db_fetch_array($products_options_name)) { $this->Ln(6); $this->SetFont($this->font, BOLD, 11); $this->Cell(190, $this->cells_height, $products_options_name_values['products_options_name'], 0, 0, LEFT); $this->Ln(); $products_options_sql = str_replace(HASH, $products_options_name_values['products_options_id'], $products_options_sql0); $products_options = olc_db_query($products_options_sql); $count_options_values = olc_db_num_rows($products_options); $count_options = 0; $largest_y = $this->GetY(); //OAI query $products_options_query = olc_db_query($products_options_query_sql); while ($products_options_values = olc_db_fetch_array($products_options_query)) { $products_options_values_name = $products_options_values['products_options_values_name']; $w = $this->GetStringWidth($products_options_values_name) + 2; $this->SetFont($this->font, EMPTY_STRING, 10); $this->SetTextColor($body_color_text[0], $body_color_text[1], $body_color_text[2]); $option_string = $products_options_values_name; $current_x = $this->GetX(); if (PDF_SHOW_OPTIONS_PRICE) { $options_values_price = $products_options_values['options_values_price']; if ($options_values_price != ' 0.0000') { $option_string .= LPAREN . $products_options_values['price_prefix'] . olc_format_price($options_values_price, true, true, true) . RPAREN; } } $count_options++; $add_to = $count_options_values != $count_options ? ',' : '.'; $this->Write($this->cells_height, $option_string . $add_to); $largest_y = $this->GetY(); $next_x = $this->GetX(); if ($products_options_name_values['products_options_images_enabled'] == TRUE_STRING_S) { $path_to_image = DIR_IMAGE . 'options/' . $products_options_values['products_options_values_thumbnail']; $img_size = GetImageSize($path_to_image); $img_h = $img_size[1] * $this->pdf_to_mm_faktor; $img_w = $img_size[0] * $this->pdf_to_mm_faktor; if ($next_x < $current_x + $img_w) { $next_x = $current_x + $img_w; } $current_y = $this->GetY(); $image_y = $this->GetY() + $this->cells_height; $largest_y = $image_y + $img_h; $this->SetY($image_y); $this->SetX($current_x); $this->ShowImage($img_w, $img_h, $path_to_image); //, false, 0); $this->SetY($current_y); $this->SetX($next_x); } $this->Cell(3, 6, EMPTY_STRING, 0, 0, CENTER); $this->SetTextColor('Black'); } $this->SetY($largest_y); } } else { // Option values are displayed vertically while ($products_options_name_values = olc_db_fetch_array($products_options_name)) { $this->Ln(6); $this->SetFont($this->font, BOLD, 11); $this->Cell(190, $this->cells_height, $products_options_name_values['products_options_name'], 0, 0, LEFT); $this->Ln(); $products_options_sql = str_replace(HASH, $products_options_name_values['products_options_id'], $products_options_sql0); $products_options = olc_db_query($products_options_sql); $count_options_values = olc_db_num_rows($products_options); //OAI query $products_options_query = olc_db_query($products_options_query_sql); // Loop on all option values while ($products_options_values = olc_db_fetch_array($products_options_query)) { $this->SetFont($this->font, EMPTY_STRING, 9); $this->SetTextColor($body_color_text[0], $body_color_text[1], $body_color_text[2]); $option_string = $products_options_values['products_options_values_name']; if (PDF_SHOW_OPTIONS_PRICE) { $options_values_price = $products_options_values['options_values_price']; if ($options_values_price != ' 0.0000') { $option_string .= LPAREN . $products_options_values['price_prefix'] . olc_format_price($options_values_price, true, true, true) . RPAREN; } } $count_options++; $add_to = $count_options_values != $count_options ? ',' : '.'; $this->Write($this->cells_height, $option_string . $add_to); if ($products_options_name_values['products_options_images_enabled'] == TRUE_STRING_S) { $path_to_image = DIR_IMAGE . 'options/' . $products_options_values['products_options_values_thumbnail']; $img_size = GetImageSize($path_to_image); $img_h = $img_size[1] * $this->pdf_to_mm_faktor; $img_w = $img_size[0] * $this->pdf_to_mm_faktor; $this->SetX(50); $this->ShowImage($img_w, $img_h, $path_to_image); //, false, 0); $this->SetX(0); } $this->Ln(); } // end loop on options values } // end loop on options } } else { $this->Ln(-$this->cells_height); while ($products_options_name_values = olc_db_fetch_array($products_options_name)) { $this->Ln($this->cells_height); $this->SetFont($this->font, BOLD, 11); $this->Cell($this->w, $this->cells_height, $products_options_name_values['products_options_name'], 0, 0, LEFT); $this->Ln(); $products_options_sql = str_replace(HASH, $products_options_name_values['products_options_id'], $products_options_sql0); $products_options = olc_db_query($products_options_sql); $option_string = EMPTY_STRING; $count_options_values = olc_db_num_rows($products_options); $count_options = 0; while ($products_options_values = olc_db_fetch_array($products_options)) { $option_string .= $products_options_values['products_options_values_name']; //. $option_value; if (PDF_SHOW_OPTIONS_PRICE) { $options_values_price = $products_options_values['options_values_price']; if ($options_values_price != ' 0.0000') { $option_string .= LPAREN . $products_options_values['price_prefix'] . olc_format_price($options_values_price, true, true, true) . RPAREN; } } $count_options++; $option_string .= $count_options_values != $count_options ? COMMA_BLANK : DOT; } $this->SetFont($this->font, EMPTY_STRING, 8); $w = $this->w - $this->lMargin - $this->rMargin; $this->SetX($this->lMargin); $this->MultiCell($w, $this->cells_height, $option_string, 0, LEFT, 1); } } } } $s = $products_data['PRODUCTS_SOLD_OUT']; if ($s) { $this->Ln($this->cells_height * 2); $y = $this->GetY(); $this->SetTextColor('red'); $this->SetFont($this->font, BOLD, $this->FontSizePt); $s = strip_tags($s); $this->Text($this->lMargin, $y, $s); $s1 = $products_data['PRODUCTS_DATE_AVAILABLE']; if ($s1) { $this->SetTextColor('Darkgreen'); $this->Text($this->lMargin + $this->GetStringWidth($s), $y, BLANK . strip_tags($s1)); } $this->Ln($this->cells_height); } if (PDF_SHOW_DATE_ADDED_AVAILABLE) { //Date available $s = $products_data['PRODUCTS_DATE_ADDED']; if ($s) { $x = $this->GetX(); $y = $this->GetY(); $this->SetFont($this->font, ITALIC, 9); $this->Ln($this->cells_height); $new_color_table = explode(COMMA, PDF_HEADER_COLOR_TABLE); $this->SetFillColor($new_color_table[0], $new_color_table[1], $new_color_table[2]); $product_name_color_text = explode(COMMA, PDF_PRODUCT_NAME_COLOR_TEXT); $this->SetTextColor($product_name_color_text[0], $product_name_color_text[1], $product_name_color_text[2]); $this->MultiCell(0, $this->cells_height, sprintf(TEXT_DATE_ADDED, olc_date_short($s)), 0, LEFT, 1); } } }
$products_status = EMPTY_STRING; } } else { $products_date_available = EMPTY_STRING; } } if ($products_date_available == EMPTY_STRING) { $products_price = str_replace(CURRENCY_DECIMAL_POINT, DOT, $products_price); $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);
$fernag_text = 'fernag'; $smarty->assign('AGB_checkbox', olc_draw_checkbox_field($conditions_text, TRUE_STRING_S, $_SESSION[$conditions_text])); $checkout_confirmation = 'checkout_confirmation'; $accept_agb = 'accept_agb'; $s = olc_get_smarty_config_variable($smarty, $checkout_confirmation, 'text_' . $accept_agb); $smarty->assign(strtoupper($accept_agb), str_replace(ATSIGN, SESSION_LANGUAGE, $s)); //Only display FernAG-Info for a customer in germany or austria from a shop in the same country! if (CUSTOMER_COUNTRY_ID == STORE_COUNTRY && (STORE_COUNTRY == 81 || STORE_COUNTRY == 14)) { // W. Kaiser if (!isset($_SESSION[$fernag_text])) { $s = $_POST[$fernag_text]; $_SESSION[$fernag_text] = $s ? $s : $_GET[$fernag_text]; } $s = olc_draw_checkbox_field($fernag_text, TRUE_STRING_S, $_SESSION[$fernag_text]); } else { $s = olc_draw_hidden_field($fernag_text, TRUE_STRING_S); } $smarty->assign('FERNAG_checkbox', $s); $accept_fernag = 'accept_fernag'; $s = olc_get_smarty_config_variable($smarty, $checkout_confirmation, 'text_' . $accept_fernag); $smarty->assign(strtoupper($accept_fernag), str_replace(ATSIGN, SESSION_LANGUAGE, $s)); $smarty->assign('CHECKOUT_BUTTON', olc_image_submit('button_confirm_order.gif', IMAGE_BUTTON_CONFIRM_ORDER)); $smarty->assign('GENERAL_DISCLAIMER', GENERAL_DISCLAIMER); $error_message = $_GET['error_message']; if ($error_message) { $smarty->assign('error', nl2br($error_message)); } require BOXES; $main_content = $smarty->fetch(CURRENT_TEMPLATE_MODULE . 'checkout_confirmation' . HTML_EXT, SMARTY_CACHE_ID); $smarty->assign(MAIN_CONTENT, $main_content); $smarty->display(INDEX_HTML);
break; } $class_order_step_text = 'class_'; $class_order_link_start_text = 'LINK_START_'; $class_order_link_end_text = 'LINK_END_'; for ($i = 1; $i <= 4; $i++) { if ($i < 3) { if ($i < $order_step) { $box_smarty->assign($class_order_link_start_text . $i, HTML_A_START . olc_href_link($links[$i]) . '" title="' . $titles[$i] . '" style="cursor:hand">'); $box_smarty->assign($class_order_link_end_text . $i, HTML_A_END); } } $box_smarty->assign($class_order_step_text . $i, $classes[$i]); } $order_steps_text = 'order_steps'; $box_template = BOX . $order_steps_text; $is_graphic_mode = is_file(CURRENT_TEMPLATE_IMG . $order_steps_text . '_1_normal.gif'); if ($is_graphic_mode) { $box_template .= UNDERSCORE . "graphic"; } $step_text = olc_get_smarty_config_variable($box_smarty, $order_steps_text, $step_text . '_text'); $you_are_here_text = 'you_are_here_text' . $step_text_finished; $you_are_here_text = olc_get_smarty_config_variable($box_smarty, $order_steps_text, $you_are_here_text); if ($order_step == 4) { $step_text = $you_are_here_text; } else { $step_text = sprintf($you_are_here_text, 4 - $order_step, $order_step . DOT . BLANK . $step_text); } $box_smarty->assign('step_text', $step_text); $box_content = $box_smarty->fetch(CURRENT_TEMPLATE_BOXES . $box_template . HTML_EXT, $cacheid); $smarty->assign('ORDER_STEPS', $box_content);
function olc_smarty_init(&$smarty, &$cacheid, $full_init = true) { global $http_protocol, $server; //Set common Smarty data if (defined('CURRENT_TEMPLATE')) { define('FULL_CURRENT_TEMPLATE', TEMPLATE_PATH . CURRENT_TEMPLATE . SLASH); } else { $tpl_path = $tpl_path; } if (!is_object($smarty)) { //Create smarty elements $smarty = new Smarty(); } $tpl_path = FULL_CURRENT_TEMPLATE; $template_dir = 'templates'; $template_c_dir = 'cache/templates_c' . SLASH; $compile_dir = 'cache/templates_c/' . CURRENT_TEMPLATE; $config_dir = 'lang'; $cache_dir = 'cache'; if (IS_ADMIN_FUNCTION) { $compile_dir = ADMIN_PATH_PREFIX . $compile_dir; $smarty->cache_dir = ADMIN_PATH_PREFIX . $cache_dir; //$config_dir=ADMIN_PATH_PREFIX.$config_dir; $template_dir = ADMIN_PATH_PREFIX . $template_dir; $tpl_path = ADMIN_PATH_PREFIX . $tpl_path; $smarty->assign('tpl_path_catalog', $tpl_path); $tpl_path .= "admin" . SLASH; } $smarty->cache_dir = $cache_dir; $smarty->compile_dir = $compile_dir; $smarty->config_dir = $config_dir; $smarty->template_dir = $template_dir; if ($full_init) { $not_have_dir = !is_dir($compile_dir); if ($not_have_dir) { $compile_dirs = array($compile_dir, $template_c_dir); for ($i = 0, $n = sizeof($compile_dirs); $i < $n; $i++) { $compile_dir = $compile_dirs[$i]; @mkdir($compile_dir); $ok_rights = is_dir($compile_dir); if ($ok_rights) { $ok_rights = decoct(fileperms($compile_dir)) >= 0777; $error = TEXT_SMARTY_COMPILE_DIR_RIGHTS; } else { $error = TEXT_NO_SMARTY_COMPILE_DIR; } if (!$ok_rights) { if (IS_ADMIN_FUNCTION) { $lang_dir = $config_dir . SLASH . SESSION_LANGUAGE . SLASH; require ADMIN_PATH_PREFIX . $lang_dir . SESSION_LANGUAGE . PHP; } my_error_handler(E_USER_ERROR, sprintf($error, $compile_dir)); } } } else { $ok_rights = decoct(fileperms($compile_dir)) >= 0777; } if ($ok_rights) { /* $traceArr = debug_backtrace(); $s = str_replace('\\',SLASH,strtolower($traceArr[0]['file'])); $s = str_replace(strtolower(DIR_FS_CATALOG),EMPTY_STRING,$s); $smarty->assign('initted_in',$s.COLON.$traceArr[0]['line']); */ $smarty->assign('tpl_path', $tpl_path); $smarty->assign('PROJECT_VERSION', PROJECT_VERSION); $smarty->assign('OL_COMMERCE', true); $smarty->assign('USE_AJAX', USE_AJAX); $smarty->assign('FORM_END', '</form>'); $use_caching = USE_CACHE == TRUE_STRING_S; if ($use_caching) { $smarty->cache_lifetime = CACHE_LIFETIME; $smarty->cache_modified_check = CACHE_CHECK; $caret = "^"; $cacheid = SESSION_LANGUAGE_ID . $caret . CUSTOMER_ID . $caret . str_replace(DOT, "%", $_SERVER['REMOTE_ADDR'] . $caret . CURRENT_SCRIPT); } if (defined('SESSION_LANGUAGE')) { $smarty->assign('language', SESSION_LANGUAGE); $smarty->assign('HTTP_PROTOCOL', $http_protocol); $smarty->assign('SERVER', $server); $s = 'SMARTY_CACHE_ID'; if (defined($s)) { $text_footer = $_SESSION[$text_footer_text]; } else { define($s, $cacheid); $text_footer_text = 'text_footer'; $text_footer = $_SESSION[$text_footer_text]; if (!$text_footer) { $text_footer = olc_get_smarty_config_variable($smarty, 'index', 'text_footer'); $text_footer = str_replace(HASH, STORE_NAME, $text_footer) . PROJECT_VERSION . HTML_A_END; $s = 'GENERAL_DISCLAIMER'; if (defined($s)) { if (GENERAL_DISCLAIMER) { $text_footer .= HTML_BR . '<font style="font-weight:normal">' . constant($s) . '</font>'; } } $_SESSION[$text_footer_text] = $text_footer; } } $smarty->assign($text_footer_text, $text_footer); } } else { my_error_handler(E_USER_ERROR, sprintf(TEXT_SMARTY_COMPILE_DIR_RIGHTS, $compile_dir)); } } $smarty->caching = $use_caching; }
while (list($name, $value) = each($products)) { $sql_data_array[$name] = $value; } $sql_data_array['customers_basket_id'] = $basket_id; olc_db_perform(TABLE_CUSTOMERS_BASKET_ATTRIBUTES_SAVE, $sql_data_array); } } $force_cart_update_only = true; unset($_SESSION['checked_saved_carts']); $_SESSION[$id_saved_carts_text] = $basket_id; $show_form = true; $error_message = olc_get_smarty_config_variable($smarty, 'shopping_cart', 'text_saved_cart'); $error_message = str_replace(HASH, $cart_name, $error_message); } else { $show_form = true; $error_message = olc_get_smarty_config_variable($smarty, 'boxes', 'text_empty_cart'); } } else { $show_form = true; } if ($show_form) { olc_smarty_init($module_smarty, $cache_id); $cart_save_text = 'cart_save'; if ($error_message) { $module_smarty->assign('ERROR_MESSAGE', $error_message); } else { $module_smarty->assign('FORM_ACTION', olc_draw_form($cart_save_text, $cart_save_text . PHP . '?process=true')); $module_smarty->assign('BUTTON_CONTINUE', olc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE)); $module_smarty->assign('main_content', olc_draw_input_field(NAVBAR_TITLE_SHOPPING_CART, $cart_name0, 'size="80"')); unset($_SESSION['checked_saved_carts']); }
$customers_send_mail = YES; } display_radio_field(EMPTY_STRING, ENTRY_MAIL, $field_desc_width, 'customers_mail', array('yes', 'no'), array(YES, NO), $customers_send_mail, $error, $entry_mail_error, ENTRY_MAIL_ERROR, EMPTY_STRING); echo field_start(ENTRY_MAIL_COMMENTS, $field_desc_width, EMPTY_STRING, EMPTY_STRING) . olc_draw_textarea_field('mail_comments', 'soft', '60', '5', $mail_comments) . '</td> </tr>'; } } else { display_pulldown_menu(EMPTY_STRING, ENTRY_NEWSLETTER, EMPTY_STRING, 'customers_newsletter', $cInfo->customers_newsletter, $newsletter_array, NOT_REQUIRED, 0, EMPTY_STRING); include DIR_WS_MODULES . FILENAME_CUSTOMER_MEMO; } display_category_end(); } } elseif ($IsAccount) { if ($_SESSION['customer_default_address_id'] != $_GET['edit']) { require_once DIR_FS_INC . 'olc_get_smarty_config_variable.inc.php'; $entry_primary_text = olc_get_smarty_config_variable($smarty, 'address_book_process', 'text_standard'); display_checkbox_field('CHECKBOX_PRIMARY', $entry_primary_text, EMPTY_STRING, 'primary', 'on', EMPTY_STRING . $error, EMPTY_STRING, EMPTY_STRING); $smarty->assign('CHECKBOX_PRIMARY', true); } $smarty->assign('IS_ACCOUNT', true); } if ($IsUserMode) { $smarty->assign('BUTTON_SUBMIT', olc_image_submit($image, $alt)); $main_content = $smarty->fetch(CURRENT_TEMPLATE_MODULE . SMARTY_TEMPLATE . HTML_EXT, SMARTY_CACHE_ID); if (!defined('SMARTY_TARGET_AREA')) { define('SMARTY_TARGET_AREA', MAIN_CONTENT); } $smarty->assign(SMARTY_TARGET_AREA, $main_content); if ($not_IsCheckout) { require BOXES; $smarty->display(INDEX_HTML);
$conditions = '<iframe SRC="' . DIR_WS_CATALOG . 'media/content/' . $shop_content_data['content_file'] . '" width="100%" height="500" style="background-color:transparent";>'; $conditions .= '</iframe>'; } else { $conditions = '<textarea name="blabla" cols="60" rows="10" readonly="readonly">' . strip_tags(str_replace(HTML_BR, NEW_LINE, $shop_content_data['content_text'])) . '</textarea>'; } $smarty->assign('FORM_ACTION', olc_draw_form('ec_checkout', FILENAME_EC_PROCESS, olc_href_link(FILENAME_CHECKOUT_CONFIRMATION, EMPTY_STRING, SSL), 'post', 'action=process')); $smarty->assign('AGB', $conditions); $smarty->assign('AGB_checkbox', olc_draw_checkbox_field('conditions', TRUE_STRING_S)); $checkout_payment = 'checkout_payment'; $accept_agb = 'accept_agb'; $s = olc_get_smarty_config_variable($smarty, $checkout_payment, 'text_' . $accept_agb); $smarty->assign(strtoupper($accept_agb), str_replace('@', SESSION_LANGUAGE, $s)); // W. Kaiser $smarty->assign('FERNAG_checkbox', olc_draw_checkbox_field('fernag', TRUE_STRING_S)); $accept_fernag = 'accept_fernag'; $s = olc_get_smarty_config_variable($smarty, $checkout_payment, 'text_' . $accept_fernag); $smarty->assign(strtoupper($accept_fernag), str_replace('@', SESSION_LANGUAGE, $s)); // W. Kaiser $smarty->assign('BUTTON_CONTINUE', olc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE)); $main_content = $smarty->fetch(CURRENT_TEMPLATE_MODULE . 'ec_process' . HTML_EXT, SMARTY_CACHE_ID); $smarty->assign(MAIN_CONTENT, $main_content); $smarty->display(INDEX_HTML); } else { $process = true; } } if ($process) { require DIR_WS_LANGUAGES . SESSION_LANGUAGE . SLASH . FILENAME_EC_PROCESS; require DIR_WS_CLASSES . 'payment.php'; $payment_modules = new payment('paypal_wpp'); $payment_modules->ec_step1();
function create_document_print_button($doc_type) { global $smarty, $url0, $image0; $parameter = '&print_' . $doc_type . '=true'; $url = str_replace(HASH, $parameter, $url0); $image = str_replace(HASH, $url, $image0); $title = olc_get_smarty_config_variable($smarty, 'account_history_info', 'title_print_' . $doc_type); if (INCLUDE_PDF_INVOICE) { $title .= PDF_FORMAT; } $image = str_replace('@', $title, $image); $smarty->assign('BUTTON_PRINT_' . strtoupper($doc_type), $image); }
$bullet = EMPTY_STRING; } $line0 = ' <tr> <td valign="top"> ' . $bullet . ' </td> <td class="infoBoxContents" valign="top"> # </td> </tr> '; $start = HTML_A_START; $term = HTML_A_END . $underline; if (OL_COMMERCE) { $s = olc_get_smarty_config_variable($box_smarty, 'sitemap', 'heading_sitemap'); $s = $start . olc_href_link(FILENAME_SITEMAP) . '">' . $s . $term; $content_string = str_replace(HASH, $s, $line0); if (SHOW_PDF_CATALOG) { $s = olc_href_link(FILENAME_PDF_EXPORT, 'u=true', NONSSL, false, false, false); $s = str_replace(strtolower(HTTPS), strtolower(HTTP), $s); $s = $start . $s . '" target="_blank">' . BOX_PDF_EXPORT . $term; $content_string .= str_replace(HASH, $s, $line0); } if (SHOW_GALLERY) { $s = $start . olc_href_link(FILENAME_GALLERY) . '">' . TEXT_GALLERY . $term; $content_string .= str_replace(HASH, $s, $line0); } $content_string .= str_replace(HASH, HTML_HR, $sep_line); } else { $content_string = EMPTY_STRING;
$_SESSION[$livehelp_show_text] = $livehelp_show; if ($livehelp_show) { $dir = 'livehelp/'; $box_content = ' <!-- Powered by: Crafty Syntax Live Help http://www.craftysyntax.com/ --> <a href="' . $dir . 'livehelp.php?relative=Y&department=' . $department . '&pingtimes=15" target="_blank" ><img src="' . DIR_WS_IMAGES . 'livehelp.gif" border="0" title="' . LIVE_HELP_TITLE . '"></a> '; /* $box_content= ' <!-- Powered by: Crafty Syntax Live Help http://www.craftysyntax.com/ --> <a href="'.$dir.'livehelp.php?relative=Y&department='.$department.'&pingtimes=15" target="_blank" ><img src="'.$dir.'image.php?department='.$department.'&what=getstate" border=0 ></a> <!-- <a name=byRef href=http://www.craftysyntax.com target="_blank" ><img name=myIcon src="'.$dir.'image.php?what=getcredit&department=2" border="0" ></a> --> */ $footer_content = '<p>{' . olc_get_smarty_config_variable($smarty, 'lievhelp', 'footer_content') . '}</p>'; $box_content .= ' <!-- copyright 2003 - 2006 by Eric Gerdes --> ' . $footer_content; $smarty->assign('BOX_CONTENT', $box_content); $box_content = $smarty->fetch(CURRENT_TEMPLATE_BOXES . 'box_livehelp' . HTML_EXT, $cacheid); } else { $box_content = HTML_NBSP; } if ($ping_mode) { echo $box_content; } else { $smarty->assign('box_LIVEHELP', $box_content); } } elseif (IS_AJAX_PROCESSING) { if ($ping_mode) {
} $products_listing_template = 'product_listing/product_listing_v' . $s; } if ($Entries == 0) { $Entries = MAX_DISPLAY_SEARCH_RESULTS; } $do_boxes = $smarty_config_section == "boxes"; if ($do_boxes) { $template_subdir = $smarty_config_section; $module_smarty->assign('entries_count', $Entries); } if (strlen($smarty_config_section) > 0) { if (strlen($heading_text) == 0) { $heading_text = "heading_text"; } $heading_text = olc_get_smarty_config_variable($module_smarty, $smarty_config_section, $heading_text); $module_smarty->assign('HEADING_TEXT', $heading_text); $heading_text = EMPTY_STRING; } $not_do_boxes = !$do_boxes; $products_listing_template = CURRENT_TEMPLATE . SLASH . $template_subdir . SLASH . $products_listing_template . HTML_EXT; $row = 0; $products_listing_entries = false; $random_rows = EMPTY_STRING; unset($module_content); if ($show_full_data) { // include needed functions require_once DIR_FS_INC . 'olc_get_products_price.inc.php'; require_once DIR_FS_INC . 'olc_image_button.inc.php'; $ThisDay = date('Y-m-d'); $separator = "|";
if ($include_itself) { $category_query = olc_db_query("\n\t\t\tselect cd.categories_name\n\t\t\tfrom " . TABLE_CATEGORIES_DESCRIPTION . " cd\n\t\t\tWHERE c.categories_status = '1' AND cd.language_id = '" . SESSION_LANGUAGE_ID . "'\n\t\t\tand cd.categories_id = '" . $parent_id . APOS); $category = olc_db_fetch_array($category_query); $category_tree_array[] = array('id' => $parent_id, 'text' => $category['categories_name']); } $categories_query = olc_db_query("\n\t\tselect\n\t\tc.categories_id,\n\t\tcd.categories_name,\n\t\tc.parent_id\n\t\tfrom " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd\n\t\twhere c.categories_id = cd.categories_id\n\t\tand cd.language_id = '" . SESSION_LANGUAGE_ID . "'\n\t\tand c.parent_id = '" . $parent_id . "'\n\t\tand c.categories_status = '1'\n\t\torder by c.sort_order, cd.categories_name"); while ($categories = olc_db_fetch_array($categories_query)) { $categories_id = $categories['categories_id']; if ($exclude != $categories_id) { $category_tree_array[] = array('id' => $categories_id, 'text' => $spacing . $categories['categories_name'], 'link' => olc_href_link(FILENAME_DEFAULT, 'cPath=' . $cPath . $categories_id, NONSSL, false, true, false), 'pcount' => olc_count_products_in_category($categories_id)); $category_tree_array = get_category_tree($categories_id, $spacing . ' ', $exclude, $category_tree_array, false, $cPath); } } return $category_tree_array; } $module_content = olc_get_smarty_config_variable($smarty, 'sitemap', 'heading_sitemap'); $breadcrumb->add($module_content, olc_href_link(CURRENT_SCRIPT)); require DIR_WS_INCLUDES . 'header.php'; if (DO_GROUP_CHECK) { $group_check = " and c." . SQL_GROUP_CONDITION; } $categories_query = olc_db_query("\n\t\t\t\t\t\t\t\t\t\t\tselect c.categories_image,\n\t\t\t\t\t\t\t\t\t\t c.categories_id,\n \t\t\t\t\t\t\t\t\tcd.categories_name FROM\n " . TABLE_CATEGORIES . " c left join\n \t\t\t\t\t\t\t\t\t " . TABLE_CATEGORIES_DESCRIPTION . " cd on c.categories_id = cd.categories_id\n where c.categories_status = '1'\n \t\t\t\t\t\t\t\t\t and cd.language_id = " . SESSION_LANGUAGE_ID . "\n\t\t\t\t\t\t\t\t\t\t\tand c.parent_id = '0'\n " . $group_check . "\n order by c.sort_order ASC"); $module_content = array(); $cat_image_dir = DIR_WS_IMAGES . 'categories/'; while ($categories = olc_db_fetch_array($categories_query)) { $categories_id = $categories['categories_id']; $scats_array = get_category_tree($categories_id, EMPTY_STRING, 0); $scats = sizeof($scats_array); if ($scats > 0) { $pcount = 0; for ($i = 0; $i < $scats; $i++) {