Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Feb 2007
    Location
    South Florida, USA
    Posts
    1,192
    Plugin Contributions
    4

    Default Removing a directory and copying its files only

    I am trying to follow instructions in Manual but they are outdated and refer to File Manager.
    As a proud Linux user I wouldn't touch that stuff with a ten foot pole.
    But I messed up because the author recommends to change files into a custom directory to void customization being broken by an update to /includes/templates/responsive_classic.
    So I decided to create a directory called mein and copying files from responsive_classic to mein.
    But I ended up with a copy of responsive_classic directory inside mein.
    There are several solutions to this:
    1. remove the responsive directory inside mein and then copy files from responsive into it
    2. Rename the responsive directory to mein using the mv command and then create an empty responsive classic at /includes/templates, so the update will update that one, and leave mein alone, which will be set as default in configuration settings.
    Problem with 1. is that I get error saying that directory is not empty, I understand that is a syntax error form my part.
    The most important thing is that now I think that author's advice is wrong because I might be able to save my customizations but I might lose important file updates to the responsive template.
    Please help.

  2. #2
    Join Date
    Dec 2020
    Location
    Ohio
    Posts
    13
    Plugin Contributions
    1

    Default Re: Removing a directory and copying its files only

    I'm not exactly sure what you're trying to do, but it sounds like you want to create a custom template based on the responsive_classic template. This excellent plugin makes that easy - https://www.zen-cart.com/downloads.php?do=file&id=2087. I don't understand your Linux comment. The instructions you read probably are referring to the CPanel File Manager, which is usable with any browser, regardless of OS.

  3. #3
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    8,845
    Plugin Contributions
    118

    Default Re: Removing a directory and copying its files only

    The Unix "cp" command is easy to mess up. When you say,
    >So I decided to create a directory called mein and copying files from responsive_classic to mein.
    > But I ended up with a copy of responsive_classic directory inside mein.

    This tells me you did (something like)

    mkdir mein
    cp -r responsive_classic mein

    This will copy the resposive classic folder into mein.

    Clean up:
    rm -rf mein
    cp -r responsive_classic mein

    This creates a new folder called mein with the contents of responsive classic.

    If you want to create the folder first then copy, you can do this, but the syntax is different from what you did:

    mkdir mein
    cp -r responsive_classic/* mein/
    Last edited by swguy; 5 Sep 2022 at 12:09 PM.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  4. #4
    Join Date
    Feb 2007
    Location
    South Florida, USA
    Posts
    1,192
    Plugin Contributions
    4

    Default Re: Removing a directory and copying its files only

    Great post, thank you.
    What do you think of author's (Richard Underwood) advice to create a different directory so customizations won't be overwritten by updates?
    I think I will delete the mein directory and keep the defaults even at the cost of losing customizations. I prefer to keep updates to files.

  5. #5
    Join Date
    Feb 2007
    Location
    South Florida, USA
    Posts
    1,192
    Plugin Contributions
    4

    Default Re: Removing a directory and copying its files only

    Quote Originally Posted by earp View Post
    I'm not exactly sure what you're trying to do, but it sounds like you want to create a custom template based on the responsive_classic template. This excellent plugin makes that easy - https://www.zen-cart.com/downloads.php?do=file&id=2087. I don't understand your Linux comment. The instructions you read probably are referring to the CPanel File Manager, which is usable with any browser, regardless of OS.
    I don't know anything about CPanel and wish to stay in blissful ignorance of it, since I only know it is unnecessary if you use Linux, same as so many things that books on ZenCart state and even tutorials on this website. I don't think plugin is necessary but thanks anyway. I am a software minimalist and use only what I need, don't want to cram my computers or my phone with apps.

  6. #6
    Join Date
    Feb 2007
    Location
    South Florida, USA
    Posts
    1,192
    Plugin Contributions
    4

    Default Re: Removing a directory and copying its files only

    Quote Originally Posted by ckosloff View Post
    I am trying to follow instructions in Manual but they are outdated and refer to File Manager.
    As a proud Linux user I wouldn't touch that stuff with a ten foot pole.
    But I messed up because the author recommends to change files into a custom directory to void customization being broken by an update to /includes/templates/responsive_classic.
    So I decided to create a directory called mein and copying files from responsive_classic to mein.
    But I ended up with a copy of responsive_classic directory inside mein.
    There are several solutions to this:
    1. remove the responsive directory inside mein and then copy files from responsive into it
    2. Rename the responsive directory to mein using the mv command and then create an empty responsive classic at /includes/templates, so the update will update that one, and leave mein alone, which will be set as default in configuration settings.
    Problem with 1. is that I get error saying that directory is not empty, I understand that is a syntax error form my part.
    The most important thing is that now I think that author's advice is wrong because I might be able to save my customizations but I might lose important file updates to the responsive template.
    Please help.

    You are right about what I did.
    Now I am about to clean up the extra directory that I created and stay with the default template.

  7. #7
    Join Date
    Feb 2007
    Location
    South Florida, USA
    Posts
    1,192
    Plugin Contributions
    4

    Default Re: Removing a directory and copying its files only

    Quote Originally Posted by swguy View Post
    The Unix "cp" command is easy to mess up. When you say,
    >So I decided to create a directory called mein and copying files from responsive_classic to mein.
    > But I ended up with a copy of responsive_classic directory inside mein.

    This tells me you did (something like)

    mkdir mein
    cp -r responsive_classic mein

    This will copy the resposive classic folder into mein.

    Clean up:
    rm -rf mein
    cp -r responsive_classic mein

    This creates a new folder called mein with the contents of responsive classic.

    If you want to create the folder first then copy, you can do this, but the syntax is different from what you did:

    mkdir mein
    cp -r responsive_classic/* mein/

    Sorry about my mistake.
    My last post was intended for you, but I quoted myself, should stop playing chess online until 3am. I am not fully awake.

  8. #8
    Join Date
    Feb 2007
    Location
    South Florida, USA
    Posts
    1,192
    Plugin Contributions
    4

    Default Re: Removing a directory and copying its files only

    Quote Originally Posted by earp View Post
    I'm not exactly sure what you're trying to do, but it sounds like you want to create a custom template based on the responsive_classic template. This excellent plugin makes that easy - https://www.zen-cart.com/downloads.php?do=file&id=2087. I don't understand your Linux comment. The instructions you read probably are referring to the CPanel File Manager, which is usable with any browser, regardless of OS.

    Thanks for tip on module, but I don't think that I will use it.
    Regarding CPanel I don't know anything about it, except that it is unnecessary for a Linux user like so many things in Zen Cart books.

  9. #9
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    8,845
    Plugin Contributions
    118

    Default Re: Removing a directory and copying its files only

    > What do you think of author's (Richard Underwood) advice to create a different directory so customizations won't be overwritten by updates?

    I don't know who he is or what you are referring to. But I would encourage you to read the official help pages on this.
    Yes, you want to use template overrides.

    https://docs.zen-cart.com/user/templ...ate_overrides/
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  10. #10
    Join Date
    Feb 2007
    Location
    South Florida, USA
    Posts
    1,192
    Plugin Contributions
    4

    Default Re: Removing a directory and copying its files only

    Quote Originally Posted by swguy View Post
    > What do you think of author's (Richard Underwood) advice to create a different directory so customizations won't be overwritten by updates?

    I don't know who he is or what you are referring to. But I would encourage you to read the official help pages on this.
    Yes, you want to use template overrides.

    https://docs.zen-cart.com/user/templ...ate_overrides/

    Richard Underwood is the author of a Zen Cart Manual, there are more than one, my choice is the one by Go Koon Hoek, that is how I learned Zen Cart a long time ago, forgot a lot.
    Thanks for the document I will implement overrides, but I have a doubt my overrides cannot have the same name as the downloaded files, so if an update comes like 1.5.8 it will load different files that will not go to my overriden folders, so I will miss the update.
    Am I right, what is the procedure then, compare files and chose?

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 12
    Last Post: 19 Sep 2016, 12:30 PM
  2. Copying and importing files folders, files
    By maxapplle in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 21 Mar 2010, 04:27 AM
  3. Upgraded, and now its gone back to its default state
    By multichild in forum Upgrading from 1.3.x to 1.3.9
    Replies: 2
    Last Post: 29 Jul 2009, 03:39 PM
  4. copying all files and products (moving)
    By [email protected] in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 10 Oct 2008, 02:12 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR