Magento

Reindex manually in Magento 2

Maybe you’ve noticed that Magento 2 does not allow you to reindex data from the administration side. Additionally, there is no script called ‘indexer.php’ or something like that, that you would usually call. How do you reindex manually then? Use magento command line tool:

X-Cart to Magento: Customers

At times there is a need to switch the eCommerce platform you are working on. Reasons for this can be numerous. Your existing platform might be outdated, might be without any future improvements coming up, you might have heard great things about some other platform or simply you are not satisfied with the way your current platform works and behaves. Nevertheless, you’ve decided to do the switch. It is not an easy task to do because, in almost every case, platforms are not compatible with each other and in order to keep all of the data from previous platform (like your customers, orders, reviews etc.), some changes have to be performed on the data.

Add custom attributes to magento SOAP API v1 and v2

Sometimes a need arises for you to add additional attributes to the standard Magento API responses. While doing this in Mageno API v1 is fairly easy, as you will see soon, the v2 has some quirks that had to be found out the hard way, unfortunately. So in order for this to not happen again, here is the explanation. I will assume you already have your API roles set up, and you can invoke Magento API and get responses.

Block caching in Magento

Everyone knows what a caching is, but to put it simply, it is a mechanism to store (save) data that is frequently accessed but rarely changed in order to have a faster response time.

Show products on transactional emails in magento

One of the requirements from clients will likely be to change transactional emails. Whether they want to add some styling or add new informations, you will have to change the default emails. Sometimes the requirement involves showing products on emails, to increase marketing and in extend revenue.

Add fee or discount to order/invoice/creditmemo email messages

In the last few days I have been playing with the functionality of adding another fee to the checkout process. While exploring the topic I stumbled upon a lot of good tutorials for doing exactly that. Namely this, and this one. I read them and followed instructions stated there. With some changes, I managed to recreate the functionality I needed. But, while reading the comments for both articles, I saw the main trouble people had with them. The part about showing the fee or discount in email messages of orders, invoices and credit memos was missing (or not implemented), so here is how i did it.

Search in this category functionality - Magento

Magento search query, when entered in the form.mini.phtml (template/catalogsearch/form.mini.phtml) is doing the search on database in Mage_CatalogSearch_Model_Layer:prepareProductCollection().

Sublime Text 2 environment for Magento development

Recently I got a new job (my first real one, actually), and it is revolving around PHP, i.e. Magento development. Before my first day at the job, I was wondering what kind of IDE or text editor should I use and what kind of one my future co-workers use. I emailed them and the response was just as I expected it to be: “full fledged IDEs like eclipse, netbeans or phpStorm”. I have had a lot of previous experience with those environments, mostly doing Java programming, and I was aware of all the bloat they bring. They were slow most of the time, they were laggy and pretty much uneasy to work with. Sure, that was the case on my own machine which is not really a “state of the art”, and I am sure they perform better on more powerful computers.

Back to Top ↑

PHP

Reindex manually in Magento 2

Maybe you’ve noticed that Magento 2 does not allow you to reindex data from the administration side. Additionally, there is no script called ‘indexer.php’ or something like that, that you would usually call. How do you reindex manually then? Use magento command line tool:

X-Cart to Magento: Customers

At times there is a need to switch the eCommerce platform you are working on. Reasons for this can be numerous. Your existing platform might be outdated, might be without any future improvements coming up, you might have heard great things about some other platform or simply you are not satisfied with the way your current platform works and behaves. Nevertheless, you’ve decided to do the switch. It is not an easy task to do because, in almost every case, platforms are not compatible with each other and in order to keep all of the data from previous platform (like your customers, orders, reviews etc.), some changes have to be performed on the data.

Add custom attributes to magento SOAP API v1 and v2

Sometimes a need arises for you to add additional attributes to the standard Magento API responses. While doing this in Mageno API v1 is fairly easy, as you will see soon, the v2 has some quirks that had to be found out the hard way, unfortunately. So in order for this to not happen again, here is the explanation. I will assume you already have your API roles set up, and you can invoke Magento API and get responses.

Block caching in Magento

Everyone knows what a caching is, but to put it simply, it is a mechanism to store (save) data that is frequently accessed but rarely changed in order to have a faster response time.

Show products on transactional emails in magento

One of the requirements from clients will likely be to change transactional emails. Whether they want to add some styling or add new informations, you will have to change the default emails. Sometimes the requirement involves showing products on emails, to increase marketing and in extend revenue.

Add fee or discount to order/invoice/creditmemo email messages

In the last few days I have been playing with the functionality of adding another fee to the checkout process. While exploring the topic I stumbled upon a lot of good tutorials for doing exactly that. Namely this, and this one. I read them and followed instructions stated there. With some changes, I managed to recreate the functionality I needed. But, while reading the comments for both articles, I saw the main trouble people had with them. The part about showing the fee or discount in email messages of orders, invoices and credit memos was missing (or not implemented), so here is how i did it.

