harial Posted January 20, 2011 Share Posted January 20, 2011 I hope I am posting this in the correct area. Basically, the three blocks: 'Best Sellers', 'Viewed Products', and 'Recently Added' all look different and show different things. I'd like them to be more consistent in how they look. The only one I like is the 'Viewed Products' block. I tried to swap around the code myself and had very limited success. Does anyone know the key pieces of code that I could edit to get the blocks to look alike?Thanks so much for any help! Link to comment Share on other sites More sharing options...
PrestaShopDeveloper Posted January 20, 2011 Share Posted January 20, 2011 These are the templates you need to override:modules/blockbestsellers/blockbestsellers.tplmodules/blocknewproducts/blocknewproducts.tplmodules/blockviewed/blockviewed.tpljust copy the files to:themes/willow/modules/blockviewed/blockviewed.tplthemes/willow/modules/blocknewproducts/blocknewproducts.tplthemes/willow/modules/blockviewed/blockviewed.tpland make the neccessary changes. For some of the modules a change in the .php file may be required. Link to comment Share on other sites More sharing options...
harial Posted January 20, 2011 Author Share Posted January 20, 2011 Thanks for the quick reply. I know that I need to copy the files over but that was not the problem. The problem was figuring out which pieces of php needed to be edited to get the blocks to look different. Link to comment Share on other sites More sharing options...
PrestaShopDeveloper Posted January 20, 2011 Share Posted January 20, 2011 I took a quick look at the php files, and I think that they pass all the necessary data to the template, so you just need to change (sync) the templates. Link to comment Share on other sites More sharing options...
harial Posted January 20, 2011 Author Share Posted January 20, 2011 I don't have a modules folder inside the skin folder... Link to comment Share on other sites More sharing options...
PrestaShopDeveloper Posted January 20, 2011 Share Posted January 20, 2011 then create it Link to comment Share on other sites More sharing options...
harial Posted January 20, 2011 Author Share Posted January 20, 2011 ...uh, maybe I'm missing something. I've never dealt with templates in this way. What do I do after moving the tpl files? Link to comment Share on other sites More sharing options...
web.geek Posted January 21, 2011 Share Posted January 21, 2011 You would edit the .tpl files that you copied into the themes folder and make the necessary changes there instead of in the original folder.UltraWebDev, can I override .php files the same way? Just by copying the original to the same folder structure under your theme and editing those files? I've been trying to get a handle on how to change php files in a way that won't break during an upgrade. For example, if I needed to change the /modules/paypal/express/paypalexpress.php file, would I just copy it to /themes/mytheme/modules/paypal/express/paypalexpress.php and edit it there? Would I need all of the other files in the folder as well, or just the file to be changed?Thanks (sorry for hijacking the thread) Link to comment Share on other sites More sharing options...
PrestaShopDeveloper Posted January 21, 2011 Share Posted January 21, 2011 You would edit the .tpl files that you copied into the themes folder and make the necessary changes there instead of in the original folder.UltraWebDev, can I override .php files the same way? Just by copying the original to the same folder structure under your theme and editing those files? I've been trying to get a handle on how to change php files in a way that won't break during an upgrade. For example, if I needed to change the /modules/paypal/express/paypalexpress.php file, would I just copy it to /themes/mytheme/modules/paypal/express/paypalexpress.php and edit it there? Would I need all of the other files in the folder as well, or just the file to be changed?Thanks (sorry for hijacking the thread) No, you can't override the .php files. If you need to make a changes in the .php files, just copy/paste the whole module and rename it (the folder name, the main .php file, the class and $this->name in the constructor). Link to comment Share on other sites More sharing options...
harial Posted January 21, 2011 Author Share Posted January 21, 2011 My problem was not making a copy of the files. I actually experimented by making copies of the main modules and just copying them in the main folder. My problem was where do I edit the files meaning where in the code. 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