Jump to content

Hotclutch

Members
  • Content count

    2,605
  • Joined

  • Last visited

  • Days Won

    32

Everything posted by Hotclutch

  1. Subject is fine as is. Working now. I checked the admin email class after reading Henry's post and then checked it against Bootstrap osCommerce. The difference is here in the send function. $additional_parameters = ''; if ((PHP_VERSION > '5.3') || ((bool)ini_get('safe_mode') === false)) { $additional_parameters = '-f' . $from_addr; } return mail($to, $subject, $this->output, implode($this->lf, $headers), $additional_parameters);
  2. The solution is not clear.
  3. I started noticing about a week ago. Its definitely some code in the Admin, because I have at least 2 sets of Admin files to test with. On the one set everything is fine, then on the other the mails bounce back. Its only order status update mails. The create account welcome email is fine. It's only gmail addresses also. I think it has to be admin/order.php -> maybe the tep_mail function. I will keep looking.
  4. I installed KissIT Image Thumbnailer by the original author (14 July 2012), on php8, and everything appears to work fine. https://apps.oscommerce.com/Get&39J0f
  5. This does appear to be a valid problem when you turn the ACCOUNT_DOB setting to false. I change to: if (ACCOUNT_DOB == 'true') $customers_dob = tep_db_prepare_input($_POST['customers_dob']); then everything works fine.
  6. Sorry, false alarm. The DOB problem is specific to one of my sites. Tested on a stock installation and cannot replicate the problem there.
  7. Required or not, still throws the error.
  8. In Admin/customers.php If your DOB is set to not required in the Admin settings, then this line of code throws an error when trying to update the customer in Admin. $customers_dob = tep_db_prepare_input($_POST['customers_dob']); Warning: Undefined array key "customers_dob" approx line 32
  9. If you have an old osCommerce shop and want to update the code on it or if you want to build a test shop, here are the steps you could take: Step1: Create a replica of your live database. You do this by going to your control panel and doing a restore of your live shop database. There will be 2 options, one to overwrite the database, and another to create a replica database. Select the 2nd option. After you have done this there will be 4 pieces of information you need for the database, so keep this webpage open. Step2: Copy the W3-osCommerce shop files into a test folder. Copy the W3-osCommerce shop files into a test folder of your domain. If you use another name for the folder you will need to modify these instructions accordingly. You can delete the installation folder, and configuration files because we won't be using those. Step3: Modify the configure files. Now you have to copy your live shop configure files into the test shop folder. On the catalog side, here is what the configure will look like: <?php define('HTTP_SERVER', 'https://www.myshop.com'); define('HTTPS_SERVER', 'https://www.myshop.com'); define('ENABLE_SSL', true); define('HTTP_COOKIE_DOMAIN', ''); define('HTTPS_COOKIE_DOMAIN', ''); define('HTTP_COOKIE_PATH', '/'); define('HTTPS_COOKIE_PATH', '/'); define('DIR_WS_HTTP_CATALOG', '/'); define('DIR_WS_HTTPS_CATALOG', '/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'); define('DIR_FS_CATALOG', '/usr/www/users/xxx/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); define('DB_SERVER', 'xxx'); define('DB_SERVER_USERNAME', 'xxx'); define('DB_SERVER_PASSWORD', 'xxx'); define('DB_DATABASE', 'xxx'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); define('CFG_TIME_ZONE', 'Africa/Johannesburg'); ?> myshop.com is your domain name. Take note of these 4 lines: define('DB_SERVER', 'xxx'); define('DB_SERVER_USERNAME', 'xxx'); define('DB_SERVER_PASSWORD', 'xxx'); define('DB_DATABASE', 'xxx'); You will have to complete this section with the 4 pieces of information mentioned in Step1. This is what the new configure file needs to look like before you copy it into the test shop folder. <?php define('HTTP_SERVER', 'https://www.myshop.com'); define('HTTPS_SERVER', 'https://www.myshop.com'); define('ENABLE_SSL', true); define('HTTP_COOKIE_DOMAIN', ''); define('HTTPS_COOKIE_DOMAIN', ''); define('HTTP_COOKIE_PATH', '/test/'); define('HTTPS_COOKIE_PATH', '/test/'); define('DIR_WS_HTTP_CATALOG', '/test/'); define('DIR_WS_HTTPS_CATALOG', '/test/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'); define('DIR_FS_CATALOG', '/usr/www/users/xxx/test/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); define('DB_SERVER', 'xxx'); define('DB_SERVER_USERNAME', 'xxx'); define('DB_SERVER_PASSWORD', 'xxx'); define('DB_DATABASE', 'xxx'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); define('CFG_TIME_ZONE', 'Africa/Johannesburg'); ?> Take note of where "test" needs to be. On the Admin configure file, before: <?php define('HTTP_SERVER', 'https://www.myshop.com'); define('HTTPS_SERVER', 'https://www.myshop.com'); define('ENABLE_SSL', true); define('HTTP_COOKIE_DOMAIN', ''); define('HTTPS_COOKIE_DOMAIN', ''); define('HTTP_COOKIE_PATH', '/admin'); define('HTTPS_COOKIE_PATH', '/admin'); define('HTTP_CATALOG_SERVER', 'https://www.myshop.com'); define('HTTPS_CATALOG_SERVER', 'https://www.myshop.com'); define('ENABLE_SSL_CATALOG', 'true'); define('DIR_FS_DOCUMENT_ROOT', '/usr/www/users/xxx/'); define('DIR_WS_ADMIN', '/admin/'); define('DIR_WS_HTTPS_ADMIN', '/admin/'); define('DIR_FS_ADMIN', '/usr/www/users/xxx/admin/'); define('DIR_WS_CATALOG', '/'); define('DIR_WS_HTTPS_CATALOG', '/'); define('DIR_FS_CATALOG', '/usr/www/users/xxx/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/'); define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/'); define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); define('DB_SERVER', 'xxx'); define('DB_SERVER_USERNAME', 'xxx'); define('DB_SERVER_PASSWORD', 'xxx'); define('DB_DATABASE', 'xxx'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); define('CFG_TIME_ZONE', 'Africa/Johannesburg'); ?> After: <?php define('HTTP_SERVER', 'https://www.myshop.com'); define('HTTPS_SERVER', 'https://www.myshop.com'); define('ENABLE_SSL', false); define('HTTP_COOKIE_DOMAIN', ''); define('HTTPS_COOKIE_DOMAIN', ''); define('HTTP_COOKIE_PATH', '/test/admin'); define('HTTPS_COOKIE_PATH', '/test/admin'); define('HTTP_CATALOG_SERVER', 'https://www.myshop.com'); define('HTTPS_CATALOG_SERVER', 'https://www.myshop.com'); define('ENABLE_SSL_CATALOG', 'false'); define('DIR_FS_DOCUMENT_ROOT', '/usr/www/users/xxx/test/'); define('DIR_WS_ADMIN', '/test/admin/'); define('DIR_WS_HTTPS_ADMIN', '/test/admin/'); define('DIR_FS_ADMIN', '/usr/www/users/xxx/test/admin/'); define('DIR_WS_CATALOG', '/test/'); define('DIR_WS_HTTPS_CATALOG', '/test/'); define('DIR_FS_CATALOG', '/usr/www/users/xxx/test/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/'); define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/'); define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); define('DB_SERVER', 'xxx'); define('DB_SERVER_USERNAME', 'xxx'); define('DB_SERVER_PASSWORD', 'xxx'); define('DB_DATABASE', 'xxx'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); define('CFG_TIME_ZONE', 'Africa/Johannesburg'); ?> This will now allow you to connect to the replica database. One more Step to make. Step4: Modify catalog/includes/application_top.php In the test shop folder, you will need to make a modification to this file, otherwise it will throw an error for an undefined constant. Towards the end of the file, find: // add the products model/name to the breadcrumb trail if (isset($_GET['products_id'])) { if (PRODUCT_NAME_IN_BREADCRUMB == 'true') { $crumb_query = tep_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$_GET['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); if (tep_db_num_rows($crumb_query)) { $crumb = tep_db_fetch_array($crumb_query); $breadcrumb->add($crumb['products_name'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $_GET['products_id'])); } } else { $model_query = tep_db_query("select products_model from " . TABLE_PRODUCTS . " where products_id = '" . (int)$_GET['products_id'] . "'"); if (tep_db_num_rows($model_query)) { $model = tep_db_fetch_array($model_query); $breadcrumb->add($model['products_model'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $_GET['products_id'])); } } } And replace it with: // add the products model to the breadcrumb trail if (isset($_GET['products_id'])) { $model_query = tep_db_query("select products_model from " . TABLE_PRODUCTS . " where products_id = '" . (int)$_GET['products_id'] . "'"); if (tep_db_num_rows($model_query)) { $model = tep_db_fetch_array($model_query); $breadcrumb->add($model['products_model'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $_GET['products_id'])); } } Now you can connect to your replica database with all your products and customers, with updated code for php8 and a responsive design. You connect with the Admin credentials of your live shop. From here you will be able to see the amount of work further needed depending on the amount of modifications to your shop. If were using SEO URLs, there will be no need to reinstall it. Those will be preserved after you update the new shop files with the SEO URLs code (incl .htaccess).
  10. Message stack in Admin updated.
  11. There's an error in categories.php tep_db_query("insert into " . TABLE_PRODUCTS_DESCRIPTION . " (products_id, language_id, products_name, products_description, products_url, products_viewed, products_seo_title, products_seo_description, products_seo_keywords) values ('" . (int)$dup_products_id . "', '" . (int)$description['language_id'] . "', '" . tep_db_input($description['products_name']) . "', '" . tep_db_input($description['products_description']) . "', '" . tep_db_input($description['products_url']) . "', '0')"); Should be: tep_db_query("insert into " . TABLE_PRODUCTS_DESCRIPTION . " (products_id, language_id, products_name, products_description, products_url, products_viewed, products_seo_title, products_seo_description, products_seo_keywords) values ('" . (int)$dup_products_id . "', '" . (int)$description['language_id'] . "', '" . tep_db_input($description['products_name']) . "', '" . tep_db_input($description['products_description']) . "', '" . tep_db_input($description['products_url']) . "', '0', '" . tep_db_input($description['products_seo_title']) . "', '" . tep_db_input($description['products_seo_description']) . "', '" . tep_db_input($description['products_seo_keywords']) . "')"); Also the instruction for functions/general.php has been amended (for php8). Step 5: catalog/admin/includes/functions/general.php Add before the closing ?> // BOF SEO Meta Tags W3-osC function tep_get_category_description($category_id, $language_id) { $category_query = tep_db_query("select categories_description from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$category_id . "' and language_id = '" . (int)$language_id . "'"); $category = tep_db_fetch_array($category_query); return $category['categories_description'] ?? ''; } function tep_get_manufacturer_description($manufacturer_id, $language_id) { $manufacturer_query = tep_db_query("select manufacturers_description from " . TABLE_MANUFACTURERS_INFO . " where manufacturers_id = '" . (int)$manufacturer_id . "' and languages_id = '" . (int)$language_id . "'"); $manufacturer = tep_db_fetch_array($manufacturer_query); return $manufacturer['manufacturers_description'] ?? ''; } function tep_get_category_seo_description($category_id, $language_id) { $category_query = tep_db_query("select categories_seo_description from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$category_id . "' and language_id = '" . (int)$language_id . "'"); $category = tep_db_fetch_array($category_query); return $category['categories_seo_description'] ?? ''; } function tep_get_category_seo_keywords($category_id, $language_id) { $category_query = tep_db_query("select categories_seo_keywords from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$category_id . "' and language_id = '" . (int)$language_id . "'"); $category = tep_db_fetch_array($category_query); return $category['categories_seo_keywords'] ?? ''; } function tep_get_category_seo_title($category_id, $language_id = 0) { global $languages_id; if ($language_id == 0) $language_id = $languages_id; $category_query = tep_db_query("select categories_seo_title from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$category_id . "' and language_id = '" . (int)$language_id . "'"); $category = tep_db_fetch_array($category_query); return $category['categories_seo_title'] ?? ''; } function tep_get_manufacturer_seo_description($manufacturer_id, $language_id) { $manufacturer_query = tep_db_query("select manufacturers_seo_description from " . TABLE_MANUFACTURERS_INFO . " where manufacturers_id = '" . (int)$manufacturer_id . "' and languages_id = '" . (int)$language_id . "'"); $manufacturer = tep_db_fetch_array($manufacturer_query); return $manufacturer['manufacturers_seo_description'] ?? ''; } function tep_get_manufacturer_seo_keywords($manufacturer_id, $language_id) { $manufacturer_query = tep_db_query("select manufacturers_seo_keywords from " . TABLE_MANUFACTURERS_INFO . " where manufacturers_id = '" . (int)$manufacturer_id . "' and languages_id = '" . (int)$language_id . "'"); $manufacturer = tep_db_fetch_array($manufacturer_query); return $manufacturer['manufacturers_seo_keywords'] ?? ''; } function tep_get_manufacturer_seo_title($manufacturer_id, $language_id) { $manufacturer_query = tep_db_query("select manufacturers_seo_title from " . TABLE_MANUFACTURERS_INFO . " where manufacturers_id = '" . (int)$manufacturer_id . "' and languages_id = '" . (int)$language_id . "'"); $manufacturer = tep_db_fetch_array($manufacturer_query); return $manufacturer['manufacturers_seo_title'] ?? ''; } function tep_get_products_seo_description($product_id, $language_id = 0) { global $languages_id; if ($language_id == 0) $language_id = $languages_id; $product_query = tep_db_query("select products_seo_description from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$product_id . "' and language_id = '" . (int)$language_id . "'"); $product = tep_db_fetch_array($product_query); return $product['products_seo_description'] ?? ''; } function tep_get_products_seo_keywords($product_id, $language_id = 0) { global $languages_id; if ($language_id == 0) $language_id = $languages_id; $product_query = tep_db_query("select products_seo_keywords from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$product_id . "' and language_id = '" . (int)$language_id . "'"); $product = tep_db_fetch_array($product_query); return $product['products_seo_keywords'] ?? ''; } function tep_get_products_seo_title($product_id, $language_id = 0) { global $languages_id; if ($language_id == 0) $language_id = $languages_id; $product_query = tep_db_query("select products_seo_title from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$product_id . "' and language_id = '" . (int)$language_id . "'"); $product = tep_db_fetch_array($product_query); return $product['products_seo_title'] ?? ''; } // EOF SEO Meta Tags W3-osC Package updated.
  12. Ajax Attribute Manager for W3-osCommerce -> based on V2.8.14 https://apps.oscommerce.com/6E6Qw&ajax-attribute-manager -> tested on php8
  13. Updating fontawesome to V6. https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta2/css/all.min.css
  14. tep_get_products_name tep_get_products_description tep_get_products_url function tep_get_products_name($product_id, $language_id = 0) { global $languages_id; if ($language_id == 0) $language_id = $languages_id; $product_query = tep_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$product_id . "' and language_id = '" . (int)$language_id . "'"); $product = tep_db_fetch_array($product_query); return $product['products_name'] ?? ''; } function tep_get_products_description($product_id, $language_id) { $product_query = tep_db_query("select products_description from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$product_id . "' and language_id = '" . (int)$language_id . "'"); $product = tep_db_fetch_array($product_query); return $product['products_description'] ?? ''; } function tep_get_products_url($product_id, $language_id) { $product_query = tep_db_query("select products_url from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$product_id . "' and language_id = '" . (int)$language_id . "'"); $product = tep_db_fetch_array($product_query); return $product['products_url'] ?? ''; } I am starting to use ?? - null coalescing operator https://www.tutorialspoint.com/php7/php7_coalescing_operator.htm Which means the code is no longer compatible with php versions < 7.
  15. Hotclutch

    Transfer 2.3 to 2.3.41 with fresh install

    You do not copy any of your old files to the new store. The important thing is to have a database & file backup of your old shop in a safe place, in case something goes wrong. Then follow Jack's advice. If all goes well, you will have a working (new) shop.
  16. The first one works to clear the error. The other one I will look at again tomorrow.
  17. On the products_attributes.php an error pointing to admin/includes/functions/general.php Warning: Trying to access array offset on value of type null function tep_options_name($options_id) { global $languages_id; $options = tep_db_query("select products_options_name from " . TABLE_PRODUCTS_OPTIONS . " where products_options_id = '" . (int)$options_id . "' and language_id = '" . (int)$languages_id . "'"); $options_values = tep_db_fetch_array($options); return $options_values['products_options_name']; } This clears the error: function tep_options_name($options_id) { global $languages_id; $options = tep_db_query("select products_options_name from " . TABLE_PRODUCTS_OPTIONS . " where products_options_id = '" . (int)$options_id . "' and language_id = '" . (int)$languages_id . "'"); $options_values = tep_db_fetch_array($options); return $options_values['products_options_name'] ?? ''; }
  18. In the SQL installer, there are 2 php8 errors: Warning: Undefined array key "install" switch ($_GET['install']) { this is the section of code: switch ($_GET['install']) { case ('new'): install_ORP_to_sql(); tep_redirect(tep_href_link($filename)); break; case ('remove'): $group_id = get_group_id($contrib); remove_keys($group_id); remove_group_id($contrib); remove_table(); tep_redirect(tep_href_link($filename)); break; case ('upgrade'): $group_id = get_group_id($contrib); remove_keys($group_id); install_ORP_to_sql($group_id); tep_redirect(tep_href_link($filename)); break; } And Fatal error: Uncaught TypeError: sizeof(): Argument #1 ($value) must be of type Countable|array, bool given in if (sizeof($group_id_array <= 1)) { function get_group_id($config_title) { $group_id_array = tep_db_fetch_array(tep_db_query("SELECT configuration_group_id FROM " . TABLE_CONFIGURATION_GROUP . " WHERE configuration_group_title like '". $config_title . "'")); if (sizeof($group_id_array <= 1)) { return $group_id_array['configuration_group_id']; } remove_group_id($contrib); return 0; }
  19. I have done some more work on ORP Related Products. -> Moved the Install/Uninstall SQL from the product module to Configuration. -> Replaced hardcoded filenames and database definitions.
  20. Display Product Name instead of Model in breadcrumb trail. Follow the updated instructions in the package above.
  21. https://www.dropbox.com/s/4kre1hbg36c8ao6/W3-osC Seo Meta Tags.zip?dl=0 -> Category & Manufacturer Descriptions. -> Category, Manufacturer, Product Titles and Meta. That completes SEO Meta Tags for W3-osC. Follow the instructions in the package.
  22. Hotclutch

    Banned Notice

    Attention Admins. If there is an IP exclusion list, then maybe it should be reviewed or disabled. It can cause problems for legitimate users.
  23. Products. function execute() { global $PHP_SELF, $oscTemplate, $languages_id, $product_check; if (basename($PHP_SELF) == FILENAME_PRODUCT_INFO) { if (isset($_GET['products_id'])) { if ($product_check['total'] > 0) { $product_info_query = tep_db_query("select pd.products_name, pd.products_seo_title, pd.products_seo_description, pd.products_seo_keywords from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$_GET['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_info = tep_db_fetch_array($product_info_query); if (tep_not_null($product_info['products_seo_title'])) { $oscTemplate->setTitle($product_info['products_seo_title'] . ', ' . STORE_NAME); } else { $oscTemplate->setTitle($product_info['products_name'] . ', ' . STORE_NAME); } if ( tep_not_null($product_info['products_seo_description']) ) { $oscTemplate->addBlock('<meta name="description" content="' . tep_output_string($product_info['products_seo_description']) . '" />', $this->group); } if ( tep_not_null($product_info['products_seo_keywords']) ) { $oscTemplate->addBlock('<meta name="keywords" content="' . tep_output_string($product_info['products_seo_keywords']) . '" />', $this->group); } } } } }
  24. Manufacturers. function execute() { global $PHP_SELF, $oscTemplate, $languages_id; if (basename($PHP_SELF) == FILENAME_DEFAULT) { if (isset($_GET['manufacturers_id']) && is_numeric($_GET['manufacturers_id'])) { $manufacturers_query = tep_db_query("select m.manufacturers_name, mi.manufacturers_seo_title, mi.manufacturers_seo_description, mi.manufacturers_seo_keywords from " . TABLE_MANUFACTURERS . " m, " . TABLE_MANUFACTURERS_INFO . " mi where m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' and mi.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' and mi.languages_id = '" . (int)$languages_id . "'"); if (tep_db_num_rows($manufacturers_query)) { $manufacturers = tep_db_fetch_array($manufacturers_query); if (tep_not_null($manufacturers['manufacturers_seo_title'])) { $oscTemplate->setTitle($manufacturers['manufacturers_seo_title'] . ', ' . STORE_NAME); } else { $oscTemplate->setTitle($manufacturers['manufacturers_name'] . ', ' . STORE_NAME); } if ( tep_not_null($manufacturers['manufacturers_seo_description']) ) { $oscTemplate->addBlock('<meta name="description" content="' . tep_output_string($manufacturers['manufacturers_seo_description']) . '" />', $this->group); } if ( tep_not_null($manufacturers['manufacturers_seo_keywords']) ) { $oscTemplate->addBlock('<meta name="keywords" content="' . tep_output_string($manufacturers['manufacturers_seo_keywords']) . '" />', $this->group); } } } } }
×