Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Template System for MS2


Recommended Posts

There is a downloads controller in the contributions that allows free items to be downloaded immediately after purchase.

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

  • Replies 50
  • Created
  • Last Reply

Top Posters In This Topic

Hi

Can any one help with following problem....

 

It seems the first page link with this contribution is index.php but the home page link in the top menu bar and the continue shopping link.... both link back to the default.php????

 

Cheers Malc

Link to comment
Share on other sites

Yeah, I noticed this to in the older themes,

 

You need to got to:

 

templateincludestemplate(THEME NAME)header.php

 

You will find a few hardcoded hyperlinks lik this:

<A href="default.php">

<A href="downloads.php">

<A href="account.php">

<A href="phpbb.php">

<a href="zz_faq.php">

<a href="contact_us.php">

 

These all need to be changed as this will cause problems with the customer session aswell, if a customer adds a product to there shopping cart and then clicks on of these (harcoded links) in the header, the customer will automatically become logged out of the store and there shopping cart contenst will be lost.

 

Change to:

<?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">'; ?>

<?php echo '<a href="' . tep_href_link(FILENAME_DOWNLOADS) . '">'; ?>

<?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT) . '">'; ?>

<?php echo '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">'; ?>

 

Get the general idea.. (It will fix the default.php to index.php to)

 

Cheers MaxiDVD

Link to comment
Share on other sites

Not to confuse anyone the path I entered above:

 

My Dev Shop is called template instead of catalog

 

templateincludestemplate(THEME NAME)header.php

Link to comment
Share on other sites

Hi

Thanks for you reply....

 

The path to header.php in my version is.....

 

osc_template_ver2includestemplateoriginal_oscheader.php

 

and I cant find any hardcoded hyperlinks in the header.php ????

 

I am using the template system created by cannuck1964 ...which is "osc_template_ver2"

 

Which are using???

 

Cheers Malc

Link to comment
Share on other sites

Im using the same one..

But I installed some of the older MS1 themes, and they had some harcoded links in the header - thats strange my standard ms2 themes (original_osc) work fine, my continue shopping link points to the history - last page that took me there.

 

Are you talking about the breadcrumb trail? I cant see a referance to any "Home" link! I can only see "Top" and "Catalog".

 

Cheers MaxiDVD

Link to comment
Share on other sites

Can any one help with following problem....  

 

It seems the first page link with this contribution is index.php but the home page link in the top menu bar and the continue shopping link.... both link back to the default.php????

 

Well in the MS1 vewrsion, I added in an index page, as well the standard default page is there too. Now the header file references the FILENAME_DEFAULT, which is defined as default.php.

 

The index.php is defined as FILENAME_INDEX, so in the header, change the file name defines. Now the bread crumb has in the application_top file a few defines which name the first part of the bread crumb etc.....look to about line 30 or so in your application_top file to see these...

 

 

cheers and HTH

Peter McGrath

-----------------------------

See my Profile (click here) for more information and to contact me for professional osCommerce support that includes SEO development, custom development and security implementation

Link to comment
Share on other sites

Hi

Well in the MS1 vewrsion, I added in an index page, as well the standard default page is there too. Now the header file references the FILENAME_DEFAULT, which is defined as default.php.

 

The index.php is defined as FILENAME_INDEX, so in the header, change the file name defines. Now the bread crumb has in the application_top file a few defines which name the first part of the bread crumb etc.....look to about line 30 or so in your application_top file to see these...

 

I am not getting this :shock: there is no reference to the index.php or default.php in my header.php...code for header below...

 

<?php

/*

$Id: header.php,v 1.1.1.1 2002/11/28 23:22:04 wilt Exp $

 

osCommerce, Open Source E-Commerce Solutions

<td align="right" valign="bottom"></td>

</tr>

</table>

<table border="0" width="<?php echo PAGE_WIDTH; ?>" cellspacing="0" cellpadding="1">

<tr class="headerNavigation">

<td class="headerNavigation">  <?php echo $breadcrumb->trail(' » '); ?></td>

<td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a>  |  <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a>   </td>

</tr>

</table>

<?php

if ($HTTP_GET_VARS['error_message'] != '') {

?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr class="headerError">

<td class="headerError"><?php echo urldecode($HTTP_GET_VARS['error_message']); ?></td>

</tr>

</table>

<?php

}

 

if ($HTTP_GET_VARS['info_message'] != '') {

?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr class="headerInfo">

<td class="headerInfo"><?php echo $HTTP_GET_VARS['info_message']; ?></td>

</tr>

</table>

<table border="0" width="<?php echo PAGE_WIDTH; ?>" cellspacing="0" cellpadding="0">

<tr width="100%">

<?php

}

?>

 

So am I not reading your post correctly :?: :?:

 

Now the bread crumb has in the application_top file a few defines which name the first part of the bread crumb etc.....look to about line 30 or so in your application_top file to see these...

 

I cant find this in my application_top.php either...

 

<?php

/*

$Id: conditions.php,v 1.1 2002/06/16 15:24:15 harley_vb Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

SystemsManager.Net Technologies Template Solution

http://www.systemsmanager.net

 

Copyright © 2002 osCommerce

Copyright © 2002 SystemsManager.Net

*/

 

