Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do you remove certain images?


twilightballoons

Recommended Posts

I am trying to configure oscommerce and am stuck yet again!!

 

I would like to remove the small image but cannot see where to remove it.

 

The image or images because an image appears on every page in the same place but with a different image. It is on the same line as 'whats new here' and another example is it is on the same line as 'welcome please sign in'. I would like to remove all the images, but I cannot seem to find the code to remove it.

 

Also, I would like to remove the oscommerce image that appears on the bottom of the page, I have had a look at the footer but cannot find the code to remove that either!!

 

Cheers for any help.

Link to comment
Share on other sites

OS image at the bottom is with in the banner maqnager so you can remove it from their

the other images you remove eather by replacing them with a clear pixel image or by finding he code in the revelant page and removing it if you have a look in the Contabs i am sure their is pre made clear images you woul djust have to upload to over write the exixting inages

 

The code for the images will be on the revelant page eg index.php if your wanting to remove them compleaty

Link to comment
Share on other sites

The first image in osc/index.php file:

 

This code makes the image:

 

			<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_default.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

 

To remove it:

 

			<td class="pageHeading" align="right"><?php // echo tep_image(DIR_WS_IMAGES . 'table_background_default.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

 

The second image in osc/login.php file:

 

This code makes the image:

 

			<td class="pageHeadingRight" align="right"><?php echo tep_image(DWT_BASE_FOLDER.DIR_WS_IMAGES . 'table_background_login.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

 

To remove it:

 

			<td class="pageHeadingRight" align="right"><?php // echo tep_image(DWT_BASE_FOLDER.DIR_WS_IMAGES . 'table_background_login.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

I have tried looking for the codes to delete the image but cannot find them on the index.php. I have listed below what is displayed on my index.php page.

 

 

<?php

/*

$Id: index.php,v 1.1 2003/06/11 17:38:00 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

define('TEXT_MAIN', 'Welcome to Twilight Balloons');

define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');

define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products');

define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');

 

if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {

define('HEADING_TITLE', 'Let\'s See What We Have Here');

define('TABLE_HEADING_IMAGE', '');

define('TABLE_HEADING_MODEL', 'Model');

define('TABLE_HEADING_PRODUCTS', 'Product Name');

define('TABLE_HEADING_MANUFACTURER', 'Manufacturer');

define('TABLE_HEADING_QUANTITY', 'Quantity');

define('TABLE_HEADING_PRICE', 'Price');

define('TABLE_HEADING_WEIGHT', 'Weight');

define('TABLE_HEADING_BUY_NOW', 'Buy Now');

define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.');

define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.');

define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: ');

define('TEXT_SHOW', '<b>Show:</b>');

define('TEXT_BUY', 'Buy 1 \'');

define('TEXT_NOW', '\' now');

define('TEXT_ALL_CATEGORIES', 'All Categories');

define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers');

} elseif ($category_depth == 'top') {

define('HEADING_TITLE', 'What\'s New Here?');

} elseif ($category_depth == 'nested') {

define('HEADING_TITLE', 'Categories');

}

?>

Link to comment
Share on other sites

Wrong index.php file

 

Look in the folder I specified.

;)

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Cheers once again germ!

 

I managed to delete the pics easily enough once I was looking in the right file! Do I need to do this to every page to remove the pics? Also, I have created new catagories and the blank link comes up without an image, do I need to delete this each time on a certain page or is there one page that I adjust to that in future all the links to the images are not there?

 

Cheers for the help

Link to comment
Share on other sites

If there is an existing image on a page, the only way to remove it is to find the appropriate code and remove it.

 

I see the two products with missing images.

 

I'd delete them (the two products), then re-add them and be sure you specify an image to upload when creating them.

 

I don't know if that was the problem when they were first created or not.

 

The text for the files in the left column:

 

Shipping and returns: the text is found in the "/osc/includes/languages/english/shipping.php" file as this:

 

define('TEXT_INFORMATION', 'Put here your Shipping & Returns information.');

 

Privacy: the text is found in the "/osc/includes/languages/english/privacy.php" file as this:

 

define('TEXT_INFORMATION', 'Put here your Privacy Notice information.');

 

Conditions of Use: the text is found in the "/osc/includes/languages/english/conditions.php" file as this:

 

define('TEXT_INFORMATION', 'Put here your Conditions of Use information.');

 

If your store is multilingual, edit the same named file in each "language" folder you support.

 

Make a backup of these files before editing.

 

As you know, PHP can be very unforgiving...

:blush:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

I know how unforgiving php can be and have definitely learned by my earlier mistake! I now keep a master copy on my hard drive of any php file I intend to change, and I have to admit this has helped on a number of occasions!!

 

I am still getting used to oscommerce and am getting the hang of it slowly, but still have pleny of questions and would like to ask a question about osc sql database if anyone knows the answer?

 

I know that osc installs an images folder and any images that I would like to have displayed such as my banner are put into this folder, but what I would like to know is if this is the folder where I put my stock images?

 

I have made a trial run with one product with an image and it displays OK, but when I look for it I cannot find it anywhere so where is it so that I can make changes to it etc as it is not in the images folder?

 

Also, when I tried a trial run of a purchase of my item it said it was out of stock even though I know it would not have been and I have no idea why?

 

Finally, when osc is installed it sets up a database, do I need to link that to the shop or is this done automatically?

 

Cheers once again for the help folks!!

Link to comment
Share on other sites

Has anybody got any ideas about what I said above??

 

Also, I am having trouble removing all the images that are on the right hand side of each page, I have removed a few of them but cant seem to remove the rest.

 

When I create a new catagory, if I check it on the site there is supposed to be an image on the right hand side, but I do not want it there, does anybody know how to get rid of them??

 

Cheers.

Link to comment
Share on other sites

I know that osc installs an images folder and any images that I would like to have displayed such as my banner are put into this folder, but what I would like to know is if this is the folder where I put my stock images?

You don't "put your images" anywhere. The software does it for you. When you create a category, there is a place for you to browse your hard drive for the image to upload to associate with that category.

 

I have made a trial run with one product with an image and it displays OK, but when I look for it I cannot find it anywhere so where is it so that I can make changes to it etc as it is not in the images folder?

The images currently in the database are in your "/ocs/images" folder. I can only assume any additions will go there as well.

 

Also, when I tried a trial run of a purchase of my item it said it was out of stock even though I know it would not have been and I have no idea why?

When you create a category, you can also set a "stock quantity". And in the admin, you can turn on "check stock". This will check the stock quantity to see if there is enough stock to fill the order. If not, they can't buy it. If you want, you can leave the quantity at zero, and turn "stock check" OFF in your admin.

 

Finally, when osc is installed it sets up a database, do I need to link that to the shop or is this done automatically?

Anything showing up on your site is already in the database.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

The right side of the page is controlled by "/osc/includes/column_right.php".

 

Whatever you don't want it to display, you'll just have to "comment out", I guess.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Cheers again for the help and advice germ.

 

I have had another trial run and the item appears ok and in stock, so not sure where I was going wrong before as I did have the instock button on.

 

The reason why I want to know where my images are is because I may stock a line now that I will not stock in the future, so I would like to delete that and save space, but for the life of me I cannot find the images I have uploaded anywhere. I know the software does it for me which I understand, but am not really sure where they go!! I have checked out every file and cannot find the images anywhere but they appear on the live site!!

 

Also, I am still having probs deleting the little image on the right. Whenever I create a new category it puts up the image which says 'lets see what we have here' but there is no pic and it is directed to the osc/images folder. How do I completely delete this so that it will not come up on any new categories that I put up?

 

Cheers.

Link to comment
Share on other sites

To find where the image is, first get the image to display on your site by going to that page in the catalog.

 

<right-click> on the image, and choose "Properties" in the dialogue box that appears.

 

In the next box that appears, look in the "Address (URL)" line and it will tell you the path to the image.

 

The "10 ballons new ad" you just added is here:

 

http://twilightballoons.co.uk/osc/images/Fashion-Ivory-Silk-10-small.jpg

 

That puts it in your /osc/images/ folder.

 

The "little image on the right" problem....

 

Look in "/osc/index.php".

 

Find this:

 

			<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
		<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

Alter it to this:

 

			<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
		<td class="pageHeading" align="right"><?php // echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Cheers for the help.

 

I had a look for the pics in the images folder via the file manager and there they are, but I was checking them via ftp and could not see them for some reason, but at least I now know how to delete them.

 

As to the little image on the right problem, I have deleted it from a few of the pages and it is gone from the index page easily enough, but it is still there if I go to one of the categories that I have made and I am not sure how to remove that?

Link to comment
Share on other sites

Again in "/osc/index.php"

 

Find:

 

// Get the right image for the top-right
$image = DIR_WS_IMAGES . 'table_background_list.gif';
if (isset($HTTP_GET_VARS['manufacturers_id'])) {
  $image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
  $image = tep_db_fetch_array($image);
  $image = $image['manufacturers_image'];
} elseif ($current_category_id) {
  $image = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
  $image = tep_db_fetch_array($image);
  $image = $image['categories_image'];
}
?>
		<td align="right"><?php echo tep_image(DIR_WS_IMAGES . $image, HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

Change to:

 

// Get the right image for the top-right
$image = DIR_WS_IMAGES . 'table_background_list.gif';
if (isset($HTTP_GET_VARS['manufacturers_id'])) {
  $image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
  $image = tep_db_fetch_array($image);
  $image = $image['manufacturers_image'];
} elseif ($current_category_id) {
  $image = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
  $image = tep_db_fetch_array($image);
  $image = $image['categories_image'];
}
?>
		<td align="right"><?php // echo tep_image(DIR_WS_IMAGES . $image, HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

Add the "//" in the very last line...

;)

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Done that on the main page and its working great, no little image even when I make a new category.

 

Now I have tried to do the same to the other pages but some work and some dont for some reason?

 

Here is an example of the reviews page:

 

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_reviews_new.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

 

now I add the //

 

<td class="pageHeading" align="right"><?php // echo tep_image(DIR_WS_IMAGES . 'table_background_reviews_new.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

 

and when I upload that the page goes all strange, I have tried a few variations but its always the same and I have to go back to the original file and I am back stuck with the little image, any ideas?

 

Cheers.

Link to comment
Share on other sites

I don't see how commenting out one image can mess up an entire page?

:unsure:

 

Are you sure you're getting the right file put back in the right folder?

:unsure:

 

You can always leave the code alone, and create a transparent GIF to replace it:

 

<blank.gif>

 

<right-click> between the brackets above, and choose "Save picture as". The name should default to "blank.gif".

 

It's a transparent GIF I made for you.

 

Upload it into your "/osc/images" folder.

 

Edit the code in the reviews.php file as such:

 

<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'blank.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

It is really strange!

 

I have inserted the blank image and on some of the pages it stuffed up the page, but other times it worked ok?

 

I am trying // and inserting the blank image and not all the pages are responding to it. I have checked I am adjusting the right files as they are from the osc folder.

 

Cheers for the help, its really beginning to bug me now!!!

Link to comment
Share on other sites

I am trying // and inserting the blank image and not all the pages are responding to it.

After you make the change, load the page up in your browser.

 

If the change doesn't show up, hold down the <Ctrl> key while clicking the "Reload page" button on your browser.

 

This forces the browser to reload the page from the web site.

;)

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...