döngü sorun

koboy

OpenCart-TR
Katılım
23 Ara 2010
Mesajlar
69
Tepkime puanı
0
Puanları
0
[attachment=2043][attachment=2043]Merhaba ürün ansayfada listeliyorum
4 adet olacak acank kodlara baktıgımda 5 adet döndügünü
ve bos olana çizgi çekiyor yardımcı olurmusunuz


<div class="box">
<div>

<h1 class="title_module"><span><?php echo $heading_title; ?></span></h1>

<div class="box-content">
<div class="box-product">
<?php foreach ($products as $product) { ?>

<?php if ($product['thumb']) { ?>
<a class="image" href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a>
<?php } ?>
<h3 class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></h3>


<?php if ($product['price']) { ?>
<p class="wrap_price">
<?php if (!$product['special']) { ?>
<?php echo $product['price']; ?>
<?php } else { ?>
<span class="price"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span>
<?php } ?>
</p>
<?php } ?>
<?php if ($product['rating']) { ?>
<div class="rating"><img src="catalog/view/theme/default/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
<?php } ?>
<p class="submit"><input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button" /></p>
</div>
<div class="box-product">
<?php } ?>
</div>
</div>
 

Ekli dosyalar

  • ana.png
    ana.png
    180 KB · Görüntüleme: 12

mdogan35

OpenCart-TR
Katılım
24 Ocak 2011
Mesajlar
111
Tepkime puanı
1
Puanları
16
Yaş
47
Konum
İzmir
Web sitesi
www.inokleen.com
<div class="box">
<div>

<h1 class="title_module"><span><?php echo $heading_title; ?></span></h1>

<div class="box-content">
<div class="box-product">
<?php foreach ($products as $product) { ?>

<?php if ($product['thumb']) { ?>
<a class="image" href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a>
<?php } ?>
<h3 class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></h3>


<?php if ($product['price']) { ?>
<p class="wrap_price">
<?php if (!$product['special']) { ?>
<?php echo $product['price']; ?>
<?php } else { ?>
<span class="price"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span>
<?php } ?>
</p>
<?php } ?>
<?php if ($product['rating']) { ?>
<div class="rating"><img src="catalog/view/theme/default/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
<?php } ?>
<p class="submit"><input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button" /></p>
</div>
<?php } ?>
<div class="box-product">
</div>
</div>

Bu şekilde denermisin arkadaşım büyük ihtimalle sorun çözülecektir.en alttaki php tagını box-productten sonraya koymuşsun box-product divinin border-top kısmınıda yazdırıyor sanırım.
 

koboy

OpenCart-TR
Katılım
23 Ara 2010
Mesajlar
69
Tepkime puanı
0
Puanları
0
sayfa böyle kayıyor olmadı
böyle yapınca <div class="box-product"> döndüreceğin e<a class="image" döndürüyor
 

bakitaro

OpenCart-TR
Katılım
17 Haz 2013
Mesajlar
36
Tepkime puanı
0
Puanları
0
Yaş
42
Web sitesi
opencartfx.com
Bir de bu şekilde deneyin...
Kod:
<div class="box">


<h1 class="title_module"><span><?php echo $heading_title; ?></span></h1>

<div class="box-content">
<div class="box-product">
<?php foreach ($products as $product) { ?>

<?php if ($product['thumb']) { ?>
<a class="image" href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a>
<?php } ?>
<h3 class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></h3>


<?php if ($product['price']) { ?>
<p class="wrap_price">
<?php if (!$product['special']) { ?>
<?php echo $product['price']; ?>
<?php } else { ?>
<span class="price"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span>
<?php } ?>
</p>
<?php } ?>
<?php if ($product['rating']) { ?>
<div class="rating"><img src="catalog/view/theme/default/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
<?php } ?>
<p class="submit"><input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button" /></p>


<?php } ?>
</div>
</div>

</div>
 
Üst