global $page_name, $insert_java;

// how wide the pages should be, in pixels (default:'100%')

define('PAGE_WIDTH','784');

// start the timer for the page parse time log

define('PAGE_PARSE_START_TIME', microtime());

 

// set the level of error reporting

error_reporting(E_ALL & ~E_NOTICE);

 

// check if register_globals is enabled.

// since this is a temporary measure this message is hardcoded. The requirement will be removed before 2.2 is finalized.

if (function_exists('ini_get')) {

ini_get('register_globals') or exit('FATAL ERROR: register_globals is disabled in php.ini, please enable it!');

}

 

// disable use_trans_sid as tep_href_link() does this manually

if (function_exists('ini_set')) @ini_set('session.use_trans_sid', 0);

 

// Set the local configuration parameters - mainly for developers

if (file_exists('includes/local/configure.php')) include('includes/local/configure.php');

 

// include server parameters

require('includes/configure.php');

 

// include the database functions

require(DIR_WS_FUNCTIONS . 'database.php');

 

// make a connection to the database... now

tep_db_connect() or die('Unable to connect to database server!');

 

// define the project version

define('PROJECT_VERSION', 'SystemsManager.Net Template Version 2.0');

define('TITLE', 'Starchild International');

define('HEADER_TITLE_TOP', 'Starchild Index Page');

define('HEADER_TITLE_CATALOG', 'Our Store');

 

// set the type of request (secure or not)

