Jump to content

[SOLVED] Need Help PHP, MySQL & FLash


kickoff3pm

Recommended Posts

I have some flash code that zooms images which I want to use on my site. After many attempts I can't get it to load the images via the PHP used. Can any help here please ?

 

Here's the PHP code (it's from a OScommerce product info page);

 

<?php if (tep_not_null($product_info['products_image'])) { ?>

 

Here's the zoom flash code, I've made the place where the images are call bold;

 

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"

codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"

WIDTH="320" HEIGHT="240" id="imagezoom" ALIGN="middle">

<param name="movie" value="imagezoom.swf?image=myimage.jpg&imagebig=myimagebig.jpg&imgW=320&imgH=240"/>

<param name="loop" value="false" />

<param name="menu" value="false" />

<param name="quality" value="high" />

<param name="bgcolor" value="#ffffff" />

<EMBED src="imagezoom.swf?image=myimage.jpg&imagebig=myimagebig.jpg&imgW=320&imgH=240" loop="false" menu="false" quality="high" bgcolor="#ffffff"  WIDTH="320" HEIGHT="240" NAME="imagezoom" ALIGN="middle"

TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>

</OBJECT>

 

Any help would be greatly appriciated, I've spent days on try this and am about to give up but this is idea for my needs as it's not just a enlarger or a popup it will be a grea benifit to my site.

 

Link to comment
Share on other sites

assuming $product_info['products_image'] is the first image and $product_info['products_image_big'] is the second and all images have the same dimensions:

 

<?php if (tep_not_null($product_info['products_image'])) { ?>

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="320" HEIGHT="240" id="imagezoom" ALIGN="middle">
<param name="movie" value="imagezoom.swf?image=<?=$product_info['products_image'];?>&imagebig=<?=$product_info['products_image_big'];?>&imgW=320&imgH=240"/>
<param name="loop" value="false" />
<param name="menu" value="false" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<EMBED src="imagezoom.swf?image=<?=$product_info['products_image'];?>&imagebig=<?=$product_info['products_image'];?>&imgW=320&imgH=240" loop="false" menu="false" quality="high" bgcolor="#ffffff"  WIDTH="320" HEIGHT="240" NAME="imagezoom" ALIGN="middle"
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>

Link to comment
Share on other sites

do you close your if elsewhere? maybe you need this:

 

<?php if (tep_not_null($product_info['products_image'])) { ?>

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="320" HEIGHT="240" id="imagezoom" ALIGN="middle">
<param name="movie" value="imagezoom.swf?image=<?=$product_info['products_image'];?>&imagebig=<?=$product_info['products_image_big'];?>&imgW=320&imgH=240"/>
<param name="loop" value="false" />
<param name="menu" value="false" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<EMBED src="imagezoom.swf?image=<?=$product_info['products_image'];?>&imagebig=<?=$product_info['products_image'];?>&imgW=320&imgH=240" loop="false" menu="false" quality="high" bgcolor="#ffffff"  WIDTH="320" HEIGHT="240" NAME="imagezoom" ALIGN="middle"
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>

<? } ?>

Link to comment
Share on other sites

No still gives the same error, messing around to see how far I can get - the code below shows the zoomable box but dosen't pull in the image. So it's a case of passing the php veriable I think, I've tried adding <?php  $new_image = $new_image = $product_info['products_image']; ?>  but changes nothing.

 

 

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"

codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"

WIDTH="320" HEIGHT="240" id="imagezoom" ALIGN="middle">

<param name="movie" value="imagezoom.swf?image=<?=$new_image;?>&imagebig=<?=$new_image;?>&imgW=320&imgH=240"/>

<param name="loop" value="false" />

<param name="menu" value="false" />

<param name="quality" value="high" />

<param name="bgcolor" value="#ffffff" />

<EMBED src="imagezoom.swf?image=<?=$new_image;?>&imagebig=<?=$new_image;?>&imgW=320&imgH=240" loop="false" menu="false" quality="high" bgcolor="#ffffff"  WIDTH="320" HEIGHT="240" NAME="imagezoom" ALIGN="middle"

TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>

</OBJECT>

Link to comment
Share on other sites

tis rather big, this is the templete for the product page as it is. You should be able to see the part where the image is displayed along with more images. I would be replacing these with this one zoomed image.

 

           <?php
// RCI code start
echo $cre_RCI->get('global', 'top');
echo $cre_RCI->get('productinfo', 'top');
// RCI code eof
echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?>
<table border="0" width="100%" cellspacing="0" cellpadding="<?php echo CELLPADDING_SUB;?>">
  <?php
  if ($product_check['total'] < 1) {
?>
  <tr>
    <td><?php  new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></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>
                <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_template_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
                <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
  <?php
  } else {
// BOF MaxiDVD: Modified For Ultimate Images Pack!
    $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, p.products_image_med, p.products_image_lrg, p.products_image_sm_1, p.products_image_xl_1, p.products_image_sm_2, p.products_image_xl_2, p.products_image_sm_3, p.products_image_xl_3, p.products_image_sm_4, p.products_image_xl_4, p.products_image_sm_5, p.products_image_xl_5, p.products_image_sm_6, p.products_image_xl_6, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
// EOF MaxiDVD: Modified For Ultimate Images Pack!
    $product_info = tep_db_fetch_array($product_info_query);

    tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");

    if (tep_not_null($product_info['products_model'])) {
      $products_name = $product_info['products_name'] . ' <span class="smallText">[' . $product_info['products_model'] . ']</span>';
    } else {
      $products_name = $product_info['products_name'];
    }

  if ($product_has_sub > '0'){ // if product has sub products
  $products_price ='';// if you like to show some thing in place of price add here
    } else {
  $pf->loadProduct($product_info['products_id'],$languages_id);
        $products_price = $pf->getPriceStringShort();

    } // end sub product check

// BOF: WebMakers.com Added: Show Featured Products
if (SHOW_HEADING_TITLE_ORIGINAL=='yes') {
$header_text = ' ';
?>
  <tr>
    <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
        <tr>
          <td class="pageHeading" valign="top"><?php echo $products_name; ?></td>
          <td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <?php
} else {
  ?>
  </tr><tr>
  <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr> <td class="infoBoxContents"><?php echo  $products_name ;?>  </td>
  <td align="right" class="infoBoxContents"><nobr><?php echo $products_price ;?></nobr>
  </td></td> <td align="right" class="main"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_template_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART,'align="absmiddle"'); ?></td>
</tr></table><td>
  <?php
}

// BOF: Lango Added for template MOD
if (MAIN_TABLE_BORDER == 'yes'){
  table_image_border_top(false, false, $header_text);
} else {
echo $header_text ;
}
// EOF: Lango Added for template MOD
?>
  <tr>
    <td class="main"><table width="100%" border="0" cellspacing="0" cellpadding="2">
        <tr>
          <td class="main" valign="top">
          <?php if (tep_not_null($product_info['products_image'])) { ?>
          <table border="0" cellspacing="0" cellpadding="0" align="right">
              <tr>
                <td>
               <!-- // BOF MaxiDVD: Modified For Ultimate Images Pack! //-->
                  <?php
      if ($product_info['products_image_med']!='') {
        $new_image = $product_info['products_image_med'];
        $image_width = MEDIUM_IMAGE_WIDTH;
        $image_height = MEDIUM_IMAGE_HEIGHT;
      } else {
        $new_image = $product_info['products_image'];
        $image_width = SMALL_IMAGE_WIDTH;
        $image_height = SMALL_IMAGE_HEIGHT;
      }
      echo tep_javascript_image(DIR_WS_IMAGES . $new_image, 'product' . $product_info['products_id'], addslashes($product_info['products_name']), $image_width, $image_height, 'hspace="5" vspace="5"', 'true');
?>
                  <!-- // EOF MaxiDVD: Modified For Ultimate Images Pack! //-->
                  <!-- // BEGIN  Affiliate program mods for 2.5a upgrade DMG  -->
                  <?php
      //affiliate build a link begin
      if (tep_session_is_registered('affiliate_id')) {
        echo '<br><br><a href="' . tep_href_link(FILENAME_AFFILIATE_BANNERS_BUILD, 'individual_banner_id=' . $product_info['products_id']) .'" target="_self">' . tep_template_image_button('button_affiliate_build_a_link.gif', LINK_ALT) . ' </a>'; ?>
                  <?php
      }
      //affiliate build a link begin
?>
                  <!-- // EOF Affiliate program 2.5a upgrade mods DMG -->
                </td>
              </tr>
            </table>
          <?php    } ?>
<p><?php echo stripslashes($product_info['products_description']); ?></p>
<?php echo tep_draw_separator('pixel_trans.gif', '100%', '10');

    $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' ");
    $products_attributes = tep_db_fetch_array($products_attributes_query);
    if ($products_attributes['total'] > 0) {
?>
            <table width="100%" border="0" cellspacing="0" cellpadding="2">
              <tr>
                <td class="main" colspan="2"><strong><?php echo TEXT_PRODUCT_OPTIONS; ?></strong></td>
              </tr>
              <?php
      $products_options_query = tep_db_query("select pa.options_id, pa.options_values_id, pa.options_values_price, pa.price_prefix, po.options_type, po.options_length, pot.products_options_name, pot.products_options_instruct from
           " . TABLE_PRODUCTS_ATTRIBUTES  . " AS pa,
           " . TABLE_PRODUCTS_OPTIONS  . " AS po,
           " . TABLE_PRODUCTS_OPTIONS_TEXT  . " AS pot
           where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'
             and pa.options_id = po.products_options_id
             and po.products_options_id = pot.products_options_text_id and pot.language_id = '" . (int)$languages_id . "'
           order by pa.products_options_sort_order
           ");

      // Store the information from the tables in arrays for easy of processing
      $options = array();
      $options_values = array();
      while ($po = tep_db_fetch_array($products_options_query)) {
        //  we need to find the values name
        if ( $po['options_type'] != 1  && $po['options_type'] != 4 ) {
          $options_values_query = tep_db_query("select products_options_values_name from " . TABLE_PRODUCTS_OPTIONS_VALUES . " where products_options_values_id ='". $po['options_values_id'] . "' and language_id = '" . (int)$languages_id . "'");
          $ov = tep_db_fetch_array($options_values_query);
        } else {
          $ov['products_options_values_name'] = '';
        }
        $options[$po['options_id']] = array('name' => $po['products_options_name'], 'type' => $po['options_type'], 'length' => $po['options_length'], 'instructions' => $po['products_options_instruct']);
        $options_values[$po['options_id']][$po['options_values_id']] =  array('name' => stripslashes($ov['products_options_values_name']), 'price' => $po['options_values_price'], 'prefix' => $po['price_prefix']);
      }

      foreach ($options as $oID => $op_data) {
        switch ($op_data['type']) {

          case 1:
            $maxlength = ( $op_data['length'] > 0 ? ' maxlength="' . $op_data['length'] . '"' : '' );
            $tmp_html = '<input type="text" name="id[' . $oID . '][t]"' . $maxlength . ' />';
?>
              <tr>
                <td class="main"><?php echo $op_data['name'] . ':' . ($op_data['instructions'] != '' ? '<br /><span class="smallText">' . $op_data['instructions'] . '</span>' : '' ); ?></td>
                <td class="main"><?php echo $tmp_html;  ?></td>
              </tr>
              <?php
            break;

          case 4:
            $text_area_array = explode(';',$op_data['length']);
            $cols = $text_area_array[0];
            if ( $cols == '' ) $cols = '100%';
            $rows = $text_area_array[1];
            $tmp_html = '<textarea name="id[' . $oID . '][t]" rows="'.$rows.'" cols="'.$cols.'" wrap="virtual"></textarea>';
?>
              <tr>
                <td class="main"><?php echo $op_data['name'] . ':' . ($op_data['instructions'] != '' ? '<br /><span class="smallText">' . $op_data['instructions'] . '</span>' : '' ); ?></td>
                <td class="main" align="center"><?php echo $tmp_html;  ?></td>
              </tr>
              <?php
            break;

          case 2:
            $tmp_html = '';
            foreach ( $options_values[$oID] as $vID => $ov_data ) {
              if ( (float)$ov_data['price'] == 0 ) {
                  $price = ' ';
              } else {
                  $price = '( ' . $ov_data['prefix'] . ' ' . $currencies->display_price($ov_data['price'], $tax_rate) . ' )';
              }
              $tmp_html .= '<input type="radio" name="id[' . $oID . ']" value="' . $vID . '">' . $ov_data['name'] . ' ' . $price . '<br />';
            } // End of the for loop on the option value
?>
              <tr>
                <td class="main"><?php echo $op_data['name'] . ':' . ($op_data['instructions'] != '' ? '<br /><span class="smallText">' . $op_data['instructions'] . '</span>' : '' ); ?></td>
                <td class="main"><?php echo $tmp_html;  ?></td>
              </tr>
              <?php
            break;

          case 3:
            $tmp_html = '';
            $i = 0;
            foreach ( $options_values[$oID] as $vID => $ov_data ) {
              if ( (float)$ov_data['price'] == 0 ) {
                $price = ' ';
              } else {
                $price = '( '.$ov_data['prefix'] . ' ' . $currencies->display_price($ov_data['price'], $tax_rate).' )';
              }
              $tmp_html .= '<input type="checkbox" name="id[' . $oID . '][c][' . $i . ']" value="' . $vID . '">' . $ov_data['name'] . ' ' . $price . '<br />';
              $i++;
            }
?>
              <tr>
                <td class="main"><?php echo $op_data['name'] . ':' . ($op_data['instructions'] != '' ? '<br /><span class="smallText">' . $op_data['instructions'] . '</span>' : '' ); ?></td>
                <td class="main"><?php echo $tmp_html;  ?></td>
              </tr>
              <?php
            break;

          case 0:
            $tmp_html = '<select name="id[' . $oID . ']">';
            foreach ( $options_values[$oID] as $vID => $ov_data ) {
              if ( (float)$ov_data['price'] == 0 ) {
                $price = ' ';
              } else {
                $price = '(  '.$ov_data['prefix'] . ' ' . $currencies->display_price($ov_data['price'], $tax_rate).' )';
              }
              $tmp_html .= '<option value="' . $vID . '">' . $ov_data['name'] . ' ' . $price .'</option>';
            } // End of the for loop on the option values
            $tmp_html .= '</select>';
?>
              <tr>
                <td class="main"><?php echo $op_data['name'] . ':' . ($op_data['instructions'] != '' ? '<br /><span class="smallText">' . $op_data['instructions'] . '</span>' : '' ); ?></td>
                <td class="main"><?php echo $tmp_html;  ?></td>
              </tr>
              <?php
            break;
        }  //end of switch
      } //end of while
?>
            </table>
            <?php
    } // end of ($products_attributes['total'] > 0)
?>
          </td>
        </tr>
      </table></td>
  </tr>
   <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <?php
// BOF MaxiDVD: Modified For Ultimate Images Pack!
if (ULTIMATE_ADDITIONAL_IMAGES == 'enable') { include(DIR_WS_MODULES . 'additional_images.php'); }
// BOF MaxiDVD: Modified For Ultimate Images Pack!
?>
  <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <?php
    $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
    $reviews = tep_db_fetch_array($reviews_query);
    if ($reviews['count'] > 0) {
?>

  <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <?php
    }
    // Extra Products Fields are checked and presented
    // START: Extra Fields Contribution  DMG
    $extra_fields_query = tep_db_query("SELECT pef.products_extra_fields_status as status, pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value
                                        FROM ". TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS ." ptf,
                                             ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef
                                        WHERE ptf.products_id='".(int)$HTTP_GET_VARS['products_id']."'
                                          and ptf.products_extra_fields_value <> ''
                                          and ptf.products_extra_fields_id = pef.products_extra_fields_id
                                          and (pef.languages_id='0' or pef.languages_id='".$languages_id."')
                                        ORDER BY products_extra_fields_order");
    if ( tep_db_num_rows($extra_fields_query) > 0 ) {
?>
  <tr>
    <td class="main"><table border="0" cellspacing="1" cellpadding="2">
        <?php
      while ($extra_fields = tep_db_fetch_array($extra_fields_query)) {
        if (! $extra_fields['status'])  // show only enabled extra field
          continue;
?>
        <tr>
          <td class="main" valign="top"><b><?php echo $extra_fields['name']; ?>: </b></td>
          <td class="main" valign="top"><?php echo $extra_fields['value']; ?></td>
        </tr>
        <?php
      }
?>
      </table></td>
  </tr>
  <?php
    }
    // END: Extra Fields Contribution
    if (tep_not_null($product_info['products_url'])) {
?>
  <tr>
    <td class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td>
  </tr>
  <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>

  <?php
    }

// BOF: Lango Added for template MOD
if (MAIN_TABLE_BORDER == 'yes'){
  $header_text= ' ';
  table_image_border_bottom(false, false, $header_text);
}
// EOF: Lango Added for template MOD

///////////////////////////////////////////////////////////////////////////////////////////////////////////
// MOD begin of sub product

if(STOCK_ALLOW_CHECKOUT =='false')
{$allowcriteria=" and p.products_quantity >0";}else{$allowcriteria="";}

  // get sort order

  $csort_order = tep_db_fetch_array(tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'CATEGORIES_SORT_ORDER'"));

  $select_order_by = '';
    switch ($csort_order['configuration_value']) {
      case 'PRODUCT_LIST_MODEL':
        $select_order_by .= 'p.products_model';
        break;
      case 'PRODUCT_LIST_NAME':
        $select_order_by .= 'pd.products_name';
        break;
//commented out - do subproducts have different manufacturers?
//      case 'PRODUCT_LIST_MANUFACTURER':
//          $select_order_by .= 'm.manufacturers_name, ';
//          break;
      case 'PRODUCT_LIST_PRICE':
        $select_order_by .= 'p.products_price';
        break;
     default:
        $select_order_by .= 'p.products_model';
        break;
    }

   $sub_products_sql = tep_db_query("select p.products_id, p.products_price, p.products_tax_class_id, p.products_image, pd.products_name, pd.products_description, p.products_model from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_parent_id = " . (int)$HTTP_GET_VARS['products_id'] . " ".$allowcriteria." and p.products_id = pd.products_id and pd.language_id = " . (int)$languages_id . " order by " . $select_order_by);

if (tep_db_num_rows($sub_products_sql) > 0) {
  // BOF: Lango Added for template MOD
  if (MAIN_TABLE_BORDER == 'yes'){
    $header_text= ' ';
    table_image_border_top(false, false, $header_text);
  }
  // EOF: Lango Added for template MOD
  ?>
      <tr>
        <td align="right">
          <table>
          <?php
          while ($sub_products = tep_db_fetch_array($sub_products_sql)) {
            $subname = substr( $sub_products['products_name'], strlen( $product_info['products_name'] . ' - ' ));
            $pf->loadProduct($sub_products['products_id'],$languages_id);
            $sub_products_price = $pf->getPriceStringShort();
            ?>
            <tr align="right">
              <td class="productListing-data"><?php if ($sub_products['products_image']) echo tep_image(DIR_WS_IMAGES . $sub_products['products_image'], $subname, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT,'vspace="2" hspace="2"'); ?></td>
              <td class="productListing-data"><b><?php echo $subname; ?></b> [<?php echo $sub_products['products_model']; ?>]<br /><?php echo $sub_products['products_description'];?></td>
              <td class="productListing-data"><?php echo $sub_products_price; ?></td>
              <td class="productListing-data"><?php echo TEXT_ENTER_QUANTITY;?> : <?php echo tep_draw_input_field('sub_products_qty[]', '0', 'size="5"') . tep_draw_hidden_field('sub_products_id[]', $sub_products['products_id']);;?></td>
            </tr>
          <?php
          }
          ?>
          </table>
        </td>
      </tr>
<?php
  // BOF: Lango Added for template MOD
  if (MAIN_TABLE_BORDER == 'yes'){
    table_image_border_bottom();
  }
  // EOF: Lango Added for template MOD
}
// MOD end of sub product
///////////////////////////////////////////////////////////////////////////////////////////////////////////
if ($product_check['total'] > 0) {

?>
  <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>
                <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                <!-- Begin Wishlist Code --><td class="main"><?php echo sprintf(TEXT_MORE_WISHLIST); ?></td>

                <?php
                  if (DESIGN_BUTTON_WISHLIST == 'true') {
                    echo '<td align="right" class="main" valign="middle">';
                    if( (!tep_session_is_registered('customer_id')) || (!tep_session_is_registered('SESSION_WISHLIST')) ){
                      $SESSION_WISHLIST = $product_info['products_id'];
                      tep_session_register('SESSION_WISHLIST');
                    }
                    echo '<a href="javascript:document.cart_quantity.action=\'' . tep_href_link(FILENAME_PRODUCT_INFO, 'action=add_wishlist') . '\'; document.cart_quantity.submit();">' . tep_template_image_button('button_add_wishlist.gif', IMAGE_BUTTON_ADD_WISHLIST,'align="absmiddle"') . '</a>' ;
                    echo '</td>';
                  }
                ?>
                <!-- End Wishlist Code -->
        <?php } ; ?>
                <td class="main" align="right" valign="absmiddle"><table border="0" cellspacing="0" cellpadding="0" align="right">
  <tr>
  <?php if (tep_db_num_rows($sub_products_sql) ==0) {?>
    <td class="main"><?php echo TEXT_ENTER_QUANTITY . ':  ';?></td>
    <td class="main"><?php echo tep_draw_input_field('cart_quantity', '1', 'size="4"');?>  </td>
  <?php }?>
    <td class="main"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_template_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART,'align="absmiddle"'); ?></td>
  </tr>
</table></form></td>
                <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <?php

   // RCI code start
   echo $cre_RCI->get('productinfo', 'bottom');
   echo $cre_RCI->get('global', 'bottom');
   // RCI code eof

   if ( (USE_CACHE == 'true') && !SID) {
    echo tep_cache_also_purchased(3600);
     include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);
    } else {
     include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS_BUYNOW);
        echo tep_draw_separator('pixel_trans.gif', '100%', '10');
     include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);

    }
//   }
?>
       </td>
      </tr>
    <tr>
    <td class="style1" valign="top">
    <?php
    if(B2B_PRICE_BREAK=='true') {
      echo tep_draw_separator('pixel_trans.gif', '100%', '10');
      include(DIR_WS_MODULES . FILENAME_PRODUCT_QUANTITY_TABLE);
    }
}?>
    <script type="text/javascript"><!--
