Saturday, 29 June 2019

How to change startSymbol endSymbol of Angular JS

I face the issue when use Angular JS in shopify liquid file at that time I have use following script.

var fetch = angular.module('myapp', []).config(function ($interpolateProvider) {
    $interpolateProvider.startSymbol('{[{').endSymbol('}]}');
});

Friday, 28 June 2019

How to disable Right click inside the Iframe

<iframe style="pointer-events:none;" src="https://jaydip+kansagra.com/landscape.pdf#toolbar=0&navpanes=0"/>

Monday, 24 June 2019

How to concat string and variable in Liquid Shopify in PHP with proxy URL

<script type="text/javascript">
{% if customer  %}
    {% assign customerid = '"<?php echo base_url('checkout?id='.$postdata['cart_id']); ?>' | append: '&customer=' | append: customer.id | append: '"' %}
{% else %}
    {% assign customerid = '"<?php echo base_url('checkout?id='.$postdata['cart_id']); ?>' | append: '"' %}
{% endif %}
var checkouturl = {{customerid}};
window.location.replace(checkouturl);
</script>

Wednesday, 19 June 2019

How to Install FREE SSL certificate into your howsting usign zerossl

Step 1 : Open : https://zerossl.com/free-ssl/#crt
Step 2 : Add your domains

Step 3 : After Click Next in previous step you can see like below image and Click Next

Step 4 : Now You can get both key like below image 

Step 5 : Click Next and you can get two files, see like below image

Step 6 : Download both key and upload into your server (like : public_html/.well-known/acme-challenge ) 


Step 7 : Click Next, You can see something like below image

Step 8 : Now Download certificate and private key file

Step 9 : Upload certificate into cpanel into see below image

Step 10 : Upload your certificate (domain-crt.txt) and save certificate code see below image

Step 11 : Install certificate see below image

Step 12 : Upload private key (domain-key.txt)

Step 13 : Click Install Certificate and Enjoy with FREE SSL

Friday, 14 June 2019

How to open simple HTML CSS popup



HTML

<div class="main-roomle-popup-bg"></div>
<div class="main-roomle-popup">
     <div class="main-roomle-box">
        <h4>Popup heading</h4>
        <p>You can put message here.</p>
        <div class="modul-close-btn"><a href="#"><img src="close.png"/></a></div>
     </div>
</div>

CSS

<style type="text/css">
body {margin: 0;padding: 0;width: 100%;} .main-roomle-popup-bg {position: fixed;left: 0;top: 0;width: 100%;height: 100%;overflow: auto;background-color: #000; opacity: 0.5;} .main-roomle-popup {margin:0;width: 100%;text-align: center;z-index: 1;} .main-roomle-box {margin: auto;padding: 20px;width: 360px;height: 130px;background: #000;position: absolute;top: 0;right: 0;left: 0;bottom: 0;} .main-roomle-box h4 {margin: 0;padding: 0 0 40px 0;font-size: 22px;color: #fff;line-height: 22px;} .main-roomle-box p {margin: 0;padding: 0;font-size: 18px;color: #fff;} .modul-close-btn {margin: 0;padding: 0;width: 30px;height: 30px;position: absolute;right: -10px;top: -10px;}
</style>


Thursday, 13 June 2019

Make Convert formatted price for sum to float number in PHP - FILTER_SANITIZE_NUMBER_FLOAT

<?php
$number="7-2f+3.3jk";
var_dump(filter_var($number, FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION));
?>
Output : string(7) "7-2+3.3"

Wednesday, 12 June 2019

How to check URL and server OR SSL error and using terminal and curl

There are several way to check issue of URL and server OR SSL error and using terminal and curl

curl https://cdn.example.com/assets/storetheme/version2.3/new_theme.js -L
curl -vo /dev/null https://cdn.example.com/assets/storetheme/version2.3/new_theme.js -L
curl -I https://cdn.example.com/assets/storetheme/.htaccess.txt -L
curl -v /dev/null https://cdn.example.com/assets/storetheme/version2.3/new_theme.js -L