Skip to main content

Posts

Shopify - Add password protection to your online store

Add password protection to your online store You can add password protection to your online store. Steps: From your Shopify admin, go to  Online Store  >  Preferences . Scroll to the  Password protection  area, and check  Enable password . In  Password , enter the password that you'll give to the customers who you want to be able to access your online store. Don't use the same password that you use to log into your admin. In  Message for your visitors , enter the message that you want to show on the password page. If you don't want to show a message, then leave this field blank. Click  Save .   Edit your password page settings You can edit the content that shows on your password page, such as the text, colors, and typography.   From your Shopify admin, go to  Online Store  >  Themes . Find the theme that you want to edit and click  Customize . Select  Password page  from the to...

A generic error occurred in GDI+ while creating image from Base64 string

In a web service, while converting a Base64 string to file, it is sometimes giving error  - "A generic error occurred in GDI+ while creating image from Base64 string". Solution: I have used the below code and problem resolved. [ HttpPost] public ActionResult UploadSignatureTwo(String imageString){          var bytes = Convert.FromBase64String(imageString);      using (var imageFile = new FileStream(Path.Combine(path,"test.jpeg"), FileMode.Create))      {          imageFile.Write(bytes, 0, bytes.Length);          imageFile.Flush();      } }

svg file not upload in wordpress

Cannot upload SVG files in WordPress When we upload the SVG file, we recieve the notification  “Sorry, this file type is not permitted for security reasons.” To Resolve this issue, we need to add the below function in the functions.php files function cc_mime_types($mimes) { $mimes['svg'] = 'image/svg+xml'; return $mimes; } add_filter('upload_mimes', 'cc_mime_types'); This will resolve the issue.

Wordpress, Gravity form - Remove space between currency symbol and amount

Wordpress, Gravity form - Remove space between currency symbol and amount Remove space between currency symbol and amount Please use the below WordPress in the theme Function (functions.php) file add_filter('gform_currencies', 'update_currency'); function update_currency($currencies) {     $currencies['GBP'] = array(         'name' => __('Pound', 'gravityforms'),         'symbol_left' => '£',         'symbol_right' => '',         'symbol_padding' => '',         'thousand_separator' => ',',         'decimal_separator' => '.',         'decimals' => 2);     return $currencies; } Change Currency symbol from left to right Please use the below WordPress in the theme Function (functions.php) file: add_filter('gform_currencies', 'update_currency'); function update...

Wordpress Yoast, Change breadcrumb trail from post to page

WordPress Yoast, Change breadcrumb trail from  to page Please use the below WordPress in the theme Function (functions.php) file add_filter('wpseo_breadcrumb_links', 'wpse_post_breadcrumbs'); // $links are the current breadcrumbs function wpse_post_breadcrumbs($links) {     // Use is_singular($post_type) to identify a single CPT     // This assumes your CPT is called "post" - change it as needed  if(is_singular('post')) {         // The first item in $links ($links[0]) is Home, so skip it         // The second item in $links is Projects - we want to change that         $links[1] = array('text' => 'News', 'url' => '/news/', 'allow_html' => 1);     }     // Even if we didn't change anything, always return the breadcrumbs     return $links; }

Datatable.net - Get Reordering of the columns & Get Column visible

Datatable.net - Get Reordering of the columns & Get Column visible Please add a button on the form like below <a class="btn btn-success visiblecheck" href="javascript:void(0);" id="visiblecheck" value="test">visiblecheck</a> Here is 'table' is variable of Datatable.net like var table = $('#example').dataTable(); $('.visiblecheck').click( function () {         alert(table.colReorder.order() );         var columnvisible = '';         for (i = 0; i < table.columns().count(); i++) {             if (columnvisible != '') {                 columnvisible += ',';             }             if (table.column(i).visible() === true) {                 columnvisible += '1';             }  ...

whats the difference between == and === ?

The difference between == and === is that: 1. == converts the variable values to the same type before performing comparison. This is called type coercion. 2. === does not do any type conversion (coercion) and returns true only if both values and types are identical for the two variables being compared. Example: var one = 1 ; var one_again = 1 ; var one_string = "1" ; // note: this is string console . log ( one == one_again ); // true console . log ( one === one_again ); // true console . log ( one == one_string ); // true. See below for explanation. console . log ( one === one_string ); // false. See below for explanation

SQL Server - Running large Sql files

When we try to open a large Sql file in SQl Server, it's gives the error "The operation could not be completed. not enough storage is available to complete this operation The template specified cannot be found. Please check that the full path is correct" Solution: use the  sqlcmd  tool to execute the file. To execute a SQL script: Start the Command Prompt Run the below command   sqlcmd -S DatabaseServer -d Database -i C:\Users\Administrator\Downloads\script.sql -x