Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

immage from admin to shop in product listing


luigicosta

Recommended Posts

Hello. I would like to show pictures that are visible in admin when I click a category from the shop

This is a piece of the database where images are stored

I thought of doing a query (I do not know how ....)

But I do not know where to start

is there any ready or contribute any ideas on how to get started?

thanks

post-303471-0-01583500-1340440413_thumb.jpg

post-303471-0-82895100-1340440418_thumb.jpg

Link to comment
Share on other sites

Hello. I would like to show pictures that are visible in admin when I click a category from the shop

This is a piece of the database where images are stored

I thought of doing a query (I do not know how ....)

But I do not know where to start

is there any ready or contribute any ideas on how to get started?

thanks

 

 

for

multimixer

 

 

I mean something like this

 

pictures explain more than 1000 words

post-303471-0-06528300-1340441016_thumb.jpg

post-303471-0-26939800-1340441020_thumb.jpg

Link to comment
Share on other sites

The categories image was a standard feature in version 2.2RC2a. The code has been removed from vers 2.3.1. To help yopu out a bit here is the code from a standard 2.2 index php file which called and placed the categories image

 

<?php
 if ($category_depth == 'nested') {
   $category_query = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");
   $category = tep_db_fetch_array($category_query);
?>
   <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
	    <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>
	  </tr>
    </table></td>
  </tr>
  <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
    <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
	    <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>

 

Now all you have to do is to figure out how to fit that code into 2.3.1 and place it where you want the image to appear. I hope this helps.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

The categories image was a standard feature in version 2.2RC2a. The code has been removed from vers 2.3.1. To help yopu out a bit here is the code from a standard 2.2 index php file which called and placed the categories image

 

<?php
 if ($category_depth == 'nested') {
$category_query = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");
$category = tep_db_fetch_array($category_query);
?>
<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<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>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>

 

Now all you have to do is to figure out how to fit that code into 2.3.1 and place it where you want the image to appear. I hope this helps.

thanks for the answer you think is exactly what I wanted

Later when I have time I'll try to do some testing ....

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...