Post by TLone » Tue Mar 29, 2016 4:54 am

This is probably pretty simple but I can't figure it out.

http://troutlegend.com/

My "Featured" will only show 6 boxes instead of 8 like Latest.

Also, how do I decrease the Height of those boxes? There's a lot of unused area.

Thanks!

New member

Posts

Joined
Mon Apr 18, 2011 2:15 am

Post by impairedspook » Fri Apr 01, 2016 10:13 am

Hi TLone,

You should be able to edit the number of products displayed in "Featured" and "Latest" by editing the module in admin...

1- Log into admin
2 - Go to Extensions > Modules and look for Featured > Home page and click edit
3 - Under the "Products" section make sure you have selected 8 products
4 - Under "Limit" section, make sure this is set to 8

Go back to your home page and press SHIFT+F5 to refresh and hopefully this should now display 8 products the same as your "Latest" module.

If you have VQMod installed, I have attached an XML file. Log into your file manager (Cpanel) and upload remove_product_description_category.xml to the vqmod/xml folder. (This will remove the product description on the category pages and also from "Featured" and "Latest" modules - I noticed at present it displays ".." or "T.." etc.. this will remove that so it looks cleaner. Your price will then be displayed directly underneath product title)

Now to decrease the box size to suit...

1- Log into file manager (Cpanel)
2 - Go to... catalog/view/theme/default/stylesheet/stylesheet.css (If you have custom theme, you will need to edit the stylesheet.css for your theme rather than default)
3 - Edit stylesheet.css and find the lines... (Handy tip while editing stylesheet.css Press CTRL+F and paste in .product-thumb .caption { it should be the first line highlighted that you need to change)

}
.product-thumb .caption {
padding: 0 20px;
min-height: 180px;
}

change to...

}
.product-thumb .caption {
padding: 0 20px;
min-height: 0 !important;
}

4 - Once you have changed above in stylesheet.css make sure to save and go back to your home page and press SHIFT+F5 again to refresh.

Hopefully all going well your "Featured" module will be displaying 8 products similar to your "Latest" module. The product description on category pages and modules should be hidden and the product box should display correctly with no big white gaps.

Hope this helps :)

Attachments


Active Member

Posts

Joined
Sat Apr 26, 2014 4:44 am

Post by TLone » Fri Apr 01, 2016 11:52 pm

Thanks so much impaired, this is immensely helpful information.

So, i forgot to mention, I can get Featured to show 8 products, like Latest, but instead of two lines of 4 across it shows up as 3,3,2. That's really my problem I can't figure out why it displays like that.

I'm going to implement the rest of your suggestions once I can get this figured out.

New member

Posts

Joined
Mon Apr 18, 2011 2:15 am

Post by impairedspook » Sat Apr 02, 2016 11:18 am

Hi TLone,

Do you have VQmod installed? Would be a lot easier to make changes with an .XML file. However the file you want to check is...

catalog/view/theme/default/template/module/featured.tpl (If you have a custom theme change "Default" to your theme name)

about 4 lines down you should see..

<div class="product-layout col-lg-3 col-md-3 col-sm-6 col-xs-12">

My homepage featured module displays 8 products 4 across 2 lines, similar to your latest module. Your code above may be slightly different considering mine displays how you would like. The main thing I found was changing "3" to another number seemed to change the layout. If yours is different to above then change to suit mine and hopefully you should be right

If not, then check your latest module and check if there is a difference between the code in the 2 files.

catalog/view/theme/default/template/module/latest.tpl

Hopefully this should sort it for you. Remember if you do edit core files you will need to log into your admin and go to Extensions > Modifications and click refresh in top right corner to see any changes on your site (Also SHIFT+F5 on your page) just to refresh.

If you do have VQMod installed and would rather upload a .XML file let me know and I can upload one for you.

Also little change with my earlier post...

To resize product box size..

Before...

}
.product-thumb .caption {
padding: 0 20px;
min-height: 180px;
}

change to...

}
.product-thumb .caption {
padding: 0 20px;
min-height: 80px;
}

Had tried the earlier code on my site but seemed to mess up my category pages a little with product placements however have tried the new code above and it's much better. Should turn out quite clean.

Good luck, hopefully all goes well. Let me know if you get stuck on anything :)

Cheers

Active Member

Posts

Joined
Sat Apr 26, 2014 4:44 am

Post by TLone » Sat Apr 02, 2016 12:10 pm

Weird, my featured file looks like it should.. I've set it to 8 and it's still going 3/3/2. check it out

Code: Select all

