adrianjfishy Posted August 24, 2010 Share Posted August 24, 2010 Hi,Not sure if this is possible, in the Front Office is it possible to display the products like in the Featured page without the descriptions. Basically I would like to show the image and if they click the "View" button the further details such as the description can be shown. Let me know where I can configure this Link to comment Share on other sites More sharing options...
rocky Posted August 24, 2010 Share Posted August 24, 2010 To remove the featured product descriptions, change line 15 of modules/homefeatured/homefeatured.tpl (in PrestaShop v1.3.1) from: {$product.description_short|strip_tags|truncate:130:'...'} to: {* {$product.description_short|strip_tags|truncate:130:'...'}*} and reduce the liHeight value on line 6 of modules/homefeatured/homefeatured.tpl until there is no more grey at the bottom of the featured products block: {assign var='liHeight' value=342} Link to comment Share on other sites More sharing options...
adrianjfishy Posted August 24, 2010 Author Share Posted August 24, 2010 HiThanks. Maybe I was not too clear, I want products page to look like the Featured page minus the descriptions. This is because there are too many products there for a single category. Link to comment Share on other sites More sharing options...
rocky Posted August 24, 2010 Share Posted August 24, 2010 Make a backup of your product-list.tpl, then replace the contents of the file with the following: {if isset($products) AND $products} {assign var='liHeight' value=342} {assign var='nbItemsPerLine' value=4} {assign var='nbLi' value=$products|@count} {assign var='nbLines' value=$nbLi/$nbItemsPerLine|ceil} {assign var='ulHeight' value=$nbLines*$liHeight} {foreach from=$products item=product name=homeFeaturedProducts} <a href="{$product.link}" title="{$product.name|truncate:32:'...'|escape:'htmlall':'UTF-8'}">{$product.name|truncate:27:'...'|escape:'htmlall':'UTF-8'} {$product.description_short|strip_tags|truncate:130:'...'} <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="128" width="128" alt="{$product.name|escape:html:'UTF-8'}" /> {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if} <a class="button" href="{$product.link}" title="{l s='View' mod='homefeatured'}">{l s='View' mod='homefeatured'} {if ($product.quantity > 0 OR $product.allow_oosp) AND $product.customizable != 2} <a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_{$product.id_product}" href="{$base_dir}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'} {else} {l s='Add to cart' mod='homefeatured'} {/if} {/foreach} {/if} Link to comment Share on other sites More sharing options...
adrianjfishy Posted August 31, 2010 Author Share Posted August 31, 2010 Hi,Thanks I have many products but would like to display a limited number and have the view use the next button like it currently in the products page. Will this code do that? Link to comment Share on other sites More sharing options...
rocky Posted September 1, 2010 Share Posted September 1, 2010 Yes, it should. The pagination code in category.tpl should be the same. Link to comment Share on other sites More sharing options...
adrianjfishy Posted September 1, 2010 Author Share Posted September 1, 2010 Thanks, will try and let you know Link to comment Share on other sites More sharing options...
adrianjfishy Posted September 1, 2010 Author Share Posted September 1, 2010 Hi,I tied that code is does not show like the featured page and also the pagination does not work.Any ideas? Link to comment Share on other sites More sharing options...
rocky Posted September 2, 2010 Share Posted September 2, 2010 I've updated my code above. This time I've tested the code on my test site and it seems to be working fine. Pagination works too. Link to comment Share on other sites More sharing options...
adrianjfishy Posted September 2, 2010 Author Share Posted September 2, 2010 Hi,Thanks it works now but something new. Is there some place to limit the number being shown. Also I do not want the descriptions too, so that will save space. The description can come in the "View" linkNotice in the image the top part is not aligning correctly and the bottom part the pagination does not align at the bottom of all images Link to comment Share on other sites More sharing options...
rocky Posted September 3, 2010 Share Posted September 3, 2010 To change the number of products per page, go to Preferences > Products and change the "Products per page" field, then click Save at the bottom.To remove the description, change line 12 from: <a href="{$product.link}" title="{l s='More' mod='homefeatured'}">{$product.description_short|strip_tags|truncate:130:'...'} to: {* <a href="{$product.link}" title="{l s='More' mod='homefeatured'}">{$product.description_short|strip_tags|truncate:130:'...'}*} and reduce the height on line 3 until the background lines up at the bottom: {assign var='liHeight' value=342} To fix the alignment at the top, change line 2 from: to: To fix the pagination alignment, you will need to change line 16 of pagination.tpl (in PrestaShop v1.3.1) from: to: Link to comment Share on other sites More sharing options...
adrianjfishy Posted September 4, 2010 Author Share Posted September 4, 2010 HiThanks a ton. It work. Something else new not related to the changes you asked me to make.1. After I click check out and and give the login details. Click next at the address section I get logged out see the screenshot and the cart gets empty. This does not happen all the time.2. I would like to move the search towards the right instead of where it is now.I tried to look at the code in header.tpl but i get {$HOOK_TOP} where do I find that to look at how it is done to change the code?Thanks Link to comment Share on other sites More sharing options...
rocky Posted September 4, 2010 Share Posted September 4, 2010 Please create a separate topic for unrelated questions. Give it a descriptive title and only ask one question per topic. 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