Announcement

Collapse
No announcement yet.

Creating A Flex Component

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Creating A Flex Component

    I've been trying my hand a creating a Flex Component. I copied the entire folder of the Flex Component I was thinking about tweaking. I thought I should practice creating the import file first so all I did was to rename all the instances of "image-across" to "image-across-popup" along with changing the Name in the flex.json. I was careful in my find and replace and naming. I thought I did the tar.bz2 correctly but I am getting an error:

    Flex Component package does not contain required file
    I did double check the docs https://docs.miva.com/miva10/referen...#import-export

    I have no idea what file could be missing
    Leslie Kirk
    Miva Certified Developer
    Miva Merchant Specialist since 1997
    Previously of Webs Your Way
    (aka Leslie Nord leslienord)

    Email me: [email protected]
    www.lesliekirk.com

    Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

    #2
    I just noticed something in the docs - it's in the extracted view of the mmx-hero. It shows two files that in the export MMX_Hero.css and MMX_Hero.js not inside any folder. In the export I did of the mmx-hero and the structure I have is different:


    VWMk5Q.png


    Did the structure change? Does the import know it changed? Do I need to make changes for my file to be imported?



    Leslie Kirk
    Miva Certified Developer
    Miva Merchant Specialist since 1997
    Previously of Webs Your Way
    (aka Leslie Nord leslienord)

    Email me: [email protected]
    www.lesliekirk.com

    Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

    Comment


      #3
      When I've seen that error before it was because when I was generating the tar file, I was not in the correct folder. You have to navigate inside you root component folder (image-across-popup in your case) then run the following command:

      tar cvfj ../flex_component.tar.bz2 .

      If you're not inside your root folder the tar command will still work but it will add an extra directory in the tar which will break the import

      Brennan Heyde
      VP Product
      Miva, Inc.
      [email protected]
      https://www.miva.com

      Comment


        #4
        Originally posted by Brennan View Post
        When I've seen that error before it was because when I was generating the tar file, I was not in the correct folder. You have to navigate inside you root component folder (image-across-popup in your case) then run the following command:

        tar cvfj ../flex_component.tar.bz2 .

        If you're not inside your root folder the tar command will still work but it will add an extra directory in the tar which will break the import
        Can you give that to me in Mac? When I run the command I use in Terminal, I have to be in the directory that the folder I am trying to tar is in. If I go inside the directory I want to tar, I get an error in the Terminal window.

        tar -jcvf mmx-image-across-popup.tar.bz2 mmx-image-across-popup
        What does it need to be? In Mac?

        Leslie Kirk
        Miva Certified Developer
        Miva Merchant Specialist since 1997
        Previously of Webs Your Way
        (aka Leslie Nord leslienord)

        Email me: [email protected]
        www.lesliekirk.com

        Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

        Comment


          #5
          c10IH6.png



          From what I can tell, it's identical to the one I exported. But I just might be overlooking something.
          Last edited by lesliekirk; 03-16-23, 10:32 AM.
          Leslie Kirk
          Miva Certified Developer
          Miva Merchant Specialist since 1997
          Previously of Webs Your Way
          (aka Leslie Nord leslienord)

          Email me: [email protected]
          www.lesliekirk.com

          Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

          Comment


            #6
            Okay, so I went and did this
            tar cvfj ../mmx-image-across-popup.tar .
            inside the mmx-image-across-popup folder. It half worked, it's only a .tar file not a .tar.bz2

            still think the command is a bit different for a Mac...
            Leslie Kirk
            Miva Certified Developer
            Miva Merchant Specialist since 1997
            Previously of Webs Your Way
            (aka Leslie Nord leslienord)

            Email me: [email protected]
            www.lesliekirk.com

            Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

            Comment

            Working...
            X