$request_type = (getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL';

 

// define the filenames used in the project

define('FILENAME_ARTICLES', 'articles.php');

 

define('FILENAME_ACCOUNT', 'account.php');

define('FILENAME_ACCOUNT_EDIT', 'account_edit.php');

define('FILENAME_ACCOUNT_EDIT_PROCESS', 'account_edit_process.php');

define('FILENAME_ACCOUNT_HISTORY', 'account_history.php');

define('FILENAME_ACCOUNT_HISTORY_INFO', 'account_history_info.php');

define('FILENAME_ADDRESS_BOOK', 'address_book.php');

define('FILENAME_ADDRESS_BOOK_PROCESS', 'address_book_process.php');

define('FILENAME_ADVANCED_SEARCH', 'advanced_search.php');

define('FILENAME_ADVANCED_SEARCH_RESULT', 'advanced_search_result.php');

define('FILENAME_ALSO_PURCHASED_PRODUCTS', 'also_purchased_products.php'); // This is the bottom of product_info.php (found in modules)

define('FILENAME_CHECKOUT_CONFIRMATION', 'checkout_confirmation.php');

define('FILENAME_CHECKOUT_PAYMENT', 'checkout_payment.php');

define('FILENAME_CHECKOUT_PAYMENT_ADDRESS', 'checkout_payment_address.php');

define('FILENAME_CHECKOUT_PROCESS', 'checkout_process.php');

define('FILENAME_CHECKOUT_SHIPPING', 'checkout_shipping.php');

define('FILENAME_CHECKOUT_SHIPPING_ADDRESS', 'checkout_shipping_address.php');

define('FILENAME_CHECKOUT_SUCCESS', 'checkout_success.php');

 

define('FILENAME_CONTACT_US', 'contact_us.php');

define('FILENAME_CONDITIONS', 'conditions.php');

 

define('FILENAME_DOMAINS', 'domains.php');

define('FILENAME_REGISTER_NAMES', 'register_names.php');

 

define('FILENAME_CREATE_ACCOUNT', 'create_account.php');

define('FILENAME_CREATE_ACCOUNT_PROCESS', 'create_account_process.php');

define('FILENAME_CREATE_ACCOUNT_SUCCESS', 'create_account_success.php');

define('FILENAME_DEFAULT', 'default.php');

define('FILENAME_DOWNLOAD', 'download.php');

define('FILENAME_INDEX', 'index.php');

define('FILENAME_INFO_SHOPPING_CART', 'info_shopping_cart.php');

define('FILENAME_LOGIN', 'login.php');

define('FILENAME_LOGOFF', 'logoff.php');

define('FILENAME_MAINPAGE', 'mainpage.php');

define('FILENAME_NEW_PRODUCTS', 'new_products.php'); // This is the middle of default.php (found in modules)

define('FILENAME_PASSWORD_FORGOTTEN', 'password_forgotten.php');

define('FILENAME_POPUP_IMAGE', 'popup_image.php');

define('FILENAME_POPUP_SEARCH_HELP', 'popup_search_help.php');

define('FILENAME_PRIVACY', 'privacy.php');

define('FILENAME_PRODUCT_INFO', 'product_info.php');

define('FILENAME_PRODUCT_LISTING', 'product_listing.php');

define('FILENAME_PRODUCT_NOTIFICATIONS', 'product_notifications.php');

define('FILENAME_PRODUCT_REVIEWS', 'product_reviews.php');

define('FILENAME_PRODUCT_REVIEWS_INFO', 'product_reviews_info.php');

define('FILENAME_PRODUCT_REVIEWS_WRITE', 'product_reviews_write.php');

define('FILENAME_PRODUCTS_NEW', 'products_new.php');

define('FILENAME_REDIRECT', 'redirect.php');

define('FILENAME_REVIEWS', 'reviews.php');

define('FILENAME_SERVICES', 'services.php');

define('FILENAME_SHIPPING', 'shipping.php');

define('FILENAME_SHOPPING_CART', 'shopping_cart.php');

define('FILENAME_SPECIALS', 'specials.php');

define('FILENAME_TELL_A_FRIEND', 'tell_a_friend.php');

define('FILENAME_UPCOMING_PRODUCTS', 'upcoming_products.php'); // This is the bottom of default.php (found in modules)

define('FILENAME_INFORMATION', 'information.php');

define('FILENAME_CHECKOUT_PAYPALIPN', 'checkout_paypalipn.php'); // PAYPALIPN

 

// define the database table names used in the project

define('TABLE_ADDRESS_BOOK', 'address_book');

define('TABLE_ADDRESS_FORMAT', 'address_format');

define('TABLE_BANNERS', 'banners');

define('TABLE_BANNERS_HISTORY', 'banners_history');

define('TABLE_CATEGORIES', 'categories');

define('TABLE_CATEGORIES_DESCRIPTION', 'categories_description');

define('TABLE_CONFIGURATION', 'configuration');

define('TABLE_CONFIGURATION_GROUP', 'configuration_group');

define('TABLE_COUNTER', 'counter');

define('TABLE_COUNTER_HISTORY', 'counter_history');

define('TABLE_COUNTRIES', 'countries');

define('TABLE_CURRENCIES', 'currencies');

define('TABLE_CUSTOMERS', 'customers');

define('TABLE_CUSTOMERS_BASKET', 'customers_basket');

define('TABLE_CUSTOMERS_BASKET_ATTRIBUTES', 'customers_basket_attributes');

define('TABLE_CUSTOMERS_INFO', 'customers_info');

define('TABLE_LANGUAGES', 'languages');

define('TABLE_MANUFACTURERS', 'manufacturers');

define('TABLE_MANUFACTURERS_INFO', 'manufacturers_info');

define('TABLE_ORDERS', 'orders');

define('TABLE_ORDERS_PRODUCTS', 'orders_products');

define('TABLE_ORDERS_PRODUCTS_ATTRIBUTES', 'orders_products_attributes');

define('TABLE_ORDERS_PRODUCTS_DOWNLOAD', 'orders_products_download');

define('TABLE_ORDERS_STATUS', 'orders_status');

define('TABLE_ORDERS_STATUS_HISTORY', 'orders_status_history');

define('TABLE_ORDERS_TOTAL', 'orders_total');

define('TABLE_PRODUCTS', 'products');

define('TABLE_PRODUCTS_ATTRIBUTES', 'products_attributes');

define('TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD', 'products_attributes_download');

define('TABLE_PRODUCTS_DESCRIPTION', 'products_description');

define('TABLE_PRODUCTS_NOTIFICATIONS', 'products_notifications');

define('TABLE_PRODUCTS_OPTIONS', 'products_options');

define('TABLE_PRODUCTS_OPTIONS_VALUES', 'products_options_values');

define('TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS', 'products_options_values_to_products_options');

define('TABLE_PRODUCTS_TO_CATEGORIES', 'products_to_categories');

define('TABLE_REVIEWS', 'reviews');

define('TABLE_REVIEWS_DESCRIPTION', 'reviews_description');

define('TABLE_SESSIONS', 'sessions');

define('TABLE_SPECIALS', 'specials');

define('TABLE_TAX_CLASS', 'tax_class');

define('TABLE_TAX_RATES', 'tax_rates');

define('TABLE_GEO_ZONES', 'geo_zones');

define('TABLE_ZONES', 'zones');

define('TABLE_ZONES_TO_GEO_ZONES', 'zones_to_geo_zones');

define('TABLE_WHOS_ONLINE', 'whos_online');

define('TABLE_PAYPALIPN_TXN', 'paypalipn_txn'); // PAYPALIPN

define('TABLE_ARTICLES', 'articles');

define('TABLE_TEMPLATE', 'template');

define('TABLE_WEB_SITE_CONTENT', 'web_site_content');

define('TABLE_WEB_PAGES', 'web_pages');

 

// customization for the design layout

define('BOX_WIDTH', 100); // how wide the boxes should be in pixels (default: 125)

 

// check if sessions are supported, otherwise use the php3 compatible session class

if (!function_exists('session_start')) {

define('PHP_SESSION_NAME', 'sID');

define('PHP_SESSION_SAVE_PATH', '/tmp');

 

include(DIR_WS_CLASSES . 'sessions.php');

}

 

// define how the session functions will be used

require(DIR_WS_FUNCTIONS . 'sessions.php');

tep_session_name('osCsid');

 

 

// set the application parameters (can be modified through the administration tool)

$configuration_query = tep_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from ' . TABLE_CONFIGURATION . '');

while ($configuration = tep_db_fetch_array($configuration_query)) {

define($configuration['cfgKey'], $configuration['cfgValue']);

}

//Site template configuration system

 

// set the template and theme parameters (can be modified through the administration interface)

$template_query = tep_db_query("select thema as themeKey, template_name as templateValue from " . TABLE_TEMPLATE . " where use_template = 'true'");

$template = tep_db_fetch_array($template_query);

 

if(($template['templateValue']=="") || ($template['themeKey']==""))

{

define('TEMPLATE_STYLE', DIR_WS_TEMPLATE . 'original_osc/catalog.php');

define('DIR_WS_SITE_FILES', DIR_WS_TEMPLATE . 'original_osc/');

define('THEMA_STYLE', DIR_WS_SITE_FILES . 'blue/stylesheet.css');

define('DIR_WS_BOXES', DIR_WS_SITE_FILES . 'theme_boxes/');

define('DIR_WS_BUTTONS', DIR_WS_SITE_FILES . 'original_osc/buttons/');

define('DIR_WS_INFOBOX', DIR_WS_SITE_FILES . THEME_STYLE . 'original_osc/infobox/');

define('TEMPLATE_IMAGES', DIR_WS_TEMPLATE . 'template_images/');

define('STORE_LOGO', TEMPLATE_IMAGES . 'logo.gif');

 

require(DIR_WS_SITE_FILES . 'thema_boxes.php');

$newtheme = THEME_STYLE;

}

else

{

$newtheme = THEME_STYLE;

define('THEME_STYLE',$template['themeKey']);

define('TEMPLATE',$template['templateValue']);

define('TEMPLATE_STYLE', DIR_WS_TEMPLATE . TEMPLATE . '/catalog.php');

define('DIR_WS_SITE_FILES', DIR_WS_TEMPLATE . TEMPLATE . '/');

define('THEMA_STYLE', DIR_WS_SITE_FILES . THEME_STYLE . '/stylesheet.css');

define('DIR_WS_BOXES', DIR_WS_SITE_FILES . 'theme_boxes/');

define('DIR_WS_BUTTONS', DIR_WS_SITE_FILES . THEME_STYLE . '/buttons/');

define('DIR_WS_INFOBOX', DIR_WS_SITE_FILES . THEME_STYLE . '/infobox/');

define('TEMPLATE_IMAGES', DIR_WS_SITE_FILES . 'template_images/');

define('STORE_LOGO', TEMPLATE_IMAGES . 'logo.gif');

 

require(DIR_WS_SITE_FILES . 'thema_boxes.php');

}

 

 

//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:::::::::::::::::::::::::::::::

 

// if gzip_compression is enabled, start to buffer the output

if ( (GZIP_COMPRESSION == 'true') && ($ext_zlib_loaded = extension_loaded('zlib')) && (PHP_VERSION >= '4') ) {

if (($ini_zlib_output_compression = (int)ini_get('zlib.output_compression')) < 1) {

if (PHP_VERSION >= '4.0.4') {

ob_start('ob_gzhandler');

} else {

include(DIR_WS_FUNCTIONS . 'gzip_compression.php');

ob_start();

ob_implicit_flush();

}

} else {

ini_set('zlib.output_compression_level', GZIP_LEVEL);

}

}

 

// set the HTTP GET parameters manually if search_engine_friendly_urls is enabled

if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {

if (strlen(getenv('PATH_INFO')) > 1) {

$GET_arrays = array();

$PHP_SELF = str_replace(getenv('PATH_INFO'), '', $HTTP_SERVER_VARS['PHP_SELF']);

$vars = explode('/', substr(getenv('PATH_INFO'), 1));

for ($i=0, $n=sizeof($vars); $i<$n; $i++) {

if (strpos($vars[$i], '[]')) {

$GET_arrays[substr($vars[$i], 0, -2)][] = $vars[$i+1];

} else {

$HTTP_GET_VARS[$vars[$i]] = $vars[$i+1];

}

$i++;

}

 

if (sizeof($GET_arrays) > 0) {

while (list($key, $value) = each($GET_arrays)) {

$HTTP_GET_VARS[$key] = $value;

}

}

}

} else {

$PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'];

}

 

// include cache functions if enabled

if (USE_CACHE == 'true') include(DIR_WS_FUNCTIONS . 'cache.php');

 

// include shopping cart class

require(DIR_WS_CLASSES . 'shopping_cart.php');

 

// include navigation history class

require(DIR_WS_CLASSES . 'navigation_history.php');

 

// some code to solve compatibility issues

require(DIR_WS_FUNCTIONS . 'compatibility.php');

 

// lets start our session

if (isset($HTTP_POST_VARS[tep_session_name()])) {

tep_session_id($HTTP_POST_VARS[tep_session_name()]);

} elseif ( (getenv('HTTPS') == 'on') && isset($HTTP_GET_VARS[tep_session_name()]) ) {

tep_session_id($HTTP_GET_VARS[tep_session_name()]);

}

 

if (function_exists('session_set_cookie_params')) {

session_set_cookie_params(0, substr(DIR_WS_CATALOG, 0, -1));

}

 

tep_session_start();

 

// Create the cart & Fix the cart if necesary

if (tep_session_is_registered('cart') && is_object($cart)) {

if (PHP_VERSION < 4) {

$broken_cart = $cart;

$cart = new shoppingCart;

$cart->unserialize($broken_cart);

}

} else {

tep_session_register('cart');

$cart = new shoppingCart;

}

 

// include currencies class and create an instance

require(DIR_WS_CLASSES . 'currencies.php');

$currencies = new currencies();

 

// include the mail classes

require(DIR_WS_CLASSES . 'mime.php');

require(DIR_WS_CLASSES . 'email.php');

 

// define our general functions used application-wide

require(DIR_WS_FUNCTIONS . 'general.php');

require(DIR_WS_FUNCTIONS . 'html_output.php');

 

// language

if (!tep_session_is_registered('language') || isset($HTTP_GET_VARS['language'])) {

if (!tep_session_is_registered('language')) {

tep_session_register('language');

tep_session_register('languages_id');

}

 

include(DIR_WS_CLASSES . 'language.php');

$lng = new language($HTTP_GET_VARS['language']);

 

if (!isset($HTTP_GET_VARS['language'])) $lng->get_browser_language();

 

$language = $lng->language['directory'];

$languages_id = $lng->language['id'];

}

 

 

// currency

if (!tep_session_is_registered('currency') || isset($HTTP_GET_VARS['currency']) || ( (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') && (LANGUAGE_CURRENCY != $currency) ) ) {

if (!tep_session_is_registered('currency')) tep_session_register('currency');

 

if (isset($HTTP_GET_VARS['currency'])) {

if (!$currency = tep_currency_exists($HTTP_GET_VARS['currency'])) $currency = (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;

} else {

$currency = (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;

}

}

 

// navigation history

if (tep_session_is_registered('navigation')) {

if (PHP_VERSION < 4) {

$broken_navigation = $navigation;

$navigation = new navigationHistory;

$navigation->unserialize($broken_navigation);

}

} else {

tep_session_register('navigation');

$navigation = new navigationHistory;

}

$navigation->add_current_page();

 

// Shopping cart actions

if (isset($HTTP_GET_VARS['action'])) {

if (DISPLAY_CART == 'true') {

$goto = FILENAME_SHOPPING_CART;

$parameters = array('action', 'cPath', 'products_id', 'pid');

} else {

$goto = basename($PHP_SELF);

if ($HTTP_GET_VARS['action'] == 'buy_now') {

$parameters = array('action', 'pid', 'products_id');

} else {

$parameters = array('action', 'pid');

}

}

switch ($HTTP_GET_VARS['action']) {

// customer wants to update the product quantity in their shopping cart

case 'update_product' : for ($i=0, $n=sizeof($HTTP_POST_VARS['products_id']); $i<$n; $i++) {

if (in_array($HTTP_POST_VARS['products_id'][$i], (is_array($HTTP_POST_VARS['cart_delete']) ? $HTTP_POST_VARS['cart_delete'] : array()))) {

$cart->remove($HTTP_POST_VARS['products_id'][$i]);

} else {

if (PHP_VERSION < 4) {

// if PHP3, make correction for lack of multidimensional array.

reset($HTTP_POST_VARS);

while (list($key, $value) = each($HTTP_POST_VARS)) {

if (is_array($value)) {

while (list($key2, $value2) = each($value)) {

if (ereg ("(.*)][(.*)", $key2, $var)) {

$id2[$var[1]][$var[2]] = $value2;

}

}

}

}

$attributes = ($id2[$HTTP_POST_VARS['products_id'][$i]]) ? $id2[$HTTP_POST_VARS['products_id'][$i]] : '';

} else {

$attributes = ($HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]]) ? $HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]] : '';

}

$cart->add_cart($HTTP_POST_VARS['products_id'][$i], $HTTP_POST_VARS['cart_quantity'][$i], $attributes, false);

}

}

tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

break;

// customer adds a product from the products page

case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {

$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);

}

tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

break;

// performed by the 'buy now' button in product listings and review page

case 'buy_now' : if (isset($HTTP_GET_VARS['products_id'])) {

if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) {

tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']));

} else {

$cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1);

}

}

tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

break;

case 'notify' : if (tep_session_is_registered('customer_id')) {

if (isset($HTTP_GET_VARS['products_id'])) {

$notify = $HTTP_GET_VARS['products_id'];

} elseif (isset($HTTP_GET_VARS['notify'])) {

$notify = $HTTP_GET_VARS['notify'];

} elseif (isset($HTTP_POST_VARS['notify'])) {

$notify = $HTTP_POST_VARS['notify'];

} else {

tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'notify'))));

}

if (!is_array($notify)) $notify = array($notify);

for ($i=0, $n=sizeof($notify); $i<$n; $i++) {

$check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $notify[$i] . "' and customers_id = '" . $customer_id . "'");

$check = tep_db_fetch_array($check_query);

if ($check['count'] < 1) {

tep_db_query("insert into " . TABLE_PRODUCTS_NOTIFICATIONS . " (products_id, customers_id, date_added) values ('" . $notify[$i] . "', '" . $customer_id . "', now())");

}

}

tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'notify'))));

} else {

$navigation->set_snapshot();

tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

}

break;

case 'notify_remove' : if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['products_id'])) {

$check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");

$check = tep_db_fetch_array($check_query);

if ($check['count'] > 0) {

tep_db_query("delete from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");

}

tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action'))));

} else {

$navigation->set_snapshot();

tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

}

