Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Is the right side really gone?


noelove

Recommended Posts

Posted

http://frostfishcovesoaps.com/store/catalog/index.php

 

1. I did this: http://www.oscommerce.info/kb/osCommerce/C...g_Area/Boxes/65

and I did this: http://www.oscommerce.info/kb/osCommerce/C..._and_Layout/258

 

I edited the following files from the catalog:

index.php

shopping_cart.php

login.php

advanced_search.php

shipping.php

privacy.php

conditions.php

contact_us.php

 

Do I have to do every single one in the catalog?

 

2. I *thought* that I had changed the title of the page, but its still showing up OScommerce. ANd now I can't find the thread where I read up on how to do it.

 

3. How do I get rid of "This product was added to our catalog on".

 

4. In the categories boxes I want to change the size so the items are not two lines.

 

 

Any help of course is appreciated. Cookies and fast internets for all!

 

:thumbsup:

 

Noel<3

Posted

Let's start with #2.

2. I *thought* that I had changed the title of the page, but its still showing up OScommerce. ANd now I can't find the thread where I read up on how to do it.

Please post the content of store/catalog/includes/header.php starting with your Line 50 to the bottom :)

 

jon

It's all just ones and zeros....

Posted

I was hoping you'd answer. I've been seeing you comment in other posts and you're very informative and helpful.

 

Thank you very much in advance, I await your reply! ;)

 

Give me a little while to cobble together a post to all your questions, okay?

 

jon

Posted

yes sir! :)

 

 if ($messageStack->size('header') > 0) {
   echo $messageStack->output('header');
 }
?>
<div class="fixcenter">
<table border="0" width="750" cellspacing="0" cellpadding="0">
 <tr class="header">
   <td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'Frost Fish Cove Soaps') . '</a>'; ?></td>
 </tr>
</table>
<table border="0" width="100%" 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); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a>   </td>
 </tr>
</table>
<?php
 if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {
?>
<table border="0" width="750" 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="750" cellspacing="0" cellpadding="2">
 <tr class="headerInfo">
   <td class="headerInfo"><?php echo htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td>
 </tr>
</table>
<?php
 }
?>

 

Let's start with #2.

2. I *thought* that I had changed the title of the page, but its still showing up OScommerce. ANd now I can't find the thread where I read up on how to do it.

Please post the content of store/catalog/includes/header.php starting with your Line 50 to the bottom :)

 

jon

Posted

Hey! Don't go fixing stuff! Just kidding :)

 

You got this one fixed on your own!

 

Next:

3. How do I get rid of "This product was added to our catalog on".

admin\includes\languages\english\categories.php (Line 36 or so)

 

This:

define('TEXT_PRODUCT_DATE_ADDED', 'This product was added to our catalog on %s.');

 

to this:

//define('TEXT_PRODUCT_DATE_ADDED', 'This product was added to our catalog on %s.');

 

includes\languages\english\product_info.php (Line 16 or so)

 

This:

 

define('TEXT_DATE_ADDED', 'This product was added to our catalog on %s.');

 

to this:

 

//define('TEXT_DATE_ADDED', 'This product was added to our catalog on %s.');

 

It's now "commented out" and will no longer show.

 

jon

It's all just ones and zeros....

Posted

Done and done but what did I do wrong?

http://frostfishcovesoaps.com/store/catalo...?products_id=38

 

"TEXT_DATE_ADDED"

 

haha

 

and yes I did fix the spacing issue in the style sheet. :)

 

 

Hey! Don't go fixing stuff! Just kidding :)

 

You got this one fixed on your own!

 

Next:

3. How do I get rid of "This product was added to our catalog on".

admin\includes\languages\english\categories.php (Line 36 or so)

 

This:

define('TEXT_PRODUCT_DATE_ADDED', 'This product was added to our catalog on %s.');

 

to this:

//define('TEXT_PRODUCT_DATE_ADDED', 'This product was added to our catalog on %s.');

 

