Jump to content

Can I edit the blocks to look more alike?


harial
 Share

Recommended Posts

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!

37150_9XL0vawagVlP8nFqi6l6_t

Share this post


Link to post
Share on other sites

These are the templates you need to override:

modules/blockbestsellers/blockbestsellers.tpl
modules/blocknewproducts/blocknewproducts.tpl
modules/blockviewed/blockviewed.tpl

just copy the files to:
themes/willow/modules/blockviewed/blockviewed.tpl
themes/willow/modules/blocknewproducts/blocknewproducts.tpl
themes/willow/modules/blockviewed/blockviewed.tpl

and make the neccessary changes. For some of the modules a change in the .php file may be required.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

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).

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More