public static function execute(ApplicationAbstract $application) { $OSCOM_ShoppingCart = Registry::get('ShoppingCart'); $OSCOM_Service = Registry::get('Service'); $OSCOM_Breadcrumb = Registry::get('Breadcrumb'); $OSCOM_Template = Registry::get('Template'); $OSCOM_Customer = Registry::get('Customer'); global $osC_oiAddress; // HPDL $application->setPageTitle(OSCOM::getDef('shipping_method_heading')); $application->setPageContent('shipping.php'); if ($OSCOM_Service->isStarted('Breadcrumb')) { $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_checkout_shipping'), OSCOM::getLink(null, null, 'Shipping', 'SSL')); } // load shipping address page if no default address exists if (!$OSCOM_ShoppingCart->hasShippingAddress()) { $application->setPageTitle(OSCOM::getDef('shipping_address_heading')); $application->setPageContent('shipping_address.php'); $OSCOM_Template->addJavascriptFilename(OSCOM::getPublicSiteLink('javascript/checkout_shipping_address.js')); $OSCOM_Template->addJavascriptPhpFilename(OSCOM::BASE_DIRECTORY . 'Core/Site/Shop/assets/form_check.js.php'); if (!$OSCOM_Customer->isLoggedOn()) { $osC_oiAddress = new ObjectInfo($OSCOM_ShoppingCart->getShippingAddress()); } } else { $OSCOM_Template->addJavascriptFilename(OSCOM::getPublicSiteLink('javascript/checkout_shipping.js')); // load all enabled shipping modules Registry::set('Shipping', new ShippingClass(), true); } }
public static function execute(ApplicationAbstract $application) { $OSCOM_ShoppingCart = Registry::get('ShoppingCart'); $OSCOM_Service = Registry::get('Service'); $OSCOM_Breadcrumb = Registry::get('Breadcrumb'); $OSCOM_Template = Registry::get('Template'); global $osC_oiAddress; // HPDL $application->setPageTitle(OSCOM::getDef('payment_method_heading')); $application->setPageContent('billing.php'); if ($OSCOM_Service->isStarted('Breadcrumb')) { $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_checkout_payment'), OSCOM::getLink(null, null, 'Billing', 'SSL')); } // load billing address page if no default address exists if (!$OSCOM_ShoppingCart->hasBillingAddress()) { $application->setPageTitle(OSCOM::getDef('payment_address_heading')); $application->setPageContent('billing_address.php'); $OSCOM_Template->addJavascriptFilename(OSCOM::getPublicSiteLink('javascript/checkout_payment_address.js')); $OSCOM_Template->addJavascriptPhpFilename(OSCOM::BASE_DIRECTORY . 'Core/Site/Shop/assets/form_check.js.php'); if (!$OSCOM_Customer->isLoggedOn()) { $osC_oiAddress = new ObjectInfo($OSCOM_ShoppingCart->getBillingAddress()); } } else { $OSCOM_Template->addJavascriptFilename(OSCOM::getPublicSiteLink('javascript/checkout_payment.js')); // load all enabled payment modules $OSCOM_Payment = Registry::get('Payment'); $OSCOM_Payment->loadAll(); $OSCOM_Template->addJavascriptBlock($OSCOM_Payment->getJavascriptBlocks()); } // HPDL // if (isset($_GET['payment_error']) && is_object(${$_GET['payment_error']}) && ($error = ${$_GET['payment_error']}->get_error())) { // $OSCOM_MessageStack->add('CheckoutBilling', $error['error'], 'error'); // } }
public static function execute(ApplicationAbstract $application) { if ( isset($_GET['id']) && is_numeric($_GET['id']) ) { $application->setPageContent('edit.php'); } else { $application->setPageContent('new.php'); } }
public static function execute(ApplicationAbstract $application) { $OSCOM_Service = Registry::get('Service'); $OSCOM_Breadcrumb = Registry::get('Breadcrumb'); $application->setPageTitle(sprintf(OSCOM::getDef('index_heading'), STORE_NAME)); $application->setPageContent('product_listing.php'); if (is_numeric($_GET['Manufacturers'])) { Registry::set('Manufacturer', new Manufacturer($_GET['Manufacturers'])); $OSCOM_Manufacturer = Registry::get('Manufacturer'); $application->setPageTitle($OSCOM_Manufacturer->getTitle()); // HPDL $application->setPageImage('manufacturers/' . $OSCOM_Manufacturer->getImage()); if ($OSCOM_Service->isStarted('Breadcrumb')) { $OSCOM_Breadcrumb->add($OSCOM_Manufacturer->getTitle(), OSCOM::getLink()); } Registry::set('Products', new Products()); $OSCOM_Products = Registry::get('Products'); $OSCOM_Products->setManufacturer($OSCOM_Manufacturer->getID()); if (isset($_GET['filter']) && is_numeric($_GET['filter']) && $_GET['filter'] > 0) { $OSCOM_Products->setCategory($_GET['filter']); } if (isset($_GET['sort']) && !empty($_GET['sort'])) { if (strpos($_GET['sort'], '|d') !== false) { $OSCOM_Products->setSortBy(substr($_GET['sort'], 0, -2), '-'); } else { $OSCOM_Products->setSortBy($_GET['sort']); } } } else { osc_redirect(OSCOM::getLink(OSCOM::getDefaultSite(), OSCOM::getDefaultSiteApplication())); } }
public static function execute(ApplicationAbstract $application) { $OSCOM_Customer = Registry::get('Customer'); $OSCOM_NavigationHistory = Registry::get('NavigationHistory'); $OSCOM_Language = Registry::get('Language'); $OSCOM_Service = Registry::get('Service'); $OSCOM_Breadcrumb = Registry::get('Breadcrumb'); if ($OSCOM_Customer->isLoggedOn() === false) { $OSCOM_NavigationHistory->setSnapshot(); osc_redirect(OSCOM::getLink(null, null, 'LogIn', 'SSL')); } $application->setPageTitle(OSCOM::getDef('orders_heading')); $application->setPageContent('orders.php'); $OSCOM_Language->load('order'); if ($OSCOM_Service->isStarted('Breadcrumb')) { $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_my_orders'), OSCOM::getLink(null, null, 'Orders', 'SSL')); if (is_numeric($_GET['Orders'])) { $OSCOM_Breadcrumb->add(sprintf(OSCOM::getDef('breadcrumb_order_information'), $_GET['Orders']), OSCOM::getLink(null, null, 'Orders=' . $_GET['Orders'], 'SSL')); } } if (is_numeric($_GET['Orders'])) { if (Order::getCustomerID($_GET['Orders']) !== $OSCOM_Customer->getID()) { osc_redirect(OSCOM::getLink(null, null, null, 'SSL')); } $application->setPageTitle(sprintf(OSCOM::getDef('order_information_heading'), $_GET['Orders'])); $application->setPageContent('orders_info.php'); } }
public static function execute(ApplicationAbstract $application) { $OSCOM_Customer = Registry::get('Customer'); $OSCOM_NavigationHistory = Registry::get('NavigationHistory'); $OSCOM_MessageStack = Registry::get('MessageStack'); $OSCOM_Service = Registry::get('Service'); $OSCOM_Breadcrumb = Registry::get('Breadcrumb'); if (ALLOW_GUEST_TO_TELL_A_FRIEND == '-1' && $OSCOM_Customer->isLoggedOn() === false) { $OSCOM_NavigationHistory->setSnapshot(); osc_redirect(OSCOM::getLink(null, 'Account', 'LogIn', 'SSL')); } $requested_product = null; $product_check = false; if (count($_GET) > 3) { $requested_product = basename(key(array_slice($_GET, 3, 1, true))); if ($requested_product == 'Write') { unset($requested_product); if (count($_GET) > 4) { $requested_product = basename(key(array_slice($_GET, 4, 1, true))); } } } if (isset($requested_product)) { if (Product::checkEntry($requested_product)) { $product_check = true; } } if ($product_check === false) { $application->setPageContent('not_found.php'); return false; } Registry::set('Product', new Product($requested_product)); $OSCOM_Product = Registry::get('Product'); if (empty($_POST['from_name'])) { $OSCOM_MessageStack->add('TellAFriend', OSCOM::getDef('error_tell_a_friend_customers_name_empty')); } if (!osc_validate_email_address($_POST['from_email_address'])) { $OSCOM_MessageStack->add('TellAFriend', OSCOM::getDef('error_tell_a_friend_invalid_customers_email_address')); } if (empty($_POST['to_name'])) { $OSCOM_MessageStack->add('TellAFriend', OSCOM::getDef('error_tell_a_friend_friends_name_empty')); } if (!osc_validate_email_address($_POST['to_email_address'])) { $OSCOM_MessageStack->add('TellAFriend', OSCOM::getDef('error_tell_a_friend_invalid_friends_email_address')); } if ($OSCOM_MessageStack->size('TellAFriend') < 1) { $email_subject = sprintf(OSCOM::getDef('email_tell_a_friend_subject'), osc_sanitize_string($_POST['from_name']), STORE_NAME); $email_body = sprintf(OSCOM::getDef('email_tell_a_friend_intro'), osc_sanitize_string($_POST['to_name']), osc_sanitize_string($_POST['from_name']), $OSCOM_Product->getTitle(), STORE_NAME) . "\n\n"; if (!empty($_POST['message'])) { $email_body .= osc_sanitize_string($_POST['message']) . "\n\n"; } $email_body .= sprintf(OSCOM::getDef('email_tell_a_friend_link'), OSCOM::getLink(null, null, $OSCOM_Product->getKeyword(), 'NONSSL', false)) . "\n\n" . sprintf(OSCOM::getDef('email_tell_a_friend_signature'), STORE_NAME . "\n" . HTTP_SERVER . DIR_WS_CATALOG . "\n"); osc_email(osc_sanitize_string($_POST['to_name']), osc_sanitize_string($_POST['to_email_address']), $email_subject, $email_body, osc_sanitize_string($_POST['from_name']), osc_sanitize_string($_POST['from_email_address'])); $OSCOM_MessageStack->add('header', sprintf(OSCOM::getDef('success_tell_a_friend_email_sent'), $OSCOM_Product->getTitle(), osc_output_string_protected($_POST['to_name'])), 'success'); osc_redirect(OSCOM::getLink(null, null, $OSCOM_Product->getKeyword())); } $application->setPageTitle($OSCOM_Product->getTitle()); $application->setPageContent('tell_a_friend.php'); }
public static function execute(ApplicationAbstract $application) { $data = array('name' => $_POST['categories_name'], 'image' => isset($_POST['cImageSelected']) ? $_POST['cImageSelected'] : null, 'parent_id' => $_POST['parent_id']); if (Categories::save(isset($_GET['id']) && is_numeric($_GET['id']) ? $_GET['id'] : null, $data)) { Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success'); } else { Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error'); } OSCOM::redirect(OSCOM::getLink(null, null, 'cid=' . $application->getCurrentCategoryID())); }
public static function execute(ApplicationAbstract $application) { $OSCOM_Service = Registry::get('Service'); $OSCOM_Breadcrumb = Registry::get('Breadcrumb'); $application->setPageTitle(OSCOM::getDef('info_shipping_heading')); $application->setPageContent('shipping.php'); if ($OSCOM_Service->isStarted('Breadcrumb')) { $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_shipping'), OSCOM::getLink(null, null, 'Shipping')); } }
public static function execute(ApplicationAbstract $application) { $parent_id = $application->getTree()->getParentID($_GET['id']); if (Categories::delete($_GET['id'])) { Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success'); } else { Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error'); } OSCOM::redirect(OSCOM::getLink(null, null, 'cid=' . $parent_id)); }
public static function execute(ApplicationAbstract $application) { $OSCOM_Service = Registry::get('Service'); $OSCOM_Breadcrumb = Registry::get('Breadcrumb'); $application->setPageTitle(OSCOM::getDef('new_products_heading')); $application->setPageContent('all.php'); if ($OSCOM_Service->isStarted('Breadcrumb')) { $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_new_products'), OSCOM::getLink(null, null, 'All')); } }
public static function execute(ApplicationAbstract $application) { if (!isset($_GET['log']) || empty($_GET['log'])) { OSCOM::redirect(OSCOM::getLink()); } if (!CoreUpdate::logExists($_GET['log'])) { Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_log_file_does_not_exist'), 'error'); OSCOM::redirect(OSCOM::getLink()); } $application->setPageContent('view_log.php'); }
public static function execute(ApplicationAbstract $application) { $OSCOM_Template = Registry::get('Template'); $OSCOM_Service = Registry::get('Service'); $OSCOM_Breadcrumb = Registry::get('Breadcrumb'); $application->setPageTitle(OSCOM::getDef('password_forgotten_heading')); $application->setPageContent('password_forgotten.php'); $OSCOM_Template->addJavascriptPhpFilename(OSCOM::BASE_DIRECTORY . 'Core/Site/Shop/assets/form_check.js.php'); if ($OSCOM_Service->isStarted('Breadcrumb')) { $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_password_forgotten'), OSCOM::getLink(null, null, 'PasswordForgotten', 'SSL')); } }
public static function execute(ApplicationAbstract $application) { $OSCOM_Service = Registry::get('Service'); $OSCOM_Breadcrumb = Registry::get('Breadcrumb'); $OSCOM_ShoppingCart = Registry::get('ShoppingCart'); $OSCOM_Customer = Registry::get('Customer'); $application->setPageTitle(OSCOM::getDef('sign_out_heading')); $application->setPageContent('logoff.php'); if ($OSCOM_Service->isStarted('Breadcrumb')) { $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_sign_out')); } $OSCOM_Customer->reset(); $OSCOM_ShoppingCart->reset(); }
public static function execute(ApplicationAbstract $application) { $OSCOM_Template = Registry::get('Template'); $OSCOM_NavigationHistory = Registry::get('NavigationHistory'); // HPDL $OSCOM_Template->setHasHeader(false); $OSCOM_Template->setHasFooter(false); $OSCOM_Template->setHasBoxModules(false); $OSCOM_Template->setHasContentModules(false); $OSCOM_Template->setShowDebugMessages(false); $OSCOM_NavigationHistory->removeCurrentPage(); $application->setPageTitle(OSCOM::getDef('search_heading')); $application->setPageContent('help.php'); }
public static function execute(ApplicationAbstract $application) { if (!isset($_GET['v']) || !CoreUpdate::packageExists($_GET['v'])) { Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_select_version_to_view'), 'error'); OSCOM::redirect(OSCOM::getLink()); } if (CoreUpdate::localPackageExists() && CoreUpdate::getPackageInfo('version_to') != $_GET['v']) { CoreUpdate::deletePackage(); } if (!CoreUpdate::localPackageExists() && !CoreUpdate::downloadPackage($_GET['v'])) { Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_local_update_package_does_not_exist'), 'error'); OSCOM::redirect(OSCOM::getLink()); } $application->setPageContent('package_contents.php'); $application->setPageTitle(sprintf(OSCOM::getDef('action_heading_apply'), CoreUpdate::getPackageInfo('version_from'), CoreUpdate::getPackageInfo('version_to'))); }
public static function execute(ApplicationAbstract $application) { $OSCOM_Session = Registry::get('Session'); $OSCOM_Service = Registry::get('Service'); $OSCOM_Breadcrumb = Registry::get('Breadcrumb'); // redirect the customer to a friendly cookies-must-be-enabled page if cookies // are disabled (or the session has not started) if ($OSCOM_Session->hasStarted() === false) { osc_redirect(OSCOM::getLink(null, 'Info', 'Cookies')); } $application->setPageTitle(OSCOM::getDef('sign_in_heading')); $application->setPageContent('login.php'); if ($OSCOM_Service->isStarted('Breadcrumb')) { $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_sign_in'), OSCOM::getLink(null, null, 'LogIn', 'SSL')); } }
public static function execute(ApplicationAbstract $application) { $error = false; foreach ($_POST['batch'] as $id) { if (!Categories::move($id, $_POST['parent_id'])) { $error = true; break; } } if ($error === false) { Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success'); } else { Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error'); } OSCOM::redirect(OSCOM::getLink(null, null, 'cid=' . $application->getCurrentCategoryID())); }
public static function execute(ApplicationAbstract $application) { $OSCOM_Customer = Registry::get('Customer'); $OSCOM_NavigationHistory = Registry::get('NavigationHistory'); $OSCOM_Service = Registry::get('Service'); $OSCOM_Breadcrumb = Registry::get('Breadcrumb'); if ($OSCOM_Customer->isLoggedOn() === false) { $OSCOM_NavigationHistory->setSnapshot(); OSCOM::redirect(OSCOM::getLink(null, null, 'LogIn', 'SSL')); } $application->setPageTitle(OSCOM::getDef('newsletters_heading')); $application->setPageContent('newsletters.php'); if ($OSCOM_Service->isStarted('Breadcrumb')) { $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_newsletters'), OSCOM::getLink(null, null, 'Newsletters', 'SSL')); } }
public static function execute(ApplicationAbstract $application) { $OSCOM_MessageStack = Registry::get('MessageStack'); $OSCOM_Service = Registry::get('Service'); $OSCOM_Breadcrumb = Registry::get('Breadcrumb'); $OSCOM_Template = Registry::get('Template'); if (AddressBook::checkEntry($_GET['Edit']) === false) { $OSCOM_MessageStack->add('AddressBook', OSCOM::getDef('error_address_book_entry_non_existing'), 'error'); osc_redirect(OSCOM::getLink(null, null, 'AddressBook', 'SSL')); } if ($OSCOM_Service->isStarted('Breadcrumb')) { $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_address_book_edit_entry'), OSCOM::getLink(null, null, 'AddressBook&Edit=' . $_GET['Edit'], 'SSL')); } $application->setPageTitle(OSCOM::getDef('address_book_edit_entry_heading')); $application->setPageContent('address_book_process.php'); $OSCOM_Template->addJavascriptPhpFilename('includes/form_check.js.php'); }
public static function execute(ApplicationAbstract $application) { $OSCOM_ShoppingCart = Registry::get('ShoppingCart'); $OSCOM_Service = Registry::get('Service'); $OSCOM_Breadcrumb = Registry::get('Breadcrumb'); $OSCOM_ShoppingCart->reset(true); // unregister session variables used during checkout unset($_SESSION['comments']); $application->setPageTitle(OSCOM::getDef('success_heading')); $application->setPageContent('success.php'); if ($OSCOM_Service->isStarted('Breadcrumb')) { $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_checkout_success'), OSCOM::getLink(null, null, 'Success', 'SSL')); } // if ( $_GET[$this->_module] == 'update' ) { // $this->_process(); // } }
public static function execute(ApplicationAbstract $application) { $OSCOM_Customer = Registry::get('Customer'); $OSCOM_NavigationHistory = Registry::get('NavigationHistory'); $OSCOM_Template = Registry::get('Template'); $OSCOM_Service = Registry::get('Service'); $OSCOM_Breadcrumb = Registry::get('Breadcrumb'); if ($OSCOM_Customer->isLoggedOn() === false) { $OSCOM_NavigationHistory->setSnapshot(); osc_redirect(OSCOM::getLink(null, null, 'LogIn', 'SSL')); } $application->setPageTitle(OSCOM::getDef('account_edit_heading')); $application->setPageContent('edit.php'); $OSCOM_Template->addJavascriptPhpFilename('includes/form_check.js.php'); if ($OSCOM_Service->isStarted('Breadcrumb')) { $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_edit_account'), OSCOM::getLink(null, null, 'Edit', 'SSL')); } }
public static function execute(ApplicationAbstract $application) { $OSCOM_Customer = Registry::get('Customer'); $OSCOM_NavigationHistory = Registry::get('NavigationHistory'); $OSCOM_Template = Registry::get('Template'); $OSCOM_Service = Registry::get('Service'); $OSCOM_Breadcrumb = Registry::get('Breadcrumb'); if ($OSCOM_Customer->isLoggedOn() === false) { $OSCOM_NavigationHistory->setSnapshot(); OSCOM::redirect(OSCOM::getLink(null, null, 'LogIn', 'SSL')); } $application->setPageTitle(OSCOM::getDef('account_password_heading')); $application->setPageContent('password.php'); $OSCOM_Template->addJavascriptPhpFilename(OSCOM::BASE_DIRECTORY . 'Core/Site/Shop/assets/form_check.js.php'); if ($OSCOM_Service->isStarted('Breadcrumb')) { $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_edit_password'), OSCOM::getLink(null, null, 'Password', 'SSL')); } }
public static function execute(ApplicationAbstract $application) { $OSCOM_Session = Registry::get('Session'); $OSCOM_Service = Registry::get('Service'); $OSCOM_Breadcrumb = Registry::get('Breadcrumb'); $OSCOM_Template = Registry::get('Template'); // redirect the customer to a friendly cookies-must-be-enabled page if cookies // are disabled (or the session has not started) if ($OSCOM_Session->hasStarted() === false) { osc_redirect(OSCOM::getLink(null, 'Info', 'Cookies')); } $application->setPageTitle(OSCOM::getDef('create_account_heading')); $application->setPageContent('create.php'); if ($OSCOM_Service->isStarted('Breadcrumb')) { $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_create_account'), OSCOM::getLink(null, null, 'Create', 'SSL')); } $OSCOM_Template->addJavascriptPhpFilename('includes/form_check.js.php'); }
public static function execute(ApplicationAbstract $application) { $OSCOM_Template = Registry::get('Template'); $OSCOM_Service = Registry::get('Service'); $OSCOM_Breadcrumb = Registry::get('Breadcrumb'); $OSCOM_Customer = Registry::get('Customer'); $OSCOM_ShoppingCart = Registry::get('ShoppingCart'); global $osC_oiAddress; $application->setPageTitle(OSCOM::getDef('payment_address_heading')); $application->setPageContent('billing_address.php'); $OSCOM_Template->addJavascriptFilename(OSCOM::getPublicSiteLink('javascript/checkout_payment_address.js')); $OSCOM_Template->addJavascriptPhpFilename(OSCOM::BASE_DIRECTORY . 'Core/Site/Shop/assets/form_check.js.php'); if ($OSCOM_Service->isStarted('Breadcrumb')) { $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_checkout_payment_address'), OSCOM::getLink(null, null, 'Billing&Address', 'SSL')); } if (!$OSCOM_Customer->isLoggedOn()) { $osC_oiAddress = new ObjectInfo($OSCOM_ShoppingCart->getShippingAddress()); } }
public static function execute(ApplicationAbstract $application) { $OSCOM_Template = Registry::get('Template'); $OSCOM_Service = Registry::get('Service'); $OSCOM_Breadcrumb = Registry::get('Breadcrumb'); $OSCOM_Customer = Registry::get('Customer'); $OSCOM_ShoppingCart = Registry::get('ShoppingCart'); global $osC_oiAddress; $application->setPageTitle(OSCOM::getDef('shipping_address_heading')); $application->setPageContent('shipping_address.php'); $OSCOM_Template->addJavascriptFilename('templates/' . $OSCOM_Template->getCode() . '/javascript/checkout_shipping_address.js'); $OSCOM_Template->addJavascriptPhpFilename('includes/form_check.js.php'); if ($OSCOM_Service->isStarted('Breadcrumb')) { $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_checkout_shipping_address'), OSCOM::getLink(null, null, 'Shipping&Address', 'SSL')); } if (!$OSCOM_Customer->isLoggedOn()) { $osC_oiAddress = new ObjectInfo($OSCOM_ShoppingCart->getShippingAddress()); } }
public static function execute(ApplicationAbstract $application) { $OSCOM_Service = Registry::get('Service'); $OSCOM_Breadcrumb = Registry::get('Breadcrumb'); $OSCOM_Template = Registry::get('Template'); $OSCOM_MessageStack = Registry::get('MessageStack'); if ($OSCOM_Service->isStarted('Breadcrumb')) { $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_address_book_add_entry'), OSCOM::getLink(null, null, 'AddressBook&Create', 'SSL')); } $application->setPageTitle(OSCOM::getDef('address_book_add_entry_heading')); $application->setPageContent('address_book_process.php'); $OSCOM_Template->addJavascriptPhpFilename(OSCOM::BASE_DIRECTORY . 'Core/Site/Shop/assets/form_check.js.php'); if (AddressBook::numberOfEntries() >= MAX_ADDRESS_BOOK_ENTRIES) { $OSCOM_MessageStack->add('AddressBook', OSCOM::getDef('error_address_book_full')); $application->setPageTitle(OSCOM::getDef('address_book_heading')); $application->setPageContent('address_book.php'); return true; } }
public static function execute(ApplicationAbstract $application) { $OSCOM_Customer = Registry::get('Customer'); $OSCOM_NavigationHistory = Registry::get('NavigationHistory'); $OSCOM_Template = Registry::get('Template'); $OSCOM_Service = Registry::get('Service'); $OSCOM_Breadcrumb = Registry::get('Breadcrumb'); $requested_product = null; $product_check = false; if (count($_GET) > 3) { $requested_product = basename(key(array_slice($_GET, 3, 1, true))); if ($requested_product == 'Write') { unset($requested_product); if (count($_GET) > 4) { $requested_product = basename(key(array_slice($_GET, 4, 1, true))); } } } if (isset($requested_product)) { if (Product::checkEntry($requested_product)) { $product_check = true; } } if ($product_check === false) { $application->setPageContent('not_found.php'); return false; } if ($OSCOM_Customer->isLoggedOn() === false && SERVICE_REVIEW_ENABLE_REVIEWS == 1) { $OSCOM_NavigationHistory->setSnapshot(); osc_redirect(OSCOM::getLink(null, 'Account', 'LogIn', 'SSL')); } Registry::set('Product', new Product($requested_product)); $OSCOM_Product = Registry::get('Product'); $application->setPageTitle($OSCOM_Product->getTitle()); $application->setPageContent('reviews_write.php'); $OSCOM_Template->addJavascriptPhpFilename('templates/' . $OSCOM_Template->getCode() . '/javascript/products/reviews_new.php'); if ($OSCOM_Service->isStarted('Breadcrumb')) { $OSCOM_Breadcrumb->add($OSCOM_Product->getTitle(), OSCOM::getLink(null, null, 'Reviews&' . $OSCOM_Product->getKeyword())); $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_reviews_new'), OSCOM::getLink(null, null, 'Reviews&Write&' . $OSCOM_Product->getKeyword())); } }
public static function execute(ApplicationAbstract $application) { $OSCOM_Service = Registry::get('Service'); $OSCOM_Breadcrumb = Registry::get('Breadcrumb'); $review_check = false; if (is_numeric($_GET['View'])) { if (Reviews::exists($_GET['View'])) { $review_check = true; Registry::set('Product', new Product(Reviews::getProductID($_GET['View']))); $OSCOM_Product = Registry::get('Product'); $application->setPageTitle($OSCOM_Product->getTitle()); $application->setPageContent('reviews_view.php'); if ($OSCOM_Service->isStarted('Breadcrumb')) { $OSCOM_Breadcrumb->add($OSCOM_Product->getTitle(), OSCOM::getLink(null, null, 'Reviews&View=' . $_GET['View'] . '&' . $OSCOM_Product->getKeyword())); } } } if ($review_check === false) { $application->setPageContent('reviews_not_found.php'); } }
public static function execute(ApplicationAbstract $application) { $OSCOM_Customer = Registry::get('Customer'); $OSCOM_MessageStack = Registry::get('MessageStack'); $OSCOM_Service = Registry::get('Service'); $OSCOM_Breadcrumb = Registry::get('Breadcrumb'); if ($_GET['Delete'] == $OSCOM_Customer->getDefaultAddressID()) { $OSCOM_MessageStack->add('AddressBook', OSCOM::getDef('warning_primary_address_deletion'), 'warning'); } else { if (AddressBook::checkEntry($_GET['Delete']) === false) { $OSCOM_MessageStack->add('AddressBook', OSCOM::getDef('error_address_book_entry_non_existing'), 'error'); } } if ($OSCOM_MessageStack->size('AddressBook') > 0) { OSCOM::redirect(OSCOM::getLink(null, null, 'AddressBook', 'SSL')); } if ($OSCOM_Service->isStarted('Breadcrumb')) { $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_address_book_delete_entry'), OSCOM::getLink(null, null, 'AddressBook&Delete=' . $_GET['Delete'], 'SSL')); } $application->setPageTitle(OSCOM::getDef('address_book_delete_entry_heading')); $application->setPageContent('address_book_delete.php'); }
public static function execute(ApplicationAbstract $application) { $OSCOM_Customer = Registry::get('Customer'); $OSCOM_NavigationHistory = Registry::get('NavigationHistory'); $OSCOM_Service = Registry::get('Service'); $OSCOM_Breadcrumb = Registry::get('Breadcrumb'); if (ALLOW_GUEST_TO_TELL_A_FRIEND == '-1' && $OSCOM_Customer->isLoggedOn() === false) { $OSCOM_NavigationHistory->setSnapshot(); OSCOM::redirect(OSCOM::getLink(null, 'Account', 'LogIn', 'SSL')); } $requested_product = null; $product_check = false; if (count($_GET) > 2) { $requested_product = basename(key(array_slice($_GET, 2, 1, true))); if ($requested_product == OSCOM::getSiteApplication()) { unset($requested_product); if (count($_GET) > 3) { $requested_product = basename(key(array_slice($_GET, 3, 1, true))); } } } if (isset($requested_product)) { if (Product::checkEntry($requested_product)) { $product_check = true; Registry::set('Product', new Product($requested_product)); $OSCOM_Product = Registry::get('Product'); $application->setPageTitle($OSCOM_Product->getTitle()); $application->setPageContent('tell_a_friend.php'); if ($OSCOM_Service->isStarted('Breadcrumb')) { $OSCOM_Breadcrumb->add($OSCOM_Product->getTitle(), OSCOM::getLink(null, null, $OSCOM_Product->getKeyword())); $OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_tell_a_friend'), OSCOM::getLink(null, null, 'TellAFriend&' . $OSCOM_Product->getKeyword())); } } if ($product_check === false) { $application->setPageContent('not_found.php'); } } }