Search in this category functionality - Magento

Magento search query, when entered in the form.mini.phtml (template/catalogsearch/form.mini.phtml) is doing the search on database in Mage_CatalogSearch_Model_Layer:prepareProductCollection().

Sublime Text 2 environment for Magento development

Recently I got a new job (my first real one, actually), and it is revolving around PHP, i.e. Magento development. Before my first day at the job, I was wondering what kind of IDE or text editor should I use and what kind of one my future co-workers use. I emailed them and the response was just as I expected it to be: “full fledged IDEs like eclipse, netbeans or phpStorm”. I have had a lot of previous experience with those environments, mostly doing Java programming, and I was aware of all the bloat they bring. They were slow most of the time, they were laggy and pretty much uneasy to work with. Sure, that was the case on my own machine which is not really a “state of the art”, and I am sure they perform better on more powerful computers.

Back to Top ↑

ruby

String manipulation in Ruby

Strings in Ruby are, just like in other programming languages, objects for handling text. If you ever tried to write some Ruby code, you are familiar with them and their syntax. But this post is not about syntax that is well known. While reading through some ruby books and tutorials I found some pretty interesting ways of dealing with strings.

Ruby memoization

I’ve been going through Ruby Best Practices book lately and, while it covers a lot of interesting topics, one thing caught my eye. It was sub-chapter about memoization.

Memoization is an optimization technique used to speed up your programs by avoiding to repeat function calls for already calculated inputs.

Back to Top ↑

Bitcoin

Bitcoin for the masses: Bitcoin Address

You know what an email address is? I’m sure you do.. It’s a string of letters (and numbers) in a certain format (eg. with an @ symbol), that serves as your identification and also as a pointer as to where the message you’re sending should go. Bitcoin’s address is very similar, only instead of sending the message to it, you’re sending a different kind of information - Bitcoin.

Bitcoin for the masses (series of posts)

Recently, my interest in large proportions switched to Bitcoin both from financial and technical standpoint. I’ve been reading a lot on the topic (be it books, forums, reddit discussions, youtube videos, various conference talks etc.). One thing I noticed, and it has been noted many times by many people (and very influential ones) in Bitcoin community, is the difficulty of “getting” the Bitcoin, and understanding what it is from the standpoint of a “regular” human - Homo Domesticus .

Back to Top ↑

email

Back to Top ↑

javascript

Make immutable objects in javascript

Cool thing I ran into when watching Douglas Crockford’s talk on Javascript: the good parts was a different way of creating objects, with lot more options than usual way I was doing it. More specifically, I found it interesting to see that we can set certain properties as non-writeable ie. immutable.

Back to Top ↑

fibonacci sequence

Ruby memoization

I’ve been going through Ruby Best Practices book lately and, while it covers a lot of interesting topics, one thing caught my eye. It was sub-chapter about memoization.

Memoization is an optimization technique used to speed up your programs by avoiding to repeat function calls for already calculated inputs.

Back to Top ↑

memoization

Ruby memoization

I’ve been going through Ruby Best Practices book lately and, while it covers a lot of interesting topics, one thing caught my eye. It was sub-chapter about memoization.

Memoization is an optimization technique used to speed up your programs by avoiding to repeat function calls for already calculated inputs.

Back to Top ↑

optimization technique

Ruby memoization

I’ve been going through Ruby Best Practices book lately and, while it covers a lot of interesting topics, one thing caught my eye. It was sub-chapter about memoization.

Memoization is an optimization technique used to speed up your programs by avoiding to repeat function calls for already calculated inputs.

Back to Top ↑

EOM

String manipulation in Ruby

Strings in Ruby are, just like in other programming languages, objects for handling text. If you ever tried to write some Ruby code, you are familiar with them and their syntax. But this post is not about syntax that is well known. While reading through some ruby books and tutorials I found some pretty interesting ways of dealing with strings.

Back to Top ↑

string

String manipulation in Ruby

Strings in Ruby are, just like in other programming languages, objects for handling text. If you ever tried to write some Ruby code, you are familiar with them and their syntax. But this post is not about syntax that is well known. While reading through some ruby books and tutorials I found some pretty interesting ways of dealing with strings.

Back to Top ↑

emberjs

Simple markdown editor in Ember.js

Recently I have been playing with Ember.js. It is a javascript front-end framework for developing web applications. You can find more details and really thorough guides on their website. As my new blog post, I have decided to create a tutorial for building a simple markdown editor (in ember). Markdown, for those unaware of it, is a simple, lightweight markup language. I use it a lot for my github readme pages. While there are several great applications for editing markdown in real time out there, I thought it would be a good exercise to create one of my own, and since this is really easy to do in ember, I am showing it as a simple tutorial.

Back to Top ↑

markdown

Simple markdown editor in Ember.js

