Opencart v.3 Easy clone default theme

#!/bin/bash folder=${PWD##*/} themes=catalog/view/theme language=admin/language/en-gb/extension/theme/ view=admin/view/template/extension/theme/ controller=admin/controller/extension/theme/ read -p "Name of new theme (latin): " themename if [[ -d admin ]]; then themenameup=`echo $themename | sed 's/./\U&/1'` cp -r $themes/default $themes/$themename cp $language/default.php $language/$themename.php sed -i "s/Default Store Theme/$themenameup theme/g" $language/$themename.php sed -i "s/default store theme/$themename theme/g" $language/$themename.php cp $view/default.twig $view/$themename.twig sed -i "s/theme_default/theme_$themename/g" $view/$themename.twig cp $controller/default.php $controller/$themename.php sed -i "s/theme_default/theme_$themename/g" $controller/$themename.php sed -i "s/theme\/default/theme\/$themename/g" $controller/$themename.php sed -i "s/ControllerExtensionThemeDefault/ControllerExtensionTheme"$themenameup"/g" $controller/$themename.php sed -i "s/default/$themename/g" $controller/$themename.php sed -i "s/default/$themename/g" $themes/$themename/template/common/header.twig else echo "Move the script to site's root directory and try again" fi

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.