ananda-parfums Posted September 4, 2014 Share Posted September 4, 2014 (edited) I have this problem with my homefeatured module. I use the theme parfume_store, and for some reason it only shows the picture of the product without any title, price or button to add in cart. Ive tried to use the code of the default theme but that looked like a hot mess. I just can't make it look good. I would want for the products to be shown with title,price and add to cart button. Also i would like for the module to show random products. It is set to show 12 products but i have like 30 products in the home category. Is it possible for it to make a random selection every time the page refreshes. So each of the 30 products could pop up? This is the code of my homefeatured.tpl file. I really hope somebody could help me this! {* * 2007-2010 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 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/osl-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-2010 Prestashop SA * @version Release: $Revision: 1.4 $ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * International Registred Trademark & Property of PrestaShop SA *} {literal} <script> $(document).ready(function() { $('.hft img').each(function() { $(this).hover(function() { $(this).stop().animate({ opacity: 0.6 }, 800); $('.hft').addClass("no_bg"); }, function() { $(this).stop().animate({ opacity: 1.0 }, 800); }); }); }); $(document).ready(function () { style = 'easeOutQuart'; $('.hft').hover( function() { $(this).children('div:last').stop(false,true).animate({bottom:0},{duration:800, easing: style}); }, function() { $(this).children('div:last').stop(false,true).animate({bottom:-150},{duration:800, easing: style}); } ); }); </script> {/literal} <!-- MODULE Home Featured Products --> <div id="featured-products_block_center" class="block products_block"> {if isset($products) AND $products} <div class="block_content"> {assign var='liHeight' value=220} {assign var='nbItemsPerLine' value=3} {assign var='nbLi' value=$products|@count} {assign var='nbLines' value=$nbLi/$nbItemsPerLine|ceil} {assign var='ulHeight' value=$nbLines*$liHeight} <ul style="height:{$ulHeight}px;margin-bottom:30px;"> {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 == 2}deuxcenter{/if} {if $smarty.foreach.homeFeaturedProducts.iteration%$nbItemsPerLine == 0}last_item_of_line{elseif $smarty.foreach.homeFeaturedProducts.iteration%$nbItemsPerLine == 1}clear{/if} {if $smarty.foreach.homeFeaturedProducts.iteration > ($smarty.foreach.homeFeaturedProducts.total - ($smarty.foreach.homeFeaturedProducts.total % $nbItemsPerLine))}last_line{/if}"> <div class="r_cont"> <div class="r_top"></div> <div class="clear"></div> <div class="hft"> <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')}" height="220" width="220" alt="{$product.name|escape:html:'UTF-8'}" /></a> <div class="caption"> <span class="{if !$PS_CATALOG_MODE}title_container{else}title_container-c{/if}"><a href="{$product.link}" title="{$product.name|truncate:32:'...'|escape:'htmlall':'UTF-8'}">{$product.name|truncate:27:'...'|escape:'htmlall':'UTF-8'}</a></span> {if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}<span class="price_container">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span>{else}<div style="height:{if !$PS_CATALOG_MODE}21{else}0{/if}px;"></div>{/if} <a class="{if !$PS_CATALOG_MODE}view_effect{else}view_effect-c{/if}" href="{$product.link}" title="{l s='View' mod='homefeatured'}">{l s='View' mod='homefeatured'}</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="cart_effect 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='Add to cart' mod='homefeatured'}</a> {else} <a class="cart_effect 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='Add to cart' mod='homefeatured'}</a> {/if} {else} <div style="height:23px;"></div> {/if} </div> </div> <div class="r_footer"></div> </div> </li> {/foreach} </ul> </div> {else} <p>{l s='No featured products' mod='homefeatured'}</p> {/if} </div> <!-- /MODULE Home Featured Products --> Edited September 16, 2014 by ananda-parfums (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted September 6, 2014 Share Posted September 6, 2014 please share URL to shop, it's necessary to compare contents from your website with tpl file you pasted above Link to comment Share on other sites More sharing options...
ananda-parfums Posted September 9, 2014 Author Share Posted September 9, 2014 please share URL to shop, it's necessary to compare contents from your website with tpl file you pasted above My shop is under construction at the moment. So not visable yet. Is it possible to give you the url to view my site without taking the website off 'under construction' ? Link to comment Share on other sites More sharing options...
vekia Posted September 9, 2014 Share Posted September 9, 2014 you can add my ip address to maintenance mode ip addresses: 159.205.78.17 Link to comment Share on other sites More sharing options...
ananda-parfums Posted September 9, 2014 Author Share Posted September 9, 2014 you can add my ip address to maintenance mode ip addresses: 159.205.78.17 Ok i added the ip adres, the url of the shop www.ananda-parfums.com Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now