WebSecuritySpecialist

Sunday, 29 October 2017

Magento 2 UI Library - JavaScript Modal Widget

October 29, 2017
Magento 2 UI Library - JavaScript Modal Widget

Magento 2 UI Library - JavaScript Modal Widget


Magento 2 has built in UI Library for the Javascript Modal Popup.
To achieve the Custom Modal Popup in your Magento 2 website.

Html Code -

<div id="popup-modal-custom" style="display: none;">
// Your Content Goes Here 
</div>

<a href="#" id="buttonid">Open Modal</a>

Javascript Code -

<script>
    require([
        'jquery',
        'Magento_Ui/js/modal/modal'
    ], function ($, modal) {

            var options = {
                'type': 'popup',
                'modalClass': 'your_popup_custom_class',
                'responsive': true,
                'innerScroll': true,
                'buttons': [{
                    text: $.mage.__('Close'),
                    class: 'back_button_class',
                    click: function () {
                        this.closeModal();
                        // any javascript coode
                    }
                }]
            };  

            var popup = modal(options, $('#popup-modal-custom'));
            $("#buttonid").on('click',function(){
                $("#popup-modal-custom").modal("openModal");
            });


    });
</script>

You can add the above code in the phtml file and on frontend modal will show up.
If you still get any issue, we are happy to assist you - feel free to drop us an email.

Read More

Thursday, 24 August 2017

Malware and Blacklist Removal

August 24, 2017
Malware and Blacklist Removal
Websites often get Blacklisted due to following malware infections -
Backdoors (e.g., C99, R57, Webshells)
Website Defacement
Obfuscated JavaScipt Injections
Hidden & Malicious iFrames
Embedded Trojans
Phishing Attempts
Malicious Redirects
Adult Websites Redirection
Mobile JS Redirect

You can Hire us to Remove Malware & Blacklist. We promise to get the website restored to running state.
- Magento Malware Removal
- WordPress Malware Removal
- Joomla Malware Removal
- Drupal Malware Removal
- Opencart Malware Removal

Email - hello@websecurityspecialist.in
Skype - deepanshukapoor21
Read More

Saturday, 19 August 2017

Magento 2 - Cache Handling Command Line

August 19, 2017
Magento 2 - Cache Handling Command Line


Flush, Enable, Disable Cache Command Line in Magento 2

Using Magneto CLI we can handle cache -

1) Check Magento 2 Cache Status -

php bin/magento cache:status  
2) Clean Magento 2 Cache -  
php bin/magento cache:clean  
3) Flush Magento 2 Cache Storage -
php bin/magento cache:flush  
4) Disable Magento 2 Cache -
php bin/magento cache:disable 
5) Enable Magento 2 Cache -
php bin/magento cache:enable 
Hope this article help you handling the Magento 2 Cache using Magento CLI

Read More

Magento 2 - Install the Extension Command Line

August 19, 2017
Magento 2 - Install the Extension Command Line

Magento 2 - Install the Extension Command Line



Install Magento 2 Extension COMMAND LINE

Your Magento 2 Extensions can be installed in a few minutes by going through these following steps -
Step 1: Download/purchase the extension
Step 2: Unzip the file in a temporary directory
Step 3: Upload it to your Magento installation root directory
Step 4: Disable the cache in Magento admin panel under System­ >> Cache Management
Step 5: Login to Shell (SSH). Go to your Magento directory Enter the following at the command line:
php ­f bin/magento setup:upgrade
Step 6: Login to Admin Panel­ >> Configuration >­>Advanced >­> Advanced, the module will be shown Enable.

Hope you easily Install and Enable the extension using above steps.
If you still get any issue we are happy to help.
Reach us - Email - hello@websecurityspecialist.in

Read More

Sunday, 6 August 2017

PHP json_decode returns null value for valid json

August 06, 2017
PHP json_decode returns null value for valid json

PHP json_decode returns null value for valid json

Valid json string when decoded returns the null value or empty value.

You can validate your JSON string on - JSON LINT https://jsonlint.com/
JSON string might contains the encoding of the special characters.

You can now json_decode your string with -

json_decode( preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $json_string), true );

Hope this will work !! 
Read More

Tuesday, 22 December 2015

Shopify - Display Specific Collection Product on a Page

December 22, 2015
Shopify - Display Specific Collection Product on a Page
Shopify - Display Specific Collection Product on a Page.

If you have a wish to show product for a specific collection on a page then follow theses steps -
  1. Create a page template in your theme.
    Theme -> Edit/HTML-CSS -> templates Create yourpagename.page.liquid file.
  2. Once you created a page enter below code in it.
    <div class="sb-titles"><a href="javascript:void(0)">Your Collection Name Title</a></div> <div id="sandBox-wrapper" class="group-product-item"> <ul id="sandBox" class="list-unstyled row"> {% for prod in collections.YOUR COLLECTION NAME.products %} <li class="element{% cycle ' first', '', '', '' %}" data-alpha="{{prod.title}}" data-price="{{prod.price}}"> {% include 'product-item' %} </li> {% endfor %} </ul> </div>
  3. Save the page and then go to pages and create a new page and assign the page template which you created in STEP - 2.
That's It. You successfully created a page which will list product for specific collection.

Now you can add the page to menu from navigation panel.
Read More

Friday, 2 October 2015

How To Remove Hidden Admin Users In WordPress [Working Method]

October 02, 2015
How To Remove Hidden Admin Users In WordPress [Working Method]

We was working on Malware Removal Project from a server where 200+ WordPress Websites are hosted.
We scan the whole server for the malwares and remove them manually from some websites which are infected.
While implement the security to these website we found some of the websites have hidden admin users.
Then we search for the solution in google but didn't find any working solutions.
After a Long time after keep trying on my localhost we found the working solution for it.

Follow the steps -

Go phpmyadmin and login to the database.

Now You need to check the users ID of your login Suppose - Username is - "Deepanshu" and
ID is - "21"

You can found the User ID in wp-users table.

Now Run the SQL Command -
SELECT DISTINCT(`user_id`) FROM `wp_usermeta`
You will See there are a lot of id list there along with the your user id which is "21" If Yes - Now We need to remove them. Now again Run the SQL query -
delete from `wp_usermeta` where `user_id` not in ('21')
This Will Delete all the hidden admin users from your wordpress.

Now you can check inside admin panel - Dashboard - > Users Only 1 Admin User will exit. :)
Read More