google_ad_client = "pub-3605661993971372";
/* 728x15, created 06/05/08 */
google_ad_slot = "7143498540";
google_ad_width = 728;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></td>
    </tr>
<!-- social bookmarks start //-->
<?php
include(DIR_WS_MODULES . 'social_bookmarks' . '.php');
?>
<!-- social bookmarks finish //-->
<?php if (tep_not_null($product_info['products_image'])) { ?>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="320" HEIGHT="240" id="imagezoom" ALIGN="middle">
<param name="movie" value="imagezoom.swf?image=<?=$product_info['products_image'];?>&imagebig=<?=$product_info['products_image_big'];?>&imgW=320&imgH=240"/>
<param name="loop" value="false" />
<param name="menu" value="false" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<EMBED src="imagezoom.swf?image=<?=$product_info['products_image'];?>&imagebig=<?=$product_info['products_image'];?>&imgW=320&imgH=240" loop="false" menu="false" quality="high" bgcolor="#ffffff"  WIDTH="320" HEIGHT="240" NAME="imagezoom" ALIGN="middle"
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>

<? } ?>


</table>

Link to comment
Share on other sites

i don't get unexpected end with your code as posted or with my changes:

 

<?php
// RCI code start
echo $cre_RCI->get('global', 'top');
echo $cre_RCI->get('productinfo', 'top');
// RCI code eof
echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?>
<table border="0" width="100%" cellspacing="0" cellpadding="<?php echo CELLPADDING_SUB;?>">
  <?php
  if ($product_check['total'] < 1) {
?>
  <tr>
    <td><?php  new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></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>
                <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_template_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
                <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
  <?php
  } else {
// BOF MaxiDVD: Modified For Ultimate Images Pack!
    $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, p.products_image_med, p.products_image_lrg, p.products_image_sm_1, p.products_image_xl_1, p.products_image_sm_2, p.products_image_xl_2, p.products_image_sm_3, p.products_image_xl_3, p.products_image_sm_4, p.products_image_xl_4, p.products_image_sm_5, p.products_image_xl_5, p.products_image_sm_6, p.products_image_xl_6, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
// EOF MaxiDVD: Modified For Ultimate Images Pack!
    $product_info = tep_db_fetch_array($product_info_query);

    tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");

    if (tep_not_null($product_info['products_model'])) {
      $products_name = $product_info['products_name'] . ' <span class="smallText">[' . $product_info['products_model'] . ']</span>';
    } else {
      $products_name = $product_info['products_name'];
    }

  if ($product_has_sub > '0'){ // if product has sub products
  $products_price ='';// if you like to show some thing in place of price add here
    } else {
  $pf->loadProduct($product_info['products_id'],$languages_id);
        $products_price = $pf->getPriceStringShort();

    } // end sub product check

// BOF: WebMakers.com Added: Show Featured Products
if (SHOW_HEADING_TITLE_ORIGINAL=='yes') {
$header_text = ' ';
?>
  <tr>
    <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
        <tr>
          <td class="pageHeading" valign="top"><?php echo $products_name; ?></td>
          <td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <?php
} else {
  ?>
  </tr><tr>
  <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr> <td class="infoBoxContents"><?php echo  $products_name ;?>  </td>
  <td align="right" class="infoBoxContents"><nobr><?php echo $products_price ;?></nobr>
  </td></td> <td align="right" class="main"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_template_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART,'align="absmiddle"'); ?></td>
</tr></table><td>
  <?php
}

