Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

ERROR in shoping cart infobox


Ennzo

Recommended Posts

Hy all i have a problem with my site............ i use an older version of oscommerce and i have a prob with my shoping cart infobox ....... if any customer add's a product to their shoping cart the infobox always shows 0 products in shoping cart i will post a picture whith my homepage so you can see what i am talking about .............untitledbs9.jpg

 

i think the problem is in the header.php script, so i will post the script .. maybe somebody will help me........ i've underlined the posible script error .......... HELP!!!1

 

 

 

<?php

 

 

// check if the 'install' directory exists, and warn of its existence

if (WARN_INSTALL_EXISTENCE == 'true') {

if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {

$messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');

}

}

 

// check if the configure.php file is writeable

if (WARN_CONFIG_WRITEABLE == 'true') {

if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {

$messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');

}

}

 

// check if the session folder is writeable

if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {

if (STORE_SESSIONS == '') {

if (!is_dir(tep_session_save_path())) {

$messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning');

} elseif (!is_writeable(tep_session_save_path())) {

$messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning');

}

}

}

 

// check session.auto_start is disabled

if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {

if (ini_get('session.auto_start') == '1') {

$messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning');

}

}

 

if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {

if (!is_dir(DIR_FS_DOWNLOAD)) {

$messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');

}

}

 

if ($messageStack->size('header') > 0) {

echo $messageStack->output('header');

}

?>

<center>

<table border="0" cellpadding="0" cellspacing="0" width="693">

<tr>

<td width="693" colspan="2" >

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

<tr>

<td width="100%" style="padding:0px 0px 5px 5px; " height="54" align="left" valign="bottom"><?php if (substr(basename($PHP_SELF), 0, 8) != 'Cumpar') {

include(DIR_WS_BOXES . 'languages.php');

} ?></td>

</tr>

<tr>

<td height="91" width="100%">

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

<tr>

<td width="184" height="123" rowspan="2"><img src="images/logo.gif" width="184" height="123" alt=""></td>

<td width="375" height="73" align="left" valign="middle" nowrap="nowrap"><div id="topmenu">

<div class="column">

<ul>

<li><a href="<?php echo tep_href_link(FILENAME_ABOUT_US) ?>" class="atopmenu">Informatii</a></li>

<li><a href="<?php echo tep_href_link(FILENAME_SPECIALS) ?>" class="atopmenu">Oferte Speciale</a></li>

<li><a href="<?php echo tep_href_link(FILENAME_ADVANCED_SEARCH) ?>" class="atopmenu">Cautare Avansata</a></li>

</ul>

</div>

<div class="column">

<ul>

<li><a href="<?php echo tep_href_link(FILENAME_CREATE_ACCOUNT) ?>" class="atopmenu">Creare Cont</a></li>

<li><a href="<?php echo tep_href_link(FILENAME_LOGIN) ?>" class="atopmenu">Login</a></li>

<li><a href="<?php echo tep_href_link(FILENAME_CONTACT_US) ?>" class="atopmenu">Contact</a></li>

</ul>

</div></div>

<div id="currencies"><p style="padding-bottom:3px;color:#1970AD;">Moneda: </p>

<?php if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {

include(DIR_WS_BOXES . 'currencies.php');

}?></div> </td>

<td width="134" align="left" valign="middle" height="83" background="images/shopping_bg.gif"><b><img src="images/shopping_cart_im.gif" width="37" height="37" alt="" align="left" style=" margin:2px 3px 2px 4px;; " />Cosul Meu:</b><br/>In cos ai <br/> Produs(e)<br/></td>

 

</tr>

<tr>

<td colspan="2" height="40" width="509">

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

<tr>

<td><a class="menu" style="width:97px; background-image:url(images/home_bg.gif)" href="<?php echo tep_href_link(FILENAME_DEFAULT) ?>">Home</a></td>

<td><a class="menu" href="<?php echo tep_href_link(FILENAME_PRODUCTS_NEW) ?>">Produse Noi</a></td>

<td><a class="menu" href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL') ?>">Contul Meu </a></td>

<td><a class="menu" href="<?php echo tep_href_link(FILENAME_SHOPPING_CART) ?>">Cosul Meu</a></td>

<td><a class="menu" style="width:106px; background-image:url(images/checkout_bg.gif)" href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') ?>">Cumpar</a></td>

</tr>

</table> </td>

</tr>

<tr>

<td width="174" height="110" valign="top" align="left" style="padding-left:10px; padding-top:20px; background-image:url(images/search_bg.jpg) ">

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

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

echo tep_cache_manufacturers_box();

} else {

include(DIR_WS_BOXES . 'manufacturers.php'); }?>

<?php require(DIR_WS_BOXES . 'search.php'); ?>

</table> </td>

<td colspan="2" width="509"><img src="images/main.jpg" width="509" height="130" alt="" /></td>

</tr>

</table>

</td>

</tr>

<tr>

<td style="border-top:1px solid #FFF; border-bottom:2px solid #FFF; font-size:1px; background-color:#777777;" >?</td>

</tr>

</table>

</td>

 

 

 

<?php

if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {

?>

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

<tr class="headerError">

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

</tr>

</table>

<?php

}

 

if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {

?>

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

<tr class="headerInfo">

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

</tr>

</table>

<?php

}

?>

 

</tr>

<tr>

<td width="693" align="center" colspan="2">

<table border="0" width="693" cellpadding="0" cellspacing="0">

 

Link to comment
Share on other sites

Try this:

Cosul Meu:</b><br/>In cos ai <br/><?php echo sizeof($products = $cart->get_products()); ?> Produs(e)<br/></td>

 

I'm not sure if this is what you want?

Other great Open Source (Free) programs: (Free as in free speech not free beer)

The Gimp - An image program. | Firefox - All you have to do is add the Web Developer add-on to make this web browser complete. | FileZilla - An ftp program. | Inkscape - A good program to create images with. | Thunderbird - An email program. | Openoffice.org - An office suite that is compatible with MS Office. | Abiword - Another office suite. | Audacity - A sound recording tool. | ddp's Picks | Wordpress - An easy to use blogging software. | Joomla - An easy to use CMS that has ecommerce plug-ins. | Drupal - Another CMS

How do I find these programs? Google Search!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...