4 Replies Latest reply: Sep 12, 2013 5:12 PM by Gopinath Ramasamy RSS

    ATG extending OOTB enumerated data type

    PrincessPoonam

      Hi All,

        

      If i have to add a extra payment group/option to an data-type="enumerated" in ATG repository, should we ,

       

      1) Use the OOTB table in our extended orderRepository.xml???? Coz ATG recomends to use auxiliary when extending the OOTB properties.

      2)Should we mention all the OOTB options along with my custom option????

      3) Will there be any SQL change for adding a extra option in the enumarated data-type????

      4)Can you please let me know more about  data-type="enumerated" .

        

      <item-descriptor name="paymentGroup" sub-type-property="type" version-property="version" expert="true" cache-mode="simple" display-name-resource="itemDescriptorPaymentGroup" item-cache-timeout="180000">

      <table name="dcspp_pay_group" type="primary" id-column-name="payment_group_id">

            <attribute name="resourceBundle" value="atg.commerce.OrderRepositoryTemplateResources"/>

           <property name="type" data-type="enumerated" default="paymentGroup" expert="true" category-resource="categoryInfo" display-name-resource="type">

              <attribute name="useCodeForValue" value="false"/>

              <option value="paymentGroup" code="0"/>

              <option value="creditCard" code="1"/>

              <option value="giftCertificate" code="2"/>

              <option value="storeCredit" code="3"/>

               <option value="MyPaymentGroup" code="3"/>

              <option value="invoiceRequest" code="5000"/>

              <attribute name="resourceBundle" value="atg.commerce.OrderRepositoryTemplateResources"/>

              <attribute name="propertySortPriority" value="10"/>

            </property>

      ..............................................................

      </table>

       

      Regards

        • 1. Re: ATG extending OOTB enumerated data type
          Gopinath Ramasamy

          Hi,

           

          You can use OOTB tables for this requirement as you are not changing the table definitions.

           

          No SQL change is required.

           

          You need to mention all the OOTB options when you say xml-combine as replace. Make sure that you are getting the correct repository xml file after combining by examining the template definition thro dyn admin.

           

          One more good practice is use reasonably greater value to the code to your custom option (instead of giving the next number) as it would help during migration.

          For Ex, in your example you have given code as 3 for your custom option. If ATG adds one more payment group they would use this code. If you use  something like 100, it avoids the rework during migration.

           

          Hope this helps.

          Keep posting the updates / questions.

           

          Thanks,

          Gopinath Ramasamy

          • 2. Re: ATG extending OOTB enumerated data type
            Clarer-Oracle

            The ATG Repository Guide recommends 101-999 for custom enum values.  The section titled "Reserved Enumerated Property Integer Codes" lists the number ranges that are reserved for the products and modules provided by ATG.

            • 3. Re: ATG extending OOTB enumerated data type
              PrincessPoonam

              @Gopinath,

               

              As you mentioned    "You need to mention all the OOTB options when you say xml-combine as replace."

              Is it xml-combine="append" or  xml-combine="replace"???? when do we have to mention all the OOTB options along with our custom option.

               

              Regards

              • 4. Re: ATG extending OOTB enumerated data type
                Gopinath Ramasamy

                Hi,

                 

                When it is xml-combine="append", you just need to mention your custom options.

                 

                Hope this helps.

                Keep posting the questions / updates.

                 

                Thanks,

                Gopinath Ramasamy