includes\languages\english\product_info.php (Line 16 or so)

 

This:

 

define('TEXT_DATE_ADDED', 'This product was added to our catalog on %s.');

 

to this:

 

//define('TEXT_DATE_ADDED', 'This product was added to our catalog on %s.');

 

It's now "commented out" and will no longer show.

 

jon

Posted

Well, this is just too dumb. I see what you did and I can duplicate it. Gimme a minute.

 

Okay, in product_info.php, find this around Line 200:

 

<?php

} else {

?>

<tr>

<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>

</tr>

<?php

 

Change it to this:

 

<?php

} else {

?>

<tr>

<td></td>

</tr>

<?php

 

Sometime tings not so simple :)

 

Alternatively, you can replace the define text with a "space" between the single quotes in the define.

 

jon

It's all just ones and zeros....

Posted

hhmmmm on my product_info.php, I don't have any of that. Here is the page.

 

<?php
/*
 $Id: product_info.php,v 1.15 2002/11/19 01:48:08 dgw_ Exp $

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2002 osCommerce

 Released under the GNU General Public License
*/

define('TEXT_PRODUCT_NOT_FOUND', 'Product not found!');
define('TEXT_CURRENT_REVIEWS', 'Current Reviews:');
define('TEXT_MORE_INFORMATION', 'For more information, please visit this products <a href="%s" target="_blank"><u>webpage</u></a>.');
//define('TEXT_DATE_ADDED', 'This product was added to our catalog on %s.');
define('TEXT_DATE_AVAILABLE', '<font color="#ff0000">This product will be in stock on %s.</font>');
define('TEXT_ALSO_PURCHASED_PRODUCTS', 'Customers who bought this product also purchased');
define('TEXT_PRODUCT_OPTIONS', 'Available Options:');
define('TEXT_CLICK_TO_ENLARGE', 'Click to enlarge');
?>

 

 

Well, this is just too dumb. I see what you did and I can duplicate it. Gimme a minute.

 

Okay, in product_info.php, find this around Line 200:

 

<?php

} else {

?>

<tr>

<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>

</tr>

<?php

 

Change it to this:

 

<?php

} else {

?>

<tr>

<td></td>

</tr>

<?php

 

Sometime tings not so simple :)

 

Alternatively, you can replace the define text with a "space" between the single quotes in the define.

 

jon

Posted

rrrrrrrrrrrrrrrrroot file :)

 

Not includes\languages\english\product_info.php but

 

store/catalog/product_info.php

It's all just ones and zeros....

Posted

so.many.files.confusing.setting.in.arg!

 

Haha, thank you for being so patient!

 

rrrrrrrrrrrrrrrrroot file :)

 

Not includes\languages\english\product_info.php but

 

store/catalog/product_info.php

Posted

:)

 

Next up:

4. In the categories boxes I want to change the size so the items are not two lines.

includes\application_top.php (Line 59 or so):

 

This:

 

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

 

to this:

 

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

 

This addresses the infobox width -- normally. But you have something else going on (and this is a template). Show me please:

store/catalog/includes/boxes/categories.php

 

Let's get that <br> out of there that's pushing your numbers down.

 

jon

It's all just ones and zeros....

Posted

here you are!

<?php
/*
 $Id: categories.php,v 1.25 2003/07/09 01:13:58 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2003 osCommerce

 Released under the GNU General Public License
*/

 function tep_show_category($counter) {
   global $tree, $categories_string, $cPath_array;

   for ($i=0; $i<$tree[$counter]['level']; $i++) {
     $categories_string .= "  ";
   }

   $categories_string .= '<a href="';

   if ($tree[$counter]['parent'] == 0) {
     $cPath_new = 'cPath=' . $counter;
   } else {
     $cPath_new = 'cPath=' . $tree[$counter]['path'];
   }

   $categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">';

   if (isset($cPath_array) && in_array($counter, $cPath_array)) {
     $categories_string .= '<b>';
   }

// display category name
   $categories_string .= $tree[$counter]['name'];

   if (isset($cPath_array) && in_array($counter, $cPath_array)) {
     $categories_string .= '</b>';
   }

   if (tep_has_category_subcategories($counter)) {
     $categories_string .= '->';
   }

   $categories_string .= '</a>';

   if (SHOW_COUNTS == 'true') {
     $products_in_category = tep_count_products_in_category($counter);
     if ($products_in_category > 0) {
       $categories_string .= ' (' . $products_in_category . ')';
     }
   }

   $categories_string .= '<br>';

   if ($tree[$counter]['next_id'] != false) {
     tep_show_category($tree[$counter]['next_id']);
   }
 }
