Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Getting product info to display..


betty

Recommended Posts

Hi!

 

Just a very quick question I hope...

 

So far my homepage looks like this:

 

http://www.cukoo.co.uk/index.php

 

The only problem is that I have set my maximum featured products to display at 6, and entered 6 of them in the control panel, but only 2 are showing up at a time. I think the problem is somewhere in this chunk of code:

 

$featured_products_query = tep_db_query("select p.products_id, p.products_image, pd.products_info, ai.medium_images, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price, p.products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id left join " . TABLE_FEATURED . " f on p.products_id = f.products_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id left join " . TABLE_ADDITIONAL_IMAGES . " ai on p.products_id = ai.products_id where p.products_status = '1' and f.status = '1' order by p.products_id DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS);
 }

 

All 6 featured products show up fine when I remove references to pd.products_info from the above code, but then show up as they are now when I put the references back in.

 

Does anyone know how I should be referencing my Products Description Table so that each watch gets it's own little description next to it???

 

Would be grateful for any ideas!

 

Betty

Link to comment
Share on other sites

Try:

 

$featured_products_query = tep_db_query("select p.products_id, p.products_image, pd.products_info, ai.medium_images, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price, p.products_price from " . TABLE_PRODUCTS . " p, " . TABLE_SPECIALS . " s, " . TABLE_FEATURED . " f, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_ADDITIONAL_IMAGES . " ai where p.products_id = s.products_id and p.products_id = f.products_id and p.products_id = pd.products_id and p.products_id = ai.products_id and p.products_status = '1' and f.status = '1' order by p.products_id DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS);

Your online success is Paramount.

Link to comment
Share on other sites

sorry - ignore that last post - i'm still messing around with the code and trying things so your version doesn't look like what's up on the site at the moment. Basically, what your code did was display one product 3 times... don't worry too much anyway - i'm just learning about all the 'left join' stuff now, and the code you posted's given me some help in understanding it. i hope i'll crack it soon!! thanks again yesudo!

 

betty

Link to comment
Share on other sites

Hi again yesudo! that would be brilliant if you did.... here's the file - featured.php - which originally came from the featured products contribution...

 

