Development

  • PHP: Determine the full URL of the current page

    Posted on Mon October 16, 2017 by Jeroen Derks

    This article originally appeared on www.phpfreelancer.org.

    Sometimes you want to know in a simple PHP script what the current URL (the URL through which the PHP script is called) is. When I was looking for a solution without reinventing the wheel, I actually found no piece of PHP code that met my expectations. So let me try it as well.

    Read more...

    This post was posted in Development, PHP

  • Programmatically creating a coupon (including the rule) with conditions in Magento

    Posted on Tue May 22, 2012 by Jeroen Derks

    For one of my projects I needed to programmatically create a random coupon for a specific product in Magento. Since I did not find an exact sample that I could use I decided to post my solution here.

    Read more...

    This post was posted in Magento, Development

  • How to add customer authentication to your Magento API

    Posted on Tue May 22, 2012 by Jeroen Derks

    In this post I will provide a simple solution to adding customer authentication to the Magento API. How to add functionality to the Magento API has already been properly documented in the Magento wiki page Creating a custom API or extending the Core API, so we will not dive into that.

    The idea is to simply call the same function for login() which would be used in the frontend and then check for customer authentication in every API call that requires customer authentication.

    Read more...

    This post was posted in Magento, Development

  • Questions to ask when interviewing a candidate Magento developer

    Posted on Sun May 6, 2012 by Jeroen Derks

    Since there is a lot of work to do for Magento, I have been looking to find some help. In my experience it is very difficult to determine the knowledge and expertise of a candidate until he/she is actually working on a project with you. During my search I have compiled a list of questions to help make the decision on who to actually talk to. When actually talking to a candidate, the questions are used to discuss the various topics more in depth.
    Read more...

    This post was posted in Magento, Development

  • How to display your extension version in Magento admin configuration

    Posted on Wed July 20, 2011 by Jeroen Derks

    To view the version of installed Magento extensions, you can go to Magento Connect Manager. But, then you have to go out of the admin, log in again, and then go back. It works, but I would prefer to see the version information together with the extension configuration in the Magento administration configuration section. This can be easily achieved by 2 or 3 additional modifications.

    Read more...

    This post was posted in Magento, Development

  • Enable cache for Ecomdev_PHPUnit

    Posted on Mon July 4, 2011 by Jeroen Derks

    While writing the unit tests for our new extension EmailImages we discovered that there was no easy way in Ecomdev_PHPUnit (or at least no documented way) to enable the use of the cache. It seemed it would only work without the cache enabled. Since our module caches images that were downloaded to be attached to an email, we would like to at least use the unit test to get 100% code coverage and to see in the log file that the cache was actually being used for these images. (Of course it would be better to have that part included in the unit test itself, but we'll leave that as an exercise to the reader, please submit your input!)

    Read more...

    This post was posted in Magento, Development

6 Item(s)