luigicosta Posted June 23, 2012 Share Posted June 23, 2012 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 Link to comment Share on other sites More sharing options...
multimixer Posted June 23, 2012 Share Posted June 23, 2012 You mean that you want to show the category image on the product listing pages? My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
luigicosta Posted June 23, 2012 Author Share Posted June 23, 2012 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 Link to comment Share on other sites More sharing options...
multimixer Posted June 23, 2012 Share Posted June 23, 2012 pictures explain more than 1000 words I'll try to draw the answer then My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
luigicosta Posted June 23, 2012 Author Share Posted June 23, 2012 I'll try to draw the answer then is this a joke? Link to comment Share on other sites More sharing options...
multimixer Posted June 23, 2012 Share Posted June 23, 2012 I thought you prefer to have the solution as a picture My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
luigicosta Posted June 23, 2012 Author Share Posted June 23, 2012 I thought you prefer to have the solution as a picture mmmmhhh ..... do as you wish .... if you can .... greetings from Italy :- Link to comment Share on other sites More sharing options...
OSC-Sevilla Posted June 23, 2012 Share Posted June 23, 2012 http://www.oscommerce.com/community/contributions,2542/page,55 Link to comment Share on other sites More sharing options...
♥14steve14 Posted June 24, 2012 Share Posted June 24, 2012 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 More sharing options...
luigicosta Posted June 25, 2012 Author Share Posted June 25, 2012 http://www.oscommerce.com/community/contributions,2542/page,55 thanks for the answer I'll give it a look Link to comment Share on other sites More sharing options...
luigicosta Posted June 25, 2012 Author Share Posted June 25, 2012 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.