// BOF: Lango Added for template MOD
if (MAIN_TABLE_BORDER == 'yes'){
  table_image_border_top(false, false, $header_text);
} else {
echo $header_text ;
}
// EOF: Lango Added for template MOD
?>
  <tr>
    <td class="main"><table width="100%" border="0" cellspacing="0" cellpadding="2">
        <tr>
          <td class="main" valign="top">
          <?php if (tep_not_null($product_info['products_image'])) { ?>
          <table border="0" cellspacing="0" cellpadding="0" align="right">
              <tr>
                <td>
               <!-- // BOF MaxiDVD: Modified For Ultimate Images Pack! //-->
                  <?php
      if ($product_info['products_image_med']!='') {
        $new_image = $product_info['products_image_med'];
        $image_width = MEDIUM_IMAGE_WIDTH;
        $image_height = MEDIUM_IMAGE_HEIGHT;
      } else {
        $new_image = $product_info['products_image'];
        $image_width = SMALL_IMAGE_WIDTH;
        $image_height = SMALL_IMAGE_HEIGHT;
      }
      echo tep_javascript_image(DIR_WS_IMAGES . $new_image, 'product' . $product_info['products_id'], addslashes($product_info['products_name']), $image_width, $image_height, 'hspace="5" vspace="5"', 'true');
?>
                  <!-- // EOF MaxiDVD: Modified For Ultimate Images Pack! //-->
                  <!-- // BEGIN  Affiliate program mods for 2.5a upgrade DMG  -->
                  <?php
      //affiliate build a link begin
      if (tep_session_is_registered('affiliate_id')) {
        echo '<br><br><a href="' . tep_href_link(FILENAME_AFFILIATE_BANNERS_BUILD, 'individual_banner_id=' . $product_info['products_id']) .'" target="_self">' . tep_template_image_button('button_affiliate_build_a_link.gif', LINK_ALT) . ' </a>'; ?>
                  <?php
      }
      //affiliate build a link begin
?>
                  <!-- // EOF Affiliate program 2.5a upgrade mods DMG -->
                </td>
              </tr>
            </table>
          <?php    } ?>
