Can we modify xsd file of magento core modules or use custom xsd instead of their xsd files? The Next CEO of Stack OverflowMagento 2.3.0: Create product attribute (yes/no) using db_schema.xmlRecommended way to get a list of all valid config fields?Magento 2.3.0 While edit UI component form data not filled up in custom moduleMagento 2.3.0 How to display only product attribute in custom rule condition into the custom admin form using the ui componentHow can I make widgets show properly in tinymce in magento 2.3?Admin accounts migration in magento 2 from magento 1 websiteMagento 2.3.0 How to override wishlist & compare product list page using pluginMagento 2.2.3 How to change validation message Or add new custom rule in system config fieldHow can I use Highcharts graphs in magento2 custom module customer account section in the standard/recommended way with require js?In Magento 2 how to print Product view page?

Audio Conversion With ADS1243

Does Germany produce more waste than the US?

Ising model simulation

How to get the last not-null value in an ordered column of a huge table?

Is it correct to say moon starry nights?

Yu-Gi-Oh cards in Python 3

Are the names of these months realistic?

My ex-girlfriend uses my Apple ID to login to her iPad, do I have to give her my Apple ID password to reset it?

What are the unusually-enlarged wing sections on this P-38 Lightning?

What steps are necessary to read a Modern SSD in Medieval Europe?

Why am I getting "Static method cannot be referenced from a non static context: String String.valueOf(Object)"?

Could a dragon use its wings to swim?

Is fine stranded wire ok for main supply line?

Calculate the Mean mean of two numbers

What would be the main consequences for a country leaving the WTO?

Point distance program written without a framework

(How) Could a medieval fantasy world survive a magic-induced "nuclear winter"?

Can this note be analyzed as a non-chord tone?

Is it ok to trim down a tube patch?

Cannot shrink btrfs filesystem although there is still data and metadata space left : ERROR: unable to resize '/home': No space left on device

Expressing the idea of having a very busy time

Getting Stale Gas Out of a Gas Tank w/out Dropping the Tank

Can Sneak Attack be used when hitting with an improvised weapon?

How do you define an element with an ID attribute using LWC?



Can we modify xsd file of magento core modules or use custom xsd instead of their xsd files?



The Next CEO of Stack OverflowMagento 2.3.0: Create product attribute (yes/no) using db_schema.xmlRecommended way to get a list of all valid config fields?Magento 2.3.0 While edit UI component form data not filled up in custom moduleMagento 2.3.0 How to display only product attribute in custom rule condition into the custom admin form using the ui componentHow can I make widgets show properly in tinymce in magento 2.3?Admin accounts migration in magento 2 from magento 1 websiteMagento 2.3.0 How to override wishlist & compare product list page using pluginMagento 2.2.3 How to change validation message Or add new custom rule in system config fieldHow can I use Highcharts graphs in magento2 custom module customer account section in the standard/recommended way with require js?In Magento 2 how to print Product view page?










2















I need to modify the email_templates.xsd file of Magento_Email module.



So can I modify it, if yes then how and if not then can I use custom file instead of original .xsd file.I tried using my custom .xsd file but it's not working.



Any help would be appreciated.










