0

I want to create a new theme for custom layout on some product pages. I want to remove some items like minimum price. Which files do I need to include in that theme.

(I wrote something here about that last night but cannot find it anymore)

2 Answers 2

0

It is hard to give a complete answer here because I need a little more information regarding the exact changes that you intend to make, and whether you are extending the base, rwd, or a third-party theme. However, I'll give a general synopsis of important files, and hopefully we can expand from there.

Template files: Basically, anything under ~/app/design/frontend/[custom]/[theme]/template/catalog/product can be useful.

template/catalog/product/view.phtml is the main file and most anything under template/catalog/product/view will be on the right side of a typical product-page, with the some exceptions, like media.phtml.

A great way to determine the files you want to copy into your subtheme is to turn on template hints under System->Configuration->Advanced->Developer->Debug->Template Path Hints.

Note: This cannot be set at a default level, so make sure you switch to the website-scope before you look for this setting.

Another great tool that is not free, but will pay for itself with the time it saves you is Commerce Bug by Alan Storm.

If you're looking for a which files are determined by Layout XML, the main handle is catalog_product_view, and PRODUCT_TYPE_simple can be useful, as well as PRODUCT_TYPE_configurable. You can find these by searching in ~/app/design/frontend/[any]/[theme]/layout "Find in files" in tools such as Notepad++ or Dreamweaver, and here is a CLI command that I have found useful for finding handles, what is added to them, and where to find the template file:

grep -rn "path/to/search/in" -e 'string*and wildcards*to search for' 

I am not sure that is is overly helpful, but maybe this can get you started, and I'll be happy to add more, if you have some specific questions.

0
0

1 First you have to create your custom theme, assuming that your package/theme is called : amthemes/prince

2 You create a new custom layout for exemple: app/design/frontend/amthemes/prince/template/page/2columns-left-new.phtml follow this answer.

3 You define a new layout 2columns-left-new.phtml for the product page like this:

app/design/frontend/amthemes/prince/layout/local.xml then you put the code bellow

<?xml version="1.0"?> <layout version="0.1.0"> <default></default> <catalog_product_view> //the product view page <reference name="root"> <action method="setTemplate"><template>page/2columns-left-new.phtml</template></action> </reference> </catalog_product_view> </layout> 

4 you copy the product page from the other theme to the new one like this:

from :

app/design/frontend/{otherPackage}/{otherTheme}/template/catalog/product/view.phtml

to :

app/design/frontend/amthemes/prince/template/catalog/product/view.phtml and update what you want.

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.