how to make flash blinking text using css

.waitingForConnection {
  animation: blinker 1.7s cubic-bezier(.5, 0, 1, 1) infinite alternate;  
}
@keyframes blinker { to { opacity: 0; } }

.waitingForConnection2 {
  animation: blinker2 0.6s cubic-bezier(1, 0, 0, 1) infinite alternate;  
}
@keyframes blinker2 { to { opacity: 0; } }

.waitingForConnection3 {
  animation: blinker3 1s ease-in-out infinite alternate;  
}
@keyframes blinker3 { to { opacity: 0; } }
<div class="waitingForConnection">X</div>
<div class="waitingForConnection2">Y</div>
<div class="waitingForConnection3">Z</div>

Best htaccess value for opencart

RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^system/download/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
RewriteCond %{THE_REQUEST} \ /+index\.php\?_route_=([^\ &]+)
RewriteRule ^ /%1? [L,R]
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.sportuvam.bg/$1 [R,L]

remove index.php route= opencart 3

Add these three Line

RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
   RewriteCond %{REQUEST_URI} !/system/.* [NC]
   RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

After adding

# 1.To use URL Alias you need to be running apache with mod_rewrite enabled. 

 # 2. In your opencart directory rename htaccess.txt to .htaccess.

 # For any support issues please visit: http://www.opencart.com

 Options +FollowSymlinks

 # Prevent Directoy listing 
 Options -Indexes

 # Prevent Direct Access to files
 <FilesMatch "\.(tpl|ini|log)">
 Order deny,allow
 Deny from all
 </FilesMatch>

 # SEO URL Settings

 # If your opencart installation does not run on the main web folder make sure 
 you folder it does run in ie. / becomes /shop/ 

 RewriteEngine On
 RewriteBase /
 RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
 RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
 RewriteRule ^download/(.*) /index.php?route=error/not_found [L]
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
 RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

 RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
 RewriteCond %{REQUEST_URI} !/system/.* [NC]
 RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

 ### Additional Settings that may need to be enabled for some servers 
 ### Uncomment the commands by removing the # sign in front of it.
 ### If you get an "Internal Server Error 500" after enabling any of the 
 following settings, restore the # as this means your host doesn't allow that.

 # 1. If your cart only allows you to add one item at a time, it is possible 
 register_globals is on. This may work to disable it:
 # php_flag register_globals off

 # 2. If your cart has magic quotes enabled, This may work to disable it:
 # php_flag magic_quotes_gpc Off

 # 3. Set max upload file size. Most hosts will limit this and not allow it to 
 be overridden but you can try
 # php_value upload_max_filesize 999M

 # 4. set max post size. uncomment this line if you have a lot of product 
 options or are getting errors where forms are not saving all fields
 # php_value post_max_size 999M

 # 5. set max time script can take. uncomment this line if you have a lot of 
 product options or are getting errors where forms are not saving all fields
 # php_value max_execution_time 200

 # 6. set max time for input to be recieved. Uncomment this line if you have a 
 lot of product options or are getting errors where forms are not saving all 
  fields
 # php_value max_input_time 200

common home redirect / in opencart

Find this bellow line

RewriteBase /

And paste after this

RewriteCond %{QUERY_STRING} ^route=common/home$
RewriteCond %{REQUEST_METHOD} !^POST$
RewriteRule ^index\.php$ http://%{HTTP_HOST}? [R=301,L]

redirect http to https htaccess opencart

First Example

# Force https everywhere
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Second Example

RewriteCond %{HTTP_HOST} ^www\.
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

get customer details in opencart 3

Add this code in PHP file

$this->load->model('account/customer');
$data['customer_firstname']=$this->customer->getFirstName();
		$data['customer_lastname'] = $this->customer->getLastName();
		$data['customer_email']=$this->customer->getEmail();
		$data['customer_telephone']=$this->customer->getTelephone();

Add this code in TWIG file

<div class="col-md-12">
        {{ customer_firstname }} {{ customer_lastname }}
        {{ customer_email }}
        {{ customer_telephone }}
      </div>

if else if in twig file opencart

<div class="tags-veg-non">
    {% if product.isbn == 'V' %}
        <div class="tag" title="vegetarians">
          <a href="#"><div class="veg-icon">V</div></a>
            
        </div>{% elseif product.isbn == 'N' %}
    
        <div class="tag" title="non vegetarian">
          <a href="#"><div class="non-veg-icon">N</div></a>
            
        </div>{% endif %}
    
</div>

file htaccess tricks

RewriteEngine On
RewriteCond %{HTTP_HOST} ^instadiet.in [NC]
RewriteRule ^(.*)$ http://www.instadiet.in/$1 [L,R=301]

#RewriteEngine On
#RewriteCond %{HTTPS} ^on$
#RewriteRule ^(.*)$ http://www.instadiet.in/$1 [NC,L,R]


RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]



#RewriteEngine On
#RewriteCond %{SERVER_PORT} ^443$ [OR]
#RewriteCond %{HTTPS} =on
#RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

#RewriteEngine On
#RewriteCond %{HTTPS} =on
#RewriteRule ^/(.*):NOSSL$ http://www.instadiet.in/$1 [R=301,L]

#RewriteCond %{HTTP:X-Forwarded-Proto} =https
#RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

php 7.4 twig for opencart

How to fix TWIG whitespace bug in Php 7.4 and Opencart 3.0.x

If you recently upgraded to php 7.4 and are using Opencart 3.0.x.x, you may encounter some bugs. In the following description I will show you how to repair them. If you login to the admin page  and Display errors option is Enabled, then on your screen you will see more messages with this error:

Notice: Trying to access array offset on value of type null in /storage/vendor/scss.inc.php on line 1753

