Jump to content
rfalkner

Broken images on subcatagories

Recommended Posts

Hello,

 

Im currently editing a site for a friend, but i am having troubles atm.

 

I can't edit the subcatagory images in the site. At the moment it's just showing as "broken images". I have tryed to inspect the elements with chrome, and it cant find the pictures he once uploadet. Ive tryed to log on FTP to manually insert the pictures, but i cant find the folder they are supposed to be in.

 

What i am talking about can be found here: http://strobisten.dk/5-adaptere

 

Hope you can help me sort this issure.

 

Best regards

Share this post


Link to post
Share on other sites

open the category.tpl of your theme

and check it the subcategory image codes are like this

 

 

 

{if $subcategory.id_image}

<img src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium')}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" />

{else}

<img src="{$img_cat_dir}default-medium.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" />

{/if}

Share this post


Link to post
Share on other sites

The code looks like this:

 

 

if $subcategory.id_image}

<img src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'subcategory')}" alt="" width="{$subcategory.width}" height="{$subcategory.height}" />

{else}

<img src="{$img_cat_dir}default-medium.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" />

{/if}

 

Seems pretty similar.

 

My questrion is, where do i replace the "broken images" with some new ones?

 

Best regards

Share this post


Link to post
Share on other sites

problem is in the first line, your code callind a image format called subcategory that seems dont have in your sintallation, change 'subcategory' to 'medium'

Share this post


Link to post
Share on other sites

So i have tried with following:

 

 

{if $medium.id_image}

<img src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'subcategory')}" alt="" width="{$subcategory.width}" height="{$subcategory.height}" />

{else}

<img src="{$img_cat_dir}default-medium.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" />

{/if}

 

and

 

 

{if $medium.id_image}

<img src="{$link->getCatImageLink($medium.link_rewrite, $medium.id_image, 'subcategory')}" alt="" width="{$medium.width}" height="{$medium.height}" />

{else}

<img src="{$img_cat_dir}default-medium.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" />

{/if}

 

nothing seems to change.

 

Am i doing this wrong or could there be something else wrong?

Share this post


Link to post
Share on other sites

nop, this is the code

 

{if $subcategory.id_image}

<img src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium')}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" />

{else}

<img src="{$img_cat_dir}default-medium.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" />

{/if}

Share this post


Link to post
Share on other sites

nop, go to the category and insert the images in the category, not manually. or send me a pm woth your site admin access and i solve

Share this post


Link to post
Share on other sites

replace the category.tpl of your theme for the category,tpl of the default prestashop theme

Share this post


Link to post
Share on other sites

Not working. I can edit the catagoty file in my template and even delete it, without any changes on the site!

 

Can somebody solve this for me?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More