ik6cgo Posted September 28, 2013 Share Posted September 28, 2013 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 www.elektros.it/shop Link to comment Share on other sites More sharing options...
Paulito Posted September 28, 2013 Share Posted September 28, 2013 (edited) 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 Edited September 28, 2013 by Paulito (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted September 28, 2013 Share Posted September 28, 2013 in addition to what Paulito said, can you show your category.tpl file please? Link to comment Share on other sites More sharing options...
ik6cgo Posted September 28, 2013 Author Share Posted September 28, 2013 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 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 More sharing options...
fierymech Posted December 17, 2013 Share Posted December 17, 2013 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 More sharing options...
vekia Posted December 17, 2013 Share Posted December 17, 2013 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? 1 Link to comment Share on other sites More sharing options...
fierymech Posted December 17, 2013 Share Posted December 17, 2013 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 ). 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 More sharing options...
vekia Posted December 17, 2013 Share Posted December 17, 2013 take a look 1) click on image icon 2) click on "browse" icon 3) upload own photos there like i show below: 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 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 1 Link to comment Share on other sites More sharing options...
fierymech Posted December 17, 2013 Share Posted December 17, 2013 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 Link to comment Share on other sites More sharing options...
fierymech Posted December 18, 2013 Share Posted December 18, 2013 Hi vekia, Eagerly waiting for your help and advise. Link to comment Share on other sites More sharing options...
fierymech Posted December 18, 2013 Share Posted December 18, 2013 Hello Prestashop forum people, Can anybody help me to solve this problem?? Link to comment Share on other sites More sharing options...
vekia Posted December 18, 2013 Share Posted December 18, 2013 i think that i don't understand well you want to dispaly banner on top ? different for each cms page? Link to comment Share on other sites More sharing options...
fierymech Posted December 18, 2013 Share Posted December 18, 2013 i think that i don't understand well 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 More sharing options...
fierymech Posted December 18, 2013 Share Posted December 18, 2013 Hi vekia, eagerly waiting for your response..... Link to comment Share on other sites More sharing options...
vekia Posted December 18, 2013 Share Posted December 18, 2013 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 More sharing options...
fierymech Posted December 18, 2013 Share Posted December 18, 2013 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 More sharing options...
fierymech Posted December 18, 2013 Share Posted December 18, 2013 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 and need your advise on this . Link to comment Share on other sites More sharing options...
fierymech Posted December 19, 2013 Share Posted December 19, 2013 Hi vekia , did you manage to figure out this issue ???? waiting for your advise Link to comment Share on other sites More sharing options...
fierymech Posted December 19, 2013 Share Posted December 19, 2013 Hi, Can anybody please help me with this??? Link to comment Share on other sites More sharing options...
stottycabanas Posted December 19, 2013 Share Posted December 19, 2013 http://www.prestashop.com/forums/topic/296070-information-instead-of-add-to-stock-button/?do=findComment&comment=1498747 Link to comment Share on other sites More sharing options...
fierymech Posted December 19, 2013 Share Posted December 19, 2013 Hi Stotty, Thanks for the link but I could not figure out how that thread link helps me with the problem I am facing Can you please elaborate? Thanks again Link to comment Share on other sites More sharing options...
fierymech Posted December 19, 2013 Share Posted December 19, 2013 http://www.prestashop.com/forums/topic/296070-information-instead-of-add-to-stock-button/?do=findComment&comment=1498747 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 More sharing options...
vekia Posted December 19, 2013 Share Posted December 19, 2013 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} 1 Link to comment Share on other sites More sharing options...
stottycabanas Posted December 19, 2013 Share Posted December 19, 2013 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 More sharing options...
fierymech Posted December 19, 2013 Share Posted December 19, 2013 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 More sharing options...
fierymech Posted December 19, 2013 Share Posted December 19, 2013 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 More sharing options...
Recommended Posts