Author Archive

New Website for Activo:

November 23rd, 2010
Comments Off

I have good news and bad news to tell you, well it is not really bad news, but just wanted to use that saying…

The bad news is that this website is has just become absolute. Meaning we will no longer publish anything new or introduce any new content on this website. The good news is that we already have a new website and the new website can be found at Notice that we got the domain name that we always wanted to have for Activo – Yeah!


For those of you who are interested, the new website was launched in late August of 2010. The domain was purchased back in November of 2009. The site currently already have twice the amount of traffic that this website has. The site also reflects a few changes in Activo:

  1. We moved our offices from Santa Clara to Los Angeles – and we love it down here. In fact LA is a great hub for techies and entrepreneurs, believe it or not.
  2. We now have a virtual team of developers, designers, and project managers. Yes – it was a decision we had to make back in the days before we moved and it turned out to work great. Our customers love it.
  3. We have decided to focus on Magento Development and Magento Extensions. I got to say, what a great decision that was!

So, check out the new website and our new blog. I (Ron Peled) will continue to post regularly about our daily grind and share with you as much as possible from what I am doing at any given time. Drop me a line if you have any suggestions or recommendations.

.NET Framework, AJAX, Content Management Systems, eCommerce, Ektron, Joomla, LAMP: Linux Apache MySQL PHP, Magento, Performance Optimization, PHP/MySQL, Project Management, Search Engine Optimization (SEO), Web Application Hosting, Web Design, Web Development, Web-based User Interfaces, ZenCart

Response to Sitepoint Podcast #40: A Googol of Googles

January 29th, 2010
Comments Off

I wanted to respond to Sitepoint’s podcast #40 since I did not see a way to add a comment on the podcast page.

First let me say that I really enjoy the podcast produced by Kevin Yank and discussed by his colleges: Patrick O’Keefe, Brad Williams and others – keep up the great work guys!

Here is what I wrote in an email to Kevin, explaining what I think are some points that were missed from the podcast:

Hi Kevin,

I had a few comments about your podcast about the Google apps and services, #40. Sorry, to respond so late as I listen to the podcasts in my spare time.

I think you totally missed the point on a few items. What Brad, Patrick, and you often miss about Google’s moves is that you have to remember that Google is a business. So, if you try to look what makes them try new services you should not be naïve in thinking that they are simply ‘trying to make things better for everyone to use’. The catch is how are they going to make more money as a result of offering these services to the world. Here are a few points you may have missed in your show:

  1. Google Public DNS service – you forgot to mention that if many people use their DNS service, they can now tell where these people browse and spend their internet time even when outside the Google universe. For an internet company this gives tremendous insights on what to focus next and get a head of the competition.
  2. Google changes to the home page – notice how many changes Google has introduced in the last 12 months? Or 6 months? It seems to me that Microsoft’s Bing is causing a lot of these changes. Notice how Google changed their input box size and button shine after Bing was launched. This is all to not lose market share in the search game, etc. This is hardly a UI decision at heart.

When you start thinking on the business side, many other issues come to light. Please do not miss that in future podcasts as you may be doing disservice to your listeners.


Ron Peled

Web Development

3 Interesting Trends in Web Browsers

November 26th, 2009

1. Opera is on the rise, especially in Europe

Recently I am reading more and more articles about the Opera browser. This browser is well known in the mobile space and is pretty much under the radar in the desktop space. However, recently I have been noticing a change upwards, especially in Europe. Opera has hired the graphic designer who worked on FireFox, has improved significantly its set of features and design, and keep introducing new innovative features such as the Opera Unite. As a web developer, I would keep an eye and make sure new site do not break in Opera, especially global sites with European audience.

2. FireFox’s (Mozilla) revenue is tapering off

According to a post “State of Mozilla” by Mitchell Baker, Mozilla has increased overall revenue in 2008 but at a slower paste. This along with large dependence on revenues coming from the main competitor, Google, brought a slew of articles and questions from Analysts and Enthusiasts. The main question from a web developer’s perspective is the long term validity of the FireFox project. At the moment, it does not seem to be in jeopardy at all and according to the article, perhaps even in a better state due to increased innovation and development as a result of fierce competition. In most cases, competition is a good thing. The dependence on Google revenue is a problem, and if I was running the show – working on decreasing this dependence will be my main priority.

