Export Guest customers in Magento 1.*

Export guest customer in Magento

There are times when you want to promote your products to a guest customer. You might want to send newsletters or promos to a guest customer to bring them back and buy your products or for marketing campaigns.

But Magento doesn’t provide any way to export guest customer from admin panel. So, we will learn an easy way to export guest customer on your Magento website. Continue reading “Export Guest customers in Magento 1.*”

WooCommerce shortcodes you definitely need to know

With over 15 million downloads on WordPress.org, WooCommerce is the popular e-commerce plugin among WordPress community. If you’re developing theme for WooCommerce, there are few shortcodes that might help you in theme development.

Here are our list of  WooCommerce shortcodes, you might not be aware of but definitely need to know for better theme customization. Continue reading “WooCommerce shortcodes you definitely need to know”

Data Validation, Sanitization and Escaping

Data Validation, Sanitization and Escaping

Don’t ever trust your users. Always validate, sanitize and escape every piece of information that saves into and read out of your database.

So, what exactly validation, sanitization and escaping? Do we really need them?

  • Validation is the ruleset to make sure data received from end user is in correct format that you expect it to be.
  • Sanitization is the process of removing unwanted character or information received from end user before saving it to the database.
  • Escaping is the process of cleaning data that you have in your database before displaying it to the end user.

Continue reading “Data Validation, Sanitization and Escaping”

Quick Tip: How to Use Shortcodes Within Widgets

Shortcodes has been in WordPress for quite some time. It allows developers to add more or less complex features in plugins and themes without user having to write single HTML code.

By default, shortcodes runs only in editor. If you want to use shortcodes in widgets, it’s not possible. But a single line of code will allow you to add shortcode in widget.

WordPress comes with plethora of widgets by default. One of such widget is “Text Widget”. This widget allows you to add any text and HTML code in it. To run shortcode in it, we will be using “widget_text” filter. This filter allows you to modify content of “Text Widget”. We will be using “do_shortcode” as a callback function in this filter. “do_shortcode” function renders shortcode for you.

The code below can be used in a theme functions.php file to run shortcode:

add_filter('widget_text', 'do_shortcode');

You can learn more about built-in shortcode in WordPress here.

You can get more details regarding shortcode API here.

Emmet for faster HTML and CSS coding

Let’s Start High Speed Coding!

In 2009, Sergey Chikuyonok started project Zen Coding, later (2012) rename as Emmet, one of the most popular free plugin for text editors to write HTML and CSS code faster. Emmet is web developer toolkit written in pure JavaScript and works across different platforms.  It saves time, save our time from lot of typing and makes writing code like fun.

Emmet is collection of abbreviations that expand input abbreviation into valid HTML/CSS. Once we get used to the Emmet syntax, it will change the way of writing HTML and CSS code. When you use it in our workflow it will definitely boost up productivity so let start using it.

“Emmet (previously known as Zen Coding) is a web-developer’s toolkit that can greatly improve your HTML & CSS workflow:” Emmet web site

Continue reading “Emmet for faster HTML and CSS coding”

C# Getting Started

Before we begin with C sharp, C#  programming, let’s talk about what is C# and .NET Framework. C# is an object oriented programming language that enables developers to make various type of desktop, web or mobile applications using .NET Framework library.

.NET Framework is a software framework developed by a Microsoft that runs primarily on Microsoft Windows. It includes a large class library known as Framework Class Library and provides a language interoperability. Programs written for .NET Framework execute in a environment known as a Common Language Runtime (CLR), an application virtual machine that provides services such as security, memory management, and exception handling.

Here’s the basic structure of console application in C# :

using system; //namespace declaration

class test
{
 public static void main()
  {
   Console.WriteLine("This is a sample program");
  }
}

Continue reading “C# Getting Started”