[Note] : Please take database backup prior to executing these queries.
I went through all tables and came up with following list of tables that should be truncated in order to clear test data:
SET FOREIGN_KEY_CHECKS = 0;
Truncate order tables
[Note] : Please take database backup prior to executing these queries.
I went through all tables and came up with following list of tables that should be truncated in order to clear test data:
SET FOREIGN_KEY_CHECKS = 0;
Truncate order tables
public static function normalizeString ($str = '') | |
{ | |
$str = strip_tags($str); | |
$str = preg_replace('/[\r\n\t ]+/', ' ', $str); | |
$str = preg_replace('/[\"\*\/\:\<\>\?\'\|]+/', ' ', $str); | |
$str = strtolower($str); | |
$str = html_entity_decode( $str, ENT_QUOTES, "utf-8" ); | |
$str = htmlentities($str, ENT_QUOTES, "utf-8"); | |
$str = preg_replace("/(&)([a-z])([a-z]+;)/i", '$2', $str); | |
$str = str_replace(' ', '-', $str); |
To update the order state and and status pro-grammatically in order define the status and state in this format. Initiate order object in the construct function and use that order object in the custom function to update it. To update order state programmatically in model, get order object from the construct function.
public function __construct(
\Magento\Sales\Model\Order $order
){
# put following two lines under server node of nginx default | |
# Load configuration files for the default server block. | |
include /etc/nginx/default.d/*.conf; |
git config --global user.name "Your name" | |
git config --global user.email "your@email.com" |
.idea/ | |
nbproject/ | |
/var | |
/media | |
/app/etc/local.xml | |
cgi-bin/ | |
/includes/src |
#!/bin/bash | |
# clear screen | |
clear; | |
# Get current directory, assume this script is locate under Magento root directory | |
SOURCE="${BASH_SOURCE[0]}" | |
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink | |
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | |
SOURCE="$(readlink "$SOURCE")" | |
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located |
Open following file :
{root}/vendor/magento/framework/View/Model/Layout/Merge.php
and find _loadFileLayoutUpdatesXml function at line number 681.
Just echo $file->getFilename(); in foerach. You can see list of layout xml files adding in that action.