break;

case 'cust_order' : if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['pid'])) {

if (tep_has_product_attributes($HTTP_GET_VARS['pid'])) {

tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['pid']));

} else {

$cart->add_cart($HTTP_GET_VARS['pid'], $cart->get_quantity($HTTP_GET_VARS['pid'])+1);

}

}

tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

break;

}

}

 

// include the who's online functions

require(DIR_WS_FUNCTIONS . 'whos_online.php');

tep_update_whos_online();

 

// include the password crypto functions

require(DIR_WS_FUNCTIONS . 'password_funcs.php');

 

// include validation functions (right now only email address)

require(DIR_WS_FUNCTIONS . 'validations.php');

 

// split-page-results

require(DIR_WS_CLASSES . 'split_page_results.php');

 

// infobox

// require(DIR_WS_CLASSES . 'boxes.php');

 

// auto activate and expire banners

require(DIR_WS_FUNCTIONS . 'banner.php');

tep_activate_banners();

tep_expire_banners();

 

// auto expire special products

require(DIR_WS_FUNCTIONS . 'specials.php');

tep_expire_specials();

 

// calculate category path

if (isset($HTTP_GET_VARS['cPath'])) {

$cPath = $HTTP_GET_VARS['cPath'];

} elseif (isset($HTTP_GET_VARS['products_id']) && !isset($HTTP_GET_VARS['manufacturers_id'])) {

$cPath = tep_get_product_path($HTTP_GET_VARS['products_id']);

} else {

$cPath = '';

}

 

