nQben Posted September 12, 2014 Share Posted September 12, 2014 (edited) Hey I kinda have a weird problem Not all product pictures are showing when you are looking at a category of products like this one http://coolbaby.dk/113_naturezoo-of-denmark?id_manufacturer=113&n=21 But when entering the single product it is showing the picture just fine, editing the CategoryController did not change a thing. Funny thing is, when adding a extra picture to the product where pictures weren't showing, it will begin showing pictures in category view, I can see in the modules/wdbanner/override/front/CategoryController.php where it apparently takes the product pictures from the current category, that it only takes the images with cover = 0, but changing it to 1 had no effect anyone knows why this is happening? since i have this task to fix it, but have no clue why this is happening in the first place Edited September 12, 2014 by nQben (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted September 12, 2014 Share Posted September 12, 2014 what ps version you use? Link to comment Share on other sites More sharing options...
PascalVG Posted September 13, 2014 Share Posted September 13, 2014 There are many strange things with the page, as for example the add to cart button is all the way to the right, outside the box it belongs to (out of sight), and so is the price. (You see a tiny ittle green bar bottom right, which belongs to the add to cart button) If you change the 'float', they become visible, athough still not as expected: ( Also, the URL seems pretty strange to me, as if two domains are concatenated: http://coolbaby.dk.pandiweb.dk/113_naturezoo-of-denmark?id_manufacturer=113&n=21 ) Do you have a link to the category page you described where the images start to show up AFTER adding a new image to a product? This may give some more idea what goed wrong. maybe also show us your themes/<your theme folder>/product-list.tpl file. This may give us a clue... pascal. Link to comment Share on other sites More sharing options...
nQben Posted September 14, 2014 Author Share Posted September 14, 2014 (edited) Hey Prestashop version is 1.6 A link to where a product with 2 pictures is showing in category, otherwise wouldn't: http://coolbaby.dk.pandiweb.dk/117-kjoler The product: hvidt 3 delt sommer sæt til piger has 2 of same pictures to just get it to show in the category EDIT: the extra pandiweb.dk domain is because its for test purposes, so i dont actually make the live site go down when trying to fix things, the live one is just without the last Product-list.tpl: <div class="productlist-box"> {if isset($products) && $products} {*define numbers of product per line in other page for desktop*} {if $page_name !='index' && $page_name !='product'} {assign var='nbItemsPerLine' value=3} {assign var='nbItemsPerLineTablet' value=2} {assign var='nbItemsPerLineMobile' value=3} {else} {assign var='nbItemsPerLine' value=4} {assign var='nbItemsPerLineTablet' value=3} {assign var='nbItemsPerLineMobile' value=2} {/if} {*define numbers of product per line in other page for tablet*} {assign var='nbLi' value=$products|@count} {math equation="nbLi/nbItemsPerLine" nbLi=$nbLi nbItemsPerLine=$nbItemsPerLine assign=nbLines} {math equation="nbLi/nbItemsPerLineTablet" nbLi=$nbLi nbItemsPerLineTablet=$nbItemsPerLineTablet assign=nbLinesTablet} <!-- Products list --> <ul{if isset($id) && $id} id="{$id}"{/if} class="product_list grid row{if isset($class) && $class} {$class}{/if}{if isset($active) && $active == 1} active{/if} style-01 {if $wd.style_cat_numpro!=''}col-{$wd.style_cat_numpro}{else}col-03{/if}"> {foreach from=$products item=product name=products} {math equation="(total%perLine)" total=$smarty.foreach.products.total perLine=$nbItemsPerLine assign=totModulo} {math equation="(total%perLineT)" total=$smarty.foreach.products.total perLineT=$nbItemsPerLineTablet assign=totModuloTablet} {math equation="(total%perLineT)" total=$smarty.foreach.products.total perLineT=$nbItemsPerLineMobile assign=totModuloMobile} {if $totModulo == 0}{assign var='totModulo' value=$nbItemsPerLine}{/if} {if $totModuloTablet == 0}{assign var='totModuloTablet' value=$nbItemsPerLineTablet}{/if} {if $totModuloMobile == 0}{assign var='totModuloMobile' value=$nbItemsPerLineMobile}{/if} <li class="ajax_block_product{if $page_name == 'index' || $page_name == 'product'} col-xs-12 col-sm-4 col-md-3{else} item{/if}{if $smarty.foreach.products.iteration%$nbItemsPerLine == 0} last-in-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLine == 1} first-in-line{/if}{if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModulo)} last-line{/if}{if $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 0} last-item-of-tablet-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 1} first-item-of-tablet-line{/if}{if $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 0} last-item-of-mobile-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 1} first-item-of-mobile-line{/if}{if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModuloMobile)} last-mobile-line{/if}"> <div class="product-container" itemscope itemtype="http://schema.org/Product"> <div class="left-block"> <a class="product-image product_img_link" href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="url"> {if $wd.style_disnew_badge=='yes'} {if isset($product.new) && $product.new == 1} <!--<span class="product-new {$wd.style_pbadge_style}">{l s='New'}</span>--> {/if} {/if} {if $wd.style_dissale_badge=='yes'} {if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE} <span class="product-sale {$wd.style_pbadge_style}">{l s='Sale!'}</span> {/if} {/if} {foreach from=$overimage key=key item=value} {if $key==$product.id_product && $value} <img class="replace-2x img-responsive" src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')|escape:'html':'UTF-8'}" alt="{if !empty($product.legend)}{$product.legend|escape:'html':'UTF-8'}{else}{$product.name|escape:'html':'UTF-8'}{/if}" title="{if !empty($product.legend)}{$product.legend|escape:'html':'UTF-8'}{else}{$product.name|escape:'html':'UTF-8'}{/if}" itemprop="image" /> {/if} {/foreach} </a> </div> <div class="productInfo"> <div class="productLeft"> <h5 itemprop="name" class="product-name"> {if isset($product.pack_quantity) && $product.pack_quantity}{$product.pack_quantity|intval|cat:' x '}{/if} <a href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="url" > {$product.name|truncate:45:'...'|escape:'html':'UTF-8'} </a> </h5> <div class="description">{$product.description_short|strip_tags:'UTF-8'|truncate:185:'...'}</div> <div class="attributes-container"> {foreach from=$combinations key=k item=comb} {if $product.id_product == $k} <div class="comb_title">{$k.group_name}Størrelse(r):</div> {foreach from=$comb item=attr} <div class="attribute">{$attr.attribute_name|strstr:'/':true}</div> {/foreach} {/if} {/foreach} </div> </div><!-- End productLeft --> <div class="productRight"> <div class="productPrice"> {if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction} <span class="old-price product-price"> {displayWtPrice p=$product.price_without_reduction} </span> {if $product.specific_prices.reduction_type == 'percentage'} <span class="price-percent-reduction">-{$product.specific_prices.reduction * 100}%</span> {/if} {/if} {if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))} <div itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="content_price price-box"> {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)} <div class="priceContainer"> <div class="currency">DKK</div> <div class="price">{if !$priceDisplay}{$product.price}{else}{$product.price_tax_exc}{/if}</div> </div> <meta itemprop="priceCurrency" content="{$priceDisplay}" /> {/if} </div> {/if} </div> <a class="ajax_add_to_cart_button btn-cart" href="{$link->getPageLink('cart',false, NULL, "add=1&id_product={$product.id_product|intval}&token={$static_token}", false)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Add to cart'}" data-id-product="{$product.id_product|intval}"> <span>{l s='Add to cart'}</span> </a> </div><!-- End productRight --> </div><!-- End productinfo --> </div><!-- .product-container> --> </li> {/foreach} </ul> {addJsDefL name=min_item}{l s='Please select at least one product' js=1}{/addJsDefL} {addJsDefL name=max_item}{l s='You cannot add more than %d product(s) to the product comparison' sprintf=$comparator_max_item js=1}{/addJsDefL} {addJsDef comparator_max_item=$comparator_max_item} {addJsDef comparedProductsIds=$compared_products} {/if} </div><!-- End productlist-box --> Edited September 14, 2014 by nQben (see edit history) Link to comment Share on other sites More sharing options...
nQben Posted September 16, 2014 Author Share Posted September 16, 2014 Does no one have a clue? Link to comment Share on other sites More sharing options...
PascalVG Posted September 21, 2014 Share Posted September 21, 2014 nQben, can it be that re-generating the images might work? It seems thst (some) images aren't available in all formates/sizes needed. When adding a new one, this one will be generated on the fly, so that one is available. Re-generating the images may do the trick. give it a try. Preferences->Images, scroll down and if you don't have loads of products, just generate all. if many products, mabe choose a sub selection and generate these and see if it helps. My 2 cents. pascal (N.B. the links to the pages you added in the original post are not working anymore, they are redirected to the http://coolbaby.dk/ main page ) Link to comment Share on other sites More sharing options...
ibuyebuy Posted September 21, 2014 Share Posted September 21, 2014 Hi I have kinda the same problem, Installed prestashop took two tries got it working. But during my second try I changed something during the in browser setup instead of ps_ for the table section I changed it to pq_ because it said table with prefix already existed change or drop table so I changed the prefix to pq_. Just wondering would that have caused problems with product pictures not showing up? Link to comment Share on other sites More sharing options...
PascalVG Posted September 28, 2014 Share Posted September 28, 2014 ibuy, that shouldn't cause problems like this. Images not showing up mostly is mostly caused by changing to 'friendly url', memory shortage, so that the images aren't created fully etc. Can you share a URL to your site, so we can have a look? Also, try re-generating the images like I suggested in post #6. What PS version did you install? pascal Link to comment Share on other sites More sharing options...
Recommended Posts