share|improve this question


























    2















    I need to modify the email_templates.xsd file of Magento_Email module.



    So can I modify it, if yes then how and if not then can I use custom file instead of original .xsd file.I tried using my custom .xsd file but it's not working.



    Any help would be appreciated.










    share|improve this question
























      2












      2








      2








      I need to modify the email_templates.xsd file of Magento_Email module.



      So can I modify it, if yes then how and if not then can I use custom file instead of original .xsd file.I tried using my custom .xsd file but it's not working.



      Any help would be appreciated.










      share|improve this question














      I need to modify the email_templates.xsd file of Magento_Email module.



      So can I modify it, if yes then how and if not then can I use custom file instead of original .xsd file.I tried using my custom .xsd file but it's not working.



      Any help would be appreciated.







      magento2.3.0






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 2 days ago









      Sanjay ChaudharySanjay Chaudhary

      385216




      385216




















          1 Answer
          1






          active

          oldest

          votes


















          2














          Try this, you can extend using preference



          Add di.xml in the below folder




          app/code/Vendor/ModuleName/etc/di.xml




          then add the below code to it



          <?xml version="1.0"?>
          <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
          <preference for="MagentoEmailModelTemplateConfigSchemaLocator" type="VendorModuleNameConfigSchemaLocator" />
          </config>


          then add SchemaLocator.php in the below path




          app/code/Vendor/ModuleName/Config/SchemaLocator.php




          then add the below code to it



          <?php
          namespace VendorModuleNameConfig;
          use MagentoFrameworkModuleDir;

          class SchemaLocator extends MagentoEmailModelTemplateConfigSchemaLocator implements
          MagentoFrameworkConfigSchemaLocatorInterface

          protected $schema = null;
          /**
          * @param MagentoFrameworkModuleDirReader $moduleReader
          */
          public function __construct(MagentoFrameworkModuleDirReader $moduleReader)

          $this->_schema = $moduleReader->getModuleDir(Dir::MODULE_ETC_DIR, 'Vendor_Module') . '/email_templates.xsd';


          /**
          * @inheritdoc
          */
          public function getSchema()

          return $this->_schema;


          /**
          * @inheritdoc
          */
          public function getPerFileSchema()

          return $this->_schema;




          the above code will change the path of email_templates.xsd to your custom module from core.



          Finally, add the email_templates.xsd in the below path




          app/code/Vendor/ModuleName/etc/email_templates.xsd




          then you can add you changes there.



          NOTE : This is working example in M2.3 and in previous version used plugin instead of preference






          share|improve this answer




















          • 1





            Thanks for your answer, it saved a lot of time and I would just like to update your answer as it was throwing "unknown validation error" kind of issue. Rest is perfect.

            – Sanjay Chaudhary
            yesterday











          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "479"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f267983%2fcan-we-modify-xsd-file-of-magento-core-modules-or-use-custom-xsd-instead-of-thei%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          Try this, you can extend using preference



          Add di.xml in the below folder




          app/code/Vendor/ModuleName/etc/di.xml




          then add the below code to it



          <?xml version="1.0"?>
          <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
          <preference for="MagentoEmailModelTemplateConfigSchemaLocator" type="VendorModuleNameConfigSchemaLocator" />
          </config>


          then add SchemaLocator.php in the below path




          app/code/Vendor/ModuleName/Config/SchemaLocator.php




          then add the below code to it



          <?php
          namespace VendorModuleNameConfig;
          use MagentoFrameworkModuleDir;

          class SchemaLocator extends MagentoEmailModelTemplateConfigSchemaLocator implements
          MagentoFrameworkConfigSchemaLocatorInterface

          protected $schema = null;
          /**
          * @param MagentoFrameworkModuleDirReader $moduleReader
          */
          public function __construct(MagentoFrameworkModuleDirReader $moduleReader)

          $this->_schema = $moduleReader->getModuleDir(Dir::MODULE_ETC_DIR, 'Vendor_Module') . '/email_templates.xsd';


          /**
          * @inheritdoc
          */
          public function getSchema()

          return $this->_schema;


          /**
          * @inheritdoc
          */
          public function getPerFileSchema()

          return $this->_schema;




          the above code will change the path of email_templates.xsd to your custom module from core.



          Finally, add the email_templates.xsd in the below path




          app/code/Vendor/ModuleName/etc/email_templates.xsd




          then you can add you changes there.



          NOTE : This is working example in M2.3 and in previous version used plugin instead of preference






          share|improve this answer




















          • 1





            Thanks for your answer, it saved a lot of time and I would just like to update your answer as it was throwing "unknown validation error" kind of issue. Rest is perfect.

            – Sanjay Chaudhary
            yesterday















          2














          Try this, you can extend using preference



          Add di.xml in the below folder




          app/code/Vendor/ModuleName/etc/di.xml




          then add the below code to it



          <?xml version="1.0"?>
          <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
          <preference for="MagentoEmailModelTemplateConfigSchemaLocator" type="VendorModuleNameConfigSchemaLocator" />
          </config>


          then add SchemaLocator.php in the below path




          app/code/Vendor/ModuleName/Config/SchemaLocator.php




          then add the below code to it



          <?php
          namespace VendorModuleNameConfig;
          use MagentoFrameworkModuleDir;

          class SchemaLocator extends MagentoEmailModelTemplateConfigSchemaLocator implements
          MagentoFrameworkConfigSchemaLocatorInterface

          protected $schema = null;
          /**
          * @param MagentoFrameworkModuleDirReader $moduleReader
          */
          public function __construct(MagentoFrameworkModuleDirReader $moduleReader)

          $this->_schema = $moduleReader->getModuleDir(Dir::MODULE_ETC_DIR, 'Vendor_Module') . '/email_templates.xsd';


          /**
          * @inheritdoc
          */
          public function getSchema()

          return $this->_schema;


          /**
          * @inheritdoc
          */
          public function getPerFileSchema()

          return $this->_schema;




          the above code will change the path of email_templates.xsd to your custom module from core.



          Finally, add the email_templates.xsd in the below path




          app/code/Vendor/ModuleName/etc/email_templates.xsd




          then you can add you changes there.



          NOTE : This is working example in M2.3 and in previous version used plugin instead of preference






          share|improve this answer




















          • 1





            Thanks for your answer, it saved a lot of time and I would just like to update your answer as it was throwing "unknown validation error" kind of issue. Rest is perfect.

            – Sanjay Chaudhary
            yesterday













          2












          2








          2







          Try this, you can extend using preference



          Add di.xml in the below folder




          app/code/Vendor/ModuleName/etc/di.xml




          then add the below code to it



          <?xml version="1.0"?>
          <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
          <preference for="MagentoEmailModelTemplateConfigSchemaLocator" type="VendorModuleNameConfigSchemaLocator" />
          </config>


          then add SchemaLocator.php in the below path




          app/code/Vendor/ModuleName/Config/SchemaLocator.php




          then add the below code to it



          <?php
          namespace VendorModuleNameConfig;
          use MagentoFrameworkModuleDir;

          class SchemaLocator extends MagentoEmailModelTemplateConfigSchemaLocator implements
          MagentoFrameworkConfigSchemaLocatorInterface

          protected $schema = null;
          /**
          * @param MagentoFrameworkModuleDirReader $moduleReader
          */
          public function __construct(MagentoFrameworkModuleDirReader $moduleReader)

          $this->_schema = $moduleReader->getModuleDir(Dir::MODULE_ETC_DIR, 'Vendor_Module') . '/email_templates.xsd';


          /**
          * @inheritdoc
          */
          public function getSchema()

          return $this->_schema;


          /**
          * @inheritdoc
          */
          public function getPerFileSchema()

          return $this->_schema;




          the above code will change the path of email_templates.xsd to your custom module from core.



          Finally, add the email_templates.xsd in the below path




          app/code/Vendor/ModuleName/etc/email_templates.xsd




          then you can add you changes there.



          NOTE : This is working example in M2.3 and in previous version used plugin instead of preference






          share|improve this answer















          Try this, you can extend using preference



          Add di.xml in the below folder




          app/code/Vendor/ModuleName/etc/di.xml




          then add the below code to it



          <?xml version="1.0"?>
          <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
          <preference for="MagentoEmailModelTemplateConfigSchemaLocator" type="VendorModuleNameConfigSchemaLocator" />
          </config>


          then add SchemaLocator.php in the below path




          app/code/Vendor/ModuleName/Config/SchemaLocator.php




          then add the below code to it



          <?php
          namespace VendorModuleNameConfig;
          use MagentoFrameworkModuleDir;

          class SchemaLocator extends MagentoEmailModelTemplateConfigSchemaLocator implements
          MagentoFrameworkConfigSchemaLocatorInterface

          protected $schema = null;
          /**
          * @param MagentoFrameworkModuleDirReader $moduleReader
          */
          public function __construct(MagentoFrameworkModuleDirReader $moduleReader)

          $this->_schema = $moduleReader->getModuleDir(Dir::MODULE_ETC_DIR, 'Vendor_Module') . '/email_templates.xsd';


          /**
          * @inheritdoc
          */
          public function getSchema()

          return $this->_schema;


          /**
          * @inheritdoc
          */
          public function getPerFileSchema()

          return $this->_schema;




          the above code will change the path of email_templates.xsd to your custom module from core.



          Finally, add the email_templates.xsd in the below path




          app/code/Vendor/ModuleName/etc/email_templates.xsd




          then you can add you changes there.



          NOTE : This is working example in M2.3 and in previous version used plugin instead of preference







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited yesterday









          Teja Bhagavan Kollepara

          3,00841949




          3,00841949










          answered 2 days ago









          Prathap GunasekaranPrathap Gunasekaran

          1,5761618




          1,5761618







          • 1





            Thanks for your answer, it saved a lot of time and I would just like to update your answer as it was throwing "unknown validation error" kind of issue. Rest is perfect.

            – Sanjay Chaudhary
            yesterday












          • 1





            Thanks for your answer, it saved a lot of time and I would just like to update your answer as it was throwing "unknown validation error" kind of issue. Rest is perfect.

            – Sanjay Chaudhary
            yesterday







          1




          1





          Thanks for your answer, it saved a lot of time and I would just like to update your answer as it was throwing "unknown validation error" kind of issue. Rest is perfect.

          – Sanjay Chaudhary
          yesterday





          Thanks for your answer, it saved a lot of time and I would just like to update your answer as it was throwing "unknown validation error" kind of issue. Rest is perfect.

          – Sanjay Chaudhary
          yesterday

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Magento Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f267983%2fcan-we-modify-xsd-file-of-magento-core-modules-or-use-custom-xsd-instead-of-thei%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Sum ergo cogito? 1 nng

          三茅街道4182Guuntc Dn precexpngmageondP