if (tep_not_null($cPath)) {

$cPath_array = tep_parse_category_path($cPath);

$cPath = implode('_', $cPath_array);

$current_category_id = $cPath_array[(sizeof($cPath_array)-1)];

} else {

$current_category_id = 0;

}

 

// include the breadcrumb class and start the breadcrumb trail

require(DIR_WS_CLASSES . 'breadcrumb.php');

$breadcrumb = new breadcrumb;

 

$breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);

 

 

// add category names or the manufacturer name to the breadcrumb trail

if (isset($cPath_array)) {

for ($i=0, $n=sizeof($cPath_array); $i<$n; $i++) {

$categories_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . $cPath_array[$i] . "' and language_id='" . $languages_id . "'");

if (tep_db_num_rows($categories_query) > 0) {

$categories = tep_db_fetch_array($categories_query);

$breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, ($i+1)))));

} else {

break;

}

}

} elseif (isset($HTTP_GET_VARS['manufacturers_id'])) {

$manufacturers_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . $HTTP_GET_VARS['manufacturers_id'] . "'");

$manufacturers = tep_db_fetch_array($manufacturers_query);

$breadcrumb->add($manufacturers['manufacturers_name'], tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id']));

}

 

// add the products model to the breadcrumb trail

if (isset($HTTP_GET_VARS['products_id'])) {

$model_query = tep_db_query("select products_model from " . TABLE_PRODUCTS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "'");

$model = tep_db_fetch_array($model_query);

$breadcrumb->add($model['products_model'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $HTTP_GET_VARS['products_id']));

}

 

// set which precautions should be checked

define('WARN_INSTALL_EXISTENCE', 'true');

define('WARN_CONFIG_WRITEABLE', 'false');

define('WARN_SESSION_DIRECTORY_NOT_WRITEABLE', 'true');

define('WARN_SESSION_AUTO_START', 'true');

define('WARN_DOWNLOAD_DIRECTORY_NOT_READABLE', 'true');

?>

 

any chance of high lighting what I am supposed to be looking for....

 