Recently I have been playing with Ember.js. It is a javascript front-end framework for developing web applications. You can find more details and really thorough guides on their website. As my new blog post, I have decided to create a tutorial for building a simple markdown editor (in ember). Markdown, for those unaware of it, is a simple, lightweight markup language. I use it a lot for my github readme pages. While there are several great applications for editing markdown in real time out there, I thought it would be a good exercise to create one of my own, and since this is really easy to do in ember, I am showing it as a simple tutorial.

Back to Top ↑

regex

Back to Top ↑

Sublime text

Sublime Text 2 environment for Magento development

Recently I got a new job (my first real one, actually), and it is revolving around PHP, i.e. Magento development. Before my first day at the job, I was wondering what kind of IDE or text editor should I use and what kind of one my future co-workers use. I emailed them and the response was just as I expected it to be: “full fledged IDEs like eclipse, netbeans or phpStorm”. I have had a lot of previous experience with those environments, mostly doing Java programming, and I was aware of all the bloat they bring. They were slow most of the time, they were laggy and pretty much uneasy to work with. Sure, that was the case on my own machine which is not really a “state of the art”, and I am sure they perform better on more powerful computers.

Back to Top ↑

Hadoop

Sum of even and odd numbers in Hadoop

I have been reading about Hadoop in the last few weeks. I went through few books and articles, and wanted to try a more hands-on approach. So, while googling for examples I noticed that there is only one real simple example for Hadoop - Word count. This one is pretty easy, but it would not be really interesting to write another article about it. So, my example will be to count the sum of even and odd numbers in a file.

Back to Top ↑

Java

Sum of even and odd numbers in Hadoop

I have been reading about Hadoop in the last few weeks. I went through few books and articles, and wanted to try a more hands-on approach. So, while googling for examples I noticed that there is only one real simple example for Hadoop - Word count. This one is pretty easy, but it would not be really interesting to write another article about it. So, my example will be to count the sum of even and odd numbers in a file.

Back to Top ↑

Apache

Back to Top ↑

block

Block caching in Magento

Everyone knows what a caching is, but to put it simply, it is a mechanism to store (save) data that is frequently accessed but rarely changed in order to have a faster response time.

Back to Top ↑

caching

Block caching in Magento

Everyone knows what a caching is, but to put it simply, it is a mechanism to store (save) data that is frequently accessed but rarely changed in order to have a faster response time.

Back to Top ↑

custom attribute

Add custom attributes to magento SOAP API v1 and v2

Sometimes a need arises for you to add additional attributes to the standard Magento API responses. While doing this in Mageno API v1 is fairly easy, as you will see soon, the v2 has some quirks that had to be found out the hard way, unfortunately. So in order for this to not happen again, here is the explanation. I will assume you already have your API roles set up, and you can invoke Magento API and get responses.

Back to Top ↑

SOAP

Add custom attributes to magento SOAP API v1 and v2

Sometimes a need arises for you to add additional attributes to the standard Magento API responses. While doing this in Mageno API v1 is fairly easy, as you will see soon, the v2 has some quirks that had to be found out the hard way, unfortunately. So in order for this to not happen again, here is the explanation. I will assume you already have your API roles set up, and you can invoke Magento API and get responses.

Back to Top ↑

XCart

X-Cart to Magento: Customers

At times there is a need to switch the eCommerce platform you are working on. Reasons for this can be numerous. Your existing platform might be outdated, might be without any future improvements coming up, you might have heard great things about some other platform or simply you are not satisfied with the way your current platform works and behaves. Nevertheless, you’ve decided to do the switch. It is not an easy task to do because, in almost every case, platforms are not compatible with each other and in order to keep all of the data from previous platform (like your customers, orders, reviews etc.), some changes have to be performed on the data.

Back to Top ↑

Customers

Back to Top ↑

Reset password

Back to Top ↑

indexers

Reindex manually in Magento 2

Maybe you’ve noticed that Magento 2 does not allow you to reindex data from the administration side. Additionally, there is no script called ‘indexer.php’ or something like that, that you would usually call. How do you reindex manually then? Use magento command line tool:

Back to Top ↑

magento2

Reindex manually in Magento 2

Maybe you’ve noticed that Magento 2 does not allow you to reindex data from the administration side. Additionally, there is no script called ‘indexer.php’ or something like that, that you would usually call. How do you reindex manually then? Use magento command line tool:

Back to Top ↑

form validation

Back to Top ↑

html

Back to Top ↑

validation

Back to Top ↑

btc

Bitcoin for the masses: Bitcoin Address

You know what an email address is? I’m sure you do.. It’s a string of letters (and numbers) in a certain format (eg. with an @ symbol), that serves as your identification and also as a pointer as to where the message you’re sending should go. Bitcoin’s address is very similar, only instead of sending the message to it, you’re sending a different kind of information - Bitcoin.

Back to Top ↑