Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

has anyone tried Articles Module v1.0?


rubygirl

Recommended Posts

  • Replies 179
  • Created
  • Last Reply

Top Posters In This Topic

It's an interesting contrib - if you dig through the code, it is pretty much simply duplicating the product layout for the whole system - the stories are added in a similar fashion to the way products are added in the system. The articles are also displayed similarily in rows when clicked on - it's pretty cool, though. - I haven't had a chance to run through all of it yet to see if it conflicts with anything - but so far so good.

Link to comment
Share on other sites

cant get it to work too...

 

i get the following errors:

Warning: Undefined index: cArticlePath in D:wwwshop11catalogincludesapplication_top.php on line 50

 

Warning: Undefined index: articles_id in D:wwwshop11catalogincludesapplication_top.php on line 52

 

Fatal error: Cannot instantiate non-existent class: breadcrumb in D:wwwshop11catalogincludesapplication_top.php on line 66

 

i have checked my application_top.php but cant fix the errors...

may be you can help me...

 

guido

Link to comment
Share on other sites

I have installed it also. I made all the additions and it is working okay. Have you made the required additions to application_top.php and general.php ?

 

Generally the mod suffers from same in-flexibility as product listing but that is not the contributors fault.

"Use no way as way, have no limitation as limitation." - Bruce Lee

Link to comment
Share on other sites

As i said there is still alot of "legacy code" from products version but this brings some interesting possibilities for further development:

 

Reviews management with reviews approval module

Manufacturers converted to writers

Pulling newest articles to front page

Having short description to articles (via contribution for products)

"See also" and "other articles like this" thru attributes

"Use no way as way, have no limitation as limitation." - Bruce Lee

Link to comment
Share on other sites

  • 2 weeks later...

Anyone have a working Example online of News Module? Would love to see. I tried installing and wasted a lot of time with it eventually not working. Sound Great though, so I'd love to see one working to decide whether its worth the effort to try to install again.

 

Thanks

Aaron

Link to comment
Share on other sites

Anyone have a working Example online of Articles Module? Would love to see. I tried installing and wasted a lot of time with it eventually not working. Sound Great though, so I'd love to see one working to decide whether its worth the effort to try to install again.

 

Thanks

Aaron

Link to comment
Share on other sites

Sorry just switched database so there are no articles at english side. If you check it in couple of hours, there will be.

 

Meanwhile if you wanna wanna take a peek, just switch language to finnish.

"Use no way as way, have no limitation as limitation." - Bruce Lee

Link to comment
Share on other sites

I have both installed at soon to be opened shop front. And they work great together. I do not see them as competitors as types of information published seems to be different. Articles for more permanent material and newsdesk for more frequent and shorter type of communications. Hardly no one wants to read an article about shipping delays and new product line.

 

I sent some code changes (stats for articles and reviews approval) to chad so maybe there will be newer version of articles mod sometime in the future.

 

But, and I have said this around thousand times before, that everything, using boxes.php and product_listing.php are a real drag to customize for mere mortals. This is not contributors fault, who both did a exellent job with their contribs, but the lack of flexibilty in the way tables are constructed.

 

Of the two, newsdesk was easier to customize. Getting the articles to show the way I wanted nearly made me insane. Got the descriptions to show too, but they got lost in the update process.

 

Templates are eagerly waited....

 

BTW great job with the contribution Carsten.

"Use no way as way, have no limitation as limitation." - Bruce Lee

Link to comment
Share on other sites

Just curious if anyone has successfully installed the Articles Mod contrib released 1-22-03?

running into errors but haven't heard anyone talk about it yet on the forums.

 

Request: Can someone kindly post a link to this contribution when

they have time. I have looked in the contributions and

searched the forum have not been able to locate it

:cry:

ibandyop

Link to comment
Share on other sites

AAAARRRGHHH!

 

I have no hair left because of this darned module. I'm a PHP neeewbie to say the most..but I can follow instructions. Perhaps it's something silly I'm leaving out but I can ALMOST swear that I'm crossing all my T's and dotting all my Is.

 

When I follow the readme.txt installation file that comes with this module, everything makes sense until STEP G where it asks me to paste the following code in catalog/includes/application_top.php.

 

//***********************BEGIN********



//iPLANIT Change - 

 //Articles_Module_v01 - 10/01/2003



Lots of BLAHBLAHBLAHBLAH



?>                           <----THIS LITTLE BUGGER



//*****************************END***********

 

Where am I supposed to paste this code? And what's up with the closing PHP tag? When my paste this code into the file (using a fancysmancy code editor), I can see that it screws up any code beneath it (i'm assuming because it conflicts with the already existing ?> tag). If I delete it, it shows up fine but my site breaks with the following message on the right column...

 