To fix this error/warning you need to go to your storage/vendor and edit scss.inc.php and change this code:

$key = $key[1];

in to:

$key = isset($key[1]) ? $key[1] : null;

Or to set Display errors to Off.

To fix this design bug you need to navigate to system/library/template/twig/ and edit the file Lexer.php. Here you need to change this code(lines 163-165 ):

$text = rtrim($text);

with this code

  if ($this->options['whitespace_trim'] === $this->positions[2][$this->position][0]) {
                // whitespace_trim detected ({%-, {{- or {#-)
                $text = rtrim($text);
            }

After that whitespace will work again and icons will be shown.

wget command in ubuntu

GNU Wget is a command-line utility for downloading files from the web. With Wget, you can download files using HTTP, HTTPS, and FTP protocols. Wget provides a number of options allowing you to download multiple files, resume downloads, limit the bandwidth, recursive downloads, download in the background, mirror a website and much more.

Installing Wget on Ubuntu and Debian 

sudo apt install wget

Installing Wget on CentOS and Fedora

sudo yum install wget

The wget utility expressions take the following form:

$ wget [options] [url]

Copy

  • options – The Wget options
  • url – URL of the file or directory you want to download or synchronize.

How to Download a File with Wget

In it’s simplest form when used without any option, wget will download the resource specified in the [url] to the current directory.

In the following example we are downloading the Linux kernel tar archive:

$ wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.17.2.tar.xz

Using Wget Command to Save the Downloaded File Under Different Name

To save the downloaded file under a different name, pass the -O option followed by the chosen name:

$ wget -O latest-hugo.zip https://github.com/gohugoio/hugo/archive/master.zip

The command above will save the latest hugo zip file from GitHub as latest-hugo.zip instead of its original name.

Using Wget Command to Download a File to a Specific Directory

By default, Wget will save the downloaded file in the current working directory. To save the file to a specific location, use the -P option:

$ wget -P /mnt/iso http://mirrors.mit.edu/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1804.iso

How to Limit the Download Speed with Wget

To limit the download speed, use the --limit-rate option. By default, the speed is measured in bytes/second. Append k for kilobytes , m for megabytes and g for gigabytes.

The following command will download the Go binary and limit the download speed to 1mb:

$ wget --limit-rate=1m https://dl.google.com/go/go1.10.3.linux-amd64.tar.gz

This option is useful when you don’t want wget to consume all the available bandwidth.

How to Resume a Download with Wget

You can resume a download using the -c option. This is useful if your connection drops during a download of a large file, and instead of starting the download from scratch, you can continue the previous one.

In the following example we are resuming the download of the Ubuntu 18.04 iso file:

$ wget -c http://releases.ubuntu.com/18.04/ubuntu-18.04-live-server-amd64.iso

If the remote server does not support resuming downloads, Wget will start the download from the beginning and overwrite the existing file.

How to Download in Background with Wget

To download in the background ,use the -b option. In the following example, we are downloading the OpenSuse iso file in the background:

$ wget -b https://download.opensuse.org/tumbleweed/iso/openSUSE-Tumbleweed-DVD-x86_64-Current.iso

By default, the output is redirected to wget-log file in the current directory. To watch the status of the download, use the tail command:

$ tail -f wget-log

How to change the Wget User-Agent of Wget

Sometimes when downloading a file, the remote server may be set to block the Wget User-Agent. In situations like this to emulate a different browser pass the -U option.

wget --user-agent="Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0" http://wget-forbidden.com/

The command above will emulate Firefox 60 requesting the page from wget-forbidden.com

How to Download Multiple Files with Wget

If you want to download multiple files at once, use the -i option followed by the path to a local or external file containing a list of the URLs to be downloaded. Each URL needs to be on a separate line.

In the following example we are downloading the Arch Linux, Debian, and Fedora iso files with URLs specified in the linux-distros.txt file:

$ wget -i linux-distros.txt

linux-distros.txt

http://mirrors.edge.kernel.org/archlinux/iso/2018.06.01/archlinux-2018.06.01-x86_64.iso
https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-9.4.0-amd64-netinst.iso
https://download.fedoraproject.org/pub/fedora/linux/releases/28/Server/x86_64/iso/Fedora-Server-dvd-x86_64-28-1.1.iso

Copy

If you specify - as a filename, URLs will be read from the standard input.

Using Wget Command to Download via FTP

To download a file from a password-protected FTP server, specify the username and password as shown below:

$ wget --ftp-user=FTP_USERNAME --ftp-password=FTP_PASSWORD ftp://ftp.example.com/filename.tar.gz

Using Wget Command to Create a Mirror of a Website

To create a mirror of a website with Wget, use the -m option. This will create a complete local copy of the website by following and downloading all internal links as well as the website resources (JavaScript, CSS, Images).

$ wget -m https://example.com

If you want to use the downloaded website for local browsing, you will need to pass a few extra arguments to the command above.

$ wget -m -k -p https://example.com

The -k option will cause Wget to convert the links in the downloaded documents to make them suitable for local viewing. The -p option will tell wget to download all necessary files for displaying the HTML page.

How to Skip Certificate Check with Wget

If you want to download a file over HTTPS from a host that has an invalid SSL certificate, use the --no-check-certificate option:

$ wget --no-check-certificate https://domain-with-invalid-ss.com

How to Download to Standard Output with Wget

In the following example, Wget will quietly ( flag -q) download and output the latest WordPress version to stdout ( flag -O -) and pipe it to the tar utility which will extract the archive to the /var/www directory.

$ wget -q -O - "http://wordpress.org/latest.tar.gz" | tar -xzf - -C /var/www