We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2762
    • 1,198 Posts
    OCx RC1

    Display Opencart products and categories in MODX Evolution

    Snippets Features:

    OcxCategory: Display one or more Opencart Category by category id
    OcxProducts: Display one or more Opencart product by product id
    OcxRelated: Display one or more Opencart products searching for a keyword in Opencart fields name, description or model

    Add to cart from MODx (requires Add to Cart via URL link Opencart extension)
    Buy from Amazon (Requires Opencart Amazon Affiliate Webstore Opencart extension )

    OCx Module Features:

    Display and search orders inside MODX Manager
    Display and search products inside MODX Manager
    Display and search categories inside MODX Manager
    Display and search customers inside MODX Manager

    http://www.tattoocms.it/extras/snippets/ocx-opencart-modx-evolution.html

    https://github.com/Nicola1971/OCx

    [ed. note: banzai last edited this post 7 years, 8 months ago.]
      Free MODx Graphic resources and Templates www.tattoocms.it
      -----------------------------------------------------

      MODx IT  www.modx.it
      -----------------------------------------------------

      bubuna.com - Web & Multimedia Design
      • 2762
      • 1,198 Posts
      News RC1.5 with updated Module :

      Now you can check and search opencart orders, products, categories and customers inside your MODx Evo

        Free MODx Graphic resources and Templates www.tattoocms.it
        -----------------------------------------------------

        MODx IT  www.modx.it
        -----------------------------------------------------

        bubuna.com - Web & Multimedia Design
        • 1934
        • 23 Posts
        Hello Nicola,

        I have a problem reading from the opencart database.

        the character_set of opencart database is utf8_general_ci.
        the character_set of modx database is latin1_swedish_ci.

        how do i convert de database query in the OCxProduct snippet from utf8_general_ci to latin1_swedish_ci, because i get strange characters?

        Peter Apeldoorn
          • 2762
          • 1,198 Posts
          I have the same issue because i'm italian and all my modx db are latin1_swedish_ci.

          I'm trying to fix it.

          test this changes, it should improve a little, but not entirely
            Free MODx Graphic resources and Templates www.tattoocms.it
            -----------------------------------------------------

            MODx IT  www.modx.it
            -----------------------------------------------------

            bubuna.com - Web & Multimedia Design
            • 1934
            • 23 Posts
            Thanks for your answer.
            I have tried your changes and now it leaves out all the special characters

            [ed. note: appeltje last edited this post 7 years, 10 months ago.]
              • 1934
              • 23 Posts
              In others words, this is what happens :

              Domaine de Félines => Domaine de Flines

              You see the é is missing [ed. note: appeltje last edited this post 7 years, 10 months ago.]
                • 2762
                • 1,198 Posts
                @Appeltje

                New 1.6.3 with two new parameters:


                • convert: convert charset (default 0)
                • charset: character set (default ISO-8859-1)
                https://github.com/Nicola1971/OCx

                Update both snippets to the new 1.6.3 code and add to your snippet calls
                &convert=`1`


                waiting for your feedback wink
                  Free MODx Graphic resources and Templates www.tattoocms.it
                  -----------------------------------------------------

                  MODx IT  www.modx.it
                  -----------------------------------------------------

                  bubuna.com - Web & Multimedia Design
                  • 1934
                  • 23 Posts
                  Hello Nicola,

                  Grazie, Grazie mille !
                  You're awesome, it works !! Thank you so much.

                  Kindly regards,
                  Appeltje
                    • 2762
                    • 1,198 Posts
                    Still in development with Various updates:

                    version RC 1.7.2

                    - cleaner code (less query, common snippets functions moved to an external file)
                    - more placeholders for chunk template (added: quantity, views and model)
                    - more ordering options (now you can order products by: product_id, price, quantity and viewed)
                    - noResults snippet parameter (now you can customize the "no product found" message)

                    http://www.tattoocms.it/extras/snippets/ocx-opencart-modx-evolution.html

                      Free MODx Graphic resources and Templates www.tattoocms.it
                      -----------------------------------------------------

                      MODx IT  www.modx.it
                      -----------------------------------------------------

                      bubuna.com - Web & Multimedia Design
                      • 9995
                      • 1,613 Posts
                      Hi Nicola, cool stuff, but how does it work?
                      Its possible to run both OC and MODX in the same root?

                      I have some Opencart sites but this would be very nice also to use MODX.
                      Do you have an example live site?
                        Evolution user, I like the back-end speed and simplicity smiley