?>
<!-- categories //-->
         <tr>
           <td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_CATEGORIES);

 new infoBoxHeading($info_box_contents, true, false);

 $categories_string = '';
 $tree = array();

 $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");
 while ($categories = tep_db_fetch_array($categories_query))  {
   $tree[$categories['categories_id']] = array('name' => $categories['categories_name'],
                                               'parent' => $categories['parent_id'],
                                               'level' => 0,
                                               'path' => $categories['categories_id'],
                                               'next_id' => false);

   if (isset($parent_id)) {
     $tree[$parent_id]['next_id'] = $categories['categories_id'];
   }

   $parent_id = $categories['categories_id'];

   if (!isset($first_element)) {
     $first_element = $categories['categories_id'];
   }
 }

 //------------------------
 if (tep_not_null($cPath)) {
   $new_path = '';
   reset($cPath_array);
   while (list($key, $value) = each($cPath_array)) {
     unset($parent_id);
     unset($first_id);
     $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");
     if (tep_db_num_rows($categories_query)) {
       $new_path .= $value;
       while ($row = tep_db_fetch_array($categories_query)) {
         $tree[$row['categories_id']] = array('name' => $row['categories_name'],
                                              'parent' => $row['parent_id'],
                                              'level' => $key+1,
                                              'path' => $new_path . '_' . $row['categories_id'],
                                              'next_id' => false);

         if (isset($parent_id)) {
           $tree[$parent_id]['next_id'] = $row['categories_id'];
         }

         $parent_id = $row['categories_id'];

         if (!isset($first_id)) {
           $first_id = $row['categories_id'];
         }

         $last_id = $row['categories_id'];
       }
       $tree[$last_id]['next_id'] = $tree[$value]['next_id'];
       $tree[$value]['next_id'] = $first_id;
       $new_path .= '_';
     } else {
       break;
     }
   }
 }
 tep_show_category($first_element); 

$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
'text' => $categories_string
);
// start of code to place link inside category box
$info_box_contents[] = array('align' => 'left',
'text' => '<a href="http://frostfishcovesoaps.blogspot.com/" target="_blank">The Soap Blog</a>'
);
// end of code to place link inside category box
new infoBox($info_box_contents);
?>
</td>
</tr>
< !-- categories_eof //-->

Posted

Try this (back up your file first). Not tested. Lines 34 through 61:

 

// display category name
$categories_string .= $tree[$counter]['name'];

if (isset($cPath_array) && in_array($counter, $cPath_array)) {
$categories_string .= '</b>';
}

if (tep_has_category_subcategories($counter)) {
$categories_string .= '->';
}

$categories_string .= '';

if (SHOW_COUNTS == 'true') {
$products_in_category = tep_count_products_in_category($counter);
if ($products_in_category > 0) {
$categories_string .= ' (' . $products_in_category . ')';
}
}

$categories_string .= '</a>';

if ($tree[$counter]['next_id'] != false) {
tep_show_category($tree[$counter]['next_id']);
}
}
?>
<!-- categories //-->

jon

It's all just ones and zeros....

Posted

You replaced Lines 34 through 61 with the code I gave you? Or did you just add it in at Line 34?

 

jon

 

Whole enchilada:

