Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

small php scripting help


smee-again

Recommended Posts

Posted

hi all

 

thanks for looking. I'm installing multiple image table in product_info.php

 

The script called for an insert of the following code

 

--------------------------------------------------------------------------------------

 

<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>

</tr>

<?php

} else {

</tr>

<?php

} else {

 

After Add :

if (DISPLAY_EXTRA_IMAGES == 'true'){

if ($product_check['total'] >= 1) {

include (DIR_WS_INCLUDES . 'products_extra_images.php');

}

}

 

 

However due to an earlier contribution added i no longer have multiple else statements

 

my current script looks like this

 

---------------------------------------------------

 

<?php

}

 

if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {

?>

<tr>

<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td>

</tr>

<?php

} else {

?>

<tr>

<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>

</tr>

<?php

}

?>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

 

 

----------------------------------------------------------------------

 

can somebody pls tell me how to adjust please. I'm sure it simple but I'm have real trouble.

 

Thanks heaps

Posted

I do not use this contribution so this is just a try.

<tr>
<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td>
</tr>
<?php
} else {
?>
<tr>
<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>
</tr>
<?php
}
?>
<tr>
<td>if (DISPLAY_EXTRA_IMAGES == 'true'){
if ($product_check['total'] >= 1) {
include (DIR_WS_INCLUDES . 'products_extra_images.php');
}
} 
</td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>

 

or this

<?php
}

if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
?>
<tr>
<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td>
</tr>
<?php
} else {
After Add :
if (DISPLAY_EXTRA_IMAGES == 'true'){
if ($product_check['total'] >= 1) {
include (DIR_WS_INCLUDES . 'products_extra_images.php');
}
} 
?>
<tr>
<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>
</tr>
<?php
}
?>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>

My Contributions

 

Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly

Password Protect Admin

"No matter where you go....There you are" - Buccaroo Bonsai

Archived

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

×
×
  • Create New...