X Cart functionality with Twig, resources, creating a theme










0















I've recently started making a website using the X-Cart platform.



I've read some of pages from the official documentation, but a lot of things do not match the current version of X-Cart (5.3).



From what I understand, they switched from Smarty to Twig, but the file locations and hierarchy have changed as well. Even the database structure is modified and old tables don't have the same names.




I'm currently trying to entirely replace the header / footer of my website. The HTML files are included in lists and displayed with twig, but I don't know how to find those specific files.



Also, I've used the Webmaster Kit add-on in order to find the templates. The problem is that every single element displayed on the page is built from multiple places. Most of them can be found in /customer/layout/, but are part of lists such as layout.header, so the twig files only include the wrappers and retrieve the rest of the code from the database, at least that's my understanding of the situation.



 ##
# Header logo
#
# @ListChild (list="layout.header", weight="100")
#
<div id=" this.getUniqueId('logo') " class="company-logo">
<a href=" url() " title=" t('Home') " rel="home"><img src=" this.getLogo() " alt=" t('Home') " /></a>
</div>


I tried accessing layout.header through my database, but the table shown in the documentation doesn't exist anymore.



Could someone please explain the hierarchy and guide me through the steps to create a custom header / footer ?



I did create my costum module, but I still don't know which files are the right to edit in order to make changes happen on my website.



Thank you, let me know if you need additional details.










