johnvv Posted September 25, 2006 Posted September 25, 2006 At first i apologize for my bad english. :blush: I have a problem with OSCommerce. I have a pre-installed template, installed in the folder /template. When i install some modules (Like Custom Computer Creator (CCC)" or "Contribution Newsletter v050") they don't work proper. CCC isn't visible at all. Contribution Newsletter is only shown as a box. When i subscribe to a newsletter, OSCommerce switches to the basic OSCommerce template and makes also CCC visible and working. When i press continue OSCommerce shows me the installed template. Can someone help me?
mark27uk3 Posted September 25, 2006 Posted September 25, 2006 Hi John, Do you have a link so we can see? Depending on whose version of osc you are running will depend on peoples answers. Are you running stock osc with a templating system such as BTS or STS or are you running a fork? Mark Lifes a bitch, then you marry one, then you die!
johnvv Posted September 25, 2006 Author Posted September 25, 2006 I have no link, because it's on a non-public server. Info that i can give: Oscommerce version 2.2 Template is manual installed by someone @ the installation of the modules, it reffered to some files in the /catalogus folder wich where in the /template folder. Files as header, footer, index are in catalog but also in template.
johnvv Posted September 25, 2006 Author Posted September 25, 2006 It looks like the template files' html code is based somewhere else. I have some codesamples: With template: <?php /* $Id: index.php,v 1.1 2003/06/11 17:37:59 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); // the following cPath references come from application_top.php $category_depth = 'top'; if (isset($cPath) && tep_not_null($cPath)) { $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'"); $cateqories_products = tep_db_fetch_array($categories_products_query); if ($cateqories_products['total'] > 0) { $category_depth = 'products'; // display products } else { $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'"); $category_parent = tep_db_fetch_array($category_parent_query); if ($category_parent['total'] > 0) { $category_depth = 'nested'; // navigate through the categories } else { $category_depth = 'products'; // category has no products, but display the 'no products' message } } } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT); if ($category_depth == 'nested') { //Code change for Categories Description 1.5 // $category_query = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'"); //Changed to the following $category_query = tep_db_query("select cd.categories_name, cd.categories_heading_title, cd.categories_description, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . $current_category_id . "' and cd.categories_id = '" . $current_category_id . "' and cd.language_id = '" . $languages_id . "'"); //End Categories Description 1.5 without: <?php /* Custom Computer Creator Version 9.3 6/28/2004 ccc.php Designed And Coded By: Stephen Walker You Are Free To Edit This File However You Would Like Custom Computer Creator Is Coded For A Base In OsCommerce Shopping Cart Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CCC); $defines_query = tep_db_query('select config_name, config_value from ccc_config'); while ($defines = tep_db_fetch_array($defines_query)){ define($defines['config_name'],$defines['config_value']); } $HTTP_POST_VARS['ccc_pics'] = pond; ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <script language="javascript" src="includes/general.js"></script> <script> function submit($form1){ $form1.submit(); } function rowOverEffect(object) { if (object.className == 'dataTableRow') object.className = 'dataTableRowOver'; } function rowOutEffect(object) { if (object.className == 'dataTableRowOver') object.className = 'dataTableRow'; } </script> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"> <table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="5" cellpadding="0"> <!-- left_navigation //-->
Recommended Posts
Archived
This topic is now archived and is closed to further replies.