Blog

Zend Core – PHP LAMP/WAMP stack overview

For all those in open source web application development, like myself, LAMP/WAMP is well known term, especially if your development is based on PHP. Imagine WAMP with commercial support available and you what to you get? You get Zend Core. I don’t mean to be harsh neither to WAMP or Zend Core with statements like these. I’m simply trying to explain as short as possible, to those interested in Zend Core what it actually is.

Read more

Google’s Interest Based Ads – Behavioral Targeting

Google is launching it’s Interest Based Ads into beta. These ads are a form of behavioral targeting ads and are being tested by limited number of selected advertisers.  At Google, they strive to serve as relevant ads as possible to the users of Internet and that’s why contextual advertising is not enough anymore. They decided to take it one step further beyond and step into the world of behavioral targeting.

Read more

Zend authentication component (Zend_Auth), database storage class

I love Zend Framework. Sometimes it can really be overhead but most of the time it’s really nice working in well organized, documented framework. One of the components I use relatively often iz Zend_Auth component. Zend Framework documentation is quite rich so I wont get into explaining how to use Zend_Auth. There is one thing that bothered me in Zend_Auth, and that’s persistent storage. Zend_Auth (in the latest version 1.7.6, as of time of this writing) supports only Session state as it’s storage. What I needed is full database session storage.

Read more

Add breadcrumbs in Magento to pages that miss them

Here is one solution on how to add breadcrumbs to pages in Magento that by default do not have breadcrumbs. Recently we had a client that requested a basic breadcrumb to be shown on pages that Magento does not serve breadcrumbs.

<?php 
/**
 *
 * CUSTOM BREADCRUMBS
 *
 * Adds url breadcrumbs for pages that do not have breadcrumbs by default
 *
 */
 
?>
<?php if(is_null($crumbs)): ?>
<?php 
 
/**
 * NOTE
 * On some servers use ->getServer('PATH_INFO')
 * and on some ->getServer('ORIG_PATH_INFO')
 */
 
$urlRequest = Mage::app()->getFrontController()->getRequest();
$urlPart = $urlRequest->getServer('ORIG_PATH_INFO');
 
if(is_null($urlPart))
{
    $urlPart = $urlRequest->getServer('PATH_INFO');
}
 
 
$urlPart = substr($urlPart, 1 );
$currentUrl = $this->getUrl($urlPart);
 
//$controllerName = Mage::app()->getFrontController()->getRequest()->getControllerName();
//$controllerName = ucfirst($controllerName);
 
$controllerName = str_replace("/", " ", $urlPart);
$controllerName = str_replace("_", " ", $controllerName);
$controllerName = str_replace("-", " ", $controllerName);
$controllerName = ucfirst($controllerName);
 
?>
<span class="breadcrumbs">
<strong class="float"><?php echo $this->__("You're currently on: ") ?></strong>
<ul class="breadcrumbs">
<li class="home">
        <a title="<?php echo $this->__('Go to Home Page') ?>" href="<?php echo $this->getUrl() ?>"><?php echo $this->__('Home') ?></a>
    </li>
    <li> / </li>
        <li class="<?php echo strtolower($controllerName) ?>">
        <strong><?php echo $this->__($controllerName) ?></strong>
    </li>
</ul>
</span>
<?php endif; /* END OF CUSTOM BREADCRUMBS */ ?>
Read more

Internal Server Error 500 in Magento

Many of us who started experimenting with this interface and tried to place various values for Base URL, came to a dead end where Magento breaks.  Usually, we get Internal Server Error 500 with each page load. The problem lies in the fact that we can no longer open the Magento administration to correct the error. What needs to be done in such a scenario?

Read more

How to buy add space on popular US blogs?

If you are into internet advertising you probably already considered or already tried out advertising on some popular or targeted blogs. Blogs can be valuable traffic generators however in most cases you will see that conversion rates and click through rates of advertising on blogs will be much worse and more expensive then advertising on search engine’s search results (Google AdWords and similar).

Read more

connect2MAGE | WordPress plugin for easy Magento database connection

Hi everyone. I wrote this little plugin while working on one of our projects. If you know your way around WordPress then you know what $wpdb variable stands for. Imagine the following scenario. You have WordPress installation on one database, Magento on another. You know your way around SQL. You can always make new object based on WPDB class inside your template files giving it database access parameters, or you can use this plugin and use $MAGEDB the same way you use $wpdb.

Read more

How to use rel canonical element (tag)?

Matt Cuts from Google made a great new video explaining how to properly use rel canonical. One of the most often questions was what is rel canonical, is it a meta tag? Matt Cuts explains that it’s easy to confuse it with meat tag as it’s included inside the website where meta tags are usually placed, however since it’s actually a link element it should be called an element, not a tag.

Read more

WordPress and Magento integration – One way to go

Lot of us in Magento related development have an issue of connecting their Magento with other CMS solutions out there. Lot of our clients like and want WordPress alongside Magento. WordPress is a great platform when it comes to publishing and managing articles. Not to mention the SEO stuff. One of the biggest issue with integrating two systems in PHP is the lack of the namespaces. This leads to function name redeclaration issues and so on. Integrating something into something is such a loosely term, depending on level of integrations… If you ask me 🙂

Read more

WordPress FirePHP plugin

While tracing some code in WordPress i got tired of var_dumps, so i quickly coded FirePHP plugin. All it does is include FirePHP and forces WordPress to load it before other plugins, so that you can use it in plugin development.

Read more

Custom Transactional Emails

Since transactional emails are very important for the process of online shopping you need to have them set up just the you want them and the default templates just don’t cut it. You need your own logo, email data and custom verbiage to be consistent with the image of your company.

Read more

TeraFlex PLUS, another Magento + WordPress duo

After we launched TeraFlex Suspensions website few months ago, we created a new similar website for Teraflex PLUS. Although the name is similar, this is not the same company. The primary goal of this site is to help Jeep owners to upgrade their pets with parts and accessories for any type of adventure. The secondary goal is to create a Jeep enthusiast community in Utah, USA and surroundings. The site is powered by WordPress and Magento combination.

Read more