Fatal error: Call to undefined function: tep_has_articlecategory_subcategories() in /var/www/html/includes/boxes/articlecat.php on line 42

 

 

PLEEEEASE help me PHP gods. :lol:

 

Refreshing this thread every other minute for an answer,

Vic

Link to comment
Share on other sites

original application_top.php

 

 

<?php

/*

 $Id: application_top.php,v 1.260 2003/02/07 22:01:55 dgw_ Exp $



 osCommerce, Open Source E-Commerce Solutions

 http://www.oscommerce.com



 Copyright (c) 2003 osCommerce



 Released under the GNU General Public License

*/



// Start the clock 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');



// Define the project version

 define('PROJECT_VERSION', 'osCommerce 2.2-CVS');



// define the filenames used in the project

 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_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_INFO_SHOPPING_CART', 'info_shopping_cart.php');

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

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

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

 define('FILENAME_PASSWORD_CRYPT', 'password_funcs.php');

 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_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_TLD', 'tld.txt');

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



// 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_TO_GEO_ZONES', 'zones_to_geo_zones');

 define('TABLE_WHOS_ONLINE', 'whos_online');

 define('TABLE_ZONES', 'zones');



// customization for the design layout

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



// check to see if php implemented session management functions - if not, include php3/php4 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');



// 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!');



// 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']);

 }



 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);

   }

 }



// Get variables from $PATH_INFO

 if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {

   if (strlen($PATH_INFO) > 1) {

     $PHP_SELF = str_replace($PATH_INFO,'',$PHP_SELF);

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

     while (list(, $var) = each($vars)) { 

       list(, $val) = each($vars); 

       $HTTP_GET_VARS[$var] = $val; 

       $GLOBALS[$var] = $val; 

     }

   }

 }



// 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 ($HTTP_POST_VARS[tep_session_name()]) {   

    tep_session_id($HTTP_POST_VARS[tep_session_name()]);   

  }   

  if ( (getenv('HTTPS') == 'on') && ($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 (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');



// language

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

   if (!$language) {

     tep_session_register('language');

     tep_session_register('languages_id');

   }



   include(DIR_WS_CLASSES . 'language.php');

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



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



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

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



 }

 

// include the language translations

 require(DIR_WS_LANGUAGES . $language . '.php');



// define our general functions used application-wide

 require(DIR_WS_FUNCTIONS . 'general.php');

 require(DIR_WS_FUNCTIONS . 'html_output.php');



// currency

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

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



   if ($HTTP_GET_VARS['currency']) {

     $currency = tep_currency_exists($HTTP_GET_VARS['currency']);

     if (!$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 ($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' : $size = sizeof($HTTP_POST_VARS['products_id']);

                             for ($i=0; $i<$size;$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), 'NONSSL'));

                             break;

     // customer adds a product from the products page

     case 'add_product' :    if (ereg('^[0-9]+$', $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), 'NONSSL'));

                             break;

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

     case 'buy_now' :        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'], 'NONSSL'));

                             } 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), 'NONSSL'));

                             }

                             break;

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

                               if ($HTTP_GET_VARS['products_id']) { 

                                 $notify = array($HTTP_GET_VARS['products_id']); 

                               } elseif ($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')), 'NONSSL')); 

                               } 

                               for ($i=0; $i<sizeof($notify); $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')), 'NONSSL')); 

                             } else { 

                               $navigation->set_snapshot(); 

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

                             } 

                             break; 



     case 'notify_remove' :  if (tep_session_is_registered('customer_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')), 'NONSSL'));

                             } else {

                               $navigation->set_snapshot();

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

                             }

                             break;

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

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

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

                               } 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), 'NONSSL'));

                             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 . FILENAME_PASSWORD_CRYPT);



