brandonc503 Posted December 10, 2009 Share Posted December 10, 2009 i want to make a category but dont want it to show in the categories module, how would i do this? even if i have to change the php.. id need to know where to put in... if category = said_category then dont dislpay(in the category block)to access this category i would used a flyer/baner on the site.. btw Link to comment Share on other sites More sharing options...
rocky Posted December 10, 2009 Share Posted December 10, 2009 Modify modules/blockcategories/category-tree-branch.tpl and add {if $node.id != 1} to the start of the file and {/if} to the end of the file, where 1 is the id of the category you want this hide. This will hide that category and its subcategories, while making them still accessible by URL.You'll need to modify category-tree-branch.tpl in your theme's directory too so that the categories are hidden from the sitemap. 2 Link to comment Share on other sites More sharing options...
brandonc503 Posted December 10, 2009 Author Share Posted December 10, 2009 SWEET!! can you also tell me how to have the contact form sent emails 'from' shop email(under bo - preferences - contact) insted of the email customer enteres in form? even if i just code the 'from' to be [email protected] instead of pulling form shop email in bo. Link to comment Share on other sites More sharing options...
rocky Posted December 12, 2009 Share Posted December 12, 2009 Change line 26 of contact-form.php from: if (Mail::Send(intval($cookie->id_lang), 'contact', 'Message from contact form', array('{email}' => $_POST['from'], '{message}' => stripslashes($message)), $contact->email, $contact->name, $from, (intval($cookie->id_customer) ? $customer->firstname.' '.$customer->lastname : $from))) to: if (Mail::Send(intval($cookie->id_lang), 'contact', 'Message from contact form', array('{email}' => Configuration::get('PS_SHOP_EMAIL'), '{message}' => stripslashes($message)), $contact->email, $contact->name, $from, (intval($cookie->id_customer) ? $customer->firstname.' '.$customer->lastname : $from))) Link to comment Share on other sites More sharing options...
brandonc503 Posted December 12, 2009 Author Share Posted December 12, 2009 so that is making the email contained within the messege my shop emaill... not the 'from' address of the email notificatioin Link to comment Share on other sites More sharing options...
brandonc503 Posted December 12, 2009 Author Share Posted December 12, 2009 in my yahoo email i realized my email has From:"My Web Site Name" where do i change php to set those each?i want the email to be the shop email and the from to be the store name. thanks Link to comment Share on other sites More sharing options...
rocky Posted December 12, 2009 Share Posted December 12, 2009 Go to Preferences > Contact to set your shop name and email address. Link to comment Share on other sites More sharing options...
brandonc503 Posted December 12, 2009 Author Share Posted December 12, 2009 i have those set but when contact-form is filled out you enter who you want to send to , customer service or webmaster.. you enter your email and enter messege..then prestashop sends notification email to designated employee.. but when email is sent it is 'from' the email cutomer enters instead of the shop email address. which i think is wrong cause then i could send emails 'from' other peoples emails. Link to comment Share on other sites More sharing options...
rocky Posted December 13, 2009 Share Posted December 13, 2009 I can't see a problem. It makes the email from the customer email so that you can just click "reply" and it will go to the customer. It won't send the email as being from the customer. If it were sent "From" the shop and your designated employee clicks "Reply", the email will be sent back to the shop itself instead of to the customer. That is why Prestashop changed it to the way it is now, so the employee didn't have to copy the email address from the content of the email and can simply click "Reply". Link to comment Share on other sites More sharing options...
brandonc503 Posted December 13, 2009 Author Share Posted December 13, 2009 but im gana want that email address transcribed anyways to other app im using . i understand what your saing but i dont get "It won’t send the email as being from the customer."and the email has a link of the customers email anyways so insted of clicking reply they can click on the mailto: link... assuming that it will open in the email client they want.. not like using web and opening in outlook.. though.. my yahoo opens mailto: in new yahoo email...any who.. could you tell me how to change it anyways.. id appreciate it very muchin my yahoo mail in my inbox emails are From: My Shops Namein email it is like thisFrom: "My Shops Name" id like to know where to edit each of those. thanks much. Link to comment Share on other sites More sharing options...
rocky Posted December 13, 2009 Share Posted December 13, 2009 Now that I re-read it, what I wrote is confusing. I meant you don't have to worry about accidentally writing emails as if they are from your customers. Which emails do you want to change the "From" field for? A couple of posts above, I already pointed out which code to change for the emails that come through the contact form. As far as I know, all the other emails already come from the shop email. You can do a global search for Mail::send on Prestashop to find every line of code that sends emails. You could also override the parameters in the send function in classes/Mail.php by writing $from = "[email protected]" and $fromName = "Shop Name". Link to comment Share on other sites More sharing options...
brandonc503 Posted December 14, 2009 Author Share Posted December 14, 2009 here is pic of notification sent to my email when contact form is filled out.[email protected] was email address entered in the form.. i made changes to line 26 of contact-form.php and it change the from address in the messege of the email.. not the from address of the email..and im not worried about accidentaly send messeges from customers email.. i just think its wierd that i could send emails to 'your' friends and family 'from' your email address. Link to comment Share on other sites More sharing options...
rocky Posted December 14, 2009 Share Posted December 14, 2009 I just checked and you are right. I was looking at the wrong variables. It is the following part of line 26 of contact-form.php you should change: $from, (intval($cookie->id_customer) ? $customer->firstname.' '.$customer->lastname : $from) to: Configuration::get('PS_SHOP_EMAIL'), Configuration::get('PS_SHOP_NAME') Link to comment Share on other sites More sharing options...
brandonc503 Posted December 21, 2009 Author Share Posted December 21, 2009 so goht ta say, lovin the help so far. helping me get things working ideally. so got another one: in the accout page if there are vouchers for the customer logged in the voucher symbol is up, how can i get same thing on all pages, ie the header.. i coppied some code to try and it showed up in header but only when in one of the customer account pages. i had something else but forgot, but ill remeember. hopefully. many thanks. Link to comment Share on other sites More sharing options...
brandonc503 Posted March 13, 2010 Author Share Posted March 13, 2010 so does work with the 1.2.6 ? cause i had it working before but now it does not.. i put {if $node.id != 1} at beginning of category-tree-branch.tpland {/if} at the end. but did not hide the category Link to comment Share on other sites More sharing options...
brandonc503 Posted March 13, 2010 Author Share Posted March 13, 2010 wait ignore that i changed in the theme tpl not module.. Link to comment Share on other sites More sharing options...
noesac Posted September 5, 2010 Share Posted September 5, 2010 Modify modules/blockcategories/category-tree-branch.tpl and add {if $node.id != 1} to the start of the file and {/if} to the end of the file, where 1 is the id of the category you want this hide. This will hide that category and its subcategories, while making them still accessible by URL.You'll need to modify category-tree-branch.tpl in your theme's directory too so that the categories are hidden from the sitemap. Very helpful thanks Rocky, I was looking around in the blockcategories.tpl page trying to make the change there...! Link to comment Share on other sites More sharing options...
ukbaz Posted November 18, 2010 Share Posted November 18, 2010 Hi Rocky been looking how to hide categoreis for ages - it works :-) thanks!How would nested staement work to hide several categories?Thanksbaz Link to comment Share on other sites More sharing options...
rocky Posted November 18, 2010 Share Posted November 18, 2010 Use the AND keywords to exclude multiple categorories: {if $node.id != 1 AND $node.id != 2} 2 Link to comment Share on other sites More sharing options...
Mallee Boy Posted December 11, 2010 Share Posted December 11, 2010 Rocky you're a Rock Star.Thanks. Link to comment Share on other sites More sharing options...
hkahil Posted January 13, 2011 Share Posted January 13, 2011 hi pleasei would like to hide categories but attributes them to the group customeris that possible thanks Link to comment Share on other sites More sharing options...
segestasisak Posted March 16, 2012 Share Posted March 16, 2012 Hi rocky, Hiding the subcategories works great, thanks for that. But I noticed that there's still a plus (or a minus) visible at the right of the parent category. I think this will be quite confusing for customers. Is there a way to remove this as well? Thanks, Steven Link to comment Share on other sites More sharing options...
comprausa Posted August 7, 2012 Share Posted August 7, 2012 Rocky, I feel that each times, when I needed this kind of help I fell on one of your excellent advices Thank you so much !! Rocky it works but only if Force Compile ON and Cache OFF. Once you switch back to production settings ForceComplie OFF and Cache ON it will display the hidden category again. Any ideas? PS1.4.6.2 Link to comment Share on other sites More sharing options...
comprausa Posted August 7, 2012 Share Posted August 7, 2012 (edited) Rocky it works but only if Force Compile ON and Cache OFF. Once you switch back to production settings ForceComplie OFF and Cache ON it will display the hidden category again. Any ideas? PS1.4.6.2 OK SOLVED. This modification to hide categories does no force compile, so cache has to be cleared at: yourshop/tools/smaty/compile yourshop/tools/smaty/cache *and just to make sure I cleared my browser cache too. Works perfect! Thanks Rocky Edited August 7, 2012 by comprausa (see edit history) Link to comment Share on other sites More sharing options...
benjamin utterback Posted August 7, 2012 Share Posted August 7, 2012 Rocky is great! Also, when in doubt, clear your cache! That's always a good step to do when you are dealing with any changes to your front or back office. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now