<h3><?php echo $heading_title; ?></h3>
<div class="row">
  <?php foreach ($products as $product) { ?>
  <div class="product-layout col-lg-3 col-md-3 col-sm-6 col-xs-12">
    <div class="product-thumb transition">
      <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" title="<?php echo $product['name']; ?>" class="img-responsive" /></a></div>
      <div class="caption">
        <h4><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></h4>
        <p><?php echo $product['description']; ?></p>
        <?php if ($product['rating']) { ?>
        <div class="rating">
          <?php for ($i = 1; $i <= 5; $i++) { ?>
          <?php if ($product['rating'] < $i) { ?>
          <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-2x"></i></span>
          <?php } else { ?>
          <span class="fa fa-stack"><i class="fa fa-star fa-stack-2x"></i><i class="fa fa-star-o fa-stack-2x"></i></span>
          <?php } ?>
          <?php } ?>
        </div>
        <?php } ?>
        <?php if ($product['price']) { ?>
        <p class="price">
          <?php if (!$product['special']) { ?>
          <?php echo $product['price']; ?>
          <?php } else { ?>
          <span class="price-new"><?php echo $product['special']; ?></span> <span class="price-old"><?php echo $product['price']; ?></span>
          <?php } ?>
          <?php if ($product['tax']) { ?>
          <span class="price-tax"><?php echo $text_tax; ?> <?php echo $product['tax']; ?></span>
          <?php } ?>
        </p>
        <?php } ?>
      </div>
      <div class="button-group">
        <button type="button" onclick="cart.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md"><?php echo $button_cart; ?></span></button>
        <button type="button" data-toggle="tooltip" title="<?php echo $button_wishlist; ?>" onclick="wishlist.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-heart"></i></button>
        <button type="button" data-toggle="tooltip" title="<?php echo $button_compare; ?>" onclick="compare.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-exchange"></i></button>
      </div>
    </div>
  </div>
  <?php } ?>
</div>

New member

Posts

Joined
Mon Apr 18, 2011 2:15 am

Post by impairedspook » Sat Apr 02, 2016 12:13 pm

Hmm... have you checked to see what your latest.tpl looks like?

Active Member

Posts

Joined
Sat Apr 26, 2014 4:44 am

Post by impairedspook » Sat Apr 02, 2016 12:41 pm

If you get to stuck with this, PM or email me your store admin and cpanel details and I will see if I can get this sorted for you.
email is impairedspook@gmail.com. Just thinking if I can log in and check out files and back end of website I might be able to spot whats wrong or different compared to my setup. :) (I have about 20 min spare to have a look now or in about an hour and half will be free again)

Cheers

Active Member

Posts

Joined
Sat Apr 26, 2014 4:44 am

Post by TLone » Sat Apr 02, 2016 11:01 pm

Thank you kindly for the offer. I may take you up on that. In the meantime, here is the latest.tpl

Code: Select all

<h3><?php echo $heading_title; ?></h3>
<div class="row">
  <?php foreach ($products as $product) { ?>
  <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
    <div class="product-thumb transition">
      <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" title="<?php echo $product['name']; ?>" class="img-responsive" /></a></div>
      <div class="caption">
        <h4><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></h4>
        <p><?php echo $product['description']; ?></p>
        <?php if ($product['rating']) { ?>
        <div class="rating">
          <?php for ($i = 1; $i <= 5; $i++) { ?>
          <?php if ($product['rating'] < $i) { ?>
          <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-2x"></i></span>
          <?php } else { ?>
          <span class="fa fa-stack"><i class="fa fa-star fa-stack-2x"></i><i class="fa fa-star-o fa-stack-2x"></i></span>
          <?php } ?>
          <?php } ?>
        </div>
        <?php } ?>
        <?php if ($product['price']) { ?>
        <p class="price">
          <?php if (!$product['special']) { ?>
          <?php echo $product['price']; ?>
          <?php } else { ?>
          <span class="price-new"><?php echo $product['special']; ?></span> <span class="price-old"><?php echo $product['price']; ?></span>
          <?php } ?>
          <?php if ($product['tax']) { ?>
          <span class="price-tax"><?php echo $text_tax; ?> <?php echo $product['tax']; ?></span>
          <?php } ?>
        </p>
        <?php } ?>
      </div>
      <div class="button-group">
        <button type="button" onclick="cart.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md"><?php echo $button_cart; ?></span></button>
        <button type="button" data-toggle="tooltip" title="<?php echo $button_wishlist; ?>" onclick="wishlist.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-heart"></i></button>
        <button type="button" data-toggle="tooltip" title="<?php echo $button_compare; ?>" onclick="compare.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-exchange"></i></button>
      </div>
    </div>
  </div>
  <?php } ?>
</div>

New member

Posts

Joined
Mon Apr 18, 2011 2:15 am

Post by impairedspook » Sun Apr 03, 2016 2:22 pm

Hi TLone,

Yeah from what I can tell your template files look how they should maybe be an issue somewhere else. Have you edited your stylesheet.css file at all? Maybe to adjust the width of the product boxes...

I know it screwed my layout up a little on my category pages from getting the size a little wrong in the stylesheet.

Just let me know if you want me to have a look for you :)

Cheers

Active Member

Posts

Joined
Sat Apr 26, 2014 4:44 am
Who is online

Users browsing this forum: No registered users and 8 guests