<p><?php echo stripslashes($product_info['products_description']); ?></p>
<?php echo tep_draw_separator('pixel_trans.gif', '100%', '10');

    $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' ");
    $products_attributes = tep_db_fetch_array($products_attributes_query);
    if ($products_attributes['total'] > 0) {
?>
            <table width="100%" border="0" cellspacing="0" cellpadding="2">
              <tr>
                <td class="main" colspan="2"><strong><?php echo TEXT_PRODUCT_OPTIONS; ?></strong></td>
              </tr>
              <?php
      $products_options_query = tep_db_query("select pa.options_id, pa.options_values_id, pa.options_values_price, pa.price_prefix, po.options_type, po.options_length, pot.products_options_name, pot.products_options_instruct from
           " . TABLE_PRODUCTS_ATTRIBUTES  . " AS pa,
           " . TABLE_PRODUCTS_OPTIONS  . " AS po,
           " . TABLE_PRODUCTS_OPTIONS_TEXT  . " AS pot
           where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'
             and pa.options_id = po.products_options_id
             and po.products_options_id = pot.products_options_text_id and pot.language_id = '" . (int)$languages_id . "'
           order by pa.products_options_sort_order
           ");

      // Store the information from the tables in arrays for easy of processing
      $options = array();
      $options_values = array();
      while ($po = tep_db_fetch_array($products_options_query)) {
        //  we need to find the values name
        if ( $po['options_type'] != 1  && $po['options_type'] != 4 ) {
          $options_values_query = tep_db_query("select products_options_values_name from " . TABLE_PRODUCTS_OPTIONS_VALUES . " where products_options_values_id ='". $po['options_values_id'] . "' and language_id = '" . (int)$languages_id . "'");
          $ov = tep_db_fetch_array($options_values_query);
        } else {
          $ov['products_options_values_name'] = '';
        }
        $options[$po['options_id']] = array('name' => $po['products_options_name'], 'type' => $po['options_type'], 'length' => $po['options_length'], 'instructions' => $po['products_options_instruct']);
        $options_values[$po['options_id']][$po['options_values_id']] =  array('name' => stripslashes($ov['products_options_values_name']), 'price' => $po['options_values_price'], 'prefix' => $po['price_prefix']);
      }

      foreach ($options as $oID => $op_data) {
        switch ($op_data['type']) {

          case 1:
            $maxlength = ( $op_data['length'] > 0 ? ' maxlength="' . $op_data['length'] . '"' : '' );
            $tmp_html = '<input type="text" name="id[' . $oID . '][t]"' . $maxlength . ' />';
?>
              <tr>
                <td class="main"><?php echo $op_data['name'] . ':' . ($op_data['instructions'] != '' ? '<br /><span class="smallText">' . $op_data['instructions'] . '</span>' : '' ); ?></td>
                <td class="main"><?php echo $tmp_html;  ?></td>
              </tr>
              <?php
            break;

          case 4:
            $text_area_array = explode(';',$op_data['length']);
            $cols = $text_area_array[0];
            if ( $cols == '' ) $cols = '100%';
            $rows = $text_area_array[1];
            $tmp_html = '<textarea name="id[' . $oID . '][t]" rows="'.$rows.'" cols="'.$cols.'" wrap="virtual"></textarea>';
?>
              <tr>
                <td class="main"><?php echo $op_data['name'] . ':' . ($op_data['instructions'] != '' ? '<br /><span class="smallText">' . $op_data['instructions'] . '</span>' : '' ); ?></td>
                <td class="main" align="center"><?php echo $tmp_html;  ?></td>
              </tr>
              <?php
            break;

          case 2:
            $tmp_html = '';
            foreach ( $options_values[$oID] as $vID => $ov_data ) {
              if ( (float)$ov_data['price'] == 0 ) {
                  $price = ' ';
              } else {
                  $price = '( ' . $ov_data['prefix'] . ' ' . $currencies->display_price($ov_data['price'], $tax_rate) . ' )';
              }
              $tmp_html .= '<input type="radio" name="id[' . $oID . ']" value="' . $vID . '">' . $ov_data['name'] . ' ' . $price . '<br />';
            } // End of the for loop on the option value
?>
              <tr>
                <td class="main"><?php echo $op_data['name'] . ':' . ($op_data['instructions'] != '' ? '<br /><span class="smallText">' . $op_data['instructions'] . '</span>' : '' ); ?></td>
                <td class="main"><?php echo $tmp_html;  ?></td>
              </tr>
              <?php
            break;

          case 3:
            $tmp_html = '';
            $i = 0;
            foreach ( $options_values[$oID] as $vID => $ov_data ) {
              if ( (float)$ov_data['price'] == 0 ) {
                $price = ' ';
              } else {
                $price = '( '.$ov_data['prefix'] . ' ' . $currencies->display_price($ov_data['price'], $tax_rate).' )';
              }
              $tmp_html .= '<input type="checkbox" name="id[' . $oID . '][c][' . $i . ']" value="' . $vID . '">' . $ov_data['name'] . ' ' . $price . '<br />';
              $i++;
            }
?>
              <tr>
                <td class="main"><?php echo $op_data['name'] . ':' . ($op_data['instructions'] != '' ? '<br /><span class="smallText">' . $op_data['instructions'] . '</span>' : '' ); ?></td>
                <td class="main"><?php echo $tmp_html;  ?></td>
              </tr>
              <?php
            break;

          case 0:
            $tmp_html = '<select name="id[' . $oID . ']">';
            foreach ( $options_values[$oID] as $vID => $ov_data ) {
              if ( (float)$ov_data['price'] == 0 ) {
                $price = ' ';
              } else {
                $price = '(  '.$ov_data['prefix'] . ' ' . $currencies->display_price($ov_data['price'], $tax_rate).' )';
              }
              $tmp_html .= '<option value="' . $vID . '">' . $ov_data['name'] . ' ' . $price .'</option>';
            } // End of the for loop on the option values
            $tmp_html .= '</select>';
?>
              <tr>
                <td class="main"><?php echo $op_data['name'] . ':' . ($op_data['instructions'] != '' ? '<br /><span class="smallText">' . $op_data['instructions'] . '</span>' : '' ); ?></td>
                <td class="main"><?php echo $tmp_html;  ?></td>
              </tr>
              <?php
            break;
        }  //end of switch
      } //end of while
?>
            </table>
            <?php
    } // end of ($products_attributes['total'] > 0)
?>
          </td>
        </tr>
      </table></td>
  </tr>
   <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <?php
// BOF MaxiDVD: Modified For Ultimate Images Pack!
if (ULTIMATE_ADDITIONAL_IMAGES == 'enable') { include(DIR_WS_MODULES . 'additional_images.php'); }
// BOF MaxiDVD: Modified For Ultimate Images Pack!
?>
  <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <?php
    $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
    $reviews = tep_db_fetch_array($reviews_query);
    if ($reviews['count'] > 0) {
?>

  <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <?php
    }
    // Extra Products Fields are checked and presented
    // START: Extra Fields Contribution  DMG
    $extra_fields_query = tep_db_query("SELECT pef.products_extra_fields_status as status, pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value
                                        FROM ". TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS ." ptf,
                                             ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef
                                        WHERE ptf.products_id='".(int)$HTTP_GET_VARS['products_id']."'
                                          and ptf.products_extra_fields_value <> ''
                                          and ptf.products_extra_fields_id = pef.products_extra_fields_id
                                          and (pef.languages_id='0' or pef.languages_id='".$languages_id."')
                                        ORDER BY products_extra_fields_order");
    if ( tep_db_num_rows($extra_fields_query) > 0 ) {
?>
  <tr>
    <td class="main"><table border="0" cellspacing="1" cellpadding="2">
        <?php
      while ($extra_fields = tep_db_fetch_array($extra_fields_query)) {
        if (! $extra_fields['status'])  // show only enabled extra field
          continue;
?>
        <tr>
          <td class="main" valign="top"><b><?php echo $extra_fields['name']; ?>: </b></td>
          <td class="main" valign="top"><?php echo $extra_fields['value']; ?></td>
        </tr>
        <?php
      }
?>
      </table></td>
  </tr>
  <?php
    }
    // END: Extra Fields Contribution
    if (tep_not_null($product_info['products_url'])) {
?>
  <tr>
    <td class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td>
  </tr>
  <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>

  <?php
    }

// BOF: Lango Added for template MOD
if (MAIN_TABLE_BORDER == 'yes'){
  $header_text= ' ';
  table_image_border_bottom(false, false, $header_text);
}
// EOF: Lango Added for template MOD

///////////////////////////////////////////////////////////////////////////////////////////////////////////
// MOD begin of sub product

if(STOCK_ALLOW_CHECKOUT =='false')
{$allowcriteria=" and p.products_quantity >0";}else{$allowcriteria="";}

  // get sort order

  $csort_order = tep_db_fetch_array(tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'CATEGORIES_SORT_ORDER'"));

  $select_order_by = '';
    switch ($csort_order['configuration_value']) {
      case 'PRODUCT_LIST_MODEL':
        $select_order_by .= 'p.products_model';
        break;
      case 'PRODUCT_LIST_NAME':
        $select_order_by .= 'pd.products_name';
        break;
//commented out - do subproducts have different manufacturers?
//      case 'PRODUCT_LIST_MANUFACTURER':
//          $select_order_by .= 'm.manufacturers_name, ';
//          break;
      case 'PRODUCT_LIST_PRICE':
        $select_order_by .= 'p.products_price';
        break;
     default:
        $select_order_by .= 'p.products_model';
        break;
    }

   $sub_products_sql = tep_db_query("select p.products_id, p.products_price, p.products_tax_class_id, p.products_image, pd.products_name, pd.products_description, p.products_model from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_parent_id = " . (int)$HTTP_GET_VARS['products_id'] . " ".$allowcriteria." and p.products_id = pd.products_id and pd.language_id = " . (int)$languages_id . " order by " . $select_order_by);

if (tep_db_num_rows($sub_products_sql) > 0) {
  // BOF: Lango Added for template MOD
  if (MAIN_TABLE_BORDER == 'yes'){
    $header_text= ' ';
    table_image_border_top(false, false, $header_text);
  }
  // EOF: Lango Added for template MOD
  ?>
      <tr>
        <td align="right">
          <table>
          <?php
          while ($sub_products = tep_db_fetch_array($sub_products_sql)) {
            $subname = substr( $sub_products['products_name'], strlen( $product_info['products_name'] . ' - ' ));
            $pf->loadProduct($sub_products['products_id'],$languages_id);
            $sub_products_price = $pf->getPriceStringShort();
            ?>
            <tr align="right">
              <td class="productListing-data"><?php if ($sub_products['products_image']) echo tep_image(DIR_WS_IMAGES . $sub_products['products_image'], $subname, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT,'vspace="2" hspace="2"'); ?></td>
              <td class="productListing-data"><b><?php echo $subname; ?></b> [<?php echo $sub_products['products_model']; ?>]<br /><?php echo $sub_products['products_description'];?></td>
              <td class="productListing-data"><?php echo $sub_products_price; ?></td>
              <td class="productListing-data"><?php echo TEXT_ENTER_QUANTITY;?> : <?php echo tep_draw_input_field('sub_products_qty[]', '0', 'size="5"') . tep_draw_hidden_field('sub_products_id[]', $sub_products['products_id']);;?></td>
            </tr>
          <?php
          }
          ?>
          </table>
        </td>
      </tr>
<?php
  // BOF: Lango Added for template MOD
  if (MAIN_TABLE_BORDER == 'yes'){
    table_image_border_bottom();
  }
  // EOF: Lango Added for template MOD
}
// MOD end of sub product
///////////////////////////////////////////////////////////////////////////////////////////////////////////
if ($product_check['total'] > 0) {

?>
  <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>
                <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                <!-- Begin Wishlist Code --><td class="main"><?php echo sprintf(TEXT_MORE_WISHLIST); ?></td>

                <?php
                  if (DESIGN_BUTTON_WISHLIST == 'true') {
                    echo '<td align="right" class="main" valign="middle">';
                    if( (!tep_session_is_registered('customer_id')) || (!tep_session_is_registered('SESSION_WISHLIST')) ){
                      $SESSION_WISHLIST = $product_info['products_id'];
                      tep_session_register('SESSION_WISHLIST');
                    }
                    echo '<a href="javascript:document.cart_quantity.action=\'' . tep_href_link(FILENAME_PRODUCT_INFO, 'action=add_wishlist') . '\'; document.cart_quantity.submit();">' . tep_template_image_button('button_add_wishlist.gif', IMAGE_BUTTON_ADD_WISHLIST,'align="absmiddle"') . '</a>' ;
                    echo '</td>';
                  }
                ?>
                <!-- End Wishlist Code -->
        <?php } ; ?>
                <td class="main" align="right" valign="absmiddle"><table border="0" cellspacing="0" cellpadding="0" align="right">
  <tr>
  <?php if (tep_db_num_rows($sub_products_sql) ==0) {?>
    <td class="main"><?php echo TEXT_ENTER_QUANTITY . ':  ';?></td>
    <td class="main"><?php echo tep_draw_input_field('cart_quantity', '1', 'size="4"');?>  </td>
  <?php }?>
    <td class="main"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_template_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART,'align="absmiddle"'); ?></td>
  </tr>
</table></form></td>
                <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <?php

   // RCI code start
   echo $cre_RCI->get('productinfo', 'bottom');
   echo $cre_RCI->get('global', 'bottom');
   // RCI code eof

   if ( (USE_CACHE == 'true') && !SID) {
    echo tep_cache_also_purchased(3600);
     include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);
    } else {
     include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS_BUYNOW);
        echo tep_draw_separator('pixel_trans.gif', '100%', '10');
     include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);

    }
