miradoro Posted June 1, 2012 Share Posted June 1, 2012 Hi Can i hide the price column on new_order.html from mail alerts module? I can comment out the price text...but the price still shows up underneath...under {items} Please advice Link to comment Share on other sites More sharing options...
fitgura Posted June 1, 2012 Share Posted June 1, 2012 You should simple get a html editor and delete the column... Link to comment Share on other sites More sharing options...
miradoro Posted June 1, 2012 Author Share Posted June 1, 2012 it is not that simple...i can remove the headers but all info is invisible and under variable {items} Link to comment Share on other sites More sharing options...
codegrunt Posted June 1, 2012 Share Posted June 1, 2012 (edited) The {items} placeholder is built up in MailAlerts::hookNewOrder($params) found in "modules/mailalerts/mailalerts.php". In that method you will see a variable called "$itemsTable" which is built up as an HTML string containing the item list. This is where the price is being set. Probably the best option would be to leave that code as is but create a new $itemsTableNoPrice variable with the layout you want so that you can make the choice in the template as to what you want to show. So basically everywhere you see $itemsTable being assigned, add another line setting $itemsTableNoPrice as you want it to be and then add that variable the templateVars array. Then you can reference {itemsTableNoPrice} in the new_order.html template. Cheers Edited June 1, 2012 by codegrunt (see edit history) Link to comment Share on other sites More sharing options...
miradoro Posted June 1, 2012 Author Share Posted June 1, 2012 does anyone know whats the variable to call products from shopping cart? is it {products_ordered}? Link to comment Share on other sites More sharing options...
codegrunt Posted June 1, 2012 Share Posted June 1, 2012 You first need to clarify what template you are dealing with. Mail templates and web page templates in Prestashop use entirely different template mechanisms. For mail messages they unfortunately do not use Smarty but instead a simple replace function for each placeholder. For mail messages especially, it highly depends on what template you are talking about and where it was loaded as to what variables will be available. So what template are you talking about here? Cheers Link to comment Share on other sites More sharing options...
miradoro Posted June 1, 2012 Author Share Posted June 1, 2012 default template Link to comment Share on other sites More sharing options...
codegrunt Posted June 1, 2012 Share Posted June 1, 2012 Sorry mirador but I have no idea what you mean by "default template". You need to be specific - what full filename are you talking about? Link to comment Share on other sites More sharing options...
miradoro Posted June 1, 2012 Author Share Posted June 1, 2012 in order confirmation...where do i edit {products} ??? Link to comment Share on other sites More sharing options...
miradoro Posted June 1, 2012 Author Share Posted June 1, 2012 new order email from mail alerts was easy ..i got it to work by editing new_order.html and mailalerts.php as suggested above Link to comment Share on other sites More sharing options...
codegrunt Posted June 1, 2012 Share Posted June 1, 2012 If you are talking about "mails/[lang]/order_conf.html", the {products} placeholder is setup in the PaymentModule::validateOrder() method via the variable "$productsList". If you decide you do want to change that method, be sure to use a class override so you do not modify core system files. Cheers Link to comment Share on other sites More sharing options...
miradoro Posted June 1, 2012 Author Share Posted June 1, 2012 Link to comment Share on other sites More sharing options...
miradoro Posted June 1, 2012 Author Share Posted June 1, 2012 well sounds crazy complicated....i will just delete it all and have a link to the website and have them check from there Link to comment Share on other sites More sharing options...
miradoro Posted June 1, 2012 Author Share Posted June 1, 2012 how do i remove the attachment from order_conf.html ? Link to comment Share on other sites More sharing options...
Recommended Posts