Datafeedr Support Forums

Datafeedr Support Forums (/index.php)
-   Questions (/forumdisplay.php?f=67)
-   -   Product Rows Breaking Due to Product Name (/showthread.php?t=6791)

bkozlowski April 20th, 2012 08:03 AM

Product Rows Breaking Due to Product Name
 
I'm having trouble with my product views and was hoping there was a way to get each row to clear so my products don't get all jumbled up due to short (1 Line) product names? I attached a screen shot just in case I'm not explaining this correctly.

Thanks,

Brent

Store ID: 36371
Website URL: http://uniquegiftideasblog.com
URL to page in question: http://uniquegiftideasblog.com/store...rsary-gifts/2/



Eric April 20th, 2012 08:53 AM

Hi

This issue is related to this post: /show...0166#post20166

To solve the issue, go here: The Factory > Your Store > VIEWS > CATEGORY PAGE > Default > Product List module > Template

Replace this code:
HTML Code:

    <a href="[product.url]" title="[product.name]" target="blank" style="font-family:Tahoma, Geneva, sans-serif; font-size:12px; font-weight:bold; color:#555; text-decoration:none" onMouseOver="this.style.color='#AC0B7D'" onMouseOut="this.style.color='#555'"><?php echo substr($product->name, 0, 44); ?></a>
With this:
HTML Code:

<div class="pname"><a href="[product.url]" title="[product.name]" target="blank" style="font-family:Tahoma, Geneva, sans-serif; font-size:12px; font-weight:bold; color:#555; text-decoration:none" onMouseOver="this.style.color='#AC0B7D'" onMouseOut="this.style.color='#555'"><?php echo substr($product->name, 0, 44); ?></a></div>
Also, add the following code to your Custom CSS here: The Factory > Your Store > Store menu > Custom CSS:

Code:

.pname {
        line-height: 1.2em;
        height: 2.4em;
        overflow: hidden;
}

That will fix the issue.

Eric

bkozlowski April 22nd, 2012 08:25 AM

Hi Eric,

Thanks for the quick response. That didn't work out to well lol. It caused my images to disappear and also put all the products in one column.

I'm thinking that since I deprecated the names of the products to 2 lines it has the effect of setting a max height for the product container. Now we just have to set a min. height in case the product name only fills 1 line?

Any suggestions?

bkozlowski April 22nd, 2012 08:27 AM


Eric April 22nd, 2012 08:32 AM

Hi
Quote:

Originally Posted by bkozlowski (Post 31213)
Thanks for the quick response. That didn't work out to well lol. It caused my images to disappear and also put all the products in one column.

You put the <div class="pname">...</div> tags around too much content. You put it around the <div> tags for the thumbnail and the price. It should only be around the <a> tag which contains the product name.

Eric

bkozlowski April 22nd, 2012 08:51 AM

Yeah, I'm a tard lol. I accidently removed the [image] when I added your code. I got it fixed and it looks great!

Thanks again for the awesome support,

Brent


All times are GMT -5. The time now is 01:15 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.