Keeping your custom templates update safe

Timo ASA 1 7 Comments

By default, ASA 1 looks for the HTML template files in its subdirectories /tpl/ and /tpl/built-in/.

You should never change the file in built-in as those are the templates shipped with ASA. They will be overwritten with new updates. You should put your custom templates one level higher in the /tpl/ directory. On update, ASA 1 tries to copy all files in the /tpl/ directory to a temporary destination and move them back after the update process is completed. However, this might not work on every server.

The best place to keep your custom template file is a subdirectory in your theme (or child theme) directory called “asa”. This folder is the first ASA checks for custom templates and it is absolutely update safe.

how to keep cutom templates update safe

 

Remember: No matter where you keep your custom templates, it is always a good choice to have a backup.

Share this Post

About the Author

Timo

I started working on Amazon Simple Admin back in 2007 because I could not find an Amazon plugin for Wordpress that met my requirements. After many years of experience and hard work, the complete new ASA 2 Pro was released in early 2016. Follow me on Twitter.

Comments 7

  1. Hello, I just updated the plugin yesterday. Thanks to reading this blogpost before I could safe my custom templates and everything works fine again! Thank you for your great work and for this phantastic plugin! Best wishes, Matthias

    1. Post
      Author
  2. That’s a very good Advice!But what happens, if I update my Theme? Than I think my templates will be also lost?Can I make a directory for the templates directly in the /wp-content/ Folder?

    1. Post
      Author

      Hi Michael,
      that’s not possible. You just have to remember the asa directory in your theme folder.
      We will get rid of the template issue with ASA 2 which stores templates in the database.

  3. Hi Timo,Just downloaded your plugin. Congratulations on a very professional piece of work.As I mentioned I am just starting to use the plugin and read the information on thr website etc.I have a question regarding compliance with the Amazon API requirements about having to display a timeif the price is not updated each hour.If I set the cache time to 3600 (or less) will a new api call be made according to that setting?

    1. Post
      Author

      Hi Maurie,
      thanks for using ASA. You are right. If you set the cache to 3600 (seconds), a product will get refreshed automatically on page access if its last refresh timestamp is older.

Leave a Reply

Your email address will not be published. Required fields are marked *