//   }
?>
       </td>
      </tr>
    <tr>
    <td class="style1" valign="top">
    <?php
    if(B2B_PRICE_BREAK=='true') {
      echo tep_draw_separator('pixel_trans.gif', '100%', '10');
      include(DIR_WS_MODULES . FILENAME_PRODUCT_QUANTITY_TABLE);
    }
}?>
    <script type="text/javascript"><!--
google_ad_client = "pub-3605661993971372";
/* 728x15, created 06/05/08 */
google_ad_slot = "7143498540";
google_ad_width = 728;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></td>
    </tr>
<!-- social bookmarks start //-->
<?php
include(DIR_WS_MODULES . 'social_bookmarks' . '.php');
?>
<!-- social bookmarks finish //-->
<?php if (tep_not_null($product_info['products_image'])) { ?>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
 codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
 WIDTH="320" HEIGHT="240" id="imagezoom" ALIGN="middle">
 <param name="movie" value="imagezoom.swf?image=<?=$product_info['products_image'];?>&imagebig=<?=$product_info['products_image_lrg'];?>&imgW=320&imgH=240"/>
<param name="loop" value="false" />
<param name="menu" value="false" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<EMBED src="imagezoom.swf?image=<?=$product_info['products_image'];?>&imagebig=<?=$product_info['products_image_lrg'];?>&imgW=320&imgH=240" loop="false" menu="false" quality="high" bgcolor="#ffffff"  WIDTH="320" HEIGHT="240" NAME="imagezoom" ALIGN="middle"
 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>

<? } ?>