<?php
/*
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
 
 Featured Products V1.1
 Displays a list of featured products, selected from admin
 For use as an Infobox instead of the "New Products" Infobox  
*/
?>
<!-- featured_products //-->
<?php
if(FEATURED_PRODUCTS_DISPLAY == 'true')
{
 $featured_products_category_id = $new_products_category_id;
 $cat_name_query = tep_db_query("select categories_name from categories_description where categories_id = '" . $featured_products_category_id . "' limit 1");
 $cat_name_fetch = tep_db_fetch_array($cat_name_query);
 $cat_name = $cat_name_fetch['categories_name'];
 $info_box_contents = array();

 if ( (!isset($featured_products_category_id)) || ($featured_products_category_id == '0') ) {
   $info_box_contents[] = array('align' => '', 'text' => '');

 list($usec, $sec) = explode(' ', microtime());
 srand( (float) $sec + ((float) $usec * 100000) );
 $mtm= rand();

$featured_products_query = tep_db_query("select p.products_id, p.products_image, pd.products_info, ai.medium_images, p.products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_FEATURED . " f on p.products_id = f.products_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id left join " . TABLE_ADDITIONAL_IMAGES . " ai on p.products_id = ai.products_id where p.products_status = '1' and f.status = '1' order by p.products_id DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS);
 } 
 
 /*else {                                                  
   $info_box_contents[] = array('align' => '', 'text' => '');
   $featured_products_query = tep_db_query("select distinct p.products_id, p.products_image, pd.products_info, ai.medium_images, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price, p.products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id left join " . TABLE_ADDITIONAL_IMAGES . " ai on p.products_id = ai.products_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c left join " . TABLE_FEATURED . " f on p.products_id = f.products_id where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . $featured_products_category_id . "' and p.products_status = '1' and f.status = '1' order by p.products_id DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS);
 }*/

 $row = 0;
 $col = 0; 
 $num = 0;
 while ($featured_products = tep_db_fetch_array($featured_products_query)) {
   $num ++; if ($num == 1) { new basic($info_box_contents); }
   $featured_products['products_name'] = tep_get_products_name($featured_products['products_id']);
   
/*if($featured_products['specstat']) {
     $info_box_contents[$row][$col] = array('align' => 'center',
                                          'params' => 'class="smallText" width="33%" valign="top"',
                                          'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $featured_products['products_image'], $featured_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . $featured_products['products_name'] . '</a><br><s>' . $currencies->display_price($featured_products['products_price'], tep_get_tax_rate($featured_products['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . 
                                          $currencies->display_price($featured_products['specials_new_products_price'], tep_get_tax_rate($featured_products['products_tax_class_id'])) . '</span>');
   
   } else*/

 {
     $info_box_contents[$row][$col] = array('align' => '',
                                          'params' => 'class="basic"',
                                          'text' => '<table width="312" cellpadding="0" cellspacing="0" border="0">
   <tr>
   <td width="312" colspan="2" align="right" class="headings" height="35">' . 
   tep_image(DIR_WS_IMAGES . $featured_products['medium_images']) . '<br>
               
   ....................................................................</td></tr>
   
   
   <tr>
   <td width="95" height="130" align="center" valign="top" class="imagedisplay">
   <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $featured_products['products_image'], $featured_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>
   
   <td valign="top">
   
   <table width="217" cellpadding="0" cellspacing="0" border="0">
   
   <tr>
   <td width="217" align="left" class="basicbold">
   <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . $featured_products['products_name'] . '</a></td>
   </tr>
   
   <tr>
   <td width="217" align="left" valign="top" class="basic">' . $featured_products['products_info'] . '</td>
   </tr>
   
   <tr>
   <td width="217" align="left" valign="top" class="basic">
   <span class="basicpurple">Cukoo price ' . $currencies->display_price($featured_products['products_price'], tep_get_tax_rate($featured_products['products_tax_class_id'])) . '</span></td>
   </tr>
   </table>
   
   </td>
   </tr>
   </table>');
   }    
   $col ++;
   if ($col > 1) {
     $col = 0;
     $row ++;
   }
 }
 if($num) {
     
     new contentBox($info_box_contents);
 }
} else // If it's disabled, then include the original New Products box
{
  include (DIR_WS_MODULES . FILENAME_NEW_PRODUCTS);
}
?>
<!-- featured_products_eof //-->

 

 

I'll check back every now and then to see if you've picked it up. thanks for all your help - i really appreciate it!

 

betty

Link to comment
Share on other sites

Try(see note below code):

 

<?php
/*
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2002 osCommerce

Released under the GNU General Public License

Featured Products V1.1
Displays a list of featured products, selected from admin
For use as an Infobox instead of the "New Products" Infobox ?
*/
?>
<!-- featured_products //-->
<?php
if(FEATURED_PRODUCTS_DISPLAY == 'true')
{
$featured_products_category_id = $new_products_category_id;
$cat_name_query = tep_db_query("select categories_name from categories_description where categories_id = '" . $featured_products_category_id . "' limit 1");
$cat_name_fetch = tep_db_fetch_array($cat_name_query);
$cat_name = $cat_name_fetch['categories_name'];
$info_box_contents = array();

if ( (!isset($featured_products_category_id)) || ($featured_products_category_id == '0') ) {
? $info_box_contents[] = array('align' => '', 'text' => '');

list($usec, $sec) = explode(' ', microtime());
srand( (float) $sec + ((float) $usec * 100000) );
$mtm= rand();

$featured_products_query = tep_db_query("select p.products_id, p.products_image, pd.products_info, ai.medium_images, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price, p.products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id left join " . TABLE_FEATURED . " f on p.products_id = f.products_id left join " . TABLE_ADDITIONAL_IMAGES . " ai on p.products_id = ai.products_id where p.products_status = '1' and f.status = '1' order by p.products_id DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS);
} 

/*else { ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
? $info_box_contents[] = array('align' => '', 'text' => '');
? $featured_products_query = tep_db_query("select distinct p.products_id, p.products_image, pd.products_info, ai.medium_images, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price, p.products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id left join " . TABLE_ADDITIONAL_IMAGES . " ai on p.products_id = ai.products_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c left join " . TABLE_FEATURED . " f on p.products_id = f.products_id where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . $featured_products_category_id . "' and p.products_status = '1' and f.status = '1' order by p.products_id DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS);
}*/

$row = 0;
$col = 0; 
$num = 0;
while ($featured_products = tep_db_fetch_array($featured_products_query)) {
? $num ++; if ($num == 1) { new basic($info_box_contents); }
? $featured_products['products_name'] = tep_get_products_name($featured_products['products_id']);
? $featured_products['products_description'] = tep_get_products_description($featured_products['products_id']); 
/*if($featured_products['specstat']) {
? ? $info_box_contents[$row][$col] = array('align' => 'center',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'params' => 'class="smallText" width="33%" valign="top"',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $featured_products['products_image'], $featured_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . $featured_products['products_name'] . '</a><br><s>' . $currencies->display_price($featured_products['products_price'], tep_get_tax_rate($featured_products['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . 
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?$currencies->display_price($featured_products['specials_new_products_price'], tep_get_tax_rate($featured_products['products_tax_class_id'])) . '</span>');
? 
? } else*/

{
? ? $info_box_contents[$row][$col] = array('align' => '',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'params' => 'class="basic"',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'text' => '<table width="312" cellpadding="0" cellspacing="0" border="0">
? <tr>
? <td width="312" colspan="2" align="right" class="headings" height="35">' . 
? tep_image(DIR_WS_IMAGES . $featured_products['medium_images']) . '<br>
? ? ? ? ? ? ? 
? ....................................................................</td></tr>
? 
? 
? <tr>
? <td width="95" height="130" align="center" valign="top" class="imagedisplay">
? <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $featured_products['products_image'], $featured_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>
? 
? <td valign="top">
? 
? <table width="217" cellpadding="0" cellspacing="0" border="0">
? 
? <tr>
? <td width="217" align="left" class="basicbold">
? <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . $featured_products['products_name'] . '</a></td>
? </tr>
? 
? <tr>
? <td width="217" align="left" valign="top" class="basic">' . $featured_products['products_info'] . '</td>
? </tr>
? 
? <tr>
? <td width="217" align="left" valign="top" class="basic">
? <span class="basicpurple">Cukoo price ' . $currencies->display_price($featured_products['products_price'], tep_get_tax_rate($featured_products['products_tax_class_id'])) . '</span></td>
? </tr>
? </table>
? 
? </td>
? </tr>
? </table>');
? } ? ?
? $col ++;
? if ($col > 1) {
? ? $col = 0;
? ? $row ++;
? }
}
if($num) {
? ? 
? ? new contentBox($info_box_contents);
}
} else // If it's disabled, then include the original New Products box
{
?include (DIR_WS_MODULES . FILENAME_NEW_PRODUCTS);
}
?>
<!-- featured_products_eof //-->

 

You also need to include $featured_product['products_description'] where you want the description to appear - left this for you to decide.

Your online success is Paramount.

Link to comment
Share on other sites

Thanks yesudo, but I'm getting this error message:

 

Fatal error: Call to undefined function: tep_get_products_description() in /home/cukooco/public_html/includes/modules/featured.php on line 46

 

any ideas??

Link to comment
Share on other sites

I must have got that function from a contribution somewhere down the line:

 

Stick this in your includes/functions/general.php file before the final ?>

 

//// 
// Return a product's description 
// TABLES: products description 
function tep_get_products_description($product_id) { 
global $languages_id; 

$product_query = tep_db_query("select products_description from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . $product_id . "' and language_id = '" . $languages_id . "'"); 
$product_description = tep_db_fetch_array($product_query); 

return $product_description['products_description']; 
}

Your online success is Paramount.

Link to comment
Share on other sites

Hi yesudo,

 

now it's saying this:

 

Fatal error: Call to undefined function: tep_expire_featured() in /home/cukooco/public_html/includes/application_top.php on line 447

 

Sorry!

Link to comment
Share on other sites

Hi again yesudo - we're definitely making progress!

 

ignore that last email - i've sorted out the applicationtop by deleting the reference to featured products that was in there.

 

That extra line that you put in your version has got all of my product short descriptions coming up (i just swopped the product_description for product_info for my uses - sorry forgot to tell you - that's another cont. i'd used - to get a short desc.for each product)

 

anyway, definitely getting there as you can see - now i just need to find out how to make all 6 different watches show up instead of just 2 at a time!

 

betty

Link to comment
Share on other sites

The page is currently showin 2x3 products - is the old code back in there ?

 

You mentioned that when you took something out it worked but didn't show the description - what did you take out ?

Your online success is Paramount.

Link to comment
Share on other sites

Try:

 

<?php
/*
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2002 osCommerce

Released under the GNU General Public License

Featured Products V1.1
Displays a list of featured products, selected from admin
For use as an Infobox instead of the "New Products" Infobox ?
*/
?>
<!-- featured_products //-->
<?php
if(FEATURED_PRODUCTS_DISPLAY == 'true')
{
$featured_products_category_id = $new_products_category_id;
$cat_name_query = tep_db_query("select categories_name from categories_description where categories_id = '" . $featured_products_category_id . "' limit 1");
$cat_name_fetch = tep_db_fetch_array($cat_name_query);
$cat_name = $cat_name_fetch['categories_name'];
$info_box_contents = array();

if ( (!isset($featured_products_category_id)) || ($featured_products_category_id == '0') ) {
?$info_box_contents[] = array('align' => '', 'text' => '');

list($usec, $sec) = explode(' ', microtime());
srand( (float) $sec + ((float) $usec * 100000) );
$mtm= rand();

$featured_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price, p.products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id left join " . TABLE_FEATURED . " f on p.products_id = f.products_id where p.products_status = '1' and f.status = '1' order by p.products_id DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS);
} 

/*else { ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
?$info_box_contents[] = array('align' => '', 'text' => '');
?$featured_products_query = tep_db_query("select distinct p.products_id, p.products_image, pd.products_info, ai.medium_images, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price, p.products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id left join " . TABLE_ADDITIONAL_IMAGES . " ai on p.products_id = ai.products_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c left join " . TABLE_FEATURED . " f on p.products_id = f.products_id where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . $featured_products_category_id . "' and p.products_status = '1' and f.status = '1' order by p.products_id DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS);
}*/

$row = 0;
$col = 0; 
$num = 0;
while ($featured_products = tep_db_fetch_array($featured_products_query)) {
?$num ++; if ($num == 1) { new basic($info_box_contents); }
?$featured_products['products_name'] = tep_get_products_name($featured_products['products_id']);
?$featured_products['products_info'] = tep_get_products_description($featured_products['products_id']); 
?$featured_products['medium_images'] = tep_get_products_image($featured_products['products_id']); 

/*if($featured_products['specstat']) {
? ?$info_box_contents[$row][$col] = array('align' => 'center',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'params' => 'class="smallText" width="33%" valign="top"',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $featured_products['products_image'], $featured_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . $featured_products['products_name'] . '</a><br><s>' . $currencies->display_price($featured_products['products_price'], tep_get_tax_rate($featured_products['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . 
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? $currencies->display_price($featured_products['specials_new_products_price'], tep_get_tax_rate($featured_products['products_tax_class_id'])) . '</span>');
?
?} else*/

{
? ?$info_box_contents[$row][$col] = array('align' => '',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'params' => 'class="basic"',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'text' => '<table width="312" cellpadding="0" cellspacing="0" border="0">
?<tr>
?<td width="312" colspan="2" align="right" class="headings" height="35">' . 
?tep_image(DIR_WS_IMAGES . $featured_products['medium_images']) . '<br>
? ? ? ? ? ? ?
?....................................................................</td></tr>
?
?
?<tr>
?<td width="95" height="130" align="center" valign="top" class="imagedisplay">
?<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $featured_products['products_image'], $featured_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>
?
?<td valign="top">
?
?<table width="217" cellpadding="0" cellspacing="0" border="0">
?
?<tr>
?<td width="217" align="left" class="basicbold">
?<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . $featured_products['products_name'] . '</a></td>
?</tr>
?
?<tr>
?<td width="217" align="left" valign="top" class="basic">' . $featured_products['products_info'] . '</td>
?</tr>
?
?<tr>
?<td width="217" align="left" valign="top" class="basic">
?<span class="basicpurple">Cukoo price ' . $currencies->display_price($featured_products['products_price'], tep_get_tax_rate($featured_products['products_tax_class_id'])) . '</span></td>
?</tr>
?</table>
?
?</td>
?</tr>
?</table>');
?} ? ?
?$col ++;
?if ($col > 1) {
? ?$col = 0;
? ?$row ++;
?}
}
if($num) {
? ?
? ?new contentBox($info_box_contents);
}
} else // If it's disabled, then include the original New Products box
{
include (DIR_WS_MODULES . FILENAME_NEW_PRODUCTS);
}
?>
<!-- featured_products_eof //-->

 

And in your general file put:

 

//// 
// Return a product's middle image
// TABLES: products middle image
function tep_get_products_image($product_id) { 
global $languages_id; 

$product_query = tep_db_query("select middle_image from " . TABLE_ADDITIONAL_IMAGES . " where products_id = '" . $product_id . "'"); 
$product_image = tep_db_fetch_array($product_query); 

return $product_image['middle_image']; 
}

Your online success is Paramount.

Link to comment
Share on other sites

Sorry yesudo,

 

No joy there either - it's saying this...

 

Fatal error: Call to undefined function: tep_get_products_description() in /home/cukooco/public_html/includes/modules/featured.php on line 46

 

it's very confusing! don't worry too much about it though - i don't expect you to be doing all my work for me! i'll have another go at it this weekend i think. the thing is, i've installed lots of different contributions, so i know it's hard to suss out unless you can see all the files etc i've got on my screen....

 

Thanks very much for your help though - i really appreciate it! and if you do suss it out let me know!! i just don't want you too work too hard!

 

betty

Link to comment
Share on other sites

  • 2 weeks later...

Hi again! sorry I'm only just replying - been on holiday.. I've put the function you told me to put in functions/general.php in there. except i did change a couple of things round eg. my table refers to medium_images as opposed to middle_image...

 

So in featured.php i put this line:

 

$featured_products['medium_images'] = tep_get_medium_images($featured_products['products_id']);

 

and in general.php i put this:

 

// Return a product's medium images
// TABLES: products medium images
function tep_get_medium_images($product_id) { 
global $languages_id; 

$product_query = tep_db_query("select medium_images from " . TABLE_ADDITIONAL_IMAGES . " where products_id = '" . $product_id . "'"); 
$medium_images = tep_db_fetch_array($product_query); 

return $medium_images['medium_images']; 
}

 

And on my page I'm still getting the problem of two products repeating 3 times each, as opposed to me seeing 6 seperate products as it should be.

 

Any help from anyone would be very greatly appreciated!!

 

The page concerned is this one - http://www.cukoo.co.uk/

 

Cheers everyone, especially yesudo!

 

Betty

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...