Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New Products


fotografico

Recommended Posts

Posted

OLD source

<td valign="right" width="33%" class="smallText" align="left"><a href="http://www.mexicofotografico.com/catalog/product_info.php?products_id=94&osCsid=967b483434b084ab738ff2cf930b3124"><img height="96" width="120" title=" El Castillo, Chichen Itza (framed) " alt="El Castillo, Chichen Itza (framed)" border="0" src="MexicoFotoGrafico.com_files/thepyramidofkukulkanchichenitza01.jpg"></a><br><a href="http://www.mexicofotografico.com/catalog/product_info.php?products_id=94&osCsid=967b483434b084ab738ff2cf930b3124">El Castillo, Chichen Itza (framed)</a><br></td>

 

NEW source

<td valign="right" width="33%" class="smallText" align="left"><a href="http://www.mexicofotografico.com/catalog/product_info.php?products_id=94&osCsid=967b483434b084ab738ff2cf930b3124"><img height="96" width="120" title=" El Castillo, Chichen Itza (framed) " alt="El Castillo, Chichen Itza (framed)" border="0" src="MexicoFotoGrafico.com_files/thepyramidofkukulkanchichenitza01.jpg"></a><a href="http://www.mexicofotografico.com/catalog/product_info.php?products_id=94&osCsid=967b483434b084ab738ff2cf930b3124">El Castillo, Chichen Itza (framed)</a><br></td>

 

Change: get rid of the first <br> (4th line)

"If you're working on something new, then you are necessarily an amateur."

Posted

This is the code I have at the moment in my new products file :

 

$info_box_contents = array();

$info_box_contents[] = array('text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')));

 

new contentBoxHeading($info_box_contents);

 

if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {

$new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);

} else {

$new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);

}

 

$row = 0;

$col = 0;

$info_box_contents = array();

while ($new_products = tep_db_fetch_array($new_products_query)) {

$new_products['products_name'] = tep_get_products_name($new_products['products_id']);

$info_box_contents[$row][$col] = array('align' => 'left',

'params' => 'class="smallText" width="33%" valign="top"',

'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br>' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])));

 

$col ++;

if ($col > 0) {

$col = 0;

$row ++;

}

}

 

new contentBox($info_box_contents);

 

 

 

 

Anyone make any sense of what I should be doing ?

Posted
In which file should I adjust the code ?

 

The images in *New Photos For November* are referenced from this file: ../modules/new_products.php and show-up on the first page of yr shop.

 

in new_products.php on +/- line 51 you find:

$new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' .

 

that's the <br> to get rid-off, I was talking about in the earlier post which you saw when you looked at the source of that page.

"If you're working on something new, then you are necessarily an amateur."

Posted

Thanks for the response.

 

Unfortunately there are no such lines in my new products file, (which looks as posted above in the earlier post).

 

I think maybe there needs to be a code I need to enter in the current text that tells it to put the product name/title to the right of the image.

 

?????

Posted
Unfortunately there are no such lines in my new products file, (which looks as posted above in the earlier post).

 

Yes of course the lines are there!!

 

I can see them clearly in the lines you are quoting and referring to.

 

The words you are looking for are these:

 

$new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' .

 

Please remove the <br> from between the </a><a href=.

 

I think maybe there needs to be a code I need to enter in the current text

 

No there is no code to remove code, you just have to remove the wrong code.

 

As you can see in any original shop, the words describing the image are always under the image, that is done by applying the <br>-tag between the image and the words appearing under the image.

 

You want the words next to the image which means that you have to remove the <br>-tag.

"If you're working on something new, then you are necessarily an amateur."

Posted

Sorry about that ! Wasn't looking hard enough !! My mind is starting to go a bit.

 

Yes it works !! Thankyou !!!!!!!!!!!

 

Is it possible to put spacing between the image and the text, and spacing between the image and the left margin ??

 

Also, could I raise the text so it sits about the height middle of the image ??

 

Sorry to keep deluging you with questions ! Any kind of guidance you could give me would be extremely, extremely grateful !

Archived

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

×
×
  • Create New...