Post by emilife93 » Thu Jul 07, 2011 12:15 pm

Greeting,

anyone can help me?.

i want put <!-- code start --> <!-- code end -->

from

this

Code: Select all

<?php if ($products) { ?>
<div class="top">
  <div class="left"></div>
  <div class="right"></div>
  <div class="center">
    <div class="heading"><?php echo $heading_title; ?></div>
  </div>
</div>

<div class="middle">
  <table class="list">
  <?php for ($i = 0; $i < sizeof($products); $i = $i + 4) { ?>
    <tr>
      <?php for ($j = $i; $j < ($i + 4); $j++) { ?>
      <td style="width: 25%;"><?php if (isset($products[$j])) { ?><!-- code start --><div class="banner"><!-- code end -->
      <a href="<?php echo str_replace('&', '&', $products[$j]['href']); ?>">
	  <!-- code start -->
	  <?php echo $products[$j]['promo_tags_top_right']; ?>
	  <?php echo $products[$j]['promo_tags_top_left']; ?>
	  <?php echo $products[$j]['promo_tags_bottom_left']; ?>
	  <?php echo $products[$j]['promo_tags_bottom_right']; ?>
	  <?php echo $products[$j]['discount_rate']; ?>
	  <?php echo $products[$j]['sold_out']; ?>
	  <!-- code end -->
	  <img src="<?php echo $products[$j]['thumb']; ?>" title="<?php echo $products[$j]['name']; ?>" alt="<?php echo $products[$j]['name']; ?>" /></a><!-- code start --></div><!-- code end -->
      <a href="<?php echo str_replace('&', '&', $products[$j]['href']); ?>"><?php echo $products[$j]['name']; ?></a><br />
      <span style="color: #999; font-size: 11px;"><?php echo $products[$j]['model']; ?></span><br />
      <?php if ($display_price) { ?>
      <?php if (!$products[$j]['special']) { ?>
      <span style="color: #900; font-weight: bold;"><?php echo $products[$j]['price']; ?></span>
      <?php } else { ?>
      <span style="color: #900; font-weight: bold; text-decoration: line-through;"><?php echo $products[$j]['price']; ?></span> <span style="color: #F00;"><?php echo $products[$j]['special']; ?></span>
      <?php } ?>
      <a class="button_add_small" href="<?php echo $products[$j]['add']; ?>" title="<?php echo $button_add_to_cart; ?>" >&nbsp;</a>
      <?php } ?>
      <br />
      <?php if ($products[$j]['rating']) { ?>
      <img src="catalog/view/theme/default/image/stars_<?php echo $products[$j]['rating'] . '.png'; ?>" alt="<?php echo $products[$j]['stars']; ?>" />
      <?php } ?>
      <?php } ?></td>
      <?php } ?>
    </tr>
    <?php } ?>
  </table>
</div>

<div class="bottom">
  <div class="left"></div>
  <div class="right"></div>
  <div class="center"></div>
</div>
<?php } ?>
to this

Code: Select all

<?php if ($products) { ?>

<div class="top">
  <div class="left"></div>
  <div class="right"></div>
  <div class="center">
    <div class="heading"><?php echo $heading_title; ?></div>
  </div>
</div>
<div class="middle">
  <ul class="list">
    <?php for ($i = 0; $i < sizeof($products); $i ++) { ?>
    <?php if(($i%3)==0) { ?>
    <li class="a">
      <div>
        <p class="proname"><a href="<?php echo str_replace('&', '&', $products[$i]['href']); ?>"><?php echo $products[$i]['name']; ?></a></p>
        <a href="<?php echo str_replace('&', '&', $products[$i]['href']); ?>"><img src="<?php echo $products[$i]['thumb']; ?>" title="<?php echo $products[$i]['name']; ?>" alt="<?php echo $products[$i]['name']; ?>" /></a></a>
        <p class="priceoutter">
          <?php if ($display_price) { ?>
          <span >
          <?php if (!$products[$i]['special']) { ?>
          <span class="price" ><?php echo $products[$i]['price']; ?></span>
          <?php } else { ?>
          <span class="price_old" ><?php echo $products[$i]['price']; ?></span>&nbsp;<span class="price" ><?php echo $products[$i]['special']; ?></span>
          <?php } ?>
          </span>
          <?php } ?>
        </p>
          <p class="priceoutter">
          <a href="<?php echo $products[$i]['add']; ?>" title="<?php echo $button_add_to_cart; ?>" class="button fltrt"><span><?php echo $button_add_to_cart; ?></span></a>
          <a onclick="doCompare('add', '<?php echo $products[$i]['product_id']; ?>')" class="button fltlft"><span>Compare</span></a>
        </p>
      </div>
    </li>
    <?php }else{?>
    <li>
      <div>
        <p class="proname"><a href="<?php echo str_replace('&', '&', $products[$i]['href']); ?>"><?php echo $products[$i]['name']; ?></a></p>
        <a href="<?php echo str_replace('&', '&', $products[$i]['href']); ?>"><img src="<?php echo $products[$i]['thumb']; ?>" title="<?php echo $products[$i]['name']; ?>" alt="<?php echo $products[$i]['name']; ?>" /></a>
        <p class="priceoutter">
          <?php if ($display_price) { ?>
          <span >
          <?php if (!$products[$i]['special']) { ?>
          <span class="price" ><?php echo $products[$i]['price']; ?></span>
          <?php } else { ?>
          <span class="price_old" ><?php echo $products[$i]['price']; ?></span>&nbsp;<span class="price" ><?php echo $products[$i]['special']; ?></span>
          <?php } ?>
          </span>
          <?php } ?>
        </p>
          <p class="priceoutter">
          <a href="<?php echo $products[$i]['add']; ?>" title="<?php echo $button_add_to_cart; ?>" class="button fltrt"><span><?php echo $button_add_to_cart; ?></span></a>
          <a onclick="doCompare('add', '<?php echo $products[$i]['product_id']; ?>')" class="button fltlft"><span>Compare</span></a>
        </p>
      </div>
    </li>
    <?php }?>
    <?php }?>
  </ul>
</div>
<div class="bottom">
  <div class="left"></div>
  <div class="right"></div>
  <div class="center"></div>
</div>
<?php } ?>
Last edited by emilife93 on Thu Jul 07, 2011 1:31 pm, edited 1 time in total.

New member

Posts

Joined
Tue Jan 11, 2011 10:21 pm

Post by nosecret » Thu Jul 07, 2011 12:20 pm

Just insert that code to your file. But don't forget you must define variable in file controller.

Active Member

Posts

Joined
Tue Dec 28, 2010 12:28 pm

Post by emilife93 » Thu Jul 07, 2011 1:30 pm

nosecret wrote:Just insert that code to your file. But don't forget you must define variable in file controller.
what your mean define controller?

New member

Posts

Joined
Tue Jan 11, 2011 10:21 pm
Who is online

Users browsing this forum: No registered users and 6 guests