Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

need help with changing header meta data


timmyhavoc

Recommended Posts

Hi

Ive looked all over the net on help here, Im not a total PHP noob but cant get my head round this.

 

Ive setup an oscommerce site for a guitar manufacturer. The guitars are normally shown horizontal but when a user clicks for a pop-up my client wants the image to be rotated vertical. IVe used the following imagerotate() function in the pop up window, the only problem is reclassifying the header content/type as image/jpeg. The headers are already sent through the application_top.php include. You can see the error here: http://www.guerillaguitars.net/catalog_gal...mage.php?pID=48

 

and the code im using in 'popup_image.php' is this:

 

<?php
/*
 $Id: popup_image.php,v 1.18 2003/06/05 23:26:23 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

$navigation->remove_current_page();

 $products_query = tep_db_query("select pd.products_name, p.products_image from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and pd.language_id = '" . (int)$languages_id . "'");
 $products = tep_db_fetch_array($products_query);
?>
<!-- <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo $products['products_name']; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<script language="javascript"><!--
var i=0;
function resize() {
 if (navigator.appName == 'Netscape') i=40;
 if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+60-i);
 self.focus();
}
//--></script>
</head>
<body onload="resize();">
[color="#FF0000"]<?php $fileName = DIR_WS_IMAGES . $products['products_image'];

$original = imagecreatefromjpeg($fileName);

$angle = 90.0;
$rotated = imagerotate($original, $angle, 0);
[b]header('Content-type: image/jpeg');[/b]
imagejpeg($rotated);[/color]?>
</body>
</html>
<?php
require('includes/application_bottom.php'); 
?>

 

I would really appreciate some help.

Link to comment
Share on other sites

I am new as well.. I manually entered my Meta Tags, description and the like in the Index.php. It took while but was wondering does the PHP index file will work similar to the index.html I normally work with. The reason I ask because if it works a little bit with PHP I will stop and wait for the spiders to do their thing.

 

Can they crawl in the index php files?

 

Is this ok to do?

 

Thanks, Craig

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...