</table>

 

can you post the entire error message you are getting?

Link to comment
Share on other sites

Parse error: syntax error, unexpected $end in localhost\live\shop\templates\content\product_info.tpl.php on line 501

 

If I take the code out with the IF statment it works fine including displaying "loading image.." but no image loads of course.

Link to comment
Share on other sites

since the code as posted compiles for me (no unexpected $end on compile), the missing bracket must be in one of your include files. I guess I would navigate to each one individually to find the one with a similar area, e.g.,

 

http://www.yoursitename.com/dirwsmodules/additional_images.php

 

plus DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS (whatever that is), etc..

 

 

Link to comment
Share on other sites

Would the existing code still work as it does if it had a missing bracket ? the site is working fine all I've done is add your code to the bottom to prove it works before I make changes. I'm guessing the existing code has the missing bracket then and it's just ignored till I put your IF statment in, am I right on that ?

 

Thanks for the help again.

Link to comment
Share on other sites

Ok, I've gone into the old code and removed all the old image code and replaced it with your code.

 

It's fixed the error so that's progress but still no image loads so for some reason the image is not being passed into the flash.

 

Looking at the old code do you think using $product_info['products_image'] is still the right way to achieve that ? sorry to be so stupid but I don't code a lot.

Link to comment
Share on other sites