3. IE9 – Performance is one of the main improvements

According to the IE team, the new IE9 which is currently being developed will be much faster then its predecessors. This is great news as speed is now the main advantage of using its competitors. Now that Microsoft is in favor with the public again due to Windows 7 and since it is continuing to push new features to IE, I think the rate of market share decline will decrease if not reverse itself and we will see a rise in market share. As a web developer this means no change: still utmost respect to IE, make sure that all websites (new or old) work on IE. Soon, we will need to test for IE6, IE7, IE8, and IE9 and notice that none of them pass the acid test. The good news is that we will drop support for the painful IE6 browser soon (will depend on the rate of adoption of Windows 7 in corporate).

Happy Thanksgiving!

Web Development , , ,

How to Detect if the Page is Secure in a Magento Template?

October 22nd, 2009
Comments Off

When you are designing a Magento template it is easy to overlook a simple fact: most links should not be hard-coded and you should always use the methods that are available for you like getSkinUrl() and getJsUrl(). In addition to pointing to the right root folder, these methods also point to the secure or unsecure URLs, ‘https’ and ‘http’ respectively. However, how can you detect if a URL needs to be secured or not?


In a recent Magento project, I needed to do exactly that: find out if we are in secure or in a non secure page and point to the right jQuery file on Google CDN’s. Here is the code:

<?php if(Mage::app()->getStore()->isCurrentlySecure()): ?>
<script src="" type="text/javascript"></script> 
<?php else: ?>
<script src="" type="text/javascript"></script> 
<?php endif;  ?>

The key method here is the Mage::app()->getStore()->isCurrentlySecure().

Reblog this post [with Zemanta]

Magento , ,

ZenCart 1.3.8 and PHP 5.2.11 Bug: problem login to admin area

October 15th, 2009

Yes, I do have some clients that still use ZenCart. In fact, some ZenCart stores are doing very well in terms of SEO and more importantly, sales. This morning, I ran a routine yum update command on one of my clients servers. To my surprise, after rebooting the admin was inaccessible. I’ll share with you the symptoms so you can identify it and the solution that worked for me.


The symptoms:

  1. Not able to login to Admin panel. More importantly, when you try to login it doesn’t show any error message.
  2. No admin is able to login, in other words, the problem is global.
  3. If you look in the php log files, you’ll find a similar line:
    PHP Fatal error:  Class ‘queryFactory’ not found in /var/www/html/includes/functions/sessions.php on line 54, referer:

What is happening:

While I am not sure exactly, this post in the ZenCart forums gave up a clue: it was something in PHP 5.2.11. Now, it may be a new bug in this new version or a bug that got resolved and as a result it broke something in the old ZenCart. Note that as of this writing, ZenCart 1.3.8 is about a year and nine months old. In internet time this is a significant amount of time.

The solution that

Once I had an assumption for what the problem is, I worked on reverting the PHP version to an older one. However, when I tried to revert using the Atomic repository – it did not work because while they do make old versions of php available, the php-common is not. I ended up removing the atomic repository and using CentOS repositories which provide PHP ver 5.1.6 something. Reinstalled, restarted apache, and vuala!

Now, only if the ZenCart team will get off their butts (or maybe get on their butts) and finish up what they call the next release of this eCommerce application!! What is the next version 1.4, 1.6, 2.0, 2.5? of ZenCart, well that is another discussion altogether.

ZenCart , ,

Magento’s massAction for Custom Plugins

October 8th, 2009
Comments Off

Ever wanted to allow your users to make mass action on your Magento Custom Plugin records? The good news is that it is built in to the Magento Admin Panel and is available at the community edition. The bad news is that there is absolutely no documentation on how to use it. Here are the 3 steps you will need to take in order to develop this feature in your custom plugin:


1. Prepare a Grid Container and Grid in your backend:
For this you will need a collection of records, a controller, and the basic blocks of a grid admin page. I will not cover this in this post, but you can find more about setting it up nicely on Tips for Twits Magento Blog, the article is called Howto: Repackageable custom extension development in Magento.

2. Add the _prepareMassaction() method inside the Grid class:
Add the following code inside your module class that extends Mage_Adminhtml_Block_Widget_Grid:

