Unophone Posted June 30, 2013 Share Posted June 30, 2013 (edited) Hello there, Been working on this code for a while and cant seem to find the problem. When I update my site the featured products looks like this. When I "mouseover". And this is how it looks after mouseover, and this is how I want it to be all the time, also on mouseover. /themes/theme/css/modules/homefeatured/homefeatured.css #featured-products_block_center li { border-width: 1px 1px 2px 1px; border-style: solid ; border-color: #e5e5e5 #e5e5e5 #b22222 #e5e5e5; border-radius: 5px; margin: 0 10px 20px; width: 174px; padding: 2px; background-color: #fff; float: left; } #featured-products_block_center li.first_item { margin: 0 10px 0 0; } #featured-products_block_center li.last_item_of_line {margin-right:0;} #featured-products_block_center h5 { padding: 2px 0; color:#222; /*text-transform: uppercase;*/ text-align: center; font-weight: 500; border-bottom: 1px dotted #CCCCCC; margin: 0 10px; } #featured-products_block_center h5 a { overflow: hidden; height: 18px; } #featured-products_block_center .product_image { display:block; position:relative; overflow:hidden } #featured-products_block_center .lnk_more { display:inline; padding-right:10px; font-weight:bold; font-size:10px; color:#0088cc; background:url(img/arrow_right_1.png) no-repeat 100% 3px; display: none; } #featured-products_block_center .price_container { margin-top:10px; padding:0; } #featured-products_block_center .price { font-weight:bold; font-size: 16px; color: #990000; text-align: center; display: block; border-top: 1px dotted #CCCCCC; margin: -9px 10px 0; } Someone who can help me out? Edited July 1, 2013 by vekia (see edit history) Link to comment Share on other sites More sharing options...
SmartDataSoft Posted June 30, 2013 Share Posted June 30, 2013 If you share you site url i can help you to fix. and paste workable css. without site url it is quite difficult to solve. Link to comment Share on other sites More sharing options...
vekia Posted June 30, 2013 Share Posted June 30, 2013 well, you use non default template, we don't know how it looks like, how the css code looks like etc., so please follow smartdatasoft suggestions and share the url to your store Link to comment Share on other sites More sharing options...
Unophone Posted July 1, 2013 Author Share Posted July 1, 2013 http://www.unophone.dk Link to comment Share on other sites More sharing options...
vekia Posted July 1, 2013 Share Posted July 1, 2013 okay, go to the homefeatured.tpl file (this is module template file) you've got there div with product description: <div class="product_desc"></div> comment it or remove it - then it will work as you expect Link to comment Share on other sites More sharing options...
Unophone Posted July 1, 2013 Author Share Posted July 1, 2013 you mean in /public_html/themes/theme/modules/homefeatured? because I cant find the code in there? Link to comment Share on other sites More sharing options...
vekia Posted July 1, 2013 Share Posted July 1, 2013 that's right, in the: /public_html/themes/theme/modules/homefeatured you've got there div with product decription, search in this file for: class="product_desc" you will see it, if not - please paste the source of the .tpl file here Link to comment Share on other sites More sharing options...
Unophone Posted July 1, 2013 Author Share Posted July 1, 2013 (edited) I tried to remove the div, but it kinda just made it worse. Here is the code from homefeatured.tpl {* * 2007-2012 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/afl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <[email protected]> * @copyright 2007-2012 PrestaShop SA * @version Release: $Revision: 6594 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} <!-- MODULE Home Featured Products --> <div id="featured-products_block_center" class="block products_block clearfix"> <h4> {$lof_title = {l s='Featured products' mod='homefeatured'[spam-filter] <span class="lof_title">{$lof_title|mb_substr:0:8:utf8}</span>{$lof_title|mb_substr:8:1000:utf8} </h4> {if isset($products) AND $products} <div class="block_content"> {assign var='liHeight' value=250} {assign var='nbItemsPerLine' value=5} {assign var='nbLi' value=$products|@count} {math equation="nbLi/nbItemsPerLine" nbLi=$nbLi nbItemsPerLine=$nbItemsPerLine assign=nbLines} {math equation="nbLines*liHeight" nbLines=$nbLines|ceil liHeight=$liHeight assign=ulHeight} <ul> {foreach from=$products item=product name=homeFeaturedProducts} <li class="ajax_block_product {if $smarty.foreach.homeFeaturedProducts.first}first_item{elseif $smarty.foreach.homeFeaturedProducts.last}last_item{else}item{/if} {if $smarty.foreach.homeFeaturedProducts.iteration%$nbItemsPerLine == 0}last_item_of_line{elseif $smarty.foreach.homeFeaturedProducts.iteration%$nbItemsPerLine == 1} {/if} {if $smarty.foreach.homeFeaturedProducts.iteration > ($smarty.foreach.homeFeaturedProducts.total - ($smarty.foreach.homeFeaturedProducts.total % $nbItemsPerLine))}last_line{/if}"> <div class="product_block"> <a href="{$product.link}" title="{$product.name|escape:html:'UTF-8'}" class="product_image"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_leoshoe')}" height="{$homeSize.height}" width="{$homeSize.width}" alt="{$product.name|escape:html:'UTF-8'}" />{if isset($product.new) && $product.new == 1}<span class="new">{l s='New' mod='homefeatured'}</span>{/if}</a> <h5><a href="{$product.link}" title="{$product.name|truncate:50:'...'|escape:'htmlall':'UTF-8'}">{$product.name|truncate:35:'...'|escape:'htmlall':'UTF-8'}</a></h5> <div class="product_desc"><a href="{$product.link}" title="{l s='More' mod='homefeatured'}">{$product.description_short|strip_tags|truncate:65:'...'}</a> {if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND $product.minimal_quantity == 1 AND $product.customizable != 2 AND !$PS_CATALOG_MODE} {if ($product.quantity > 0 OR $product.allow_oosp)} <a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$link->getPageLink('cart.php')}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title="{l s='Add to cart' mod='homefeatured'}">{l s='Shop now' mod='homefeatured'}</a> {else} <span class="exclusive">{l s='Shop now' mod='homefeatured'}</span> {/if} </div> <div> <a class="lnk_more" href="{$product.link}" title="{l s='View' mod='homefeatured'}">{l s='View' mod='homefeatured'}</a> {if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}<p class="price_container"><span class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span></p>{else}<div style="height:21px;"></div>{/if} {else} <div style="height:23px;"></div> {/if} </div> </div> </li> {/foreach} </ul> </div> {else} <p>{l s='No featured products' mod='homefeatured'}</p> {/if} </div> <script type="text/javascript"> {literal} jQuery(document).ready(function(){ aa = $('.product_block').height(); bb = $('.product_block').width(); $('.product_block').hover(function(){ $(this).find('.product_desc').fadeIn(200).css('top',0).css('width',bb-20).css('height',aa-18); },function(){ $(this).find('.product_desc').fadeOut(); }); }); $('.last_item_of_line').next().addClass('first_item'); {/literal} </script> <!-- /MODULE Home Featured Products --> Edited July 1, 2013 by Unophone (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted July 1, 2013 Share Posted July 1, 2013 <div class="product_desc"><a href="{$product.link}" title="{l s='Więcej' mod='homefeatured'}">{$product.description_short|strip_tags|truncate:65:'...'}</a> {if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND $product.minimal_quantity == 1 AND $product.customizable != 2 AND !$PS_CATALOG_MODE} {if ($product.quantity > 0 OR $product.allow_oosp)} <a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$link->getPageLink('cart.php')}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title="{l s='Dodaj do koszyka' mod='homefeatured'}">{l s='Kup Teraz' mod='homefeatured'}</a> {else} <span class="exclusive">{l s='Kup Teraz' mod='homefeatured'}</span> {/if} </div> + {else} <div style="height:23px;"></div> {/if} remove code / comment code that i pasted above 1 Link to comment Share on other sites More sharing options...
Unophone Posted July 1, 2013 Author Share Posted July 1, 2013 Ah thank you very much, it worked :-) Link to comment Share on other sites More sharing options...
vekia Posted July 1, 2013 Share Posted July 1, 2013 you're welcome im going to mark this thread as [solved] if you've got any other questions related to homefeatured module issue that you've got before - feel free to continue discussion here. regards Link to comment Share on other sites More sharing options...
Recommended Posts