// 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 ($HTTP_GET_VARS['cPath']) {

   $cPath = $HTTP_GET_VARS['cPath'];

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

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

 } else {

   $cPath = '';

 }

 if (strlen($cPath) > 0) {

   $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;

 }



 require(DIR_WS_CLASSES . 'breadcrumb.php');

 $breadcrumb = new breadcrumb;



 $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);

 $breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULT));



 if (isset($cPath_array)) {

   $n = sizeof($cPath_array);

   for ($i = 0; $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 ($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']));

 }



 if ($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', 'true');

 define('WARN_SESSION_DIRECTORY_NOT_WRITEABLE', 'true');

 define('WARN_SESSION_AUTO_START', 'true');

 define('WARN_DOWNLOAD_DIRECTORY_NOT_READABLE', 'true');

?>

 

 

 

 

And here's the snip out of the contrib...

 

 

g) In catalog/includes/application_top.php add the following code



//***********************BEGIN**********************************



//iPLANIT Change - 

 //Articles_Module_v01 - 10/01/2003

 //Storefront Side

 define('FILENAME_DEFAULTARTICLE', 'defaultarticle.php');

 define('FILENAME_ARTICLE_INFO', 'article_info.php');

 define('FILENAME_ARTICLE_LISTING', 'article_listing.php');

 define('FILENAME_NEW_ARTICLES', 'new_articles.php'); // This is the middle of defaultarticle.php (found in modules)

 define('FILENAME_ARTICLE_REVIEWS', 'article_reviews.php');

 define('FILENAME_ARTICLE_REVIEWS_INFO', 'article_reviews_info.php');

 define('FILENAME_ARTICLE_REVIEWS_WRITE', 'article_reviews_write.php');

 

 

 define('TABLE_ARTICLECAT', 'articlecat');

 define('TABLE_ARTICLECAT_DESCRIPTION', 'articlecat_description');

 define('TABLE_ARTICLES', 'articles');

 define('TABLE_ARTICLES_DESCRIPTION', 'articles_description');

 define('TABLE_ARTICLES_TO_ARTICLECAT','articles_to_articlecat');

 define('TABLE_ARTICLEREVIEWS','articlereviews');

 define('TABLE_ARTICLEREVIEWS_DESCRIPTION','articlereviews_description');

 

 // Articles Box: recursive articles count

 define('SHOW_ARTICLE_COUNTS', 'true'); // show category count: true=Yes False=No

 define('USE_RECURSIVE_ARTICLE_COUNT', 'true'); // recursive count: true=Yes False=No



// calculate Article Category path

 if ($HTTP_GET_VARS['cArticlePath']) {

   $cArticlePath = $HTTP_GET_VARS['cArticlePath'];

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

   $cArticlePath = tep_get_article_path($HTTP_GET_VARS['articles_id']);

 } else {

   $cArticlePath = '';

 }

 if (strlen($cArticlePath) > 0) {

   $cArticlePath_array = array_map('tep_string_to_int', explode('_', $cArticlePath));

   $cArticlePath = implode('_', $cArticlePath_array);

   $current_articlecategory_id = $cArticlePath_array[(sizeof($cArticlePath_array)-1)];

 } else {

   $current_articlecategory_id = 0;

 }



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

 $articlebreadcrumb = new breadcrumb;



 $articlebreadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);

 $articlebreadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULTARTICLE));



 if (isset($cArticlePath_array)) {

   for($i=0; $i<sizeof($cArticlePath_array); $i++) {

     $articlecat_query = tep_db_query("select articlecat_name from " . TABLE_ARTICLECAT_DESCRIPTION . " where articlecat_id = '" . $cArticlePath_array[$i] . "' and language_id='" . $languages_id . "'");

     //echo($cArticlePath_array[$i]."-Chad2");

         $articlecat = tep_db_fetch_array($articlecat_query);

     $articlebreadcrumb->add($articlecat['articlecat_name'], tep_href_link(FILENAME_DEFAULTARTICLE, 'cArticlePath=' . implode('_', array_slice($cArticlePath_array, 0, ($i+1)))));

   }

 } elseif ($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);

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

 }



 if ($HTTP_GET_VARS['articles_id']) {

   $model_query = tep_db_query("select articles_model from " . TABLE_ARTICLES . " where articles_id = '" . $HTTP_GET_VARS['articles_id'] . "'");

   $model = tep_db_fetch_array($model_query);

   $articlebreadcrumb->add($model['articles_model'], tep_href_link(FILENAME_ARTICLE_INFO, 'cArticlePath=' . $cArticlePath . '&articles_id=' . $HTTP_GET_VARS['articles_id']));

 }





?>



//*****************************END*****************

Link to comment
Share on other sites

Try replacing:

 

  



define('WARN_INSTALL_EXISTENCE', 'true');

 define('WARN_CONFIG_WRITEABLE', 'true');

 define('WARN_SESSION_DIRECTORY_NOT_WRITEABLE', 'true');

 define('WARN_SESSION_AUTO_START', 'true');

 define('WARN_DOWNLOAD_DIRECTORY_NOT_READABLE', 'true');

 

?>

 

With:

 

  