protected function _prepareMassaction()

 $this->getMassactionBlock()->addItem('add', array(
 'label'    => Mage::helper('rma')->__('Add Products to RMA List'),
 'url'      => $this->getUrl('*/*/massAdd'),

 return $this;

A few things to notice:

2.1. ‘entity_id’ is the database column that serves as the unique identifier throughout your data structure, including: db table, single product magento model, and the collection.
2.2. setFormFieldName(‘product’) – the text ‘product’ is flexible but you will need it in the next step, so remember it.
2.3. The routing string ‘*/*/massAdd’ will triger a method called massAddAction() in your controller.

3. Prepare the actual action to be taken in your controller
Here is the code that needs to be added, notes are below:

public function massAddAction()
 $productIds = $this->getRequest()->getParam('product');
 if(!is_array($productIds)) {
 Mage::getSingleton('adminhtml/session')->addError(Mage::helper('rma')->__('Please select product(s)'));
 } else {
 try {
 $product = Mage::getModel('catalog/product');

 foreach ($productIds as $productId) 
 $rmaProduct = Mage::getModel('rma/product');
 'Total of %d product(s) were successfully added to the RMA product list', count($productIds)
 } catch (Exception $e) {




3.1. The method name is routed from the previously provided $this->getUrl(‘*/*/massAdd’) method.
3.2. Yes, the variable $productIds contains a simple array of entity_id numbers. This is not a collection by any means, so you should treat it this way.
3.3. Inside the main foreach loop, you can pretty much do whatever action you wanted.

In conclusion, with about 20 lines of code and updates to two files we are able to leverage a powerful built in feature provided by Magento which allows for mass actions on our records. Obviously, this little excerpt is not for the beginners out there. However, I hope this will make some developers’ lives a bit easier.

Let me know how what other advanced Magento features you use the most.

Magento , ,

Updating iNove to work with KeywordLuv plugin

October 5th, 2009

Last week I discussed a new wordpress plugin that got me excited: KeywordLuv. I also promised to show you how I fixed the issue with iNove theme. Here it goes:


The main issue is that the iNove theme uses the get_comment_author_url() and the KeywordLuv works on a different method, the get_comment_author_link(). So, here are the steps to update your iNove theme in a way that the author will show the Author name and the keywords properly:

  1. Go to your WordPress admin area
  2. Install the DoFollow plugin
  3. Install the KeywordLuv plugin
  4. Go to the Appearance tab
  5. Click on the Editor (Themes Editor for wordpress)
  6. Click on the ‘Theme Functions‘ file (functions.php)
  7. Look for these lines of code around line 230:

    <?php if (get_comment_author_url()) : ?>
    <a id="commentauthor-<?php comment_ID() ?>" href="<?php comment_author_url() ?>" rel="external nofollow">
    <?php else : ?>
    <span id="commentauthor-<?php comment_ID() ?>">
    <?php endif; ?>
    <?php comment_author(); ?>
    <?php if(get_comment_author_url()) : ?>
    <?php else : ?>
    <?php endif; ?>
  8. Erase the above lines and instead insert the following code:

    <?php echo get_comment_author_link(); ?>
  9. Save by clicking the ‘update file’ & check your work

That should do it. Notice that this site already has it installed and working properly. Disclaimer: the steps above are provided with the intention that it may fix an issue – there is by no means a guarantee. Each blog is slightly different.

Let me know how this worked out for you.

Web Development ,

KeywordLuv: a must have wordpress plugin

October 2nd, 2009

KeywordLuv is the latest hot wordpress plugin. It did not officially catch on fire yet, but it will. I won’t be surprised to find it built in next versions of wordpress. So what is it anyway? From the publisher’s website:

Description: Reward your commentators by separating their name from their keywords in the link to their website, giving them improved anchor text.

- Stephan Cronin

keywordluv-google-wonder-wheelIn other words it lets commentators leave a comment and allow area for their name and keywords while showing clear separation.  Instead of having Dedicated Advanced Hosting or Magento Plugins post comments on your site, the author of the comment can leave their name and get the credit they want with the keywords they selected. Three immediate benefits arise from this plugin/feature:

  1. Clear separation between author name and the keyword.
  2. Since the plugin needs a DoFollow plugin installed and the keywords entice authors to comment on your posts, more people will potentially join the discussion.
  3. Ability to separate between spammers and non spammers easily (for now).

There was a tiny issue with inove and the usage of this plugin. Next week, I will share with you how to address the issue in the iNove theme.

Let me know if you find this plugin useful or not.

Web Development

Coming Book Review for Magento: Beginner’s Guide

October 1st, 2009

Magento-for-Beginners-GuideI’ve recently been approach by a UK publisher, Packt Publishing, to review a new books about Magento. The book is called Magento: Beginner’s Guide and covers many aspects of the Magento eCommerce platform. In fact, it almost seem like an intermediate or even advanced from a merchant’s point of view. Here are a few pros and cons for this book which I drafted from a quick 10 minutes glance:


  • From the table of content, the book seem to be comprehensive and covers many parts of the Magento eCommerce.
  • The book has a duo setup of Author(William Rice) + Technical Reviewer(Jose Argudo) – which is promising.
  • Installation chapter includes FTP instructions and folder/file permissions instructions which is more than I have seen in similar books.


  • The book claims to target everyone. Realistically, this book seem to target smaller merchants who will be installing, setting up, and running the store themselves.
  • The book refers to a bit outdated version of Magento: 1.2.x.x. Not a big issue since Magento’s main features have not changed much.
  • Seem to be a bit technical for the average smaller merchants. Still remains to be seen how technical.

If you have any thoughts about this book or if you read it and have something to say about it, let me know.


Magento’s Order Management Workflow: Comprehensive but Unrealistic #2

September 29th, 2009

Yes, I finished the goEmerchant payment plugin for Magento and figured out how to use and modify Magento’s Order Management Workflow. It did require a lot of reverse engineering and a bit of tweaking of the button labels to improve the admin’s understanding on what each operation actually does.

Magento's Order Management Workflow is like a plumbing job, maybe not so bad.

Pre-Authorize transaction on Checkout:
So, the first thing we want to do is pre-authorize transactions when a user places an online order and checks out from Magento. That is relatively easy and mostly built in. Nothing needed to change from a workflow point of view. The only thing we had to realize is that there are two values that stay with the payment which is associated with the Order and we can use for the goEmerchant reference_number. Those are: ‘cc_trans_id’ and ‘last_trans_id’ – I chose to use ‘cc_trans_id’ just because it made more sense.

Cenceling & Voiding an Order:
In Magento you can only void invoices. However, if you create an invoice you in effect will triger the captur() method of the payment. Now, goEmerchant allows you to void only unsettled transactions – so we had to handle the voiding before we create an invoice. Luckily Magento has the cancel() method that is called when an order is canceled. So, we wired the void operation to the cancel() method and relabeled the button from ‘Cancel’ to ‘Cancel & Void’ – to explain what it actually does. We also turned off voiding, since there is not much sense in voiding an already created/settled invoice.

Settling a Transaction (Capture Funds):
goEmerchant needs the eCommerce application to send a ‘settle’ request when the order was processed, shipped, and invoiced. This request than places the transaction in the settled queue and will be processed usually at 2am. This was relatively easy and no modifications to the workflow needed here. All we needed to do is perform the ‘settle’ request in the capture() method of the payment. Note: since our module still allows Authorization & Capture setups, we had to handle the special cases here. But overall no problem.

Refund or Creditmemos:
Magento has this option to create new credit memos, these serve as what we call it as refunds. Luckily, here Magento’s Order Management Workflow works finde and allows you to process a credit memo and ‘Refund Online’. It is actualy labeled ‘Refund’ and the other option is to ‘Refund Offline’. So, in our plugin we are simply wiring the refund request in the refund() method of the payment. Note: Magento also allows a refund of the entire order which is not triggering anything. So, we will need to be cautious to explain to our merchants that they will need to refund already created invoices.

Magento’s Order Workflow is definitely rich in features and allows great level of flexibility for the merchants. However, some of it would not make sense and seems like overly complex for something that should be configurable but simple. We were able to get our plugin working the way we needed it to by a combination of using the existing functionality and relabeling some buttons. We will also need to caution our merchants from certain actions or make the decision to remove these options altogether.

If you are interested in our goEmerchant payment module for Magento, email us at or call at (888) 897-7775.

Magento ,