当前位置: 首页>>代码示例>>PHP>>正文


PHP OSCOM::getLink方法代码示例

本文整理汇总了PHP中osCommerce\OM\Core\OSCOM::getLink方法的典型用法代码示例。如果您正苦于以下问题:PHP OSCOM::getLink方法的具体用法?PHP OSCOM::getLink怎么用?PHP OSCOM::getLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在osCommerce\OM\Core\OSCOM的用法示例。


在下文中一共展示了OSCOM::getLink方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: initialize

 function initialize()
 {
     $OSCOM_Cache = Registry::get('Cache');
     $OSCOM_Language = Registry::get('Language');
     $OSCOM_Currencies = Registry::get('Currencies');
     $OSCOM_PDO = Registry::get('PDO');
     $OSCOM_Image = Registry::get('Image');
     $this->_title_link = OSCOM::getLink(null, 'Products', 'All');
     $data = array();
     if (BOX_WHATS_NEW_CACHE > 0 && $OSCOM_Cache->read('box-whats_new-' . $OSCOM_Language->getCode() . '-' . $OSCOM_Currencies->getCode(), BOX_WHATS_NEW_CACHE)) {
         $data = $OSCOM_Cache->getCache();
     } else {
         $Qnew = $OSCOM_PDO->prepare('select products_id from :table_products where products_status = :products_status order by products_date_added desc limit :max_random_select_new');
         $Qnew->bindInt(':products_status', 1);
         $Qnew->bindInt(':max_random_select_new', BOX_WHATS_NEW_RANDOM_SELECT);
         $Qnew->execute();
         $result = $Qnew->fetchAll();
         if (count($result) > 0) {
             $result = $result[rand(0, count($result) - 1)];
             $OSCOM_Product = new Product($result['products_id']);
             $data = $OSCOM_Product->getData();
             $data['display_price'] = $OSCOM_Product->getPriceFormated(true);
             $data['display_image'] = $OSCOM_Product->getImage();
         }
         $OSCOM_Cache->write($data);
     }
     if (!empty($data)) {
         $this->_content = '';
         if (!empty($data['display_image'])) {
             $this->_content .= HTML::link(OSCOM::getLink(null, 'Products', $data['keyword']), $OSCOM_Image->show($data['display_image'], $data['name'])) . '<br />';
         }
         $this->_content .= HTML::link(OSCOM::getLink(null, 'Products', $data['keyword']), $data['name']) . '<br />' . $data['display_price'];
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:34,代码来源:Controller.php

示例2: initialize

 public function initialize()
 {
     $OSCOM_Customer = Registry::get('Customer');
     $OSCOM_Database = Registry::get('Database');
     $OSCOM_Language = Registry::get('Language');
     if ($OSCOM_Customer->isLoggedOn()) {
         $Qorders = $OSCOM_Database->query('select distinct op.products_id from :table_orders o, :table_orders_products op, :table_products p where o.customers_id = :customers_id and o.orders_id = op.orders_id and op.products_id = p.products_id and p.products_status = 1 group by products_id order by o.date_purchased desc limit :limit');
         $Qorders->bindInt(':customers_id', $OSCOM_Customer->getID());
         $Qorders->bindInt(':limit', BOX_ORDER_HISTORY_MAX_LIST);
         $Qorders->execute();
         if ($Qorders->numberOfRows()) {
             $product_ids = '';
             while ($Qorders->next()) {
                 $product_ids .= $Qorders->valueInt('products_id') . ',';
             }
             $product_ids = substr($product_ids, 0, -1);
             $Qproducts = $OSCOM_Database->query('select products_id, products_name, products_keyword from :table_products_description where products_id in (:products_id) and language_id = :language_id order by products_name');
             $Qproducts->bindRaw(':products_id', $product_ids);
             $Qproducts->bindInt(':language_id', $OSCOM_Language->getID());
             $Qproducts->execute();
             $this->_content = '<ol style="list-style: none; margin: 0; padding: 0;">';
             while ($Qproducts->next()) {
                 $this->_content .= '<li>' . osc_link_object(OSCOM::getLink(null, 'Products', $Qproducts->value('products_keyword')), $Qproducts->value('products_name')) . '</li>';
             }
             $this->_content .= '</ol>';
         }
     }
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:28,代码来源:Controller.php

示例3: execute

 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');
     //      }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:34,代码来源:Billing.php

示例4: initialize

 public function initialize()
 {
     if (Registry::exists('Product')) {
         $OSCOM_PDO = Registry::get('PDO');
         $OSCOM_Product = Registry::get('Product');
         $OSCOM_Language = Registry::get('Language');
         $OSCOM_Image = Registry::get('Image');
         $Qorders = $OSCOM_PDO->prepare('select p.products_id, pd.products_name, pd.products_keyword, i.image from :table_orders_products opa, :table_orders_products opb, :table_orders o, :table_products p left join :table_products_images i on (p.products_id = i.products_id and i.default_flag = :default_flag), :table_products_description pd where opa.products_id = :products_id and opa.orders_id = opb.orders_id and opb.products_id != :products_id and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = 1 and p.products_id = pd.products_id and pd.language_id = :language_id group by p.products_id order by o.date_purchased desc limit :limit');
         $Qorders->bindInt(':default_flag', 1);
         $Qorders->bindInt(':products_id', $OSCOM_Product->getID());
         $Qorders->bindInt(':products_id', $OSCOM_Product->getID());
         $Qorders->bindInt(':language_id', $OSCOM_Language->getID());
         $Qorders->bindInt(':limit', MODULE_CONTENT_ALSO_PURCHASED_MAX_DISPLAY);
         if (MODULE_CONTENT_ALSO_PURCHASED_PRODUCTS_CACHE > 0) {
             $Qorders->setCache('also_purchased-' . $OSCOM_Product->getID(), MODULE_CONTENT_ALSO_PURCHASED_PRODUCTS_CACHE);
         }
         $Qorders->execute();
         $result = $Qorders->fetchAll();
         if (count($result) >= MODULE_CONTENT_ALSO_PURCHASED_MIN_DISPLAY) {
             $this->_content = '<div style="overflow: auto;">';
             foreach ($result as $p) {
                 $this->_content .= '<span style="width: 33%; float: left; text-align: center;">';
                 if (strlen($p['image']) > 0) {
                     $this->_content .= HTML::link(OSCOM::getLink(null, 'Products', $p['products_keyword']), $OSCOM_Image->show($p['image'], $p['products_name'])) . '<br />';
                 }
                 $this->_content .= HTML::link(OSCOM::getLink(null, 'Products', $p['products_keyword']), $p['products_name']) . '</span>';
             }
             $this->_content .= '</div>';
         }
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:31,代码来源:Controller.php

示例5: execute

 public static function execute(ApplicationAbstract $application)
 {
     $OSCOM_MessageStack = Registry::get('MessageStack');
     $data = array();
     if (DISPLAY_PRIVACY_CONDITIONS == '1') {
         if (isset($_POST['privacy_conditions']) === false || isset($_POST['privacy_conditions']) && $_POST['privacy_conditions'] != '1') {
             $OSCOM_MessageStack->add('Create', OSCOM::getDef('error_privacy_statement_not_accepted'));
         }
     }
     if (ACCOUNT_GENDER >= 0) {
         if (isset($_POST['gender']) && ($_POST['gender'] == 'm' || $_POST['gender'] == 'f')) {
             $data['gender'] = $_POST['gender'];
         } else {
             $OSCOM_MessageStack->add('Create', OSCOM::getDef('field_customer_gender_error'));
         }
     }
     if (isset($_POST['firstname']) && strlen(trim($_POST['firstname'])) >= ACCOUNT_FIRST_NAME) {
         $data['firstname'] = $_POST['firstname'];
     } else {
         $OSCOM_MessageStack->add('Create', sprintf(OSCOM::getDef('field_customer_first_name_error'), ACCOUNT_FIRST_NAME));
     }
     if (isset($_POST['lastname']) && strlen(trim($_POST['lastname'])) >= ACCOUNT_LAST_NAME) {
         $data['lastname'] = $_POST['lastname'];
     } else {
         $OSCOM_MessageStack->add('Create', sprintf(OSCOM::getDef('field_customer_last_name_error'), ACCOUNT_LAST_NAME));
     }
     if (ACCOUNT_DATE_OF_BIRTH == '1') {
         if (isset($_POST['dob_days']) && isset($_POST['dob_months']) && isset($_POST['dob_years']) && checkdate($_POST['dob_months'], $_POST['dob_days'], $_POST['dob_years'])) {
             $data['dob'] = mktime(0, 0, 0, $_POST['dob_months'], $_POST['dob_days'], $_POST['dob_years']);
         } else {
             $OSCOM_MessageStack->add('Create', OSCOM::getDef('field_customer_date_of_birth_error'));
         }
     }
     if (isset($_POST['email_address']) && strlen(trim($_POST['email_address'])) >= ACCOUNT_EMAIL_ADDRESS) {
         if (filter_var($_POST['email_address'], FILTER_VALIDATE_EMAIL)) {
             if (Account::checkEntry($_POST['email_address']) === false) {
                 $data['email_address'] = $_POST['email_address'];
             } else {
                 $OSCOM_MessageStack->add('Create', OSCOM::getDef('field_customer_email_address_exists_error'));
             }
         } else {
             $OSCOM_MessageStack->add('Create', OSCOM::getDef('field_customer_email_address_check_error'));
         }
     } else {
         $OSCOM_MessageStack->add('Create', sprintf(OSCOM::getDef('field_customer_email_address_error'), ACCOUNT_EMAIL_ADDRESS));
     }
     if (isset($_POST['password']) === false || isset($_POST['password']) && strlen(trim($_POST['password'])) < ACCOUNT_PASSWORD) {
         $OSCOM_MessageStack->add('Create', sprintf(OSCOM::getDef('field_customer_password_error'), ACCOUNT_PASSWORD));
     } elseif (isset($_POST['confirmation']) === false || isset($_POST['confirmation']) && trim($_POST['password']) != trim($_POST['confirmation'])) {
         $OSCOM_MessageStack->add('Create', OSCOM::getDef('field_customer_password_mismatch_with_confirmation'));
     } else {
         $data['password'] = $_POST['password'];
     }
     if ($OSCOM_MessageStack->size('Create') === 0) {
         if (Account::createEntry($data)) {
             $OSCOM_MessageStack->add('Create', OSCOM::getDef('success_account_updated'), 'success');
         }
         OSCOM::redirect(OSCOM::getLink(null, null, 'Create&Success', 'SSL'));
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:60,代码来源:Process.php

示例6: execute

 public static function execute(ApplicationAbstract $application)
 {
     $OSCOM_ShoppingCart = Registry::get('ShoppingCart');
     $OSCOM_PaymentModule = Registry::get('PaymentModule');
     $OSCOM_PaymentModule->process();
     osc_redirect(OSCOM::getLink(null, null, 'Success', 'SSL'));
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:7,代码来源:Process.php

示例7: execute

 public static function execute(ApplicationAbstract $application)
 {
     $data = HTML::sanitize(basename($_GET['code']));
     if (!Services::exists($data) || Services::get($data, 'uninstallable') !== true) {
         OSCOM::redirect(OSCOM::getLink());
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:7,代码来源:Uninstall.php

示例8: execute

 public static function execute(ApplicationAbstract $application)
 {
     $OSCOM_ShoppingCart = Registry::get('ShoppingCart');
     $requested_product = null;
     if (count($_GET) > 2) {
         $requested_product = basename(key(array_slice($_GET, 2, 1, true)));
         if ($requested_product == 'Add') {
             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)) {
             $OSCOM_Product = new Product($requested_product);
             if ($OSCOM_Product->isTypeActionAllowed('AddToShoppingCart')) {
                 if ($OSCOM_Product->hasVariants()) {
                     if (isset($_POST['variants']) && is_array($_POST['variants']) && !empty($_POST['variants'])) {
                         if ($OSCOM_Product->variantExists($_POST['variants'])) {
                             $OSCOM_ShoppingCart->add($OSCOM_Product->getProductVariantID($_POST['variants']));
                         } else {
                             OSCOM::redirect(OSCOM::getLink(null, 'Products', $OSCOM_Product->getKeyword()));
                         }
                     } else {
                         OSCOM::redirect(OSCOM::getLink(null, 'Products', $OSCOM_Product->getKeyword()));
                     }
                 } else {
                     $OSCOM_ShoppingCart->add($OSCOM_Product->getID());
                 }
             }
         }
     }
     OSCOM::redirect(OSCOM::getLink(null, 'Cart'));
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:35,代码来源:Add.php

示例9: __construct

 public function __construct()
 {
     Registry::get('Language')->loadIniFile('modules/Dashboard/Customers.php');
     $this->_title = OSCOM::getDef('admin_indexmodules_customers_title');
     $this->_title_link = OSCOM::getLink(null, 'Customers');
     if (Access::hasAccess(OSCOM::getSite(), 'Customers')) {
         $this->_data = '<table border="0" width="100%" cellspacing="0" cellpadding="2" class="dataTable">' . '  <thead>' . '    <tr>' . '      <th>' . OSCOM::getDef('admin_indexmodules_customers_table_heading_customers') . '</th>' . '      <th>' . OSCOM::getDef('admin_indexmodules_customers_table_heading_date') . '</th>' . '      <th>' . OSCOM::getDef('admin_indexmodules_customers_table_heading_status') . '</th>' . '    </tr>' . '  </thead>' . '  <tbody>';
         $Qcustomers = Registry::get('Database')->query('select customers_id, customers_gender, customers_lastname, customers_firstname, customers_status, date_account_created from :table_customers order by date_account_created desc limit 6');
         $Qcustomers->execute();
         $counter = 0;
         while ($Qcustomers->next()) {
             $customer_icon = osc_icon('people.png');
             if (ACCOUNT_GENDER > -1) {
                 switch ($Qcustomers->value('customers_gender')) {
                     case 'm':
                         $customer_icon = osc_icon('user_male.png');
                         break;
                     case 'f':
                         $customer_icon = osc_icon('user_female.png');
                         break;
                 }
             }
             $this->_data .= '    <tr onmouseover="$(this).addClass(\'mouseOver\');" onmouseout="$(this).removeClass(\'mouseOver\');"' . ($counter % 2 ? ' class="alt"' : '') . '>' . '      <td>' . osc_link_object(OSCOM::getLink(null, 'Customers', 'cID=' . $Qcustomers->valueInt('customers_id') . '&action=save'), $customer_icon . '&nbsp;' . $Qcustomers->valueProtected('customers_firstname') . ' ' . $Qcustomers->valueProtected('customers_lastname')) . '</td>' . '      <td>' . $Qcustomers->value('date_account_created') . '</td>' . '      <td align="center">' . osc_icon($Qcustomers->valueInt('customers_status') === 1 ? 'checkbox_ticked.gif' : 'checkbox_crossed.gif', null, null) . '</td>' . '    </tr>';
             $counter++;
         }
         $this->_data .= '  </tbody>' . '</table>';
     }
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:28,代码来源:Customers.php

示例10: execute

 public static function execute(ApplicationAbstract $application)
 {
     $OSCOM_Database = Registry::get('Database');
     $OSCOM_Customer = Registry::get('Customer');
     $OSCOM_MessageStack = Registry::get('MessageStack');
     if (isset($_POST['newsletter_general']) && is_numeric($_POST['newsletter_general'])) {
         $newsletter_general = (int) $_POST['newsletter_general'];
     } else {
         $newsletter_general = 0;
     }
     // HPDL Should be moved to the customers class!
     $Qnewsletter = $OSCOM_Database->query('select customers_newsletter from :table_customers where customers_id = :customers_id');
     $Qnewsletter->bindInt(':customers_id', $OSCOM_Customer->getID());
     $Qnewsletter->execute();
     if ($newsletter_general !== $Qnewsletter->valueInt('customers_newsletter')) {
         $newsletter_general = $Qnewsletter->value('customers_newsletter') == '1' ? '0' : '1';
         $Qupdate = $OSCOM_Database->query('update :table_customers set customers_newsletter = :customers_newsletter where customers_id = :customers_id');
         $Qupdate->bindInt(':customers_newsletter', $newsletter_general);
         $Qupdate->bindInt(':customers_id', $OSCOM_Customer->getID());
         $Qupdate->execute();
         if ($Qupdate->affectedRows() === 1) {
             $OSCOM_MessageStack->add('Account', OSCOM::getDef('success_newsletter_updated'), 'success');
         }
     }
     osc_redirect(OSCOM::getLink(null, null, null, 'SSL'));
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:26,代码来源:Process.php

示例11: execute

 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()));
     }
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:31,代码来源:Manufacturers.php

示例12: execute

 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);
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:29,代码来源:Shipping.php

示例13: initialize

 public function initialize()
 {
     if (Registry::exists('Product')) {
         $OSCOM_Database = Registry::get('Database');
         $OSCOM_Product = Registry::get('Product');
         $OSCOM_Language = Registry::get('Language');
         $OSCOM_Image = Registry::get('Image');
         $Qorders = $OSCOM_Database->query('select p.products_id, pd.products_name, pd.products_keyword, i.image from :table_orders_products opa, :table_orders_products opb, :table_orders o, :table_products p left join :table_products_images i on (p.products_id = i.products_id and i.default_flag = :default_flag), :table_products_description pd where opa.products_id = :products_id and opa.orders_id = opb.orders_id and opb.products_id != :products_id and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = 1 and p.products_id = pd.products_id and pd.language_id = :language_id group by p.products_id order by o.date_purchased desc limit :limit');
         $Qorders->bindInt(':default_flag', 1);
         $Qorders->bindInt(':products_id', $OSCOM_Product->getID());
         $Qorders->bindInt(':products_id', $OSCOM_Product->getID());
         $Qorders->bindInt(':language_id', $OSCOM_Language->getID());
         $Qorders->bindInt(':limit', MODULE_CONTENT_ALSO_PURCHASED_MAX_DISPLAY);
         if (MODULE_CONTENT_ALSO_PURCHASED_PRODUCTS_CACHE > 0) {
             $Qorders->setCache('also_purchased-' . $OSCOM_Product->getID(), MODULE_CONTENT_ALSO_PURCHASED_PRODUCTS_CACHE);
         }
         $Qorders->execute();
         if ($Qorders->numberOfRows() >= MODULE_CONTENT_ALSO_PURCHASED_MIN_DISPLAY) {
             $this->_content = '<div style="overflow: auto;">';
             while ($Qorders->next()) {
                 $this->_content .= '<span style="width: 33%; float: left; text-align: center;">';
                 if (strlen($Qorders->value('image')) > 0) {
                     $this->_content .= osc_link_object(OSCOM::getLink(null, 'Products', $Qorders->value('products_keyword')), $OSCOM_Image->show($Qorders->value('image'), $Qorders->value('products_name'))) . '<br />';
                 }
                 $this->_content .= osc_link_object(OSCOM::getLink(null, 'Products', $Qorders->value('products_keyword')), $Qorders->value('products_name')) . '</span>';
             }
             $this->_content .= '</div>';
         }
         $Qorders->freeResult();
     }
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:31,代码来源:Controller.php

示例14: execute

 public static function execute(ApplicationAbstract $application)
 {
     $OSCOM_Shipping = Registry::get('Shipping');
     $OSCOM_ShoppingCart = Registry::get('ShoppingCart');
     if (!empty($_POST['comments'])) {
         $_SESSION['comments'] = HTML::sanitize($_POST['comments']);
     }
     if ($OSCOM_Shipping->hasQuotes()) {
         if (isset($_POST['shipping_mod_sel']) && strpos($_POST['shipping_mod_sel'], '_')) {
             list($module, $method) = explode('_', $_POST['shipping_mod_sel']);
             if (Registry::exists('Shipping_' . $module) && Registry::get('Shipping_' . $module)->isEnabled()) {
                 $quote = $OSCOM_Shipping->getQuote($_POST['shipping_mod_sel']);
                 if (isset($quote['error'])) {
                     $OSCOM_ShoppingCart->resetShippingMethod();
                 } else {
                     $OSCOM_ShoppingCart->setShippingMethod($quote);
                     OSCOM::redirect(OSCOM::getLink(null, null, null, 'SSL'));
                 }
             } else {
                 $OSCOM_ShoppingCart->resetShippingMethod();
             }
         }
     } else {
         $OSCOM_ShoppingCart->resetShippingMethod();
         OSCOM::redirect(OSCOM::getLink(null, null, null, 'SSL'));
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:27,代码来源:Process.php

示例15: execute

 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');
     }
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:28,代码来源:Orders.php


注:本文中的osCommerce\OM\Core\OSCOM::getLink方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。