share|improve this question


























    0















    I've recently started making a website using the X-Cart platform.



    I've read some of pages from the official documentation, but a lot of things do not match the current version of X-Cart (5.3).



    From what I understand, they switched from Smarty to Twig, but the file locations and hierarchy have changed as well. Even the database structure is modified and old tables don't have the same names.




    I'm currently trying to entirely replace the header / footer of my website. The HTML files are included in lists and displayed with twig, but I don't know how to find those specific files.



    Also, I've used the Webmaster Kit add-on in order to find the templates. The problem is that every single element displayed on the page is built from multiple places. Most of them can be found in /customer/layout/, but are part of lists such as layout.header, so the twig files only include the wrappers and retrieve the rest of the code from the database, at least that's my understanding of the situation.



     ##
    # Header logo
    #
    # @ListChild (list="layout.header", weight="100")
    #
    <div id=" this.getUniqueId('logo') " class="company-logo">
    <a href=" url() " title=" t('Home') " rel="home"><img src=" this.getLogo() " alt=" t('Home') " /></a>
    </div>


    I tried accessing layout.header through my database, but the table shown in the documentation doesn't exist anymore.



    Could someone please explain the hierarchy and guide me through the steps to create a custom header / footer ?



    I did create my costum module, but I still don't know which files are the right to edit in order to make changes happen on my website.



    Thank you, let me know if you need additional details.










    share|improve this question
























      0












      0








      0








      I've recently started making a website using the X-Cart platform.



      I've read some of pages from the official documentation, but a lot of things do not match the current version of X-Cart (5.3).



      From what I understand, they switched from Smarty to Twig, but the file locations and hierarchy have changed as well. Even the database structure is modified and old tables don't have the same names.




      I'm currently trying to entirely replace the header / footer of my website. The HTML files are included in lists and displayed with twig, but I don't know how to find those specific files.



      Also, I've used the Webmaster Kit add-on in order to find the templates. The problem is that every single element displayed on the page is built from multiple places. Most of them can be found in /customer/layout/, but are part of lists such as layout.header, so the twig files only include the wrappers and retrieve the rest of the code from the database, at least that's my understanding of the situation.



       ##
      # Header logo
      #
      # @ListChild (list="layout.header", weight="100")
      #
      <div id=" this.getUniqueId('logo') " class="company-logo">
      <a href=" url() " title=" t('Home') " rel="home"><img src=" this.getLogo() " alt=" t('Home') " /></a>
      </div>


      I tried accessing layout.header through my database, but the table shown in the documentation doesn't exist anymore.



      Could someone please explain the hierarchy and guide me through the steps to create a custom header / footer ?



      I did create my costum module, but I still don't know which files are the right to edit in order to make changes happen on my website.



      Thank you, let me know if you need additional details.










      share|improve this question














      I've recently started making a website using the X-Cart platform.



      I've read some of pages from the official documentation, but a lot of things do not match the current version of X-Cart (5.3).



      From what I understand, they switched from Smarty to Twig, but the file locations and hierarchy have changed as well. Even the database structure is modified and old tables don't have the same names.




      I'm currently trying to entirely replace the header / footer of my website. The HTML files are included in lists and displayed with twig, but I don't know how to find those specific files.



      Also, I've used the Webmaster Kit add-on in order to find the templates. The problem is that every single element displayed on the page is built from multiple places. Most of them can be found in /customer/layout/, but are part of lists such as layout.header, so the twig files only include the wrappers and retrieve the rest of the code from the database, at least that's my understanding of the situation.



       ##
      # Header logo
      #
      # @ListChild (list="layout.header", weight="100")
      #
      <div id=" this.getUniqueId('logo') " class="company-logo">
      <a href=" url() " title=" t('Home') " rel="home"><img src=" this.getLogo() " alt=" t('Home') " /></a>
      </div>


      I tried accessing layout.header through my database, but the table shown in the documentation doesn't exist anymore.



      Could someone please explain the hierarchy and guide me through the steps to create a custom header / footer ?



      I did create my costum module, but I still don't know which files are the right to edit in order to make changes happen on my website.



      Thank you, let me know if you need additional details.







      twig x-cart






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 18 '17 at 11:23









      Alex HerascuAlex Herascu

      93




      93






















          1 Answer
          1






          active

          oldest

          votes


















          0














          The header section is defined by the skins/customer/layout/header/main.header.twig template or you can just assign all needed templates to layout.header view list and it will have the same effect. You may also want to remove existing templates and viewer classes from this list.



          All these procedures are explained here:



          • http://devs.x-cart.com/en/getting_started/step_2_-_applying_design_changes.html

          • http://devs.x-cart.com/en/design_changes/basic_guide_to_theme_creation.html

          If you want to look up what templates and viewer classes are in the list, then you can run following MySQL query:



          SELECT * FROM xc_view_lists WHERE list="layout.header";



          As for footer, the layout.footer defines this area or just override the skins/customer/layout/footer/main.footer.twigtemplate.



          Hope, it helps.



          Tony






          share|improve this answer






















            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            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: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            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%2fstackoverflow.com%2fquestions%2f45755463%2fx-cart-functionality-with-twig-resources-creating-a-theme%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









            0














            The header section is defined by the skins/customer/layout/header/main.header.twig template or you can just assign all needed templates to layout.header view list and it will have the same effect. You may also want to remove existing templates and viewer classes from this list.



            All these procedures are explained here:



            • http://devs.x-cart.com/en/getting_started/step_2_-_applying_design_changes.html

            • http://devs.x-cart.com/en/design_changes/basic_guide_to_theme_creation.html

            If you want to look up what templates and viewer classes are in the list, then you can run following MySQL query:



            SELECT * FROM xc_view_lists WHERE list="layout.header";



            As for footer, the layout.footer defines this area or just override the skins/customer/layout/footer/main.footer.twigtemplate.



            Hope, it helps.



            Tony






            share|improve this answer



























              0














              The header section is defined by the skins/customer/layout/header/main.header.twig template or you can just assign all needed templates to layout.header view list and it will have the same effect. You may also want to remove existing templates and viewer classes from this list.



              All these procedures are explained here:



              • http://devs.x-cart.com/en/getting_started/step_2_-_applying_design_changes.html

              • http://devs.x-cart.com/en/design_changes/basic_guide_to_theme_creation.html

              If you want to look up what templates and viewer classes are in the list, then you can run following MySQL query:



              SELECT * FROM xc_view_lists WHERE list="layout.header";



              As for footer, the layout.footer defines this area or just override the skins/customer/layout/footer/main.footer.twigtemplate.



              Hope, it helps.



              Tony






              share|improve this answer

























                0












                0








                0







                The header section is defined by the skins/customer/layout/header/main.header.twig template or you can just assign all needed templates to layout.header view list and it will have the same effect. You may also want to remove existing templates and viewer classes from this list.



                All these procedures are explained here:



                • http://devs.x-cart.com/en/getting_started/step_2_-_applying_design_changes.html

                • http://devs.x-cart.com/en/design_changes/basic_guide_to_theme_creation.html

                If you want to look up what templates and viewer classes are in the list, then you can run following MySQL query:



                SELECT * FROM xc_view_lists WHERE list="layout.header";



                As for footer, the layout.footer defines this area or just override the skins/customer/layout/footer/main.footer.twigtemplate.



                Hope, it helps.



                Tony






                share|improve this answer













                The header section is defined by the skins/customer/layout/header/main.header.twig template or you can just assign all needed templates to layout.header view list and it will have the same effect. You may also want to remove existing templates and viewer classes from this list.



                All these procedures are explained here:



                • http://devs.x-cart.com/en/getting_started/step_2_-_applying_design_changes.html

                • http://devs.x-cart.com/en/design_changes/basic_guide_to_theme_creation.html

                If you want to look up what templates and viewer classes are in the list, then you can run following MySQL query:



                SELECT * FROM xc_view_lists WHERE list="layout.header";



                As for footer, the layout.footer defines this area or just override the skins/customer/layout/footer/main.footer.twigtemplate.



                Hope, it helps.



                Tony







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Sep 5 '17 at 12:21









                TonyTony

                1414




                1414





























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • 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%2fstackoverflow.com%2fquestions%2f45755463%2fx-cart-functionality-with-twig-resources-creating-a-theme%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

                    27

                    Top Tejano songwriter Luis Silva dead of heart attack at 64

                    Category:Rhetoric