I'm having different type of products on my website with different layouts. So I've created a custom product type but don't know how to set a custom template for my custom product type. So when someone browse the product they will see different product layout and not the default one.

Thanks in advance!

  • You want to customize the whole page or some specific part , like media section , products info section or something else ? Nov 7, 2016 at 11:13

1 Answer 1


If you've created a custom product type called "test" you should create a new layout file at <vendor>/<module>/view/frontend/layout/catalog_product_view_type_test.xml and adjust your layout from there.

  • thanks for your reply. Can I copy/paste the content from catalog_category_view_type_default.xml file?
    – Deeps
    Nov 7, 2016 at 12:00
  • 1
    No, catalog_category_view_type_default.xml is for the category view. And I think your custom file catalog_product_view_type_test.xml should inherit it's layout from the default catalog_product_view.xml, so you only need to add your desired changes.
    – oscarpas
    Nov 7, 2016 at 12:07
  • 1
    Oh yes, sorry that was by mistake. Yes, I've created a file catalog_product_view_type_rooms.xml and its working properly. Thanks.
    – Deeps
    Nov 7, 2016 at 12:41
  • 1
    Glad I could help. Accept the answer, if you don't mind, so others can easily find the solution.
    – oscarpas
    Nov 7, 2016 at 15:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.