Menu Close

    Class Setting in Pimcore

    In the series of Pimcore blogs”How to create Class Data Object in Pimcore?“, In this blog, I will explain the Class Setting in Pimcore. So, if you want to know more about How to create a class data object in Pimcore, please check this blog.

    So, you can browse “Setting -> Data Objects -> Classes” in Pimcore and click on the “Class” that you have been created.


    You can click the class that you have created. You can see in the screenshot that I have created a new class “Test_PIM”. You can click on the class to see the setting.

    class setting in pimcore

    Let’s discuss first point in the setting “Parent PHP Class”.

    Parent PHP Class

    In Pimcore, you can configure the Parent PHP class. Pimcore classes work like any data object in PHP so if you are creating any class then you can inherit it from other classes too. By Default, in Pimcore, the class data object can be inherited from “Pimcore\Model\DataObject\Concrete” but you can change it.

    Searching for an experienced
    Pimcore Company ?
    Read More

    So, you can create a new parent class and class objects can be inherited in this class. If you have created a new Parent Class then you have to specify it in the Parent PHP class.

    parent php class in Pimcore

    Allow Inheritance

    Pimcore data objects support inheritance as the simple PHP class does. The allow inheritance option helps to reduce a repetitive task.

    For example, if you have a product type of clothes. In this type of product, you have two categories, men and women. So, there will be some small changes in these types of categories in terms of size and color.

    With the allow inheritance, you can just create a class with the common attribute and you can inherit this class in other classes.

    Inheritance in Pimcore


    In the eCommerce, almost every product comes with a variant option. You can easily manage the variants in Pimcore.

    The variants products are products come with the same features but different in some aspect from each other. For example, you have a product Shirt with variants Red, Blue, and Green. So all the attributes of the shirt product will be the same but there will change in the color.

    In Pimcore, with the help of Inheritance, you can just create the variants easily. You can create a Variant class and inherit this class in to the Parent class to create the variants.

    variants in pimcore 1

    You can also create a tree structure of the variant products.

    variants in Pimcore

    Custom Icon for Classes

    In the Pimcore classes, you can add the custom icons for the classes and object so that you can easily identify.

    For example, you have a class “Clothes” and two objects “Men” and “Women” then you can add the different icons for these. It makes more easy to identify in tree view of data.

    custom icon for classes in pimcore

    Custom Layout Pimcore Classes

    In Pimcore, you can create the custom layout of the Pimcore classes. The custom layout helps to visualize your products.

    You can just click on the “configure custom layouts”.

    custom layout in Pimcore

    After that, a new window will be open where you can add a custom layout.

    custom layout in Pimcore 1


    We provide end to end Pimcore support for the eCommerce and PIM development. We have created the Pimcore extension for various eCommerce frameworks.

    For any enquiry, you can just drop an email to [email protected]

    . . .
    Discuss on Helpdesk

    Leave a Comment

    Your email address will not be published. Required fields are marked*

    Be the first to comment.

    Back to Top