Loading YAML files
page last edited on 05 September 2017
We highly advise to use the X-Cart command line tool to load YAML files. This guide is deprecated and considered uneffective.
This guide describes how developers can load updated YAML file of your module without running the command line tool.
Sometimes developers cannot use X-Cart CLI tool, because for some reason they cannot run console commands. They can still accomplish other tasks that are eased by macros except loading YAML file. This guide shows a way to load YAML file without having to uninstall/reinstall the module.
Table of Contents
We need to create simple PHP script as follows:
<?php require_once 'top.inc.php'; $path = 'path/to/your/yaml/file.yaml'; \XLite\Core\Database::getInstance()->loadFixturesFromYaml($path);
and run it through the browser. Of course
$path variable must contain an actual path to your YAML file.
Help make this document better
This guide, as well as the rest of our docs, are open-source and available on GitHub.