Tips / Recommendations

Replacing currency sign with letters Woocommerce

Posted on

Open the WordPress theme’s functions.php file and add a filter for woocommerce to it (ATTENTION !!! The code below is added to the end of the functions.php file): add_filter( ‘woocommerce_currencies’, ‘add_my_currency’ ); function add_my_currency( $currencies ) { $currencies[‘UAH’] = __( ‘Українська гривня’, ‘woocommerce’ ); return $currencies; } add_filter(‘woocommerce_currency_symbol’, ‘add_my_currency_symbol’, 10, 2); function add_my_currency_symbol( $currency_symbol, $currency […]

Tips / Recommendations

Show password by icon

Posted on

<div><input type=”password” id=”password-input” placeholder=”Введите пароль” name=”password” value=”123456″><a href=”#”></a></div><style type=”text/css”>.password {width: 300px;margin: 15px auto;position: relative;}#password-input {width: 100%;padding: 5px 0;height: 30px;line-height: 40px;text-indent: 10px;margin: 0 0 15px 0;border-radius: 5px;border: 1px solid #999;font-size: 18px;}.password-control {position: absolute;top: 11px;right: 6px;display: inline-block;width: 20px;height: 20px;background: url(https://snipp.ru/demo/495/view.svg) 0 0 no-repeat;}.password-control.view {background: url(https://snipp.ru/demo/495/no-view.svg) 0 0 no-repeat;}</style> <script src=”https://snipp.ru/cdn/jquery/2.1.1/jquery.min.js”></script><script>$(‘body’).on(‘click’, ‘.password-control’, function(){if ($(‘#password-input’).attr(‘type’) == ‘password’){$(this).addClass(‘view’);$(‘#password-input’).attr(‘type’, ‘text’);} else […]

Tips / Recommendations

Redirect after a successful order in the store

Posted on

The redirect can be done by adding this code to the function.php of your theme. add_action( ‘template_redirect’, ‘woo_custom_redirect_after_purchase’ ); function woo_custom_redirect_after_purchase() { global $wp; if ( is_checkout() && !empty( $wp->query_vars[‘order-received’] ) ) { wp_redirect( ‘URL куда будем делать редирект’ ); exit; } } Now you can simply create a “thank you for order” page and […]

Tips / Recommendations

Install Symfony Framework

Posted on

Создание проекта   Чтобы создать новый Symfony проект, основанный на одном из официальных шаблонов, нужно запустить команду:   $ symfony new [–full | –demo] <path-to-project>   По умолчанию используется минимальный шаблон skeleton. Чтобы установить website-skeleton нужно запустить команду с опцией –full. Соответственно, для установки demo проекта необходимо запускать команду с опцией –demo.   Под капотом symfony new выполняет команду composer create-project, затем инициализирует новый Git […]

Tips / Recommendations

Install Laravel on Ubuntu

Posted on

System requirements Your system must meet the following requirements to be able to run the latest version of Laravel: PHP> = 7.1.3 with OpenSSL, PDO, Mbstring, Tokenizer, XML, Ctype and JSON PHP Extensions. Composer is an application-level package manager for PHP. Setting prerequisites First, make sure you update your system sources and existing software packages […]