Jump to content

Hotclutch

Members
  • Content count

    2,613
  • Joined

  • Last visited

  • Days Won

    34

Everything posted by Hotclutch

  1. 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; }
  2. 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.
  3. Display Product Name instead of Model in breadcrumb trail. Follow the updated instructions in the package above.
  4. 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.
  5. 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.
  6. 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); } } } } }
  7. 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); } } } } }
  8. Here is the code for Category SEO. It will add 1 query to every pageload. I will do another one each for manufacturers and products. function execute() { global $PHP_SELF, $oscTemplate, $current_category_id, $languages_id; if ( (basename($PHP_SELF) == 'index.php') && ($current_category_id > 0) ){ $categories_query = tep_db_query("select categories_name, categories_seo_title, categories_seo_description, categories_seo_keywords from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' and language_id = '" . (int)$languages_id . "' limit 1"); if (tep_db_num_rows($categories_query) > 0) { $categories = tep_db_fetch_array($categories_query); if (tep_not_null($categories['categories_seo_title'])) { $oscTemplate->setTitle($categories['categories_seo_title'] . ', ' . STORE_NAME); } else { $oscTemplate->setTitle($categories['categories_name'] . ', ' . STORE_NAME); } if ( tep_not_null($categories['categories_seo_description']) ) { $oscTemplate->addBlock('<meta name="description" content="' . tep_output_string($categories['categories_seo_description']) . '" />', $this->group); } if ( tep_not_null($categories['categories_seo_keywords']) ) { $oscTemplate->addBlock('<meta name="keywords" content="' . tep_output_string($categories['categories_seo_keywords']) . '" />', $this->group); } } } }
  9. Tomorrow I start looking at the header tag modules catalog side.
  10. I am working on Meta Tags.
  11. We make the sidebar a bit wider, and add an indicator for the one that's open (green).
  12. Here's a simple, no frills accordion, that can replace the jquery one in the Admin. Appears to be working fine, and I like it. Will test it some more tomorrow before updating the package with it.
  13. There is no more need for includes/classes/boxes.php, however I will leave the code there as a fallback in case anybody has/installs old code onto the package. In your installation you can delete this file, and then also in application_top.php // infobox require(DIR_WS_CLASSES . 'boxes.php'); can be removed.
  14. Now I go to one of my product pages where the also purchased module shows a few products. How many people still remember / or ever knew how to work cache? Go to page 68 of the original osCommerce documentation and find the explanation there. After configuring cache for my also purchased products, here is the result:
  15. Today I am going to improve on the performance of my shop, by caching the configuration values which are queried on every page load. Contribution: Configuration Cache for osCommerce 2.3 Before we install the contribution, I use the following debugger: Before installation: After installation:
  16. This contribution still appears to be working well, reporting on even php8 errors. However the installation might fail. In that case I found this replacement code to work: Follow the instructions in the package and when it comes time to amend functions/database.php, replace with: function tep_db_query($query, $link = 'db_link') { global $$link; if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) { error_log('QUERY ' . $query . "\n", 3, STORE_PAGE_PARSE_TIME_LOG); } $start_time = microtime( true ); $result = mysqli_query($$link, $query) or tep_db_error($query, mysqli_errno($$link), mysqli_error($$link)); if ( class_exists( 'KissER' ) ) { KissER::q( round( ( microtime( true ) - $start_time ), 4 ), $query ); } if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) { $result_error = mysqli_error(); error_log('RESULT ' . $result . ' ' . $result_error . "\n", 3, STORE_PAGE_PARSE_TIME_LOG); } return $result; }
  17. Hotclutch

    NIF (VAT NUMBER) in customer email confirmation

    So then stop using that software, unless you enjoy being taken for a ride. I recommend you to try W3 osCommerce, its osCommerce the way it was 10 years ago (working software), and the majority of addons will be adaptable to it.
  18. Language packs will have to be checked and updated if necessary for php8, because if you're missing just one definition it will cause a fatal error.
  19. Now we add currencies & languages to the navbar.
×