Knowledgebase: Site Design

How do I save files to common or common-html folders in FTP?

 

Global HTML template and scripting files (which are used by all Shift4Shop stores) are contained within either your store's "common" folder or "common-html5" folder (if you are using HTML5 themes).

A question we get often is in reference to adding files into these folders.

As mentioned, these folders are used globally by all Shift4Shop users, and as such are controlled directly by Shift4Shop. Therefore, we do not allow the adding of files TO these two folders.

If you are trying to make changes to a file that is present inside either of these folders, you will first need to download the file from the folder (via FTP), make the changes on your desktop, and then upload the altered file(s) to your store's theme folder.

For example, let's say you are using v40001 as your store's selected theme, and you need to make a change to the "view_cart.html" HTML template found in the common folder.

The change cannot be made to the file in the common folder, but you can:

  1. FTP into your account
  2. Navigate to web/assets/templates/common
  3. find and download view_cart.html to your computer.

After downloading the file, you can then make your changes as needed and upload the altered file to your theme folder (web/assets/templates/v40001) to have the changes reflect on your store.

Additional Information
The same basic process occurs when you use the template editor, which can be found by going to Settings >Design >Themes & Styles in your Shift4Shop Online Store Manager and clicking on the "Edit Template (HTML)" button.

This will take you to a page where you will see your selected theme's unique HTML templates. From here, you can click on the "Go to folder:" drop down menu to navigate to the files in the common folder to view all HTML templates. Clicking on "edit" for any file in the common folder will also copy the file to your theme folder.

In most cases, simply having the file present in your theme folder will automatically reference the altered file since the store first looks in your theme folder for files and - if the file is not found there - goes to the common folder. However, the above is true mostly for HTML files.

For CSS and scripting files like jquery and javascript codes, the process is bascially the same, but you will need to also change the reference in your frame.html file for the location of the altered file.

For example, let's say that along with your view_cart.html change, you'd also like to customize one of your store's javascript files.

Using the scenario above:

  1. FTP into your account
  2. Navigate to web/assets/templates/common/js
  3. find and download the js file to your computer.

After downloading the file, you can make your alterations and upload the altered file to your theme folder.

Note:
You may need to create the js folder in your theme folder for this purpose.

For example, web/assets/templates/v40001/js

Then, a fter the altered file is in your theme folder, you will also need to change the reference to the file so that it properly reflects its new location.


Help Desk Software by Kayako fusion