Jump to content

Images on sub-category


Recommended Posts

Hi,

PS 1.4.8.2

I created sub-categories but despite having put its image for each sub-category these images are not displayed, I see only he title of the product but not the image.

I assume that there is to work on admin panel -> Preferences -> Image

Here I am 8 configurations with the relative size in px

Small

Medium

Large

thick box

Category

Home

Large_scene

Thumb_scene

 

Do you think there is to add sub​​-category and their size?

If yes what size?

 

thanks for your help


Link to comment
Share on other sites

Good Morning

 

It might sound like a silly question but, you have added images to your sub-categories

 

see images below

 

As i cannot see a link/url when I inspect them

 

 

<img src="http://yourtheme/img/p/2/8/28-home_default.jpg" alt="" width="124" height="124">

 

Paul

post-321361-0-27062100-1380393969_thumb.png

post-321361-0-25793300-1380393981_thumb.png

post-321361-0-19145100-1380393993_thumb.png

Edited by Paulito (see edit history)
Link to comment
Share on other sites

Good Morning

 

It might sound like a silly question but, you have added images to your sub-categories

 

see images below

 

As i cannot see a link/url when I inspect them

 

 

<img src="http://yourtheme/img/p/2/8/28-home_default.jpg" alt="" width="124" height="124">

 

Paul

For Paulito: of course I added the image

test.jpg

 

124x124 px

 

For Vekia: I think you say the file blockcategories.tpl

the file here
 
 
<!-- Block categories module -->

<div id="categories_block_left" class="block">

<h4>{l s='Categories' mod='blockcategories'}</h4>

<div class="block_content">

  <ul class="tree {if $isDhtml}dhtml{/if}">

  {foreach from=$blockCategTree.children item=child name=blockCategTree}

   {if $smarty.foreach.blockCategTree.last}

    {include file="$branche_tpl_path" node=$child last='true'}

   {else}

    {include file="$branche_tpl_path" node=$child}

   {/if}

  {/foreach}

  </ul>

  {* Javascript moved here to fix bug #PSCFI-151 *}

  <script type="text/javascript">

  // <![CDATA[

   // we hide the tree only if JavaScript is activated

   $('div#categories_block_left ul.dhtml').hide();

  // ]]>

  </script>

</div>

</div>

<!-- /Block categories module -->

 

 

Link to comment
Share on other sites

  • 2 months later...

Hi Vekia,

 

Need your urgent help and sorry that I am not able to create a new topic as my account does not allow to post new topics :(

I want to add a file field. I want to upload an image for a CMS page and / or CMS page under a created CMS Category page in the admin panel. The image as added will be unique to that page content itself. I could have added that image through fck editor but that will be a part of {$cms->content}.

 
I need to create a field in ps_cms_lang as banner_image so that I can display that image on front end at a specific location at the top position or show it at any position by calling {$cms->banner_image}.

 
Can you pls help me in this regard. Thanks in advance. Others are also welcome to shre their thoughts in this regard.

Link to comment
Share on other sites

it's to complicated. why not to use just tinymce editor? to paste own image url (you can upload it there!) then youcan use descriptions in img feature in rich text editor.

 

will work the same as you want, no core changes, why not?

 

Many Thanks vekia for your quick reply. But still I am a bit confused :(

 

I am in the CMS area wherein I call the tinymce editor as fck editor (earlier version :P). But could not make out that if i add it there then it will be a part of the content and I cannot take out the image out of that.

 

Can you please be kind to elaborate your point .

 

Many Thanks for your help again.

Link to comment
Share on other sites

take a look

OETAU8P.png

 

 

1) click on image icon

2) click on "browse" icon

3) upload own photos there like i show below:

 

ZE2aKA5.png

1) click on upload (upload file after that you will see it on list)

2) select image on list

3) press "select" button - image will appear as a part of content

 

OgYfuOC.png

 

 

as you can see above, you can define there image description, title and a lot of other settings.

 

click on insert button and voila ;) do the same for other languages

  • Like 1
Link to comment
Share on other sites

Thanks again vekia for such a detailed description .... i really appreciate it.

 

However, as what you have done, at the last stage, we need to click on the "Insert" button. And doing so will insert it in the content page. I have attached an image below on what exactly needs to be done. Please let me know your view on this. Thanks again

 

post-341913-0-09831800-1387290883_thumb.jpg

Link to comment
Share on other sites

i think that i don't understand well :P

 

you want to dispaly banner on top ? different for each cms page?

 

Yes exactly :)

 

Thats why I wanted to add an extra field in the CMS admin page. When client is adding one CMS page, he uploads a relevant image for that page. And that will be displayed in the front end.

Link to comment
Share on other sites

it's not only related to modification of controler, in this case you will have to modify also template files to display these banners.