well, i see these lines that imply you've retrieved a record from the database and loaded it into the array $product_info. assuming you actually got a record with data, $product_info['products_image'] should have that info in it and $product_info['products_image_lrg'] should have that info in it. therefore, yes, those are the right values. when you run the code, what does the object HTML look like (view source)?

 

    $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, p.products_image_med, p.products_image_lrg, p.products_image_sm_1, p.products_image_xl_1, p.products_image_sm_2, p.products_image_xl_2, p.products_image_sm_3, p.products_image_xl_3, p.products_image_sm_4, p.products_image_xl_4, p.products_image_sm_5, p.products_image_xl_5, p.products_image_sm_6, p.products_image_xl_6, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
// EOF MaxiDVD: Modified For Ultimate Images Pack!
    $product_info = tep_db_fetch_array($product_info_query);

Link to comment
Share on other sites

This is the view code text for that part

 


         <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="320" HEIGHT="240" id="imagezoom" ALIGN="middle">
<param name="movie" value="imagezoom.swf?image=<?=$product_info['products_image'];?>&imagebig=<?=$product_info['products_image'];?>&imgW=320&imgH=240"/>
<param name="loop" value="false" />
<param name="menu" value="false" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<EMBED src="imagezoom.swf?image=<?=$product_info['products_image'];?>&imagebig=<?=$product_info['products_image'];?>&imgW=320&imgH=240" loop="false" menu="false" quality="high" bgcolor="#ffffff"  WIDTH="320" HEIGHT="240" NAME="imagezoom" ALIGN="middle"
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>

