ross.fraser Posted July 20, 2010 Share Posted July 20, 2010 Hi GuysI've been using Prestashop for a few weeks now after never having used a shopping cart before. It can be really easy to do some things and frustratingly difficult to do others.I thought I would share some of the things I have learnt along the way.A lot of changes to customise your site can only be done by editing the TPL, PHP or JS files.Always make a copy of any file you are going to edit, FIRST! If things go pear shaped, copy back the original.I make a copy EVERY time I do an edit, as some of my files have many changes and I can then revert to the last working file with all my modifications to date. I have for example: cart1.php, cart2.php, cart3.php etc.When you change a section of code / text in a file, make a copy of that code above your changes. The original code must be enclosed within tags that turn it into a comment and stop it functioning. This makes it easier to compare your changes with the original code, or replace the original code if things go wrong!i.e. Note the original is commented by being between these tags: <!-- and --><!-- ';--> ';TPL files use <!-- to start the comment and --> to end the commentPHP and JS files use /* to start the comment and */ to end the commentYou can also comment a single line in a PHP or JS by starting it with //i.e/*show or hide element e depending on condition show*/ OR// show or hide element e depending on condition showwould both work.I also add a comment wherever I edit a file, i.e.<!-- ross was here. Changed width: 160px; to 100px; to allow for wider images -->This lets me quickly find where the changes were made and why. (time will make you forget!)I found that pages would take about 3 or 4 seconds to change with the default install.In the config folder, open smarty.config.inc.php and change the following line (line 10):from$smarty->force_compile = true; // to pass "false" when put into productionto$smarty->force_compile = false; // to pass "false" when put into productionThis made a HUGE difference to my site. Hope this info helps someone out. Link to comment Share on other sites More sharing options...
rocky Posted July 21, 2010 Share Posted July 21, 2010 Thanks for posting your advice for newbies. You should use {* *} in TPL files instead of <!-- --> though. Code commented out like the latter is still downloaded and displayed in the source code, whereas code commented out like the former is ignored and not downloaded. Link to comment Share on other sites More sharing options...
Recommended Posts