Home page block order - magento

I would like to change the order of some blocks in our Magento environment.
I've opened nearly every layout XML, but I can't find what I am looking for.
Does anyone know where to start looking for the order of the blocks?

Anything front-end or design related is under app/design/frontend (for general site) and app/design/adminhtml for the admin panel.
The next folder you navigate to is the package you use, you can check this under the design tab of the system config of the admin panel. So for example if it is base, you go to the app/design/frontend/base
Next folder is the theme, you can check it in the design tab too. So assume it's the default theme it would be like app/design/frontend/base/default
Now go to the layout folder and find the .xml for the page you looking for. If its a product page it would be the app/design/frontend/base/default/layout/catalog.xml

Related

Magento frontend hightlight translations

I am trying to make Magento highlight translations on the front end of the website and show what file the translation is in.
I'm not really sure where best to start with this and cant find anything similar.
Edit: I managed to do this by extending the Translate model, was actually very simple.
You're in luck! Magento has this built in. Go to admin, and go to;
System > Configuration
From the top menu, then;
Developer
From the left menu (its at the bottom).
Open the 'translate inline' tab, and enable for front end. Flush your cache and go back to the frontend. It will now show you the paths for labels which live in the /app/locale/[COUNTRY CODE] folders.
NOTE: Don't do this on a production site, as others will see the labels too.

Magento, how to change home page?

I see that you can set a cms home page at "Default Pages" at admin panel (system/configuration/web) but I want a whole template including [html][head][body] tags to be shown, is this possible?
I can't do it via (CMS/Pages) as it deletes/modifies the code.. Even when I set it on "empty" don't really understand it..
Help would be much appreciated, cheers!
The file that you want is the layout file. If you need to add new layout of your home page then you can make a new layout file using following link
http://rakeshwebdev.wordpress.com/2014/02/13/add-new-custom-page-layout-in-magento-1-7/
Then after making layout while creating CMS Page go to layout section and choose your created layout. Then your home page will have what you want.
Note: By default header, footer all these are kept in different file and called from the 1column.phtml etc. So it will be always better to keep it that way only. As we always should follow Magento programming methodology.

Magento, category, details button

I'm trying to teach myself Magento, and basic programming.
In the product lists I have, beside the "add to cart" button is a "Details" button. It has a typo in the label, and says "Detalis".
I need to fix this, but I can't find where/which file it is in. Can anyone point me in the right direction?
Generally,product list layout came from list.phtml file.
file location:app/design/frontend/default/my_theme/template/catalog/product/list.phtml
(or)
Please enable the path hints via admin panel.It's show all block paths.
How do I turn on template path hints?
To turn on template path hints in Magento:
log into the magento back-end admin
Go to System -> Configuration in the main menu
Go to Developer on the bottom left under ADVANCED
Switch to the store view on the top left to your current website or
store view.
Under the Debug tab of the same Developer config page you will see a
new option appear that will allow you to turn on/off template path
hints.
Remember to clear your cache.
Generally, I believe that the templates associated with products would be located in the
app/design/frontend/default/your_theme/template/catalog/product/
However, I am unsure of your site template files etc, especially if you are doing things yourself.
To make your life easier, I would suggest installing a program called Agent Ransack which I have found to be invaluable when searching for a needle in a haystack.

Magento Identifier position - similar to ?tp=1 in Joomla

Does anybody know how can I find out the predefined identifiers and their position in the layout of a certain magento template?
I am having a big problem every time I want to add a new static block, since I do not know what are the available positions.
In other words I am looking for something like ?tp=1 that joomla has.
Thanks,
George
Just had this problem and here is the solution I've found.
log into the magento back-end admin
Go to System -> Configuration in the main menu
Go to Developer on the bottom left under ADVANCED
Switch to the store view on the top left to your current website or store view.
Under the Debug tab of the same Developer config page you will see a new option appear that will allow you to turn on/off template path hints.
Remember to clear your cache
source: https://support.sweettoothrewards.com/entries/21255937-How-do-I-turn-on-template-path-hints-
I am not sure about Joombla, but you can "Turn on Template Path Hints" to identify blocks.

display custom attributes on Virtuemart browse page

I need the browse page to show quantity box, custom attributes, and Add to Cart button all together.
It doesn't show it at all. Only when you go to the product page, you can see them.
Any solutions?
Thanks, Ahmed.
Ahmed, you'll have to modify the template directly to do something like that. VM uses a large number of template files written in PHP. If you're using the default template, you can find them here:
components/com_virtuemart/themes/default/templates/
From there, it takes a little looking around to figure out exactly which template you need to edit. If you need to edit a browse template, my recommendation is go to your VirtueMart Administration in Joomla backend and look at Admin | Configuration | Site | Layout to get an idea of which files you're using. It will probably say "Default" in the dropdown, with a Configuration link directly below. Click that link and look at the very first item, Product List Style. From the description of your layout desires, you might be using Flat Product List.
The main file for editing that layout is:
components/com_virtuemart/themes/default/templates/browse/includes/browse_listtable.tpl.php
If you're a programmer, you should be able to look thru the code and correctly guess which code elements are being used to display VM product details. If you're not a programmer, you can still fake it by commenting out sections to see what "goes away" on the actual product page. Use what you learn to strip out useful code and move it around.
Another useful file to pull VM product code from is:
components/com_virtuemart/themes/default/templates/product_details/flypage.tpl.php
This is the actual product view (unless it's been changed in VM config), and contains pretty much all the common code elements that extract product details. You should be able to lift some of that code and place it where it needs to go in other forms.
Good luck with all of this. I find VM coding painful, and community support in the VM forums can be... sparse...

Resources