<? } ?>

Link to comment
Share on other sites

i mean how does the HTML look in your browser? when you load the page in your browser, View Source to see the HTML that is produced. we want to see if any values are getting loaded into the object where imagezoom.swf?image=

 

also, IS there image data in the database for the images you are trying to load?

Link to comment
Share on other sites

Yes the is images in the database I'm using a full copy of a working site.

 

That is the veiwed source, the image is not being loaded, however I've managed to get the flash to issue an error "error - you must specify image peramiters" with this code I've hacked myself, do you think it's progress ?

 

         <?php $new_image = $product_info['products_image'];?>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="320" HEIGHT="240" id="imagezoom" ALIGN="middle">
<param name="movie" value="imagezoom.swf?image=<?="DIR_WS_IMAGES . $new_image";?>&imagebig=<?="DIR_WS_IMAGES . $new_image";?>&imgW=320&imgH=240"/>
<param name="loop" value="false" />
<param name="menu" value="false" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<EMBED src="imagezoom.swf?image=<?="DIR_WS_IMAGES . $new_image";?>&imagebig=<?="DIR_WS_IMAGES . $new_image";?>&imgW=320&imgH=240" loop="false" menu="false" quality="high" bgcolor="#ffffff"  WIDTH="320" HEIGHT="240" NAME="imagezoom" ALIGN="middle"
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>

 

Got to sign off now, I'll pick this back up in about 7 hours. Thanks very much for your help, if you are a soccer fan send me your email address and if we get this working I'll send you a nice gift.

Link to comment
Share on other sites

you should NOT be seeing <?php anything in your browser. if THAT is what is showing in your browser, then the file isn't compiling before it's sent to the browser. does this file end with .php extension or is your server configured to parse PHP otherwise?

Link to comment
Share on other sites

you should NOT be seeing <?php anything in your browser. if THAT is what is showing in your browser, then the file isn't compiling before it's sent to the browser. does this file end with .php extension or is your server configured to parse PHP otherwise?

 

When the page is viewed in the browser I don't see PHP that is what I see when I choose "view source" as you requested. I see a lot more then that but I cut out all the rest to show just that part.

Link to comment
Share on other sites

you should not see any PHP code when you View Source in your browser, after the page is run. the PHP should be executed on the server, not displayed in the browser. does your file end in .php?

 

to make sure we're talking about the same thing, to View Source in Internet Explorer, I click on Page, then select View Source. You are doing this and seeing PHP code in your HTML source?

Link to comment
Share on other sites

you should not see any PHP code when you View Source in your browser, after the page is run. the PHP should be executed on the server, not displayed in the browser. does your file end in .php?

 

to make sure we're talking about the same thing, to View Source in Internet Explorer, I click on Page, then select View Source. You are doing this and seeing PHP code in your HTML source?

 

That is what I see when I do the above.

Link to comment
Share on other sites

I think I've sorted it now, here the code I hacked if anyone want a ref.

 

I think it's right and thanks very much for taking the time to help.

 

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="320" HEIGHT="240" id="imagezoom" ALIGN="middle">
<param name="movie" value="imagezoom.swf?image=<?php echo (DIR_WS_IMAGES . $product_info['products_image']);?>&imagebig=<?php echo (DIR_WS_IMAGES . $product_info['products_image2']);?>&imgW=320&imgH=240"/>
<param name="loop" value="false" />                                                                                
<param name="menu" value="false" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<EMBED src="imagezoom.swf?image=<?php echo (DIR_WS_IMAGES . $product_info['products_image']);?>&imagebig=<?php echo (DIR_WS_IMAGES . $product_info['products_image2']);?>&imgW=320&imgH=240" loop="false" menu="false" quality="high" bgcolor="#ffffff"  WIDTH="320" HEIGHT="240" NAME="imagezoom" ALIGN="middle"
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.