Jump to content

Featured Products image size problem


Recommended Posts

added a new theme. it turned out like this.

here is the code in the global.css file in the theme/css/ directory.

/* Block featured products */
div#new-products_block {}
div#new-products_block h4 {width:537px;height:25px;padding:9px 0 0 15px;position:absolute;top:-34px;left:0;background:url(../img/block_center-column-header.png) 0 0 no-repeat;font:bold 0.75em "Arial";color:#fff;text-transform:uppercase;}
div#new-products_block h4 a {font:bold 1em "Arial";color:#fff;text-decoration:none;}
div#new-products_block h4 a:hover {text-decoration:underline;}
div#new-products_block div.block_content {width:552px;float:left;background:#fff;padding:0 0 7px 0;}
div#new-products_block div.block_content ul {margin:23px 0 0 23px;}
div#new-products_block div.block_content ul li {width:161px;height:277px;float:left;padding:0 11px 11px 0;}
div#new-products_block div.block_content ul li a {width:161px;height:277px;display:block;border:none;text-decoration:none;background:#ff0000;}
div#new-products_block div.block_content ul li a span {width:139px;height:37px;padding:8px 11px 0 11px;display:block;background:url(../img/block_special_product-desc.jpg) 0 0 no-repeat;font:normal 11px "Arial";color:#fff;margin:0;}

how can i make it look this the demo page but keeping the purple color.

http://www.prestashop.com/demo/

34597_zT1eDtTDBvQ51rVa6NTl_t

Link to comment
Share on other sites

ok i've changed the value of the height in global.css. it looks ok in term of size but the "view" and "add to cart" button are missing.

/* Block featured products */
div#new-products_block {}
div#new-products_block h4 {width:537px;height:25px;padding:9px 0 0 15px;position:absolute;top:-34px;left:0;background:url(../img/block_center-column-header.png) 0 0 no-repeat;font:bold 0.75em "Arial";color:#fff;text-transform:uppercase;}
div#new-products_block h4 a {font:bold 1em "Arial";color:#fff;text-decoration:none;}
div#new-products_block h4 a:hover {text-decoration:underline;}
div#new-products_block div.block_content {width:552px;float:left;background:#fff;padding:0 0 7px 0;}
div#new-products_block div.block_content ul {margin:23px 0 0 23px;}
div#new-products_block div.block_content ul li {width:161px;height:121px;float:left;padding:0 11px 11px 0;}
div#new-products_block div.block_content ul li a {width:161px;height:121px;display:block;border:none;text-decoration:none;background:#ff0000;}
div#new-products_block div.block_content ul li a span {width:139px;height:37px;padding:8px 11px 0 11px;display:block;background:url(../img/block_special_product-desc.jpg) 0 0 no-repeat;font:normal 11px "Arial";color:#fff;margin:0;}

34600_psXTYptPKGhyC5erIjMZ_t

Link to comment
Share on other sites

Huh well it looks like that the html is basically not there.
Have you uploaded a new homefeatured module?

Normally you should see a code that looks like that on homefeatured.tpl

{l s='View' mod='homefeatured'}
                       {if ($product.quantity > 0 OR $product.allow_oosp) AND $product.customizable != 2 AND $product.price > 0}
{l s='Add to cart' mod='homefeatured'}

Link to comment
Share on other sites

Ok so if you want to add the view and add to cart buttons to the new homefeatured module you have to add the code for it.

I would probably take the original module as an example and copy/paste the relevant code for these buttons in the new module.

Hopefully that should work!

Link to comment
Share on other sites

i tried copy and paste the code of the original homefeatured.tpl and the new theme homefeatured.tpl. didnt really work


<!-- MODULE Home Featured Products -->


{l s='Featured products' mod='homefeatured'}


{if isset($products) AND $products}

{assign var='liHeight' value=123}
{assign var='nbItemsPerLine' value=4}
{assign var='nbLi' value=$products|@count}
{assign var='nbLines' value=$nbLi/$nbItemsPerLine|ceil}
{assign var='ulHeight' value=$nbLines*$liHeight}


{else}

{l s='No featured products' mod='homefeatured'}


{/if}

<!-- /MODULE Home Featured Products -->

and these

<!-- MODULE Home Featured Products -->

{l s='featured products' mod='homefeatured'}


{if isset($products) AND $products}



{else}

{l s='No featured products' mod='homefeatured'}


{/if}

<!-- /MODULE Home Featured Products -->
Link to comment
Share on other sites

Maybe try to copy and paste only the code for the buttons. It should look something like that:

{l s='View' mod='homefeatured'}
{if ($product.quantity > 0 OR $product.allow_oosp) AND $product.customizable != 2}
{l s='Add to cart' mod='homefeatured'}
{else}
{l s='Add to cart' mod='homefeatured'}
{/if}

Link to comment
Share on other sites

×
×
  • Create New...