//$breadcrumb->add(NAVBAR_TITLE_1_CHECKOUT_SHIPPING_ADDRESS, xtc_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); $breadcrumb->add(NAVBAR_TITLE_1_CHECKOUT_SHIPPING_ADDRESS, xtc_href_link($link_checkout_shipping, $params, 'SSL')); // EOF - Tomcraft - 2009-10-03 - Paypal Express Modul $breadcrumb->add(NAVBAR_TITLE_2_CHECKOUT_SHIPPING_ADDRESS, xtc_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, $params, 'SSL')); $addresses_count = xtc_count_customer_address_book_entries(); require DIR_WS_INCLUDES . 'header.php'; $smarty->assign('FORM_ACTION', xtc_draw_form('checkout_address', xtc_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, $params, 'SSL'), 'post', 'onsubmit="return check_form_optional(checkout_address);"')); if ($messageStack->size('checkout_address') > 0) { $smarty->assign('error', $messageStack->output('checkout_address')); } if ($process == false) { $smarty->assign('ADDRESS_LABEL', xtc_address_label($_SESSION['customer_id'], $_SESSION['sendto'], true, ' ', '<br />')); include DIR_WS_MODULES . 'checkout_address_layout.php'; } if ($addresses_count < MAX_ADDRESS_BOOK_ENTRIES) { require DIR_WS_MODULES . 'checkout_new_address.php'; } $smarty->assign('BUTTON_CONTINUE', xtc_draw_hidden_field('action', 'submit') . xtc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE)); if ($process == true) { $smarty->assign('BUTTON_BACK', '<a href="' . xtc_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, $params, 'SSL') . '">' . xtc_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'); } $smarty->assign('FORM_END', '</form>'); $smarty->assign('language', $_SESSION['language']); $main_content = $smarty->fetch(CURRENT_TEMPLATE . '/module/checkout_shipping_address.html'); $smarty->assign('main_content', $main_content); $smarty->caching = 0; if (!defined('RM')) { $smarty->load_filter('output', 'note'); } $smarty->display(CURRENT_TEMPLATE . '/index.html'); include 'includes/application_bottom.php';
} // Get manufacturer name etc. for the product page $manufacturer_query = xtc_db_query("SELECT m.manufacturers_id,\n m.manufacturers_name,\n m.manufacturers_image,\n mi.manufacturers_url\n FROM " . TABLE_MANUFACTURERS . " m\n LEFT JOIN " . TABLE_MANUFACTURERS_INFO . " mi\n ON (m.manufacturers_id = mi.manufacturers_id\n AND mi.languages_id = '" . (int) $_SESSION['languages_id'] . "'),\n " . TABLE_PRODUCTS . " p\n WHERE p.products_id = '" . $product->data['products_id'] . "'\n AND p.manufacturers_id = m.manufacturers_id"); if (xtc_db_num_rows($manufacturer_query)) { $manufacturer = xtc_db_fetch_array($manufacturer_query); $info_smarty->assign('MANUFACTURER_IMAGE', !empty($manufacturer['manufacturers_image']) ? DIR_WS_IMAGES . $manufacturer['manufacturers_image'] : ''); $info_smarty->assign('MANUFACTURER', $manufacturer['manufacturers_name']); $info_smarty->assign('MANUFACTURER_LINK', xtc_href_link(FILENAME_DEFAULT, xtc_manufacturer_link($manufacturer['manufacturers_id'], $manufacturer['manufacturers_name']))); } // build products price $products_price = $xtPrice->xtcGetPrice($product->data['products_id'], $format = true, 1, $product->data['products_tax_class_id'], $product->data['products_price'], 1); // check if customer is allowed to add to cart if ($_SESSION['customers_status']['customers_status_show_price'] != '0' && ($_SESSION['customers_status']['customers_fsk18'] == '1' && $product->data['products_fsk18'] == '0' || $_SESSION['customers_status']['customers_fsk18'] != '1')) { $add_pid_to_qty = xtc_draw_hidden_field('products_id', $product->data['products_id']); $info_smarty->assign('ADD_QTY', xtc_draw_input_field('products_qty', '1', $hide_qty ? '' : 'size="3"', $hide_qty ? 'hidden' : 'text') . ' ' . $add_pid_to_qty); $info_smarty->assign('ADD_CART_BUTTON', xtc_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART)); } // show expiry date of active special products $special_expires_date_query = "SELECT expires_date\n FROM " . TABLE_SPECIALS . "\n WHERE products_id = '" . $product->data['products_id'] . "'\n AND status = '1'"; $special_expires_date_query = xtDBquery($special_expires_date_query); $sDate = xtc_db_fetch_array($special_expires_date_query, true); $info_smarty->assign('PRODUCTS_EXPIRES', $sDate['expires_date'] != '0000-00-00 00:00:00' ? xtc_date_short($sDate['expires_date']) : ''); // FSK18 $info_smarty->assign('PRODUCTS_FSK18', $product->data['products_fsk18'] == '1' ? 'true' : ''); //get shippingstatus image and name if (ACTIVATE_SHIPPING_STATUS == 'true') { $info_smarty->assign('SHIPPING_NAME', $main->getShippingStatusName($product->data['products_shippingtime'])); $info_smarty->assign('SHIPPING_IMAGE', $main->getShippingStatusImage($product->data['products_shippingtime'])); // BOF - Tutorial: Umsetzung der EU-Verbraucherrichtlinie vom 13.06.2014 $info_smarty->assign('SHIPPING_NAME_LINK', $main->getShippingStatusName($product->data['products_shippingtime'], true)); // EOF - Tutorial: Umsetzung der EU-Verbraucherrichtlinie vom 13.06.2014
$sPreForm = ''; if (method_exists(${$_SESSION}['payment'], 'confirm_pre_form')) { $sPreForm = ${$_SESSION}['payment']->confirm_pre_form(); } $smarty->assign('CHECKOUT_FORM', $sPreForm . xtc_draw_form('checkout_confirmation', $form_action_url, 'post')); $smarty->assign('CHECKOUT_FORM_PREFORM', $sPreForm); $smarty->assign('CHECKOUT_FORM_ACTION_URL', $form_action_url); // EOF GM_MOD saferpay $payment_button = ''; if (is_array($payment_modules->modules)) { $payment_button .= $payment_modules->process_button(); } $smarty->assign('MODULE_BUTTONS', $payment_button); // BOF GM_MOD $smarty->assign('BUTTON_BACK', '<a href="javascript:history.back()"><img src="templates/' . CURRENT_TEMPLATE . '/buttons/' . $_SESSION['language'] . '/backgr.gif" /></a>'); $smarty->assign('CHECKOUT_BUTTON', xtc_image_submit('bestellung.gif', IMAGE_BUTTON_CONFIRM_ORDER) . '</form>' . "\n"); // EOF GM_MOD // BOF GM_MOD Heidelpay Bugfixes $_SESSION['gm_heidelpay'] = $order->info['total']; $_SESSION['gm_heidelpay_currency'] = $order->info['currency']; $_SESSION['gm_heidelpay_firstname'] = $order->billing['firstname']; $_SESSION['gm_heidelpay_lastname'] = $order->billing['lastname']; $_SESSION['gm_heidelpay_gender'] = $order->customer['gender']; $_SESSION['gm_heidelpay_street_address'] = $order->billing['street_address']; $_SESSION['gm_heidelpay_postcode'] = $order->billing['postcode']; $_SESSION['gm_heidelpay_city'] = $order->billing['city']; $_SESSION['gm_heidelpay_state'] = $order->billing['state']; $_SESSION['gm_heidelpay_city'] = $order->billing['city']; $_SESSION['gm_heidelpay_state'] = $order->billing['state']; $_SESSION['gm_heidelpay_iso_code_2'] = $order->billing['country']['iso_code_2']; $_SESSION['gm_heidelpay_email_address'] = $order->customer['email_address'];
----------------------------------------------------------------------------------------- based on: (c) 2000-2001 The Exchange Project (earlier name of osCommerce) (c) 2002-2003 osCommercebased on original files from OSCommerce CVS 2.2 2002/08/28 02:14:35 www.oscommerce.com (c) 2003 nextcommerce (loginbox.php,v 1.10 2003/08/17); www.nextcommerce.org (c) 2006 XT-Commerce Released under the GNU General Public License ----------------------------------------------------------------------------------------- Third Party contributions: Loginbox V1.0 Aubrey Kilian <*****@*****.**> Released under the GNU General Public License ---------------------------------------------------------------------------------------*/ if (!isset($_SESSION['customer_id'])) { require_once DIR_FS_INC . 'xtc_image_submit.inc.php'; require_once DIR_FS_INC . 'xtc_draw_password_field.inc.php'; $box_smarty = new smarty(); $box_smarty->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/'); $box_smarty->assign('FORM_ACTION', '<form id="loginbox" method="post" action="' . xtc_href_link(FILENAME_LOGIN, 'action=process', 'SSL') . '">'); $box_smarty->assign('FIELD_EMAIL', xtc_draw_input_field('email_address', '', 'maxlength="50" style="width: 100%!important;""')); $box_smarty->assign('FIELD_PWD', xtc_draw_password_field('password', '', 'maxlength="30" style="width: 100%!important;""')); $box_smarty->assign('BUTTON', xtc_image_submit('button_login_small.gif', IMAGE_BUTTON_LOGIN)); $box_smarty->assign('LINK_LOST_PASSWORD', xtc_href_link(FILENAME_PASSWORD_DOUBLE_OPT, '', 'SSL')); $box_smarty->assign('FORM_END', '</form>'); $box_smarty->assign('BOX_CONTENT', ''); $box_smarty->caching = 0; $box_smarty->assign('language', $_SESSION['language']); $box_loginbox = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_login.html'); $smarty->assign('box_LOGIN', $box_loginbox); }
function get_html($p_coo_product, $p_current_category_id = 0) { $t_html_output = ''; $xtPrice = new xtcPrice($_SESSION['currency'], $_SESSION['customers_status']['customers_status_id']); $main = new main(); $group_check = ''; // xs:booster start (v1.041) $xsb_tx = array(); if (@is_array($_SESSION['xtb0']['tx'])) { foreach ($_SESSION['xtb0']['tx'] as $tx) { if ($tx['products_id'] == $p_coo_product->data['products_id']) { $xsb_tx = $tx; break; } } } // xs:booster end if (!is_object($p_coo_product) || !$p_coo_product->isProduct()) { // product not found in database $error = TEXT_PRODUCT_NOT_FOUND; include DIR_WS_MODULES . FILENAME_ERROR_HANDLER; $t_html_output = $main_content; } else { if (ACTIVATE_NAVIGATOR == 'true') { $coo_product_navigator = MainFactory::create_object('ProductNavigatorContentView'); $t_view_html = $coo_product_navigator->get_html($p_coo_product, $p_current_category_id); $this->set_content_data('PRODUCT_NAVIGATOR', $t_view_html); } xtc_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . $p_coo_product->data['products_id'] . "' and language_id = '" . $_SESSION['languages_id'] . "'"); $products_price = $xtPrice->xtcGetPrice($p_coo_product->data['products_id'], $format = true, 1, $p_coo_product->data['products_tax_class_id'], $p_coo_product->data['products_price'], 1); // check if customer is allowed to add to cart // BOF GM_MOD: if ($_SESSION['customers_status']['customers_status_show_price'] != '0' && $xtPrice->gm_check_price_status($p_coo_product->data['products_id']) == 0) { // fsk18 if ($_SESSION['customers_status']['customers_fsk18'] == '1') { if ($p_coo_product->data['products_fsk18'] == '0') { // BOF GM_MOD: $this->set_content_data('ADD_QTY', xtc_draw_input_field('products_qty', gm_convert_qty($p_coo_product->data['gm_min_order'], false), 'id="gm_attr_calc_qty"') . ' ' . xtc_draw_hidden_field('products_id', $p_coo_product->data['products_id'], 'id="gm_products_id"')); $t_quantity = gm_convert_qty($p_coo_product->data['gm_min_order'], false); $t_disabled_quantity = 0; if (@$xsb_tx['XTB_ALLOW_USER_CHQTY'] == 'true' || $xsb_tx['products_id'] != $p_coo_product->data['products_id']) { $this->set_content_data('ADD_QTY', xtc_draw_input_field('products_qty', str_replace('.', ',', (double) $p_coo_product->data['gm_min_order']), 'id="gm_attr_calc_qty"') . ' ' . xtc_draw_hidden_field('products_id', $p_coo_product->data['products_id'], 'id="gm_products_id"')); } else { $this->set_content_data('ADD_QTY', xtc_draw_input_field('products_qty', '1', 'disabled="disabled" style="background-color:gray;"') . ' ' . xtc_draw_hidden_field('products_id', $p_coo_product->data['products_id'], 'id="gm_attr_calc_qty"')); $t_quantity = 1; $t_disabled_quantity = 1; } $this->set_content_data('QUANTITY', $t_quantity); $this->set_content_data('DISABLED_QUANTITY', $t_disabled_quantity); $this->set_content_data('ADD_CART_BUTTON', xtc_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART, 'id="cart_button"')); if (gm_get_conf('GM_SHOW_WISHLIST') == 'true') { $this->set_content_data('ADD_WISHLIST_BUTTON', '<a href="javascript:submit_to_wishlist()" id="gm_wishlist_link">' . xtc_image_button('button_in_wishlist.gif', NC_WISHLIST) . '</a>'); } } else { $this->set_content_data('GM_PID', xtc_draw_hidden_field('products_id', $p_coo_product->data['products_id'], 'id="gm_products_id"')); } } else { // BOF GM_MOD: $this->set_content_data('ADD_QTY', xtc_draw_input_field('products_qty', gm_convert_qty($p_coo_product->data['gm_min_order'], false), 'id="gm_attr_calc_qty"') . ' ' . xtc_draw_hidden_field('products_id', $p_coo_product->data['products_id'], 'id="gm_products_id"')); $t_quantity = gm_convert_qty($p_coo_product->data['gm_min_order'], false); $t_disabled_quantity = 0; if (@$xsb_tx['XTB_ALLOW_USER_CHQTY'] == 'true' || $xsb_tx['products_id'] != $p_coo_product->data['products_id']) { $this->set_content_data('ADD_QTY', xtc_draw_input_field('products_qty', str_replace('.', ',', (double) $p_coo_product->data['gm_min_order']), 'id="gm_attr_calc_qty"') . ' ' . xtc_draw_hidden_field('products_id', $p_coo_product->data['products_id'], 'id="gm_products_id"')); } else { $this->set_content_data('ADD_QTY', xtc_draw_input_field('products_qty', '1', 'disabled="disabled" style="background-color:gray;"') . ' ' . xtc_draw_hidden_field('products_id', $p_coo_product->data['products_id'], 'id="gm_attr_calc_qty"')); $t_quantity = 1; $t_disabled_quantity = 1; } $this->set_content_data('QUANTITY', $t_quantity); $this->set_content_data('DISABLED_QUANTITY', $t_disabled_quantity); $this->set_content_data('ADD_CART_BUTTON', xtc_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART, 'id="cart_button"')); if (gm_get_conf('GM_SHOW_WISH_LIST') == 'true') { $this->set_content_data('ADD_WISHLIST_BUTTON', '<a href="javascript:submit_to_wishlist()">' . xtc_image_button('button_in_wishlist.gif', NC_WISHLIST) . '</a>'); } } } elseif ($xtPrice->gm_check_price_status($p_coo_product->data['products_id']) > 0 || $_SESSION['customers_status']['customers_status_show_price'] == '0') { $this->set_content_data('GM_PID', xtc_draw_hidden_field('products_id', $p_coo_product->data['products_id'], 'id="gm_products_id"')); } if ($p_coo_product->data['products_fsk18'] == '1') { $this->set_content_data('PRODUCTS_FSK18', 'true'); } // BOF GM_MOD: if (ACTIVATE_SHIPPING_STATUS == 'true' && $xtPrice->gm_check_price_status($p_coo_product->data['products_id']) == 0) { $this->set_content_data('SHIPPING_NAME', $main->getShippingStatusName($p_coo_product->data['products_shippingtime'])); $this->set_content_data('SHIPPING_IMAGE', $main->getShippingStatusImage($p_coo_product->data['products_shippingtime'])); } // BOF_GM_MOD: $this->set_content_data('FORM_ACTION', xtc_draw_form('cart_quantity', xtc_href_link(FILENAME_PRODUCT_INFO, xtc_get_all_get_params(array('action')) . 'action=add_product'), 'post', 'name="cart_quantity" onsubmit="gm_qty_check = new GMOrderQuantityChecker(); return gm_qty_check.check();"')); $this->set_content_data('FORM_ACTION_URL', xtc_href_link(FILENAME_PRODUCT_INFO, xtc_get_all_get_params(array('action')) . 'action=add_product')); $this->set_content_data('FORM_ID', 'cart_quantity'); $this->set_content_data('FORM_NAME', 'cart_quantity'); $this->set_content_data('FORM_METHOD', 'post'); // BOF GM_MOD GX-Customizer $coo_gm_gprint_product_manager = new GMGPrintProductManager(); if ($coo_gm_gprint_product_manager->get_surfaces_groups_id($p_coo_product->data['products_id']) !== false) { $coo_gm_gprint_configuration = new GMGPrintConfiguration($_SESSION['languages_id']); $this->set_content_data('GM_GPRINT_SHOW_PRODUCTS_DESCRIPTION', $coo_gm_gprint_configuration->get_configuration('SHOW_PRODUCTS_DESCRIPTION')); $this->set_content_data('GM_GPRINT', 1); } // EOF GM_MOD GX-Customizer $this->set_content_data('FORM_END', '</form>'); $this->set_content_data('PRODUCTS_PRICE', $products_price['formated']); if ($p_coo_product->data['products_vpe_status'] == 1 && $p_coo_product->data['products_vpe_value'] != 0.0 && $products_price['plain'] > 0) { $this->set_content_data('PRODUCTS_VPE', $xtPrice->xtcFormat($products_price['plain'] * (1 / $p_coo_product->data['products_vpe_value']), true) . TXT_PER . xtc_get_vpe_name($p_coo_product->data['products_vpe'])); } $this->set_content_data('PRODUCTS_ID', $p_coo_product->data['products_id']); $this->set_content_data('PRODUCTS_NAME', $p_coo_product->data['products_name']); // BOF GM_MOD: if ($_SESSION['customers_status']['customers_status_show_price'] != 0 && ($xtPrice->gm_check_price_status($p_coo_product->data['products_id']) == 0 || $xtPrice->gm_check_price_status($p_coo_product->data['products_id']) == 2 && $p_coo_product->data['products_price'] > 0)) { // price incl tax $tax_rate = $xtPrice->TAX[$p_coo_product->data['products_tax_class_id']]; $tax_info = $main->getTaxInfo($tax_rate); $this->set_content_data('PRODUCTS_TAX_INFO', $tax_info); // BOF GM_MOD: if ($xtPrice->gm_check_price_status($p_coo_product->data['products_id']) == 0) { $this->set_content_data('PRODUCTS_SHIPPING_LINK', $main->getShippingLink(true)); } } // BOF GM_MOD if (gm_get_conf('GM_TELL_A_FRIEND') == 'true') { $this->set_content_data('GM_TELL_A_FRIEND', 1); } if ($p_coo_product->data['gm_show_price_offer'] == 1 && $_SESSION['customers_status']['customers_status_show_price'] != '0' && $xtPrice->gm_check_price_status($p_coo_product->data['products_id']) == 0) { $this->set_content_data('GM_PRICE_OFFER', 1); } if ((double) $p_coo_product->data['gm_min_order'] != 1) { $this->set_content_data('GM_MIN_ORDER', gm_convert_qty($p_coo_product->data['gm_min_order'], false)); } if ((double) $p_coo_product->data['gm_graduated_qty'] != 1) { $this->set_content_data('GM_GRADUATED_QTY', gm_convert_qty($p_coo_product->data['gm_graduated_qty'], false)); } // EOF GM_MOD $this->set_content_data('PRODUCTS_MODEL', $p_coo_product->data['products_model']); $this->set_content_data('PRODUCTS_EAN', $p_coo_product->data['products_ean']); if ($p_coo_product->data['gm_show_qty_info'] == 1) { $this->set_content_data('PRODUCTS_QUANTITY', gm_convert_qty(xtc_get_products_stock($p_coo_product->data['products_id']), false)); if ($p_coo_product->data['quantity_unit_id'] > 0) { $this->set_content_data('PRODUCTS_QUANTITY_UNIT', $p_coo_product->data['unit_name']); } } // BOF GM_MOD if ($p_coo_product->data['gm_show_weight'] == '1') { $this->set_content_data('SHOW_PRODUCTS_WEIGHT', 1); $this->set_content_data('PRODUCTS_WEIGHT', gm_prepare_number($p_coo_product->data['products_weight'], $xtPrice->currencies[$xtPrice->actualCurr]['decimal_point'])); } // EOF GM_MOD $this->set_content_data('PRODUCTS_STATUS', $p_coo_product->data['products_status']); $this->set_content_data('PRODUCTS_ORDERED', $p_coo_product->data['products_ordered']); $this->set_content_data('PRODUCTS_PRINT', '<img src="templates/' . CURRENT_TEMPLATE . '/buttons/' . $_SESSION['language'] . '/print.gif" style="cursor:hand;" onclick="javascript:window.open(\'' . xtc_href_link(FILENAME_PRINT_PRODUCT_INFO, 'products_id=' . $p_coo_product->data['products_id']) . '\', \'popup\', \'toolbar=0, width=640, height=600\')" alt="" />'); //GM_MOD: $gmTabTokenizer = MainFactory::create_object('GMTabTokenizer', array(stripslashes($p_coo_product->data['products_description']))); $gm_products_descrition = $gmTabTokenizer->get_prepared_output(); $this->set_content_data('PRODUCTS_DESCRIPTION', $gm_products_descrition); $t_gm_images_data = array(); $t_thumbnails_array = array(); $t_main_max_width = 369; $t_main_max_height = 279; $t_thumbnail_max_width = 86; $t_thumbnail_max_height = 86; // BOF GM_MOD require_once DIR_FS_CATALOG . 'gm/classes/GMGMotion.php'; $coo_gm_gmotion = new GMGMotion(); $this->set_content_data('GMOTION', $coo_gm_gmotion->check_status($p_coo_product->data['products_id'])); // EOF GM_MOD if (isset($xsb_tx['XTB_REDIRECT_USER_TO']) && $xsb_tx['products_id'] == $p_coo_product->data['products_id']) { $this->set_content_data('XTB_REDIRECT_USER_TO', $xsb_tx['XTB_REDIRECT_USER_TO']); } // BOF GM_MOD if ($p_coo_product->data['products_image'] != '' && $p_coo_product->data['gm_show_image'] == '1') { $t_info_image_size_array = @getimagesize(DIR_WS_INFO_IMAGES . $p_coo_product->data['products_image']); $t_thumbnail_image_size_array = @getimagesize(DIR_WS_IMAGES . 'product_images/gallery_images/' . $p_coo_product->data['products_image']); $t_main_padding_left = 0; $t_main_padding_top = 0; if (isset($t_info_image_size_array[0]) && $t_info_image_size_array[0] < $t_main_max_width) { $t_main_padding_left = round(($t_main_max_width - $t_info_image_size_array[0]) / 2); } if (isset($t_info_image_size_array[1]) && $t_info_image_size_array[1] < $t_main_max_height) { $t_main_padding_top = round(($t_main_max_height - $t_info_image_size_array[1]) / 2); } $t_zoom_image = DIR_WS_POPUP_IMAGES . $p_coo_product->data['products_image']; if (file_exists(DIR_WS_ORIGINAL_IMAGES . $p_coo_product->data['products_image'])) { $t_zoom_image = DIR_WS_ORIGINAL_IMAGES . $p_coo_product->data['products_image']; } $t_gm_images_data[] = array('IMAGE' => DIR_WS_INFO_IMAGES . $p_coo_product->data['products_image'], 'IMAGE_ALT' => $p_coo_product->data['gm_alt_text'], 'IMAGE_NR' => 0, 'ZOOM_IMAGE' => $t_zoom_image, 'PRODUCTS_NAME' => $p_coo_product->data['products_name'], 'PADDING_LEFT' => $t_main_padding_left, 'PADDING_TOP' => $t_main_padding_top, 'WIDTH' => $t_info_image_size_array[0], 'HEIGHT' => $t_info_image_size_array[1]); $t_thumbnail_padding_left = 0; $t_thumbnail_padding_top = 0; if (isset($t_thumbnail_image_size_array[0]) && $t_thumbnail_image_size_array[0] < $t_thumbnail_max_width) { $t_thumbnail_padding_left = round(($t_thumbnail_max_width - $t_thumbnail_image_size_array[0]) / 2); } if (isset($t_thumbnail_image_size_array[1]) && $t_thumbnail_image_size_array[1] < $t_thumbnail_max_height) { $t_thumbnail_padding_top = round(($t_thumbnail_max_height - $t_thumbnail_image_size_array[1]) / 2); } $t_thumbnails_array[] = array('IMAGE' => DIR_WS_IMAGES . 'product_images/gallery_images/' . $p_coo_product->data['products_image'], 'IMAGE_ALT' => $p_coo_product->data['gm_alt_text'], 'IMAGE_NR' => 0, 'ZOOM_IMAGE' => $t_zoom_image, 'INFO_IMAGE' => DIR_WS_INFO_IMAGES . $p_coo_product->data['products_image'], 'PRODUCTS_NAME' => $p_coo_product->data['products_name'], 'PADDING_LEFT' => $t_thumbnail_padding_left, 'PADDING_TOP' => $t_thumbnail_padding_top); } $t_gm_images = xtc_get_products_mo_images($p_coo_product->data['products_id']); if ($t_gm_images != false) { $coo_gm_alt_form = MainFactory::create_object('GMAltText'); foreach ($t_gm_images as $t_gm_image) { $t_info_image_size_array = @getimagesize(DIR_WS_INFO_IMAGES . $t_gm_image['image_name']); $t_thumbnail_image_size_array = @getimagesize(DIR_WS_IMAGES . 'product_images/gallery_images/' . $t_gm_image['image_name']); $t_main_padding_left = 0; $t_main_padding_top = 0; if (isset($t_info_image_size_array[0]) && $t_info_image_size_array[0] < $t_main_max_width) { $t_main_padding_left = round(($t_main_max_width - $t_info_image_size_array[0]) / 2); } if (isset($t_info_image_size_array[1]) && $t_info_image_size_array[1] < $t_main_max_height) { $t_main_padding_top = round(($t_main_max_height - $t_info_image_size_array[1]) / 2); } $t_zoom_image = DIR_WS_POPUP_IMAGES . $t_gm_image['image_name']; if (file_exists(DIR_WS_ORIGINAL_IMAGES . $t_gm_image['image_name'])) { $t_zoom_image = DIR_WS_ORIGINAL_IMAGES . $t_gm_image['image_name']; } $t_gm_images_data[] = array('IMAGE' => DIR_WS_INFO_IMAGES . $t_gm_image['image_name'], 'IMAGE_ALT' => $coo_gm_alt_form->get_alt($t_gm_image["image_id"], $t_gm_image['image_nr'], $p_coo_product->data['products_id']), 'IMAGE_NR' => $t_gm_image['image_nr'], 'ZOOM_IMAGE' => $t_zoom_image, 'PRODUCTS_NAME' => $p_coo_product->data['products_name'], 'PADDING_LEFT' => $t_main_padding_left, 'PADDING_TOP' => $t_main_padding_top, 'IMAGE_POPUP_URL' => DIR_WS_POPUP_IMAGES . $t_gm_image['image_name']); $t_thumbnail_padding_left = 0; $t_thumbnail_padding_top = 0; if (isset($t_thumbnail_image_size_array[0]) && $t_thumbnail_image_size_array[0] < $t_thumbnail_max_width) { $t_thumbnail_padding_left = round(($t_thumbnail_max_width - $t_thumbnail_image_size_array[0]) / 2); } if (isset($t_thumbnail_image_size_array[1]) && $t_thumbnail_image_size_array[1] < $t_thumbnail_max_height) { $t_thumbnail_padding_top = round(($t_thumbnail_max_height - $t_thumbnail_image_size_array[1]) / 2); } $t_thumbnails_array[] = array('IMAGE' => DIR_WS_IMAGES . 'product_images/gallery_images/' . $t_gm_image['image_name'], 'IMAGE_ALT' => $coo_gm_alt_form->get_alt($t_gm_image["image_id"], $t_gm_image['image_nr'], $p_coo_product->data['products_id']), 'IMAGE_NR' => $t_gm_image['image_nr'], 'ZOOM_IMAGE' => $t_zoom_image, 'INFO_IMAGE' => DIR_WS_INFO_IMAGES . $t_gm_image['image_name'], 'PRODUCTS_NAME' => $p_coo_product->data['products_name'], 'PADDING_LEFT' => $t_thumbnail_padding_left, 'PADDING_TOP' => $t_thumbnail_padding_top); } } $this->set_content_data('images', $t_gm_images_data); $this->set_content_data('thumbnails', $t_thumbnails_array); // EOF GM_MOD $discount = 0.0; if ($_SESSION['customers_status']['customers_status_discount'] != '0.00') { // BOF GM_MOD: $discount = $_SESSION['customers_status']['customers_status_discount']; if ($p_coo_product->data['products_discount_allowed'] < $_SESSION['customers_status']['customers_status_discount']) { $discount = $p_coo_product->data['products_discount_allowed']; } if ($discount != '0.00') { $this->set_content_data('PRODUCTS_DISCOUNT', $discount . '%'); } } // BOF GM_MOD if (PRODUCT_IMAGE_INFO_WIDTH < 190 - 16) { $this->set_content_data('MIN_IMAGE_WIDTH', 188); $this->set_content_data('MIN_INFO_BOX_WIDTH', 156 - 10); $this->set_content_data('MARGIN_LEFT', 188 + 10); } else { $this->set_content_data('MIN_IMAGE_WIDTH', PRODUCT_IMAGE_INFO_WIDTH + 16); $this->set_content_data('MIN_INFO_BOX_WIDTH', PRODUCT_IMAGE_INFO_WIDTH + 16 - 32 - 10); $this->set_content_data('MARGIN_LEFT', PRODUCT_IMAGE_INFO_WIDTH + 16 + 10); } // EOF GM_MOD $coo_product_attributes = MainFactory::create_object('ProductAttributesContentView', array($p_coo_product->data['options_template'])); $t_view_html = $coo_product_attributes->get_html($p_coo_product); $this->set_content_data('MODULE_product_options', $t_view_html); $coo_product_reviews = MainFactory::create_object('ProductReviewsContentView'); $t_view_html = $coo_product_reviews->get_html($p_coo_product); $this->set_content_data('MODULE_products_reviews', $t_view_html); if (xtc_not_null($p_coo_product->data['products_url'])) { $this->set_content_data('PRODUCTS_URL', sprintf(TEXT_MORE_INFORMATION, xtc_href_link(FILENAME_REDIRECT, 'action=product&id=' . $p_coo_product->data['products_id'], 'NONSSL', true))); } if ($p_coo_product->data['products_date_available'] > date('Y-m-d H:i:s')) { $this->set_content_data('PRODUCTS_DATE_AVIABLE', sprintf(TEXT_DATE_AVAILABLE, xtc_date_long($p_coo_product->data['products_date_available']))); } else { // BOF GM_MOD: if ($p_coo_product->data['products_date_added'] != '0000-00-00 00:00:00' && $p_coo_product->data['gm_show_date_added'] == 1) { $this->set_content_data('PRODUCTS_ADDED', sprintf(TEXT_DATE_ADDED, xtc_date_long($p_coo_product->data['products_date_added']))); } } $coo_product_media = MainFactory::create_object('ProductMediaContentView'); $t_view_html = $coo_product_media->get_html($p_coo_product->data['products_id'], $_SESSION['languages_id']); $this->set_content_data('MODULE_products_media', $t_view_html); $coo_graduated_prices = MainFactory::create_object('GraduatedPricesContentView'); $t_view_html = $coo_graduated_prices->get_html($p_coo_product); $this->set_content_data('MODULE_graduated_price', $t_view_html); $coo_also_purchased = MainFactory::create_object('AlsoPurchasedContentView'); $t_view_html = $coo_also_purchased->get_html($p_coo_product); $this->set_content_data('MODULE_also_purchased', $t_view_html); $coo_cross_selling = MainFactory::create_object('CrossSellingContentView', array('cross_selling')); $t_view_html = $coo_cross_selling->get_html($p_coo_product); $this->set_content_data('MODULE_cross_selling', $t_view_html); $coo_reverse_cross_selling = MainFactory::create_object('CrossSellingContentView', array('reverse_cross_selling')); $t_view_html = $coo_reverse_cross_selling->get_html($p_coo_product); $this->set_content_data('MODULE_reverse_cross_selling', $t_view_html); $i = count($_SESSION['tracking']['products_history']); if ($i > 6) { array_shift($_SESSION['tracking']['products_history']); $_SESSION['tracking']['products_history'][6] = $p_coo_product->data['products_id']; $_SESSION['tracking']['products_history'] = array_unique($_SESSION['tracking']['products_history']); } else { $_SESSION['tracking']['products_history'][$i] = $p_coo_product->data['products_id']; $_SESSION['tracking']['products_history'] = array_unique($_SESSION['tracking']['products_history']); } $coo_stop_watch = new StopWatch(); $coo_stop_watch->start(); $coo_properties_view = MainFactory::create_object('PropertiesView', array($_GET, $_POST)); $t_properties_selection_form = $coo_properties_view->get_selection_form($p_coo_product->data['products_id'], $_SESSION['languages_id']); if (trim($t_properties_selection_form) != "") { if ($p_coo_product->data['gm_show_qty_info'] == 1) { if ($p_coo_product->data['use_properties_combis_quantity'] == 0 && STOCK_CHECK == 'true' && ATTRIBUTES_STOCK_CHECK == 'true' || $p_coo_product->data['use_properties_combis_quantity'] == 2) { $this->set_content_data('PRODUCTS_QUANTITY', '-'); $this->set_content_data('SHOW_PRODUCTS_QUANTITY', true); } else { if ($p_coo_product->data['use_properties_combis_quantity'] == 1) { $this->set_content_data('SHOW_PRODUCTS_QUANTITY', true); } } } $this->set_content_data('SHOW_PRODUCTS_MODEL', true); if (APPEND_PROPERTIES_MODEL == "false" || trim($p_coo_product->data['products_model']) == '') { $this->set_content_data('PRODUCTS_MODEL', '-'); } if (ACTIVATE_SHIPPING_STATUS == 'true' && $xtPrice->gm_check_price_status($p_coo_product->data['products_id']) == 0 && $p_coo_product->data['use_properties_combis_shipping_time'] == 1) { $this->set_content_data('SHOW_SHIPPING_TIME', true); $this->set_content_data('SHIPPING_NAME', ''); $this->set_content_data('SHIPPING_IMAGE', 'admin/images/icons/gray.png'); } } $this->set_content_data('properties_selection_form', $t_properties_selection_form); $coo_stop_watch->stop(); //$coo_stop_watch->log_total_time('PropertiesView get_selection_form'); // BOF GM_MOD $t_gm_show_wishlist = gm_get_conf('GM_SHOW_WISHLIST'); if ($t_gm_show_wishlist == 'true') { $this->set_content_data('GM_SHOW_WISHLIST', 1); } $t_show_facebook = gm_get_conf('SHOW_FACEBOOK'); if ($t_show_facebook == 'true') { $this->set_content_data('SHOW_FACEBOOK', 1); } $t_show_twitter = gm_get_conf('SHOW_TWITTER'); if ($t_show_twitter == 'true') { $this->set_content_data('SHOW_TWITTER', 1); } $t_show_googleplus = gm_get_conf('SHOW_GOOGLEPLUS'); if ($t_show_googleplus == 'true') { $this->set_content_data('SHOW_GOOGLEPLUS', 1); } $t_show_pinterest = gm_get_conf('SHOW_PINTEREST'); if ($t_show_pinterest == 'true') { $this->set_content_data('SHOW_PINTEREST', 1); } $t_show_print = gm_get_conf('SHOW_PRINT'); if ($t_show_print == 'true') { $this->set_content_data('SHOW_PRINT', 1); } $t_show_bookmarking = gm_get_conf('SHOW_BOOKMARKING'); if ($t_show_bookmarking == 'true') { $this->set_content_data('SHOW_BOOKMARKING', 1); } // EOF GM_MOD // Bitcoin Payment - Commerce Coding - BEGIN $multiplier = 1; $digits = 8; switch (MODULE_PAYMENT_BITCOIN_UNITS) { case 'uBTC': $multiplier *= 1000; $digits -= 3; case 'mBTC': $multiplier *= 1000; $digits -= 3; case 'BTC': $btcPrice = number_format($products_price['plain'] / MODULE_PAYMENT_BITCOIN_BTCEUR * $multiplier, $digits, '.', ''); $this->set_content_data('BITCOIN_PRICE', $btcPrice . ' ' . MODULE_PAYMENT_BITCOIN_UNITS); } // Bitcoin Payment - Commerce Coding - END include_once DIR_FS_DOCUMENT_ROOT . '/shopgate/plugins/gambiogx/system/views/product_info/ProductInfoContentView.inc.php'; $t_html_output = $this->build_html(); } return $t_html_output; }
require_once DIR_WS_CLASSES . 'payment.php'; $payment_modules = new payment($payment_class); $smarty->assign('PAYMENT_INFO', $payment_modules->success()); // BOF - GTB - 2011-04-12 - changes for Guest Account // $smarty->assign('FORM_ACTION', xtc_draw_form('order', xtc_href_link(FILENAME_CHECKOUT_SUCCESS, 'action=update', 'SSL'))); $smarty->assign('FORM_ACTION', xtc_draw_form('order', xtc_href_link(FILENAME_CHECKOUT_SUCCESS, 'action=update', 'SSL')) . xtc_draw_hidden_field('account_type', $_SESSION['account_type'])); // EOF - GTB - 2011-04-12 - changes for Guest Account //BOF - Dokuman - 2009-11-23 - Make the print preview clickable, i.e. change mouse cursor to hand symbol $smarty->assign('BUTTON_CONTINUE', xtc_image_submit('button_continue.gif', IMAGE_BUTTON_CHECKOUT_START_PAGE)); //$smarty->assign('BUTTON_PRINT', '<img src="'.'templates/'.CURRENT_TEMPLATE.'/buttons/'.$_SESSION['language'].'/button_print.gif" style="cursor:pointer" onclick="window.open(\''.xtc_href_link(FILENAME_PRINT_ORDER, 'oID='.$orders['orders_id']).'\', \'popup\', \'toolbar=0, width=640, height=600\')" />'); //BOF - Tomcraft - 2010-04-03 - unified popups with scrollbars and make them resizable //$smarty->assign('BUTTON_PRINT', '<a style="cursor:pointer" onclick="javascript:window.open(\''.xtc_href_link(FILENAME_PRINT_ORDER, 'oID='.$orders['orders_id']).'\', \'popup\', \'toolbar=0, width=640, height=600\')"><img src="'.'templates/'.CURRENT_TEMPLATE.'/buttons/'.$_SESSION['language'].'/button_print.gif" alt="'.TEXT_PRINT.'" /></a>'); //BOF - GTB - 2010-09-15 - change Print Button to Form for Guests //$smarty->assign('BUTTON_PRINT', '<a style="cursor:pointer" onclick="javascript:window.open(\''.xtc_href_link(FILENAME_PRINT_ORDER, 'oID='.$orders['orders_id']).'\', \'popup\', \'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no, width=640, height=600\')"><img src="'.'templates/'.CURRENT_TEMPLATE.'/buttons/'.$_SESSION['language'].'/button_print.gif" alt="'.TEXT_PRINT.'" /></a>'); $smarty->assign('FORM_ACTION_PRINT', xtc_draw_form('print_order', xtc_href_link(FILENAME_PRINT_ORDER, 'oID=' . $orders['orders_id'], 'SSL'), 'post', 'target="popup" onsubmit="javascript:window.open(\'' . xtc_href_link(FILENAME_PRINT_ORDER, 'oID=' . $orders['orders_id'], 'SSL') . '\', \'popup\', \'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no, ' . POPUP_PRINT_ORDER_SIZE . '\')"') . xtc_draw_hidden_field('customer_id', $_SESSION['customer_id'])); $smarty->assign('BUTTON_PRINT', xtc_image_submit('print.gif', TEXT_PRINT)); //EOF - GTB - 2010-09-15 - change Print Button to Form for Guests //EOF - Tomcraft - 2010-04-03 - unified popups with scrollbars and make them resizable //EOF - Dokuman - 2009-11-23 - Make the print preview clickable, i.e. change mouse cursor to hand symbol $smarty->assign('FORM_END', '</form>'); // GV Code Start $gv_query = xtc_db_query("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id='" . $_SESSION['customer_id'] . "'"); if ($gv_result = xtc_db_fetch_array($gv_query)) { if ($gv_result['amount'] > 0) { $smarty->assign('GV_SEND_LINK', xtc_href_link(FILENAME_GV_SEND)); } } // GV Code End // Google Conversion tracking if (GOOGLE_CONVERSION == 'true') { $smarty->assign('google_tracking', 'true');
//BOF - Dokuman - 2009-12-23 - send contact form information with SSL //$smarty->assign('FORM_ACTION', xtc_draw_form('contact_us', xtc_href_link(FILENAME_CONTENT, 'action=send&coID='.(int) $_GET['coID']))); $smarty->assign('FORM_ACTION', xtc_draw_form('contact_us', xtc_href_link(FILENAME_CONTENT, 'action=send&coID=' . (int) $_GET['coID'], 'SSL'))); //EOF - Dokuman - 2009-12-23 - send contact form information with SSL $smarty->assign('INPUT_NAME', xtc_draw_input_field('name', $error ? $_POST['name'] : $customers_name, 'size="30"')); $smarty->assign('INPUT_EMAIL', xtc_draw_input_field('email', $error ? $_POST['email'] : $email_address, 'size="30"')); $smarty->assign('INPUT_HONEYPOT', xtc_draw_input_field('email2_FT7ughj521dfdf', $error ? $_POST['email2_FT7ughj521dfdf'] : '', 'size="30"')); // BOF - Tomcraft - 2009-11-05 - Advanced contact form (additional fields) $smarty->assign('INPUT_PHONE', xtc_draw_input_field('phone', $error ? $_POST['phone'] : $phone, 'size="30"')); $smarty->assign('INPUT_COMPANY', xtc_draw_input_field('company', $error ? $_POST['company'] : $company, 'size="30"')); $smarty->assign('INPUT_STREET', xtc_draw_input_field('street', $error ? $_POST['street'] : $street, 'size="30"')); $smarty->assign('INPUT_POSTCODE', xtc_draw_input_field('postcode', $error ? $_POST['postcode'] : $postcode, 'size="30"')); $smarty->assign('INPUT_CITY', xtc_draw_input_field('city', $error ? $_POST['city'] : $city, 'size="30"')); $smarty->assign('INPUT_FAX', xtc_draw_input_field('fax', $error ? $_POST['fax'] : $fax, 'size="30"')); if (CONTACT_FORM_CONSENT == 'true') { $smarty->assign('CHECKBOX', xtc_draw_checkbox_field('checkbox')); } // EOF - Tomcraft - 2009-11-05 - Advanced contact form (additional fields) // BOF - Tomcraft - 2009-09-29 - fixed word-wrap in contact-form //$smarty->assign('INPUT_TEXT', xtc_draw_textarea_field('message_body', 'soft', 50, 15, ($error ? xtc_db_input($_POST['message_body']) : $first_name))); // BOF - Tomcraft - 2010-02-18 - Fixed width of textarea in FireFox under Linux. //$smarty->assign('INPUT_TEXT', xtc_draw_textarea_field('message_body', 'soft', 50, 15, ($error ? $_POST['message_body'] : $message_body))); $smarty->assign('INPUT_TEXT', xtc_draw_textarea_field('message_body', 'soft', 45, 15, $error ? $_POST['message_body'] : $message_body)); // EOF - Tomcraft - 2010-02-18 - Fixed width of textarea in FireFox under Linux. // EOF - Tomcraft - 2009-09-29 - fixed word-wrap in contact-form $smarty->assign('BUTTON_SUBMIT', xtc_image_submit('button_send.gif', IMAGE_BUTTON_SEND)); $smarty->assign('FORM_END', '</form>'); } $smarty->assign('language', $_SESSION['language']); $smarty->caching = 0; $main_content = $smarty->fetch(CURRENT_TEMPLATE . '/module/contact_us.html');
$back_button_submit = BUTTONS_DIR . 'continue.gif'; $s = $navigation_text[$n_step]; if (!$s) { $s = $navigation_text[$n_step + 1]; } $s = QUOTE . $s . QUOTE; $continue_button_link = xtc_image($back_button_submit, $s); $onsubmit_text = '#onsubmit#'; $continue_button_submit = xtc_image_submit($back_button_submit, BUTTON_CONTINUE_TEXT . $s, $onsubmit_text); $s = $navigation_text[$p_step]; if (!$s) { $s = $navigation_text[$p_step - 1]; } $s = QUOTE . $s . QUOTE; $back_button_submit = xtc_image_submit(BUTTONS_DIR . 'back.gif', BUTTON_BACK_TEXT . $s); $retry_button_submit = xtc_image_submit(BUTTONS_DIR . 'retry.gif', BUTTON_RETRY_TEXT . QUOTE . $navigation_text[$install_step] . QUOTE); $install_text = 'install'; $install_step_text = $install_text . '_step'; $step_text = 'step'; if ($install_step > 1) { /* if (!$_SESSION[$step_text][$p_step]) //Previous step not done! { install_error(TEXT_STEP_ERROR); $post_data.=' <tr> <td class="error">'.TEXT_STEP_ERROR_1.'</td> </tr> '; include('includes/program_frame.php'); }
$gift_smarty->assign('GV_AMOUNT', $xtPrice->xtcFormat($gv_result['amount'], true, 0, true)); $gift_smarty->assign('GV_SEND_TO_FRIEND_LINK', xtc_href_link(FILENAME_GV_SEND)); } else { $gift_smarty->assign('GV_AMOUNT', 0); } } if (isset($_SESSION['gv_id'])) { $gv_query = xtc_db_query("select coupon_amount from " . TABLE_COUPONS . " where coupon_id = '" . $_SESSION['gv_id'] . "'"); $coupon = xtc_db_fetch_array($gv_query); $gift_smarty->assign('COUPON_AMOUNT2', $xtPrice->xtcFormat($coupon['coupon_amount'], true, 0, true)); } if (isset($_SESSION['cc_id'])) { if (!defined('POPUP_COUPON_HELP_LINK_PARAMETERS')) { define('POPUP_COUPON_HELP_LINK_PARAMETERS', '&KeepThis=true&TB_iframe=true&height=400&width=600'); } if (!defined('POPUP_SHIPPING_LINK_CLASS')) { define('POPUP_SHIPPING_LINK_CLASS', 'thickbox'); } $gift_smarty->assign('COUPON_HELP_LINK', '<a target="_blank" class="' . POPUP_SHIPPING_LINK_CLASS . '" href="' . xtc_href_link(FILENAME_POPUP_COUPON_HELP, 'cID=' . $_SESSION['cc_id'] . POPUP_COUPON_HELP_LINK_PARAMETERS, $request_type) . '">'); } if (isset($_SESSION['customer_id'])) { $gift_smarty->assign('C_FLAG', 'true'); } $gift_smarty->assign('LINK_ACCOUNT', xtc_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL')); $gift_smarty->assign('FORM_ACTION', xtc_draw_form('gift_coupon', xtc_href_link(FILENAME_SHOPPING_CART, 'action=check_gift', $request_type))); $gift_smarty->assign('INPUT_CODE', xtc_draw_input_field('gv_redeem_code')); $gift_smarty->assign('BUTTON_SUBMIT', xtc_image_submit('button_redeem.gif', IMAGE_REDEEM_GIFT)); $gift_smarty->assign('language', $_SESSION['language']); $gift_smarty->assign('FORM_END', '</form>'); $gift_smarty->caching = 0; $smarty->assign('MODULE_gift_cart', $gift_smarty->fetch(CURRENT_TEMPLATE . '/module/gift_cart.html'));
function get_html() { global $PHP_SELF; $config = $this->_payone->getConfig(); if ($_SERVER['REQUEST_METHOD'] == 'POST') { if (!empty($_POST['billto'])) { $this->_correctAddressBookEntry($_SESSION['billto'], $_POST['billto']); } if (!empty($_POST['sendto'])) { $this->_correctAddressBookEntry($_SESSION['sendto'], $_POST['sendto']); } // user has had a chance to review/correct addresses, consider them validated now $_SESSION['payone_ac_billing_hash'] = $this->_payone->getAddressHash($_SESSION['billto']); $_SESSION['payone_ac_delivery_hash'] = $this->_payone->getAddressHash($_SESSION['sendto']); xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); } $addresses_correct = $this->_checkAddresses(); if ($addresses_correct) { xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); } if (isset($_SESSION['payone_error']) && $_SESSION['payone_error'] == 'address_changed') { $this->set_content_data('note_address_changed', NOTE_ADDRESS_CHANGED); unset($_SESSION['payone_error']); } $this->set_content_data('form_action', xtc_href_link(basename($PHP_SELF), '', 'SSL')); $this->set_content_data('BUTTON_CONFIRM', xtc_image_submit('button_confirm.gif', IMAGE_BUTTON_CONFIRM)); $this->set_content_data('payonecss', DIR_WS_EXTERNAL . 'payone/css/payone.css'); $t_html_output = $this->_payone->build_html('checkout_payone_addresscheck.html', $this->content); return $t_html_output; }
if (!$product->isProduct()) { $smarty->assign('error', ERROR_INVALID_PRODUCT); } else { $name = ""; if (isset($customer_info['customers_firstname']) && $customer_info['customers_firstname'] != '') { $name .= $customer_info['customers_firstname'] . ' '; } if (isset($customer_info['customers_lastname']) && $customer_info['customers_lastname'] != '') { $name .= $customer_info['customers_lastname']; } if ($name == "") { $name = TEXT_GUEST; } $smarty->assign('PRODUCTS_NAME', $product->data['products_name']); $smarty->assign('AUTHOR', $name); $smarty->assign('INPUT_TEXT', xtc_draw_textarea_field('review', 'soft', 60, 15, '', '', false)); $smarty->assign('INPUT_RATING', xtc_draw_radio_field('rating', '1') . ' ' . xtc_draw_radio_field('rating', '2') . ' ' . xtc_draw_radio_field('rating', '3') . ' ' . xtc_draw_radio_field('rating', '4') . ' ' . xtc_draw_radio_field('rating', '5')); $smarty->assign('FORM_ACTION', xtc_draw_form('product_reviews_write', xtc_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, 'action=process&' . xtc_product_link($product->data['products_id'], $product->data['products_name'])), 'post', 'onSubmit="return checkForm();"')); $smarty->assign('BUTTON_BACK', '<a href="javascript:history.back(1)">' . xtc_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'); $smarty->assign('BUTTON_SUBMIT', xtc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE) . xtc_draw_hidden_field('get_params', $get_params)); $smarty->assign('FORM_END', '</form>'); } $smarty->assign('language', $_SESSION['language']); $main_content = $smarty->fetch(CURRENT_TEMPLATE . '/module/product_reviews_write.html'); $smarty->assign('main_content', $main_content); $smarty->caching = 0; if (!defined('RM')) { $smarty->load_filter('output', 'note'); } $smarty->display(CURRENT_TEMPLATE . '/index.html'); include 'includes/application_bottom.php';
function selection() { global $smarty; $payments = get_third_party_payments(); if (ACTIVATE_GIFT_SYSTEM == 'true') { require_once DIR_WS_CLASSES . 'order_total.php'; $order_total_modules = new order_total(); $credit_selection = $order_total_modules->credit_selection(); } if (isset($credit_selection) && is_array($credit_selection) && count($credit_selection) > 0) { $payments = array(); } if (isset($_SESSION['payment'])) { for ($i = 0, $n = count($payments); $i < $n; $i++) { if ($payments[$i]['id'] == $_SESSION['payment']) { $_SESSION['payment'] = $this->code; } } } $_SESSION['paypal']['approval'] = $this->payment_redirect(false, true); if ($_SESSION['paypal']['approval'] == '') { $GLOBALS['paypalplus']->enabled = false; } else { $description = '<div id="ppp_result"></div> <script type="text/javascript"> (function() { var pp = document . createElement(\'script\'); pp.type = \'text/javascript\'; pp.async = true; pp.src = \'https://www.paypalobjects.com/webstatic/ppplus/ppplus.min.js\'; var s = document.getElementsByTagName(\'script\')[0]; s . parentNode . insertBefore(pp, s); })(); $(window).on(\'load\',function() { ' . (count($payments) > 0 ? ' if ($(\'input[name="payment"]:checked\', \'#checkout_payment\').val() == "' . $this->code . '") { $("#continueButton").attr("onclick", "ppp.doContinue(); return false;"); } ' : '') . ' $("#checkout_payment").attr("name", "checkout_payment"); $.get("' . xtc_href_link('callback/paypal/paypalplus.php', '', 'SSL') . '", function(data) { $("#ppp_result").html(data); }); ' . ($this->get_config('MODULE_PAYMENT_' . strtoupper($this->code) . '_USE_TABS') == '1' || count($payments) > 0 ? ' $("[id*=\\"rd\\"]").click(function(e) { if ($(\'input[name="payment"]:checked\', \'#checkout_payment\').val() == "' . $this->code . '") { ' . ($this->get_config('MODULE_PAYMENT_' . strtoupper($this->code) . '_USE_TABS') == '1' ? ' $.get("' . xtc_href_link('callback/paypal/paypalplus.php', '', 'SSL') . '", function(data) { $("#ppp_result").html(data); }); ' : '') . ' ' . (count($payments) > 0 ? ' $("#continueButton").removeAttr("onclick"); $("#continueButton").attr("onclick", "ppp.doContinue(); return false;"); ' : '') . ' } else { ' . (count($payments) > 0 ? '$("#continueButton").removeAttr("onclick");' : '') . ' } });' : '') . ' }); </script>'; $smarty->assign('BUTTON_CONTINUE', xtc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE, 'id="continueButton"')); return array('id' => $this->code, 'module' => $this->title, 'description' => $this->info . $description); } }
// include boxes require DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/source/boxes.php'; // include needed functions require_once DIR_FS_INC . 'xtc_get_categories.inc.php'; require_once DIR_FS_INC . 'xtc_get_manufacturers.inc.php'; require_once DIR_FS_INC . 'xtc_checkdate.inc.php'; $breadcrumb->add(NAVBAR_TITLE_ADVANCED_SEARCH, xtc_href_link(FILENAME_ADVANCED_SEARCH)); require DIR_WS_INCLUDES . 'header.php'; $smarty->assign('FORM_ACTION', xtc_draw_form('advanced_search', xtc_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', $request_type, false), 'get', 'onsubmit="return check_form(this);"') . xtc_hide_session_id()); //WEB28 change NONSSL to $request_type $smarty->assign('INPUT_KEYWORDS', xtc_draw_input_field('keywords', '', 'style="width: 100%"')); //BOF - DokuMan - 2009-05-31 - removed quotationmark //$smarty->assign('HELP_LINK', xtc_href_link(FILENAME_POPUP_SEARCH_HELP.'?KeepThis=true&TB_iframe=true&height=400&width=600"')); $smarty->assign('HELP_LINK', xtc_href_link(FILENAME_POPUP_SEARCH_HELP . '?KeepThis=true&TB_iframe=true&height=400&width=600')); //EOF - DokuMan - 2009-05-31 - removed quotationmark $smarty->assign('BUTTON_SUBMIT', xtc_image_submit('button_search.gif', IMAGE_BUTTON_SEARCH)); $smarty->assign('SELECT_CATEGORIES', xtc_draw_pull_down_menu('categories_id', xtc_get_categories(array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES))))); $smarty->assign('ENTRY_SUBCAT', xtc_draw_checkbox_field('inc_subcat', '1', true)); $smarty->assign('SELECT_MANUFACTURERS', xtc_draw_pull_down_menu('manufacturers_id', xtc_get_manufacturers(array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS))))); $smarty->assign('SELECT_PFROM', xtc_draw_input_field('pfrom')); $smarty->assign('SELECT_PTO', xtc_draw_input_field('pto')); $error = ''; if (isset($_GET['errorno'])) { if (($_GET['errorno'] & 1) == 1) { $error .= str_replace('\\n', '<br />', JS_AT_LEAST_ONE_INPUT); } if (($_GET['errorno'] & 10) == 10) { $error .= str_replace('\\n', '<br />', JS_INVALID_FROM_DATE); } if (($_GET['errorno'] & 100) == 100) { $error .= str_replace('\\n', '<br />', JS_INVALID_TO_DATE);
} if (isset($o_paypal) && is_object($o_paypal)) { $smarty->assign('BUTTON_PAYPAL', $o_paypal->build_express_checkout_button()); } ## PayPal require_once DIR_FS_EXTERNAL . 'paypal/classes/PayPalPayment.php'; $paypal_cart = new PayPalPayment('paypalcart'); if ($paypal_cart->enabled === true) { $smarty->assign('BUTTON_PAYPAL', $paypal_cart->checkout_button()); if (isset($_GET['payment_error'])) { include_once DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/paypalcart.php'; $error = $paypal_cart->get_error(); $smarty->assign('info_message', $error['error']); } } $smarty->assign('BUTTON_RELOAD', xtc_image_submit('button_update_cart.gif', IMAGE_BUTTON_UPDATE_CART)); $smarty->assign('BUTTON_CHECKOUT', '<a href="' . xtc_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . xtc_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'); } // EOF - Tomcraft - 2009-10-03 - Paypal Express Modul } else { // empty cart $cart_empty = true; //if ($_GET['info_message']) // $smarty->assign('info_message', str_replace('+', ' ', encode_htmlspecialchars($_GET['info_message']))); $smarty->assign('cart_empty', $cart_empty); $smarty->assign('BUTTON_CONTINUE', '<a href="' . xtc_href_link(FILENAME_DEFAULT) . '">' . xtc_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'); } if (isset($_GET['info_message'])) { $smarty->assign('info_message', str_replace('+', ' ', encode_htmlspecialchars($_GET['info_message']))); } //BOF - web28 - 2011-05-15 - new continue shopping link
echo $payments_split->display_links($payments_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], xtc_get_all_get_params(array('page', 'pID', 'action'))); ?> </td> </tr> </table></td> </tr> </table></td> <?php $heading = array(); $contents = array(); switch ($_GET['action']) { case 'delete': $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_PAYMENT . '</b>'); $contents = array('form' => xtc_draw_form('payment', FILENAME_AFFILIATE_PAYMENT, xtc_get_all_get_params(array('pID', 'action')) . 'pID=' . $pInfo->affiliate_payment_id . '&action=deleteconfirm')); $contents[] = array('text' => TEXT_INFO_DELETE_INTRO . '<br>'); $contents[] = array('align' => 'center', 'text' => '<br>' . xtc_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . xtc_href_link(AFFILIATE_PAYMENT, xtc_get_all_get_params(array('pID', 'action')) . 'pID=' . $pInfo->affiliate_payment_id) . '">' . xtc_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; default: if (is_object($pInfo)) { $heading[] = array('text' => '<b>[' . $pInfo->affiliate_payment_id . '] ' . xtc_datetime_short($pInfo->affiliate_payment_date) . '</b>'); $contents[] = array('align' => 'center', 'text' => '<a href="' . xtc_href_link(FILENAME_AFFILIATE_PAYMENT, xtc_get_all_get_params(array('pID', 'action')) . 'pID=' . $pInfo->affiliate_payment_id . '&action=edit') . '">' . xtc_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . xtc_href_link(FILENAME_AFFILIATE_PAYMENT, xtc_get_all_get_params(array('pID', 'action')) . 'pID=' . $pInfo->affiliate_payment_id . '&action=delete') . '">' . xtc_image_button('button_delete.gif', IMAGE_DELETE) . '</a>'); $contents[] = array('align' => 'center', 'text' => '<a href="' . xtc_href_link(FILENAME_AFFILIATE_INVOICE, 'pID=' . $pInfo->affiliate_payment_id) . '" TARGET="_blank">' . xtc_image_button('button_invoice.gif', IMAGE_ORDERS_INVOICE) . '</a> '); } break; } if (xtc_not_null($heading) && xtc_not_null($contents)) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box(); echo $box->infoBox($heading, $contents); echo ' </td>' . "\n"; }
// web28 - 2010-09-21 - change NONSSL -> SSL //BOF - web28 - 2010-02-09: SHOW EMAIL IN INPUT FIELD //$smarty->assign('INPUT_EMAIL', xtc_draw_input_field('email', xtc_db_input($_POST['email']))); $smarty->assign('INPUT_EMAIL', xtc_draw_input_field('email', isset($_GET['email']) && xtc_db_input($_GET['email']) != '' ? xtc_db_input($_GET['email']) : (isset($_POST['email']) && xtc_db_input($_POST['email']) ? xtc_db_input($_POST['email']) : ''))); //EOF - web28 - 2010-02-09: SHOW EMAIL IN INPUT FIELD //BOF - web28 - 2010-02-09: NEWSLETTER ERROR HANDLING if (isset($_POST['check']) && $_POST['add'] == '') { $inp = 'true'; $del = ''; } if (isset($_POST['check']) && $_POST['delete'] == '') { $inp = ''; $del = 'true'; } #$smarty->assign('CHECK_INP', xtc_draw_radio_field('check', 'inp', $inp)); //EOF - web28 - 2010-02-09: NEWSLETTER ERROR HANDLING #$smarty->assign('CHECK_DEL', xtc_draw_radio_field('check', 'del', $del)); $smarty->assign('BUTTON_SEND', xtc_image_submit('button_send.gif', IMAGE_BUTTON_LOGIN_NEWSLETTER, "name=add")); $smarty->assign('BUTTON_UNSUB', xtc_image_submit('button_delete.gif', IMAGE_BUTTON_UNSUBSCRIBE_NEWSLETTER, "name=delete")); $smarty->assign('FORM_END', '</form>'); $smarty->assign('language', $_SESSION['language']); $smarty->caching = 0; $main_content = $smarty->fetch(CURRENT_TEMPLATE . '/module/newsletter.html'); $smarty->assign('main_content', $main_content); $smarty->assign('language', $_SESSION['language']); $smarty->caching = 0; if (!defined('RM')) { $smarty->load_filter('output', 'note'); } $smarty->display(CURRENT_TEMPLATE . '/index.html'); include 'includes/application_bottom.php';
XT-Commerce - community made shopping http://www.xt-commerce.com Copyright (c) 2003 XT-Commerce Released under the GNU General Public License ---------------------------------------------------------------------------------------*/ //header( 'HTTP/1.0 404 Not Found' ); //header( 'Status: 404 Not Found' ); $module_smarty = new Smarty(); $module_smarty->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/'); $module_smarty->assign('language', $_SESSION['language']); $module_smarty->assign('ERROR', $error); $module_smarty->assign('BUTTON', '<a href="javascript:history.back(1)">' . xtc_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'); // Tomcraft - 2010-05-04 - Changed alternative text for the button $module_smarty->assign('language', $_SESSION['language']); // search field $module_smarty->assign('FORM_ACTION', xtc_draw_form('new_find', xtc_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', $request_type, false), 'get') . xtc_hide_session_id()); //WEB28 change NONSSL to $request_type $module_smarty->assign('INPUT_SEARCH', xtc_draw_input_field('keywords', '', 'size="30" maxlength="30"')); $module_smarty->assign('BUTTON_SUBMIT', xtc_image_submit('button_quick_find.gif', IMAGE_BUTTON_SEARCH)); $module_smarty->assign('LINK_ADVANCED', xtc_href_link(FILENAME_ADVANCED_SEARCH)); $module_smarty->assign('FORM_END', '</form>'); $module_smarty->caching = 0; $module_smarty->caching = 0; $module = $module_smarty->fetch(CURRENT_TEMPLATE . '/module/error_message.html'); if (strstr($PHP_SELF, FILENAME_PRODUCT_INFO)) { $product_info = $module; } $smarty->assign('main_content', $module);
function confirmation() { global $order, $smarty, $xtPrice, $main, $messageStack, $total_weight, $total_count, $free_shipping; if (isset($_GET['conditions_message'])) { $message_condition = str_replace('\\n', '', ERROR_CONDITIONS_NOT_ACCEPTED); $message_address = str_replace('\\n', '', ERROR_ADDRESS_NOT_ACCEPTED); switch ($_GET['conditions_message']) { case "1": $messageStack->add('checkout_confirmation', $message_condition); break; case "13": $messageStack->add('checkout_confirmation', $message_condition); $messageStack->add('checkout_confirmation', ERROR_CHECKOUT_SHIPPING_NO_METHOD); break; case "2": $messageStack->add('checkout_confirmation', $message_address); break; case "23": $messageStack->add('checkout_confirmation', $message_address); $messageStack->add('checkout_confirmation', ERROR_CHECKOUT_SHIPPING_NO_METHOD); break; case "12": $messageStack->add('checkout_confirmation', $message_condition); $messageStack->add('checkout_confirmation', $message_address); break; case "123": $messageStack->add('checkout_confirmation', $message_condition); $messageStack->add('checkout_confirmation', $message_address); $messageStack->add('checkout_confirmation', ERROR_CHECKOUT_SHIPPING_NO_METHOD); break; case "3": $messageStack->add('checkout_confirmation', ERROR_CHECKOUT_SHIPPING_NO_METHOD); break; } } if ($order->delivery['country']['iso_code_2'] != '') { $_SESSION['delivery_zone'] = $order->delivery['country']['iso_code_2']; } $no_shipping = false; if ($order->content_type == 'virtual' || $order->content_type == 'virtual_weight' || $_SESSION['cart']->count_contents_virtual() == 0) { $no_shipping = true; } $total_weight = $_SESSION['cart']->show_weight(); $total_count = $_SESSION['cart']->count_contents(); // load all enabled shipping modules $shipping_modules = new shipping(); // add unallowed payment / shipping if (defined('MODULE_EXCLUDE_PAYMENT_STATUS') && MODULE_EXCLUDE_PAYMENT_STATUS == 'True') { for ($i = 1; $i <= MODULE_EXCLUDE_PAYMENT_NUMBER; $i++) { $payment_exclude = explode(',', constant('MODULE_EXCLUDE_PAYMENT_PAYMENT_' . $i)); if (in_array($this->code, $payment_exclude)) { $shipping_exclude = explode(',', constant('MODULE_EXCLUDE_PAYMENT_SHIPPING_' . $i)); for ($i = 0, $n = count($shipping_modules->modules); $i < $n; $i++) { if (in_array(substr($shipping_modules->modules[$i], 0, -4), $shipping_exclude)) { unset($shipping_modules->modules[$i]); } } } } } $free_shipping = false; $ot_shipping = new ot_shipping(); $ot_shipping->process(); if ($no_shipping === true) { $_SESSION['shipping'] = false; } // get all available shipping quotes $quotes = $shipping_modules->quote(); // if no shipping method has been selected, automatically select the cheapest method. // if the modules status was changed when none were available, to save on implementing // a javascript force-selection method, also automatically select the cheapest shipping // method if more than one module is now enabled if (!isset($_SESSION['shipping']) && CHECK_CHEAPEST_SHIPPING_MODUL == 'true' || isset($_SESSION['shipping']) && $_SESSION['shipping'] == false && xtc_count_shipping_modules() > 1) { $_SESSION['shipping'] = $shipping_modules->cheapest(); } if ($no_shipping === true) { $_SESSION['shipping'] = false; } if (defined('SHOW_SELFPICKUP_FREE') && SHOW_SELFPICKUP_FREE == 'true') { if ($free_shipping == true) { $free_shipping = false; $quotes = array_merge($ot_shipping->quote(), $shipping_modules->quote('selfpickup', 'selfpickup')); } } $module_smarty = new Smarty(); $shipping_block = ''; if (xtc_count_shipping_modules() > 0) { $showtax = $_SESSION['customers_status']['customers_status_show_price_tax']; $module_smarty->assign('FREE_SHIPPING', $free_shipping); # free shipping or not... if ($free_shipping == true) { $module_smarty->assign('FREE_SHIPPING_TITLE', FREE_SHIPPING_TITLE); $module_smarty->assign('FREE_SHIPPING_DESCRIPTION', sprintf(FREE_SHIPPING_DESCRIPTION, $xtPrice->xtcFormat($free_shipping_value_over, true, 0, true)) . xtc_draw_hidden_field('shipping', 'free_free')); $module_smarty->assign('FREE_SHIPPING_ICON', $quotes[$i]['icon']); } else { $radio_buttons = 0; #loop through installed shipping methods... for ($i = 0, $n = sizeof($quotes); $i < $n; $i++) { if (!isset($quotes[$i]['error'])) { for ($j = 0, $n2 = sizeof($quotes[$i]['methods']); $j < $n2; $j++) { # set the radio button to be checked if it is the method chosen $quotes[$i]['methods'][$j]['radio_buttons'] = $radio_buttons; $checked = isset($_SESSION['shipping']) && $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $_SESSION['shipping']['id'] ? true : false; if ($checked == true || $n == 1 && $n2 == 1) { $quotes[$i]['methods'][$j]['checked'] = 1; } if ($n > 1 || $n2 > 1) { if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 || !isset($quotes[$i]['tax'])) { $quotes[$i]['tax'] = 0; } $quotes[$i]['methods'][$j]['price'] = $xtPrice->xtcFormat(xtc_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax']), true, 0, true); $quotes[$i]['methods'][$j]['radio_field'] = xtc_draw_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $checked, 'id="rd-' . ($i + 1) . '" onChange="this.form.submit()"'); } else { if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0) { $quotes[$i]['tax'] = 0; } $quotes[$i]['methods'][$j]['price'] = $xtPrice->xtcFormat(xtc_add_tax($quotes[$i]['methods'][$j]['cost'], isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0), true, 0, true) . xtc_draw_hidden_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id']); } $radio_buttons++; } } } $module_smarty->assign('module_content', $quotes); } $module_smarty->assign('language', $_SESSION['language']); $module_smarty->caching = 0; $shipping_block = $module_smarty->fetch(CURRENT_TEMPLATE . '/module/checkout_shipping_block.html'); } if ($no_shipping === false) { $module_smarty->assign('FORM_SHIPPING_ACTION', xtc_draw_form('checkout_shipping', xtc_href_link(FILENAME_CHECKOUT_CONFIRMATION, xtc_get_all_get_params(), 'SSL')) . xtc_draw_hidden_field('action', 'process')); $shipping_found = false; for ($i = 0, $n = sizeof($quotes); $i < $n; $i++) { for ($j = 0, $n2 = sizeof($quotes[$i]['methods']); $j < $n2; $j++) { if ($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $_SESSION['shipping']['id']) { $shipping_found = true; break; } } } if ($shipping_found === false) { $module_smarty->assign('shipping_message', ERROR_CHECKOUT_SHIPPING_NO_METHOD); /* if (xtc_count_shipping_modules() == 1) { $module_smarty->assign('BUTTON_CONTINUE', xtc_image_submit('button_confirm.gif', IMAGE_BUTTON_CONFIRM)); } */ } $module_smarty->assign('BUTTON_CONTINUE', xtc_image_submit('button_confirm.gif', IMAGE_BUTTON_CONFIRM)); $module_smarty->assign('FORM_END', '</form>'); if ($no_shipping === false) { $module_smarty->assign('SHIPPING_BLOCK', $shipping_block); } $module_smarty->assign('language', $_SESSION['language']); $module_smarty->caching = 0; $shipping_method = $module_smarty->fetch(DIR_FS_EXTERNAL . '/paypal/templates/shipping_block.html'); $smarty->assign('SHIPPING_METHOD', $shipping_method); } $smarty->assign('SHIPPING_ADDRESS_EDIT', xtc_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, xtc_get_all_get_params(), 'SSL')); $smarty->assign('BILLING_ADDRESS_EDIT', xtc_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, xtc_get_all_get_params(), 'SSL')); $smarty->clear_assign('SHIPPING_EDIT'); $smarty->clear_assign('PAYMENT_EDIT'); //$smarty->clear_assign('PRODUCTS_EDIT'); }
http://www.xt-commerce.com Copyright (c) 2003 XT-Commerce ----------------------------------------------------------------------------------------- based on: (c) 2000-2001 The Exchange Project (earlier name of osCommerce) (c) 2002-2003 osCommerce(add_a_quickie.php,v 1.10 2001/12/19); www.oscommerce.com Released under the GNU General Public License ----------------------------------------------------------------------------------------- Third Party contribution: Add A Quickie v1.0 Autor Harald Ponce de Leon Released under the GNU General Public License ---------------------------------------------------------------------------------------*/ // reset var $box_smarty = new smarty(); $box_content = ''; $box_smarty->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/'); // BOF - GTB - 2010-09-20 - correct the Formular in dependences of the request type SSL / NONSSL $box_smarty->assign('FORM_ACTION', '<form id="quick_add" method="post" action="' . xtc_href_link(basename($PHP_SELF), xtc_get_all_get_params(array('action')) . 'action=add_a_quickie', $request_type) . '">'); //$box_smarty->assign('FORM_ACTION','<form id="quick_add" method="post" action="' . xtc_href_link(basename($PHP_SELF), xtc_get_all_get_params(array ('action')) . 'action=add_a_quickie', 'NONSSL') . '">'); // EOF - GTB - 2010-09-20 - correct the Formular in dependences of the request type SSL / NONSSL $box_smarty->assign('INPUT_FIELD', xtc_draw_input_field('quickie', '', 'style="width:170px"')); $box_smarty->assign('SUBMIT_BUTTON', xtc_image_submit('button_add_quick.gif', BOX_HEADING_ADD_PRODUCT_ID)); $box_smarty->assign('FORM_END', '</form>'); $box_smarty->assign('BOX_CONTENT', $box_content); $box_smarty->assign('language', $_SESSION['language']); $box_smarty->caching = 0; $box_add_a_quickie = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_add_a_quickie.html'); $smarty->assign('box_ADD_QUICKIE', $box_add_a_quickie);
?> </td> <td><?php echo xtc_draw_textarea_field('message', 'soft', '60', '15'); ?> </td> </tr> <tr> <td colspan="2"><?php echo xtc_draw_separator('pixel_trans.gif', '1', '10'); ?> </td> </tr> <tr> <td colspan="2" align="right"><?php echo xtc_image_submit('button_send_mail.gif', IMAGE_SEND_EMAIL); ?> </td> </tr> </table></td> </form></tr> <?php } ?> <!-- body_text_eof //--> </table></td> </tr> </table></td> </tr> </table> <!-- body_eof //-->
$newpass = xtc_create_random_value(ENTRY_PASSWORD_MIN_LENGTH); $crypted_password = xtc_encrypt_password($newpass); xtc_db_query("update " . TABLE_AFFILIATE . " set affiliate_password = '******' where affiliate_id = '" . $check_affiliate['affiliate_id'] . "'"); xtc_php_mail(AFFILIATE_EMAIL_ADDRESS, STORE_OWNER, $_POST['email_address'], $check_affiliate['affiliate_firstname'] . " " . $check_affiliate['affiliate_lastname'], '', AFFILIATE_EMAIL_ADDRESS, STORE_OWNER, '', '', EMAIL_PASSWORD_REMINDER_SUBJECT, nl2br(sprintf(EMAIL_PASSWORD_REMINDER_BODY, $newpass)), nl2br(sprintf(EMAIL_PASSWORD_REMINDER_BODY, $newpass))); if (!isset($mail_error)) { xtc_redirect(xtc_href_link(FILENAME_AFFILIATE, 'info_message=' . urlencode(TEXT_PASSWORD_SENT), 'SSL', true, false)); } else { echo $mail_error; } } else { xtc_redirect(xtc_href_link(FILENAME_AFFILIATE_PASSWORD_FORGOTTEN, 'email=nonexistent', 'SSL')); } } else { $breadcrumb->add(NAVBAR_TITLE, xtc_href_link(FILENAME_AFFILIATE, '', 'SSL')); $breadcrumb->add(NAVBAR_TITLE_PASSWORD_FORGOTTEN, xtc_href_link(FILENAME_AFFILIATE_PASSWORD_FORGOTTEN, '', 'SSL')); require DIR_WS_INCLUDES . 'header.php'; $smarty->assign('FORM_ACTION', xtc_draw_form('password_forgotten', xtc_href_link(FILENAME_AFFILIATE_PASSWORD_FORGOTTEN, 'action=process', 'SSL'))); $smarty->assign('INPUT_EMAIL', xtc_draw_input_field('email_address', '', 'maxlength="96"')); $smarty->assign('LINK_AFFILIATE', '<a href="' . xtc_href_link(FILENAME_AFFILIATE, '', 'SSL') . '">' . xtc_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'); $smarty->assign('BUTTON_SUBMIT', xtc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE)); if (isset($_GET['email']) && $_GET['email'] == 'nonexistent') { $smarty->assign('email_nonexistent', 'true'); } } $smarty->assign('language', $_SESSION['language']); $smarty->caching = 0; $main_content = $smarty->fetch(CURRENT_TEMPLATE . '/module/affiliate_password_forgotten.html'); $smarty->assign('main_content', $main_content); $smarty->assign('language', $_SESSION['language']); $smarty->caching = 0; $smarty->display(CURRENT_TEMPLATE . '/index.html');
</table></td> </tr> </table></td> <?php $heading = array(); $contents = array(); switch ($_GET['action']) { case 'delete': $heading[] = array('text' => '<b>' . $abInfo->affiliate_banners_title . '</b>'); $contents = array('form' => xtc_draw_form('affiliate_banners', FILENAME_AFFILIATE_BANNER_MANAGER, 'page=' . $_GET['page'] . '&abID=' . $abInfo->affiliate_banners_id . '&action=deleteconfirm')); $contents[] = array('text' => TEXT_INFO_DELETE_INTRO); $contents[] = array('text' => '<br><b>' . $abInfo->affiliate_banners_title . '</b>'); if ($abInfo->affiliate_banners_image) { $contents[] = array('text' => '<br>' . xtc_draw_checkbox_field('delete_image', 'on', true) . ' ' . TEXT_INFO_DELETE_IMAGE); } $contents[] = array('align' => 'center', 'text' => '<br>' . xtc_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . xtc_href_link(FILENAME_AFFILIATE_BANNER_MANAGER, 'page=' . $_GET['page'] . '&abID=' . $_GET['abID']) . '">' . xtc_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; default: if (is_object($abInfo)) { $sql = "select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . $abInfo->affiliate_products_id . "' and language_id = '" . $_SESSION['languages_id'] . "'"; $product_description_query = xtc_db_query($sql); $product_description = xtc_db_fetch_array($product_description_query); $heading[] = array('text' => '<b>' . $abInfo->affiliate_banners_title . '</b>'); $contents[] = array('align' => 'center', 'text' => '<a href="' . xtc_href_link(FILENAME_AFFILIATE_BANNER_MANAGER, 'page=' . $_GET['page'] . '&abID=' . $abInfo->affiliate_banners_id . '&action=new') . '">' . xtc_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . xtc_href_link(FILENAME_AFFILIATE_BANNER_MANAGER, 'page=' . $_GET['page'] . '&abID=' . $abInfo->affiliate_banners_id . '&action=delete') . '">' . xtc_image_button('button_delete.gif', IMAGE_DELETE) . '</a>'); $contents[] = array('text' => $product_description['products_name']); $contents[] = array('text' => '<br>' . TEXT_BANNERS_DATE_ADDED . ' ' . xtc_date_short($abInfo->affiliate_date_added)); $contents[] = array('text' => '' . sprintf(TEXT_BANNERS_STATUS_CHANGE, xtc_date_short($abInfo->affiliate_date_status_change))); } break; } if (xtc_not_null($heading) && xtc_not_null($contents)) {
} $smarty->assign('PAYMENT_INFORMATION', $payment_info); } } if (isset(${$_SESSION}['payment']->form_action_url) && !${$_SESSION}['payment']->tmpOrders) { $form_action_url = ${$_SESSION}['payment']->form_action_url; } else { $form_action_url = xtc_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL'); } $smarty->assign('CHECKOUT_FORM', xtc_draw_form('checkout_confirmation', $form_action_url, 'post')); $checkout_payment_button = ''; if (isset($checkout_payment_modules->modules) && is_array($checkout_payment_modules->modules)) { $checkout_payment_button .= $checkout_payment_modules->process_button(); } $smarty->assign('MODULE_BUTTONS', $checkout_payment_button); $smarty->assign('CHECKOUT_BUTTON', xtc_image_submit('button_confirm_order.gif', IMAGE_BUTTON_CONFIRM_ORDER) . "\n"); if ($order->info['shipping_method']) { $smarty->assign('SHIPPING_METHOD', $order->info['shipping_method']); //$smarty->assign('SHIPPING_EDIT', xtc_href_link(FILENAME_PAYPAL_CHECKOUT_SHIPPING, '', 'SSL')); $smarty->assign('SHIPPING_EDIT', xtc_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); //DokuMan - 2012-05-29 - assume FILENAME_CHECKOUT_SHIPPING here } $smarty->assign('COMMENTS', xtc_draw_textarea_field('comments', 'soft', '60', '5', isset($_SESSION['comments']) ? $_SESSION['comments'] : '') . xtc_draw_hidden_field('comments_added', 'YES')); //Dokuman - 2012-05-31 - fix paypal_checkout notices $smarty->assign('ADR_checkbox', '<input type="checkbox" value="address" name="check_address" />'); //check if display conditions on checkout page is true if (DISPLAY_CONDITIONS_ON_CHECKOUT == 'true') { if (GROUP_CHECK == 'true') { $group_check = "and group_ids LIKE '%c_" . $_SESSION['customers_status']['customers_status_id'] . "_group%'"; } $shop_content_query = xtc_db_query("SELECT\n content_title,\n content_heading,\n content_text,\n content_file\n FROM " . TABLE_CONTENT_MANAGER . "\n WHERE content_group='3' " . $group_check . "\n AND languages_id='" . $_SESSION['languages_id'] . "'");
(c) 2002-2003 osCommerce www.oscommerce.com (c) 2003 nextcommerce www.nextcommerce.org Released under the GNU General Public License ---------------------------------------------------------------------------------------*/ $box_smarty = new smarty(); $box_content = ''; $rebuild = false; $box_smarty->assign('language', $_SESSION['language']); // set cache ID if (!CacheCheck()) { $cache = false; $box_smarty->caching = 0; } else { $cache = true; $box_smarty->caching = 1; $box_smarty->cache_lifetime = CACHE_LIFETIME; $box_smarty->cache_modified_check = CACHE_CHECK; $cache_id = $_SESSION['language']; } if (!$box_smarty->is_cached(CURRENT_TEMPLATE . '/boxes/box_newsletter.html', $cache_id) || !$cache) { $box_smarty->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/'); $rebuild = true; $box_smarty->assign('FORM_ACTION', xtc_draw_form('sign_in', xtc_href_link(FILENAME_NEWSLETTER, '', 'SSL'))); // web28 - 2010-09-21 - change NONSSL -> SSL $box_smarty->assign('FIELD_EMAIL', xtc_draw_input_field('email', '', 'maxlength="50" style="width:170px;"')); $box_smarty->assign('BUTTON', xtc_image_submit('button_login_newsletter.gif', IMAGE_BUTTON_LOGIN_NEWSLETTER)); $box_smarty->assign('FORM_END', '</form>'); } $box_newsletter = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_newsletter.html', $cache_id); $smarty->assign('box_NEWSLETTER', $box_newsletter);