cheers Malc :(

Link to comment
Share on other sites

Hi

Well in the MS1 vewrsion, I added in an index page, as well the standard default page is there too. Now the header file references the FILENAME_DEFAULT, which is defined as default.php.  

 

The index.php is defined as FILENAME_INDEX, so in the header, change the file name defines. Now the bread crumb has in the application_top file a few defines which name the first part of the bread crumb etc.....look to about line 30 or so in your application_top file to see these...

 

These instructions do not make any sense to me, there is no reference to the index.php or default.php in my header.php,

 

OK I will try to be clear about my problem...

 

With my version of this contribution the entry page it seems is index.php... ok cool :?:

 

When I click on the breadcrumb link Home Page it takes me to default.php :?: :?:

 

What I would like is for some kind person (grovel, grovel) to post some instructions on how to give me the choice of the following..

 

... enter page index.php..... home page link back to index.php.... or.... enter page default.php.... home page link back to default.php

 

I tried commenting out the default.php but the Categories links stopped working :?:

 

The joys of being a newby :lol:

 

Cheers Malc :lol:

Link to comment
Share on other sites

Check your catalogincludesfilenames.php

define('FILENAME_DEFAULT', 'index.php');

Or Your application_top.php

 

define('FILENAME_DEFAULT', 'default.php');  

define('FILENAME_DOWNLOAD', 'download.php');  

define('FILENAME_INDEX', 'index.php');

To

define('FILENAME_DEFAULT', 'index.php');  

define('FILENAME_DOWNLOAD', 'download.php');  

define('FILENAME_INDEX', 'index.php');

Link to comment
Share on other sites

Hi

Thanks for your help MaxiDVD...

define('FILENAME_DEFAULT', 'index.php');  

define('FILENAME_DOWNLOAD', 'download.php');  

define('FILENAME_INDEX', 'index.php');

 

I should have said, I have tried the above already... But the links in Categories stopped working... the link url is .... http://localhost/osc_template_ver2/index.php?cPath=1... but when you click it you end up still at index.php... I hope I have explained my prod clearly...

 

any ideas

 

 

Cheers Malc

Link to comment
Share on other sites

Hi Deborah,

 

 

There is a downloads controller in the contributions that allows free items to be downloaded immediately after purchase.

 

Looked can not find it.... :?:

 

think you might post the link for me please.....

 

 

cheers and thanks.....

Peter McGrath

-----------------------------

See my Profile (click here) for more information and to contact me for professional osCommerce support that includes SEO development, custom development and security implementation

Link to comment
Share on other sites

  • 2 weeks later...

Hi

Ok I have hacked a solution..

 

I have changed the code in default.php to call mainpage.php this is the same as index.php...

 

So the enterpage is index.php and the home page(top) is default.php...both now have the same info...jees 2 pages doing the same job :shock: :?:

 

Cheers Malc

Link to comment
Share on other sites

Hi Deborah,

 

 

There is a downloads controller in the contributions that allows free items to be downloaded immediately after purchase.

 

Looked can not find it.... :?:

 

think you might post the link for me please.....

 

 

cheers and thanks.....

 

Sorry Peter, I haven't been on the boards much and missed this.

 

In case you haven't found it yet:

 

http://www.oscommerce.com/community/contributions,994

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

Sorry Peter, I haven't been on the boards much and missed this.

Thanks,

 

I will get it uploaded and running next week.....sort of in the middle of updating my mall system right now.....and well going away this weekeend...

 

 

cheers,

Peter McGrath

-----------------------------

See my Profile (click here) for more information and to contact me for professional osCommerce support that includes SEO development, custom development and security implementation

Link to comment
Share on other sites

  • 3 weeks later...

Going to give your system a try. have to wait for the check to clear ..lol

How long that take when one isnt being sent....

 

A few notes here , first they arent setup to download without purchase even after Loxy explained how to do it.

 

Second , donations on work are fine , except for those of us

who refuse to use Pay Pal. Do you people know how many times its been hacked? A credit card number is one thing but bank info is on another level.

 

Third, Im sure Im not the only person who would mirror your download if

you made it as an Add on instead of a full install. I got extra bandwidth at the moment, let me know.

 

P

Link to comment
Share on other sites

Hi,

 

A few notes here , first they arent setup to download without purchase even after Loxy explained how to do it.

 

Yes I know, sort of in the middle of a big project using my mall system, But this is going to be done soon too.....

 

 

Second , donations on work are fine , except for those of us

who refuse to use Pay Pal. Do you people know how many times its been hacked? A credit card number is one thing but bank info is on another level.

 

Had no idea PayPal has had this problem...I have never heard about this. I am not releasing this the way as I have done to solisit(sp) donations, rather, it was the only way at the time to do it .......

 

Third, Im sure Im not the only person who would mirror your download if

you made it as an Add on instead of a full install. I got extra bandwidth at the moment, let me know.

 

WellI am waiting to hear back from Harald about uploading the system, as a contribution. I can remove most of it and set it up as a contribution but the upload file size prohibits this. I am not having difficutly with the bandwidth rather just time.....and well just getting over a flu bug, so I have not been watching my site as much these last couple of days.....

 

cheers,

Peter McGrath

-----------------------------

See my Profile (click here) for more information and to contact me for professional osCommerce support that includes SEO development, custom development and security implementation

Link to comment
Share on other sites

Understadn being under the weather.

Just got over yet another kidney stone myself.

 

Uploading your MS2 now.

If it dosent work out and you need a mirror , just let me know.

 

Anyone know what happend to kenny and the Theme Shop?

Still looking for that...

Link to comment
Share on other sites

Hi ,

Installed and all went well until I uploaded

the 3 follwoing themes from your downloads:

Nuke_Tech , Tech , V-BabyBlue.

They install correctly but I get the following error at the bottom of each catalog page

1146 - Table 'WC_Clothing.TABLE_WEB_PAGES' doesn't exist



select distinct page_name from TABLE_WEB_PAGES order by page_name



[TEP STOP]

 

Came across one post with reference to a WEB_Page table but was jsut a list of tables. My Db dosent contain said table nor does any of the 3 difffernt SQL files I have frrom different OSC installs.

 

Help ....

Link to comment
Share on other sites

Hi

 

 

Installed and all went well until I uploaded

the 3 follwoing themes from your downloads:

Nuke_Tech , Tech , V-BabyBlue.

They install correctly but I get the following error at the bottom of each catalog page

Code: 



1146 - Table 'WC_Clothing.TABLE_WEB_PAGES' doesn't exist 



select distinct page_name from TABLE_WEB_PAGES order by page_name 



[TEP STOP]

 

 

Came across one post with reference to a WEB_Page table but was jsut a list of tables. My Db dosent contain said table nor does any of the 3 difffernt SQL files I have frrom different OSC installs.

 

This is due to the fact that each template has it's own unique boxes. These boxes are needed since they differ slightly. In the MS2 template version, I have not added in anything other then the template system, since some people did not want to have lots of other stuff. So I did not add in the site text editing tool. It is these boxes that the themes are referring to. To fix this, Just remove the calls to them via the column_left/right files.

 

Once the calls to them are removed the templatres should function as expected. If you have other difficulties, please let me know and I will correct this. I will be putting a contribution together for the site text editing system which now supports multi-languages (the first version did not), if anyone is interested.

 

cheers,

Peter McGrath

-----------------------------

See my Profile (click here) for more information and to contact me for professional osCommerce support that includes SEO development, custom development and security implementation

Link to comment
Share on other sites

ok Im at a loss.

I have 3 column_ files. 2 within /catalog/includes/template

colum_left and another colum_right

Then the thrid is under /catalog/admin/includes

colum_left

 

None of which call Table 'WC_Clothing.TABLE_WEB_PAGES'.

All I see are the normal osc box calls.

 

if ((USE_CACHE == 'true') && empty($SID)) {

   echo tep_cache_categories_box();

 } else {

   include(DIR_WS_BOXES . 'categories.php');

 }



 if ((USE_CACHE == 'true') && empty($SID)) {

   echo tep_cache_manufacturers_box();

 } else {

   include(DIR_WS_BOXES . 'manufacturers.php');

 }



 require(DIR_WS_BOXES . 'whats_new.php');

 require(DIR_WS_BOXES . 'search.php');

 require(DIR_WS_BOXES . 'information.php');

 

 

Besides this , your project is exactly what Ive been looking for.

This will allow easy manipulation of layout. Fact , I should be ble to transfer any of my Nuke themes into OSC themes now... long as I can get working which Im sure we will.

Link to comment
Share on other sites

ok Im at a loss.

I have 3 column_ files. 2 within /catalog/includes/template

colum_left and another colum_right

Then the thrid is under /catalog/admin/includes

colum_left

 

Sorry, the only column files you need concern yourself with are in the includes/templates folder, not in the theme folder. the ones in the theme folders can be safely removed (which I should have done). Now the information box can be commented out

 

ie

 

// require(DIR_WS_BOXES . 'information.php');

 

or modified.....

 

the information box, is totally different then regular OSC. To change this, you will need to look at the information box found in original_osc/theme_boxes, and compare it to the Nek Teck version. The original_osc box will be what you want, while the Nek Teck has some changes, look to the info box heading and info box footer found at the top and bottom of the file.

 

Have problems with this, let me know and I will try to help out.

 

cheers,

Peter McGrath

-----------------------------

See my Profile (click here) for more information and to contact me for professional osCommerce support that includes SEO development, custom development and security implementation

Link to comment
Share on other sites

Well everything partially works now.

Sometimes the pages layout is stacked vertical instead of a horizontal layout.

Also I get the following error:

Fatal error: Cannot instantiate non-existent class: productlistingbox in /usr/local/www/vhosts/worldconspiracy.org/htdocs/WC_Clothing/includes/modules/product_listing.php on line 151

 

Which line 151 is in the follwoing segment:

    $list_box_contents = array();



   $list_box_contents[0] = array('params' => 'class="productListing-odd"');

   $list_box_contents[0][] = array('params' => 'class="productListing-data"',

                                  'text' => TEXT_NO_PRODUCTS);



   new productListingBox($list_box_contents);

 }

 

Of course its only the add one themes that do this.

Color change Themas work just fine.

 

Also,

When will this be available as a add on contrib instead of full isntall?

Is it possible to get it as such now? (Complete with the editing part)

Link to comment
Share on other sites

Is it possible to get it as such now? (Complete with the editing part)

 

What editing part? There are several existing html editors available.

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...