in my opinion it's better to not touch controllers, especially when it's possible to achieve it with simple .tpl file modifications (header.tpl) - it's much easier, definitely.

 

how many cms pages you want to create?

Link to comment
Share on other sites

it's not only related to modification of controler, in this case you will have to modify also template files to display these banners.

in my opinion it's better to not touch controllers, especially when it's possible to achieve it with simple .tpl file modifications (header.tpl) - it's much easier, definitely.

 

how many cms pages you want to create?

 

I agree vekia that the process would involve changing in controller files but I got no alternative as the number of cms pages to be added is unknown. Hence to make it dynamic, an addition of that field (upload image field for each cms page) is required. I have already changed some of the sections in cms.tpl file as per the design but that is not a problem at all.

 

Required is how to make and get individual banner image and place it at the <div> on top of the cms page front end??

 

Kindly advise

Link to comment
Share on other sites

Also vekia,

 

What I was also trying to do was to upload an image from the "Catelog"-> "Image Mapping" and placing it in CMS created text field (not an Upload file button here now).

 

Elaboration on above point :-

 

I wanted to add a readonly text field in the "Catelog"-> "Image Mapping" add image section. This text field will show where exactly the image on server is located. The path would be shown as "http://localhost/mydomain/img/scenes/11.jpg". The user will then copy that location and paset it in the CMS page in the admin panel.

 

For pasting the image path, I need to create a simple text field in the CMS controller file where it will only store image path. Thereby I get the path in one extra field in my database table "ps_cms_lang" under the column name 'banner_image'.

 

Then at last I will call that field in cms.tpl file by simply calling the field through {$cms->banner_image} in the <img src=""> field.

 

Thats the alternative I was trying to do but as always, I got stuck in the very first point in displaying the image path in the "Catelog"-> "Image Mapping" :(

 

Dont know if this alternative would work or not. What would you suggest vekia ???

 

Also as per your statement, what did you meant by constant cms page and making change in the header.tpl file ??

 

I am totally at loss  :wacko: and need your advise on this .

Link to comment
Share on other sites

 

Hi Stotty,

 

In case if you referred me that link wherein a "bump" is mentioned then I believe that you must have read at the initiation point of my question on 17 December 2013 that my account does not allow me to create a new topic and becoz this thread was somewhat similar to my requirement hence I posted on this thread and not on some other thread (if I had that motive).

 

If possible then do let me know how to create a new topic and I will start from there.

 

Thanks again for your thread and please understand I respect this community and its members :)

Link to comment
Share on other sites

i don't know what you exactly expect now.

if you want to simply add banners you can do it in header.tpl file

right below the hook_top add if condition:

{if $smarty.get.controller=="cms"}
{if $smarty.get.id_cms==4}
<img src="http://to,your.image">
{elseif $smarty.get.id_cms==19}
<img src="http://to,your.image">
{/if}
{/if}
  • Like 1
Link to comment
Share on other sites

Hi Stotty,

 

In case if you referred me that link wherein a "bump" is mentioned then I believe that you must have read at the initiation point of my question on 17 December 2013 that my account does not allow me to create a new topic and becoz this thread was somewhat similar to my requirement hence I posted on this thread and not on some other thread (if I had that motive).

 

If possible then do let me know how to create a new topic and I will start from there.

 

Thanks again for your thread and please understand I respect this community and its members :)

 

Yes, it was to highlight the bumping.

The fact that the bumping is on a thread that you didn't start is irrelevant.

Fortunately, vekia is a kindly soul :)  and is now trying to help.

Link to comment
Share on other sites

 

i don't know what you exactly expect now.

if you want to simply add banners you can do it in header.tpl file

right below the hook_top add if condition:

{if $smarty.get.controller=="cms"}
{if $smarty.get.id_cms==4}
<img src="http://to,your.image">
{elseif $smarty.get.id_cms==19}
<img src="http://to,your.image">
{/if}
{/if}

 

Thanks vekia,

 

I think I have to try try that in that way instead.

 

However, Just wanted to know that if user wants to change an image for a certain page then it would not be possible as I will be pulling the image statically.

 

Any ideas on how to make that dynamic. That is if user change that image then under the cms id page, the changed image gets called ??

 

Thanks again.

Link to comment
Share on other sites

Hi vekia,

 

I followed your steps and somewhat this task has been done. I have made the number of CMS pages as per my knowledge. Then I added images from the Image Mapping section under the catalog.

 

Took the id of the image and showed it on the header part :)

 

Problem still remains that in future if the user added or create a new cms page and adds its relevant image in the image mapping area then the cms page would be shown in the front end but the image will not be shown as I didn't called it :(

 

What do you suggest on this vekia ??

Link to comment
Share on other sites

×
×
  • Create New...