sqlBash/batchImportDatabasesFromFolder.sh
sqlBash/batchImportCompressedDatabasesFromFolder.sh
sqlBash/downloadAllDatabases.sh
sqlBash/downloadAllDatabasesViaCron.sh
sqlBash/magentoDbDumpWithoutN98.sh
sqlBash/streamAllDatabasesFromListToHere.sh
sqlBash/streamAllDatabasesHere.sh
sqlBash/updateMagentoDatabase.sh
Transfer a database from one magento install (remote) to another installation (local)
This drops the tables in the current local database. So can be used on a cron to keep to db's in sync, but only if the local db's changes are not required to be kept.
remove comments from xml files in a folder
an example of a question which will ask again unless an acceptable response given
run though a ist of files to copy and files to symlink
stop varien (or similar frameworks) throwing xml validator warnings from comments, by converting into --!> in all xml files from the folder it is in. e.g. turns all into
run from command line
echo's out a table of images not found
advised column: sku
accepted image columns: 'image','small_image','thumbnail','media_gallery'
php/copyFilesToOneLocation.php
A script to get all files from a folder recursively and copy those files into another folder and will rename files adding a no. to the end if required. It is limited to 1000 files with the same original name.
It gives a comma separated output with source file location and destination filename. This can be output into a file running the below from shell
php -f copyFilesToOneLocation.php > fileMapping.csv
It works with multiple image column, including columns like 'additional_images' where the cell can have multiple images split by a delimiter.
$fields should be an array where the key is the column name and the "cell delimiter" mentioned above as the value.
e.g. the below would have a cell delimiter of , and file delimiter of ;
sku;website_id;additional_images;additional_image_labels
123a;1;blue.jpg,red.jpg;blue,red
124a;1;blue.jpg,red.jpg;blue,red
and would have:
$fileDelimiter = ';';
$hasHeader = true;
$fields = [
'additional_images' => ',' // field name => row delimiter (empty string for none)
];
Make a copy of the two sitemaps and name them 'newSitemap.xml' & 'oldSitemap.xml', in the same folder as the file
run php compareSiteMaps.php
it will output to the screen
php/getClassesUsingInterface.php This assumes psr4 is followed .ie the names are the same as their class
php/linkListFilesFromFolder.php
Creates a list of links to files from a folder of html/php/... files.
php/renameVideoFilesFromXmlData.php
Rename video files to the date/time recorded based on meta data in the modd files. Adjust the protected variables for your requirements. Please use on copies of your files, for safety and not the originals. As misconfiguration will cause the data files to be not named the same as the video files and reverting will be difficult.
$filenamePrefix can be changed to add a prefix to the names of the renamed files
$includeOriginalName can be set to true to include the original name at the end of the filename
This script can move the files into a destination folder and/or keep the current folder structure if the relevant class variables are set.
If the $destinationFolder is not set then the files are not moved but renamed.
If the $destinationFolder is set but $keepFolderStructure is false then all files are moved into the $destinationFolder.
If $keepFolderStructure is true then the relative path to the original file from the $fileFolder path is used and the moved to that location relative to the destination path. e.g. if $fileFolder='video', $keepFolderStructure=true, $destinationFolder='collection' and the original file is video/folder/folderTwo/test.mpg then the destination will be collection/folder/folderTwo/test.mpg