Questions tagged [template]

The folder that contains all the `phtml` files used to display at frontend or backend.

Filter by
Sorted by
Tagged with
0
votes
1answer
292 views

x% OFF tag in product listings, home and details page

I would like to add a x% OFF tag in products in home, listings, and product page, except for certain SKUs and categories. This would be easily done by a catalog price rule. My problem is that this ...
3
votes
1answer
1k views

Is there a better way to add layout updates to a category rather than using the “Custom Layout Updates” field?

Here's the issue in a nutshell; I have a module adding custom templates that can be used for CMS Pages or Categories. The layout I'm using has updates in local.xml referencing the layout_handle ...
2
votes
1answer
241 views

What purpose does getChildHtml('top') and getChildHtml('bottom') have in wishlist/view?

I undersand getChildHtm() is used for rendering child blocks which are connected in layout xml files, but I can not find any template or block named 'top' or 'bottom'. Also both of them are empty ...
2
votes
3answers
95 views

Should Magento css classes be kept when creating a new theme?

I read an article once that said when creating your own Magento theme that you should keep the default class/id names? I heard it's best to keep these in place as some modules reference these ...
8
votes
2answers
15k views

Custom template for static blocks in CMS page?

I searched the web and could not find how to do this. I want to add a static block that I have created in admin before to a cms-page. This works using either of this lines: {{block type="cms/block" ...
6
votes
3answers
4k views

Different Footer per Page

I have a request from client where he wants to put google analytics code on different pages in Magento under footer. I see that footer is generic, so is there a way to place a different code under ...
2
votes
1answer
4k views

Changing header.phtml for an extension

What is the best practice for the given situation? I'm creating an extension and following Magento's best practices by creating my layout and templates in base/default but putting them in the module ...
2
votes
1answer
2k views

How to show Grouped or Bundle Products in my custom template?

I created my own template/skin. Simple products show great but others fail. As far as i know, the following lines in the view.phtml allow me to do this: <?php if ($_product->isSaleable() &&...
0
votes
1answer
3k views

admin sales order total shipment empty

I recently have the problem that the yellow block with the total order on the bottom right of the sale order info page stays empty. I looked into the files and found out that in /app/design/adminhtml/...
1
vote
1answer
63 views

Custom Extension Need to save Input Text and Output It in the Template

Here is what I have so far. I am not sure how to save the text fields (url's) and insert them into the template. Any help with this would be great :) config.xml http://pastebin.com/UZfVLs6P system....
-1
votes
4answers
361 views

Adding values from custom model as CSS in templates

I have a module that needs to display specific CSS values for each entry in my custom model collection. This is trivial enough, as I can simply echo these values with PHP in my template as needed; ...
12
votes
1answer
3k views

Messages block not using theme template

I am trying to change the phtml file for the messages block. I found in the base theme template/core/messages.phtml and copied that over to my theme and made the changes. My changes didn't show so I ...
0
votes
3answers
1k views

How do I retrieve an ajax friendly phtml file?

I have created a custom front end module that allows a user to go through a wizard like process. I would like to make this AJAX. I am loading my layout block with the following <batch_index_index&...
0
votes
2answers
804 views

Adding a custom area for blocks in a custom layout

Ok, So I've made a module and use it to manage all the custom layouts on my store. Now I need to just add some blocks to certain pages using the template. I added the following line to my custom ...
1
vote
3answers
5k views

how to change customer login page into 2 column page

I am using Facebook connect and like plugin On Login or Create an Account page, i want two columns page. currently its one column <reference name="root"> <action method="...
14
votes
2answers
32k views

Adding custom layouts for CMS and Category use with custom module trouble

I have a category in my store that requires a totally different layout to the standard Magento layouts. So I created a new copy of the 1column.phtml and renamed it and made one small change to test. ...
0
votes
2answers
424 views

Downside of using Mage::getModel and load/getCollection in a template file

What would be the downside of using Mage::getModel (+ load, getCollection) in a template? I've seen quite a few templates with this logic put directly in the template instead of using the block?
5
votes
3answers
7k views

How to insert core template into product view page before price?

I am trying to insert my core template file in product view page before price using layout xml. I've tried this. <catalog_product_view> <reference name="content"> <block ...
2
votes
1answer
1k views

Image Zoom Dimensions

AFAIU Magento zoom spot size is defined via CSS (square by default). It takes a large product image and fits it in by the short side and then allows to zoom it to actual size. So for example if I ...
1
vote
2answers
2k views

layout - call left column block within main column (in the 1column.phtml template)

I have a category list page which uses the 1column.phtml template. However, when the user navigates to a category where there are no subcategories - and only its products are displayed - I would like ...
3
votes
3answers
1k views

Provide properties to views in Magento

In Zend Framework we provide properties to layouts which are then consumed in the view. An example of this would be: $this->layout = new Zend_Layout(); $this->layout->username = 'John'; $...
14
votes
4answers
2k views

Is it good to instantiate a getModel class on phtml templates?

This is a question regarding a good programming practices in Magento. I need to show (in the category product list) the product with its related products in thumbnails. So I edited mypackage/mytheme/...
1
vote
1answer
8k views

Customize Invoice PDF Template

In one of our over seas stores, the Invoice PDF Printout is printing what looks like html encoded chars (á), We need to correct this, I have reviewed the following links, but none of it seems to ...
4
votes
5answers
2k views

Turn template path hints off from command line

For whatever reason, I just did a mysqldump of our magento database, imported it into a new database, and suddenly template path hints are on, how can I turn these off from the command line? Or what ...
2
votes
1answer
2k views

Output all product attribute values on catalog page

On the catalog grid page, I want to output all filterable attribute values for each product. For example: If the price is filterable in the layered navigation, the attribute value associated with the ...
3
votes
3answers
567 views

Template hints under global scope

Is there any reason why template hints are not available in the global scope?
27
votes
4answers
27k views

How to escape output data?

Is there a built-in Magento helper to escape outputted template data to prevent XSS? Or should I just use the PHP htmlspecialchars or htmlentities functions?
6
votes
4answers
244 views

How to manipulate templates without copying them, for example in an extension?

If I write extensions it is often unavoidable to install small pieces of code into core templates (if there are no appropriate layout templates). How do you handle this situation? How do to inject ...
2
votes
2answers
4k views

How to display simple product descriptions on a grouped product page?

When working with a grouped product on Magento (such as a furniture set), very little info is displayed by default about its simple products. The demo site example doesn't appear to allow the user to ...
7
votes
1answer
777 views

Change the template inheritance hierarchy

Is there a way to change the template/skin inheritance hierarchy? Currently you can have: custompackage/customtheme custompackage/default base/default Is there a way or a module that would ...
4
votes
2answers
21k views

How to change template of category page depending on category level in code?

I had a project where there was no pattern and I applied all changes of categories layout in Admin area (Catalog->Manage Categories->Custom Design tab). Now I need to have the following: Parent ...
14
votes
1answer
9k views

Customization of total order and additional infos

When want to have the following style of totals on checkout/cart: Discount Subtotal Shipping fee OR Info Text: "excl. shipping" Additional text: "free shipping from 30EUR" (display always) ...