user3245106
user3245106

Reputation: 43

Different .phtml to diffrent type of product

I am trying to make module that switches diffrent .phtml of productview depend on attributeset name. I dont know witch file is responsible for rendering productview.

Upvotes: 0

Views: 67

Answers (2)

Krishna Sunuwar
Krishna Sunuwar

Reputation: 2947

It is usually Magento Block that render template. In your case productivew is rendered by

Mage_Catalog_Block_Product_View.

You can easily figure this out by enabling template_hints and template_hints_blocks. To enable these to option follow steps below:

  1. Go go Admin
  2. System > Configuration
  3. In left column, Select Developer under Advance.
  4. Change Current Configuration Scope to website level (template_hints and template_hints_blocks is applicable at website level only)
  5. Make yes to Template Path Hints and Add Block Names to Hints under Debug group.

Upvotes: 1

imso077
imso077

Reputation: 311

you can rewrite this class:

Mage_Catalog_Block_Product_View

and then you can add your own logic to it to switch to another template, not the standard

catalog/product/view.phtml

Upvotes: 0

Related Questions