<?php
/*
$Id: categories.php,v 1.25 2003/07/09 01:13:58 hpdl Exp $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright © 2003 osCommerce

Released under the GNU General Public License
*/

function tep_show_category($counter) {
global $tree, $categories_string, $cPath_array;

for ($i=0; $i<$tree[$counter]['level']; $i++) {
$categories_string .= "  ";
}

$categories_string .= '<a href="';

if ($tree[$counter]['parent'] == 0) {
$cPath_new = 'cPath=' . $counter;
} else {
$cPath_new = 'cPath=' . $tree[$counter]['path'];
}

$categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">';

if (isset($cPath_array) && in_array($counter, $cPath_array)) {
$categories_string .= '<b>';
}

// display category name
$categories_string .= $tree[$counter]['name'];

if (isset($cPath_array) && in_array($counter, $cPath_array)) {
$categories_string .= '</b>';
}

if (tep_has_category_subcategories($counter)) {
$categories_string .= '->';
}

$categories_string .= '';

if (SHOW_COUNTS == 'true') {
$products_in_category = tep_count_products_in_category($counter);
if ($products_in_category > 0) {
$categories_string .= ' (' . $products_in_category . ')';
}
}

$categories_string .= '</a>';

if ($tree[$counter]['next_id'] != false) {
tep_show_category($tree[$counter]['next_id']);
}
}
?>
<!-- categories //-->
<tr>
<td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_CATEGORIES);

new infoBoxHeading($info_box_contents, true, false);

$categories_string = '';
$tree = array();

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");
while ($categories = tep_db_fetch_array($categories_query)) {
$tree[$categories['categories_id']] = array('name' => $categories['categories_name'],
'parent' => $categories['parent_id'],
'level' => 0,
'path' => $categories['categories_id'],
'next_id' => false);

if (isset($parent_id)) {
$tree[$parent_id]['next_id'] = $categories['categories_id'];
}

$parent_id = $categories['categories_id'];

if (!isset($first_element)) {
$first_element = $categories['categories_id'];
}
}

//------------------------
if (tep_not_null($cPath)) {
$new_path = '';
reset($cPath_array);
while (list($key, $value) = each($cPath_array)) {
unset($parent_id);
unset($first_id);
$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");
if (tep_db_num_rows($categories_query)) {
$new_path .= $value;
while ($row = tep_db_fetch_array($categories_query)) {
$tree[$row['categories_id']] = array('name' => $row['categories_name'],
'parent' => $row['parent_id'],
'level' => $key+1,
'path' => $new_path . '_' . $row['categories_id'],
'next_id' => false);

if (isset($parent_id)) {
$tree[$parent_id]['next_id'] = $row['categories_id'];
}

$parent_id = $row['categories_id'];

if (!isset($first_id)) {
$first_id = $row['categories_id'];
}

$last_id = $row['categories_id'];
}
$tree[$last_id]['next_id'] = $tree[$value]['next_id'];
$tree[$value]['next_id'] = $first_id;
$new_path .= '_';
} else {
break;
}
}
}
tep_show_category($first_element);

$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
'text' => $categories_string
);
// start of code to place link inside category box
$info_box_contents[] = array('align' => 'left',
'text' => '<a href="http://frostfishcovesoaps.blogspot.com/" target="_blank">The Soap Blog</a>'
);
// end of code to place link inside category box
new infoBox($info_box_contents);
?>
</td>
</tr>
< !-- categories_eof //-->

It's all just ones and zeros....

Posted

trying to pm you back, but the site is freezing up on me!

 

it's a conspiracy jon!

 

Go back to your backup on this file. Will PM.

 

jon

Posted

trying to pm you back, but the site is freezing up on me!

and your mailbox is full!

 

it's a conspiracy jon!

 

Go back to your backup on this file. Will PM.

 

jon

Posted

trying to pm you back, but the site is freezing up on me!

and your mailbox is full!

 

it's a conspiracy jon!

 

Go back to your backup on this file. Will PM.

 

jon

Archived

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

×
×
  • Create New...