touchdez Posted June 9, 2013 Share Posted June 9, 2013 (edited) How would I go about creating a page that has downloadable freebies on it? I just want a picture of the design and when you click on it, you can download the freebie. Is it possible? This is my website: TouchDezines Thanks in advance. Edited June 14, 2013 by touchdez (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted June 9, 2013 Share Posted June 9, 2013 hmmm you can create CMS page with urls to files you uploaded via FTP 1 Link to comment Share on other sites More sharing options...
touchdez Posted June 10, 2013 Author Share Posted June 10, 2013 (edited) Ok, will do that, vekia. How would I be able to display the pictures? Thanks for helping me so far! vekia, in which folder should the uploaded files go - the downloads folder, perhaps? Edited June 13, 2013 by Benjamin Utterback (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted June 10, 2013 Share Posted June 10, 2013 you can upload files anywhere you want, for example - you can create new directory and then upload files there. Everything depends on you in tinymce (wysiwyg) editor you can easily add own pictures. Editor looks like text processor like word / libreoffice. it's easy in use. 1 Link to comment Share on other sites More sharing options...
touchdez Posted June 10, 2013 Author Share Posted June 10, 2013 Thanks, vekia! I am going to try it now - will come back here and report! Link to comment Share on other sites More sharing options...
vekia Posted June 10, 2013 Share Posted June 10, 2013 im waiting for your reply, feel free to ask if you've got any other questions related to this case regards Link to comment Share on other sites More sharing options...
touchdez Posted June 10, 2013 Author Share Posted June 10, 2013 vekia, how do I install tinymce on prestashop? I apologize if it is a stupid question, but I can't get it right. Link to comment Share on other sites More sharing options...
vekia Posted June 10, 2013 Share Posted June 10, 2013 when you go to the preferences > CMS you can create new page there, just click on add new page button, you've got there editor: as you can see, there is many options to customize content (own pictures also) Link to comment Share on other sites More sharing options...
touchdez Posted June 10, 2013 Author Share Posted June 10, 2013 That far I got, but would like the tables enabled. I don't know how to get that part of tinymce to show... Link to comment Share on other sites More sharing options...
vekia Posted June 10, 2013 Share Posted June 10, 2013 if you use HTML view, you can put there own code, maybe try there to add own table ? Link to comment Share on other sites More sharing options...
touchdez Posted June 10, 2013 Author Share Posted June 10, 2013 I will try that, vekia, as soon as I can get back into my shop. I am testing another installation on a localhost, logged out and now cannot get back in - forgot my password and don't know where to start looking. Hopefully I will be able to access my back office soon. Link to comment Share on other sites More sharing options...
benjamin utterback Posted June 10, 2013 Share Posted June 10, 2013 vekia has a solution for that! Check out this page. I think this should work on a localhost as well. Link to comment Share on other sites More sharing options...
touchdez Posted June 10, 2013 Author Share Posted June 10, 2013 Benjamin, do you want me to put a handle on the back office door, otherwise I don't understand the link ? Link to comment Share on other sites More sharing options...
benjamin utterback Posted June 10, 2013 Share Posted June 10, 2013 Hey, sorry! oops, I updated the link! 1 Link to comment Share on other sites More sharing options...
touchdez Posted June 10, 2013 Author Share Posted June 10, 2013 (edited) I thought it funny - getting a handle hahaha! Thanks for the link, Benjamin! Benjamin, you are a super star - thank you! vekia, thanks so much for that tutorial - you, too, are a super star! I am back in the BO and will now try again... I have looked at this tutorial from Nemo, but cannot find the javascript he is talking about. This is the only reference in the form.tpl to tinymce - line 391: [size=4]{if isset($tinymce) && $tinymce}[/size] <script type="text/javascript"> var iso = '{$iso}'; var pathCSS = '{$smarty.const._THEME_CSS_DIR_}'; var ad = '{$ad}'; $(document).ready(function(){ {block name="autoload_tinyMCE"} tinySetup({ editor_selector :"autoload_rte" }); {/block} }); </script> {/if} Edited June 13, 2013 by Benjamin Utterback (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted June 10, 2013 Share Posted June 10, 2013 have you tried with HTML editor? what ps version you use? ps you want to enable all features in tinymce because you want ability to add to the tinymce toolbar "table creator" am I right? Link to comment Share on other sites More sharing options...
touchdez Posted June 10, 2013 Author Share Posted June 10, 2013 I am using 1.5.4 and have tried the HTML editor. Yes, you are right, vekia, I want to enable all the features of tinymce. Link to comment Share on other sites More sharing options...
vekia Posted June 10, 2013 Share Posted June 10, 2013 there is: tinySetup({ editor_selector :"autoload_rte" }); use this: tinySetup({ editor_selector :"autoload_rte" theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,fontselect,fontsizeselect", theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,codemagic,|,insertdate,inserttime,preview,|,forecolor,backcolor", theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen", theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft,visualblocks", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", theme_advanced_resizing : false, extended_valid_elements: \'pre[*],script[*],style[*]\', valid_children: "+body[style|script],pre[script|div|p|br|span|img|style|h1|h2|h3|h4|h5],*[*]", valid_elements : \'*[*]\', force_p_newlines : false, cleanup: false, forced_root_block : false, force_br_newlines : true }); Link to comment Share on other sites More sharing options...
touchdez Posted June 10, 2013 Author Share Posted June 10, 2013 vekia, this is what happened after I had changed the file: Sorry, didn't mean to add image twice! I will try again tomorrow - thanks so far for your help. Goodnight! Link to comment Share on other sites More sharing options...
vekia Posted June 10, 2013 Share Posted June 10, 2013 i forgot about coma after: editor_selector :"autoload_rte" Link to comment Share on other sites More sharing options...
touchdez Posted June 11, 2013 Author Share Posted June 11, 2013 Still the same - no menu at all... Link to comment Share on other sites More sharing options...
vekia Posted June 11, 2013 Share Posted June 11, 2013 sorry it was my mistake!!!! i tested code after little modifications, now it works! check: tinymce editor + extended version + javascript/ html support editor_selector :"autoload_rte", theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,fontselect,fontsizeselect", theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,codemagic,|,insertdate,inserttime,preview,|,forecolor,backcolor", theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen", theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft,visualblocks", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", theme_advanced_resizing : false, extended_valid_elements: 'pre[*],script[*],style[*]', valid_children: "+body[style|script],pre[script|div|p|br|span|img|style|h1|h2|h3|h4|h5],*[*]", valid_elements : '*[*]', force_p_newlines : false, cleanup: false, forced_root_block : false, force_br_newlines : true effect: 1 Link to comment Share on other sites More sharing options...
touchdez Posted June 11, 2013 Author Share Posted June 11, 2013 You are a star, vekia! Thanks so much for your patience with a newbie! Link to comment Share on other sites More sharing options...
vekia Posted June 11, 2013 Share Posted June 11, 2013 youre welcome thanks for YOUR patience so, you tested it and it works for you now? 1 Link to comment Share on other sites More sharing options...
touchdez Posted June 11, 2013 Author Share Posted June 11, 2013 One more question, please? How do I add the HTML button to the menu? Link to comment Share on other sites More sharing options...
vekia Posted June 11, 2013 Share Posted June 11, 2013 lol it disappeared insted old theme_advanced_buttons3 : use this: theme_advanced_buttons3 : "code,|,tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen", effect: Link to comment Share on other sites More sharing options...
touchdez Posted June 11, 2013 Author Share Posted June 11, 2013 It works - thank so much! Now I can try and get some order on the freebies page. Should I mark this topic as solved now? Link to comment Share on other sites More sharing options...
vekia Posted June 11, 2013 Share Posted June 11, 2013 everything depends on you if you've got any other questions - feel free to write i think that we can mark this thread as solved, solved isn't mean close - so we can continue discussion even if the topis is [solved] regards Link to comment Share on other sites More sharing options...
touchdez Posted June 11, 2013 Author Share Posted June 11, 2013 I do have another question, but it is regarding the gallery - I will bump that topic. Next question about this freebie page: I have created it and it works great. Now I want to make the freebies available only to subscribed members, in other words you have to be logged in to download it. How would I do that? Link to comment Share on other sites More sharing options...
vekia Posted June 13, 2013 Share Posted June 13, 2013 unfortunately, without tpl modification it isn't possible to achieve this. All you are able to do in this case is ... deny access to the WHOLE freebie content, not only several items Link to comment Share on other sites More sharing options...
touchdez Posted June 13, 2013 Author Share Posted June 13, 2013 (edited) Is it difficult to do the modification, vekia? I would like to have something like this: http://catalogo-onlinersi.net/en/8-prestashop-modules Edited June 13, 2013 by touchdez (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted June 13, 2013 Share Posted June 13, 2013 controllers/front/CmsController.php right after the: public function initContent() { add: $this->context->smarty->assign('customer', $this->context->customer); next open the cms.tpl in your theme directory instead the: {$cms->content} use this: {if Tools::getValue('id_cms')==4} {if $customer->logged==1} {$cms->content} {else} {l s='unlogged. login first.'} {/if} {else} {$cms->content} {/if} where the 4 from: {if Tools::getValue('id_cms')==4} is an ID of the cms page for which, you want to add login restriction. 1 Link to comment Share on other sites More sharing options...
touchdez Posted June 13, 2013 Author Share Posted June 13, 2013 Thanks, vekia, will make the changes now. vekia, where will I find the ID of the page? Has anyone told you lately you are a superstar, vekia? Thank you so much - it works! Another question: How do I add a hyperlink to the words "log in" in the cms.tpl file? Link to comment Share on other sites More sharing options...
Dolke Posted June 13, 2013 Share Posted June 13, 2013 (edited) I told him almost the same thing but I think he already knows Edited June 13, 2013 by Dolke (see edit history) Link to comment Share on other sites More sharing options...
touchdez Posted June 13, 2013 Author Share Posted June 13, 2013 Yeah, I suppose he does, Dolke, but it is nice to have someone tell you that every now and then! Link to comment Share on other sites More sharing options...
Dolke Posted June 13, 2013 Share Posted June 13, 2013 Couldn't agree more. Great that you solved your problem. Best regards Link to comment Share on other sites More sharing options...
touchdez Posted June 13, 2013 Author Share Posted June 13, 2013 Do you know how to add the hyperlink in the cms page, Dolke? Here is the page that I want to change: http://touchdezines.com/shop/content/8-freebies Link to comment Share on other sites More sharing options...
Dolke Posted June 13, 2013 Share Posted June 13, 2013 You have add hyperlink icon on the editor. You just click that icon and add some links to CMS page of your choice. Link to comment Share on other sites More sharing options...
touchdez Posted June 13, 2013 Author Share Posted June 13, 2013 Hmmm, editor? I am using Dreamweaver and it is not showing on the page. Here is the bit of code: {l s='<strong>You have to be logged in to see this page - please <u><a href="http://touchdezines.com/shop/authentication?back=my-account">log in</a></u> or create an account.</strong>'} Link to comment Share on other sites More sharing options...
vekia Posted June 13, 2013 Share Posted June 13, 2013 it's because all html tags from {l s=''} function doesn't work. Smarty deletes all html tags. Link to comment Share on other sites More sharing options...
Dolke Posted June 13, 2013 Share Posted June 13, 2013 Why are you using Dreamweaver for CMS pages? You have cms functionality in the Prestashop and its editor is quite all right for content pages... Link to comment Share on other sites More sharing options...
vekia Posted June 13, 2013 Share Posted June 13, 2013 that's right, i wondering, you want to put this link with url to the cms page? Link to comment Share on other sites More sharing options...
touchdez Posted June 13, 2013 Author Share Posted June 13, 2013 I don't know, Dolke, I suppose it is because I have it and don't know too much about Prestashop yet. I still have a lot to learn, but at least I got my shop working. vekia, I will give this page another think. I think it is important to have that "login" as a link, but maybe there is another way to do it... I want it to look like this: You have to be logged in to see this page - please log in or create an account. Instead of having to go to the top right of the page, just to click on the link to go to the log in page. Link to comment Share on other sites More sharing options...
Dolke Posted June 13, 2013 Share Posted June 13, 2013 If I got it right, you are making some pages that will contain some text and URLs right. The easiest way to do that is by using core PS functionality and that is under preferences -> CMS This is one of my pages under the CMS section: http://dekom.co.rs/sr/content/4-o-nama Is this something you are trying to make? OK, what is behind that page exactly? Link to comment Share on other sites More sharing options...
touchdez Posted June 13, 2013 Author Share Posted June 13, 2013 Dolke, create yourself an account on my site to see what is going on there. It is just a page with free designs, but I want the customer to create an account before downloading the freebies. http://touchdezines.com/shop/authentication?back=my-account Link to comment Share on other sites More sharing options...
Dolke Posted June 13, 2013 Share Posted June 13, 2013 (edited) This msg has to be edited through some tpl file. There youll be able to add html tag and make ""log in" as a hyperlink. Which file should be edited is a good question We need a Vekia's help on this one Edited June 13, 2013 by Dolke (see edit history) Link to comment Share on other sites More sharing options...
touchdez Posted June 13, 2013 Author Share Posted June 13, 2013 I will wait, then. I will have to give this page a good think of what I want to do here. Without loading the freebies as "products", I am a bit stumped... Link to comment Share on other sites More sharing options...
vekia Posted June 13, 2013 Share Posted June 13, 2013 im back dudes okay, i think that this will be the best way: blabla bla <a href="{$link->getPageLink('my-account', true)}">{l s='Log In'}</a> blabla this is the default method to get links to my-account / login page. No matter what language you browsing - you will get proper link always. Link to comment Share on other sites More sharing options...
benjamin utterback Posted June 13, 2013 Share Posted June 13, 2013 Hey everyone, just a reminder to everywhere to refrain from "double-posting" or triple posting! (posting two consecutive posts in a row)... Simply edit your message and add 'UPDATE' or something. Now I'm going to merge these posts, No worries just keep it in mind, it helps maintain the flow and conciseness of the thread. Thank you! Link to comment Share on other sites More sharing options...
touchdez Posted June 13, 2013 Author Share Posted June 13, 2013 Sorry, Benjamin! vekia, the page crashes now... Link to comment Share on other sites More sharing options...
vekia Posted June 13, 2013 Share Posted June 13, 2013 crashes? Where you put this code? can you please paste the sources here? Link to comment Share on other sites More sharing options...
touchdez Posted June 13, 2013 Author Share Posted June 13, 2013 This is the cms.tpl file in the themes directory: {if ($content_only == 0)} {include file="$tpl_dir./breadcrumb.tpl"} {/if} {if isset($cms) && !isset($cms_category)} {if !$cms->active} <br /> <div id="admin-action-cms"> <p>{l s='This CMS page is not visible to your customers.'} <input type="hidden" id="admin-action-cms-id" value="{$cms->id}" /> <input type="submit" value="{l s='Publish'}" class="exclusive" onclick="submitPublishCMS('{$base_dir}{$smarty.get.ad|escape:'htmlall':'UTF-8'}', 0, '{$smarty.get.adtoken|escape:'htmlall':'UTF-8'}')"/> <input type="submit" value="{l s='Back'}" class="exclusive" onclick="submitPublishCMS('{$base_dir}{$smarty.get.ad|escape:'htmlall':'UTF-8'}', 1, '{$smarty.get.adtoken|escape:'htmlall':'UTF-8'}')"/> </p> <div class="clear" ></div> <p id="admin-action-result"></p> </p> </div> {/if} <div class="rte{if $content_only} content_only{/if}"> <h4>{if Tools::getValue('id_cms')==8} {if $customer->logged==1} {$cms->content} {else} {l s='<strong>You have to be logged in to see this page - please <a href="{$link->getPageLink('my-account', true)}">{l s='Log In'}log in</a> or create an account.</strong>'} {/if} {else} {$cms->content} {/if} </h4> </div> {elseif isset($cms_category)} <div class="block-cms"> <h1><a href="{if $cms_category->id eq 1}{$base_dir}{else}{$link->getCMSCategoryLink($cms_category->id, $cms_category->link_rewrite)}{/if}">{$cms_category->name|escape:'htmlall':'UTF-8'}</a></h1> {if isset($sub_category) & !empty($sub_category)} <p class="title_block">{l s='List of sub categories in %s:' sprintf=$cms_category->name}</p> <ul class="bullet"> {foreach from=$sub_category item=subcategory} <li> <a href="{$link->getCMSCategoryLink($subcategory.id_cms_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'}</a> </li> {/foreach} </ul> {/if} {if isset($cms_pages) & !empty($cms_pages)} <p class="title_block">{l s='List of pages in %s:' sprintf=$cms_category->name}</p> <ul class="bullet"> {foreach from=$cms_pages item=cmspages} <li> <a href="{$link->getCMSLink($cmspages.id_cms, $cmspages.link_rewrite)|escape:'htmlall':'UTF-8'}">{$cmspages.meta_title|escape:'htmlall':'UTF-8'}</a> </li> {/foreach} </ul> {/if} </div> {else} <div class="error"> {l s='This page does not exist.'} </div> {/if} <br /> Link to comment Share on other sites More sharing options...
vekia Posted June 13, 2013 Share Posted June 13, 2013 you do it wrong you can't use variables ($link in this case) in the l s= function: {l s=' HERE ' } use this: <strong> {l s='You have to be logged in to see this page - please'} <a href="{$link->getPageLink('my-account', true)}">{l s='Log In'}</a> {l s='or create an account.'} </strong> Also, remember to not use html tags inside the {ls =''} function ... and don't forget to let us know if this works 1 Link to comment Share on other sites More sharing options...
touchdez Posted June 13, 2013 Author Share Posted June 13, 2013 it works like a charm - thanks, vekia! Link to comment Share on other sites More sharing options...
Recommended Posts