define('WARN_INSTALL_EXISTENCE', 'true');

 define('WARN_CONFIG_WRITEABLE', 'true');

 define('WARN_SESSION_DIRECTORY_NOT_WRITEABLE', 'true');

 define('WARN_SESSION_AUTO_START', 'true');

 define('WARN_DOWNLOAD_DIRECTORY_NOT_READABLE', 'true');

 



//***********************BEGIN**********************************



//iPLANIT Change - 

 //Articles_Module_v01 - 10/01/2003

 //Storefront Side

 define('FILENAME_DEFAULTARTICLE', 'defaultarticle.php');

 define('FILENAME_ARTICLE_INFO', 'article_info.php');

 define('FILENAME_ARTICLE_LISTING', 'article_listing.php');

 define('FILENAME_NEW_ARTICLES', 'new_articles.php'); // This is the middle of defaultarticle.php (found in modules)

 define('FILENAME_ARTICLE_REVIEWS', 'article_reviews.php');

 define('FILENAME_ARTICLE_REVIEWS_INFO', 'article_reviews_info.php');

 define('FILENAME_ARTICLE_REVIEWS_WRITE', 'article_reviews_write.php');

 

 

 define('TABLE_ARTICLECAT', 'articlecat');	

 define('TABLE_ARTICLECAT_DESCRIPTION', 'articlecat_description');	

 define('TABLE_ARTICLES', 'articles');

 define('TABLE_ARTICLES_DESCRIPTION', 'articles_description');

 define('TABLE_ARTICLES_TO_ARTICLECAT','articles_to_articlecat');

 define('TABLE_ARTICLEREVIEWS','articlereviews');

 define('TABLE_ARTICLEREVIEWS_DESCRIPTION','articlereviews_description');

 

 // Articles Box: recursive articles count

 define('SHOW_ARTICLE_COUNTS', 'false'); // show category count: true=Yes False=No

 define('USE_RECURSIVE_ARTICLE_COUNT', 'false'); // recursive count: true=Yes False=No



// calculate Article Category path

 if ($HTTP_GET_VARS['cArticlePath']) {

   $cArticlePath = $HTTP_GET_VARS['cArticlePath'];

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

   $cArticlePath = tep_get_article_path($HTTP_GET_VARS['articles_id']);

 } else {

   $cArticlePath = '';

 }

 if (strlen($cArticlePath) > 0) {

   $cArticlePath_array = array_map('tep_string_to_int', explode('_', $cArticlePath));

   $cArticlePath = implode('_', $cArticlePath_array);

   $current_articlecategory_id = $cArticlePath_array[(sizeof($cArticlePath_array)-1)];

 } else {

   $current_articlecategory_id = 0;

 }



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





 if (isset($cArticlePath_array)) {

   for($i=0; $i<sizeof($cArticlePath_array); $i++) {

     $articlecat_query = tep_db_query("select articlecat_name from " . TABLE_ARTICLECAT_DESCRIPTION . " where articlecat_id = '" . $cArticlePath_array[$i] . "' and language_id='" . $languages_id . "'");

     //echo($cArticlePath_array[$i]."-Chad2");

  $articlecat = tep_db_fetch_array($articlecat_query);

     $breadcrumb->add($articlecat['articlecat_name'], tep_href_link(FILENAME_DEFAULTARTICLE, 'cArticlePath=' . implode('_', array_slice($cArticlePath_array, 0, ($i+1)))));

   }

 } elseif ($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_DEFAULTARTICLE, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id']));

 }



 if ($HTTP_GET_VARS['articles_id']) {

   $article_bc_query = tep_db_query("select p.articles_id, pd.articles_name from " . TABLE_ARTICLES . " p, " . TABLE_ARTICLES_DESCRIPTION . " pd where p.articles_id = '" . $HTTP_GET_VARS['articles_id'] . "' and pd.articles_id = '" . $HTTP_GET_VARS['articles_id'] . "' and pd.language_id = '" . $languages_id . "'");

   $article_bc = tep_db_fetch_array($article_bc_query); 

   $breadcrumb->add($article_bc['articles_name'], tep_href_link(FILENAME_ARTICLE_INFO, 'cArticlePath=' . $cArticlePath . '&articles_id=' . $HTTP_GET_VARS['articles_id']));

 }



//*****************************END************************************

?>

 

This is my set-up which is working.

"Use no way as way, have no limitation as limitation." - Bruce Lee

Link to comment
Share on other sites

Thanks Matti for your help on the app_top file. Found out the problem was in /incl/function/general.php....stupid wordwrap pasted it incorrectly.

 

THX AGAIN!

 

Me :arrow: :onfire: :D :onfire: :D :onfire: :D :onfire: :D :onfire: :D

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...