Blog

Zend Core – PHP LAMP/WAMP stack overview

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

Zend authentication component (Zend_Auth), database storage class

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

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

Selling on eBay vs. running a web store

Selling on eBay vs. running a web store

People tend to ask this question a lot. Should I sell on eBay or should I open my own web store. There is no ultimate answer to this question and it really depends on many different factors such as your budget, your niche, the amount of time you have, number of different products and so on.

This is the list of things that might help you make up your mind on what’s the best way to go for you.

Read more

File upload in Magento

File upload in Magento

Whan of the most enticipated and needed things in Magento is File upload Custom Option. As discussed last year at Magento Forum, it is not completed nor tested.

Now, Magento already have frontend and admin part of file upload option implemented in themes. Since backend part is still missing, understand that this still doesn’t work, however, if you’re interested how it looks, read on ..

Read more

Simple product with custom options in grouped product in Magento

Simple product with custom options in grouped product in Magento

Does the title sound complicated? Grouped Products display several products on one page.  For example – if you’re selling chef’s knives and you have the same knife in four sizes, you can make a grouped product to display all four sizes.  Customers can select the size(s) they want and add to cart from this page.  Another example would be a themed bedroom set – you can create a grouped product and sell the sheets, comforter, and pillow cases all from the same page.

Read more

Getting started with REST using Zend Framework

Getting started with REST using Zend Framework

I was playing with SOAP for the last few days. I must say, it looks somewhat complicated in some areas. After some google-ing on SOAP vs REST stuff I decided to write this simple ZendFramework REST how to. Actualy this is a PHP part of tutorial since I was working on a PHP and C# solution using Mono framework for C# part can be found on my site. My desire was to create a web service in PHP environment and consume that service in C# environment.Getting started with REST using ZendFramework. Here’s the PHP REST server part.

Basic example is really, really simple. Aren’t they always. Seriously, it’s not my intention to go into outermost details.

Read more

What is the best shopping cart?

What is the best shopping cart?

If you try to ask this question on some forum or newsgroup, you will surely get many replies. Everyone will present you his favorite. My first developed online store was created with standard osCommerce platform. After three or four projects, I started to work with CRE Loaded and used it frequently for years.  Although it was also an osCommerce fork, it had many advantages. I switched to Magento™ early this year and this is my final choice.

Let’s look at the popularity of those platforms now.

Read more

dotProject – Open Source Project Management for free

dotProject – Open Source Project Management for free

Notice the word free in the title. If something is declared as open source this does not imply it should be free. Take a look at FogBugz. It is, one of the best open source project tracking tools currently available. However it’s quite expensive. Maybe not so expensive to larger companies but for small businesses and freelancers it sure is.

Yesterday I came across dotProject tool. If you are like me and came to PHP from .Net world then your first though might be that this is .Net application due to the “dot” in the title. Well, it isn’t, it’s a PHP powered collaboration tool.

Read more

Custom price filter in Magento

Custom price filter in Magento

Quite a few people have asked me for a price filter functionality that comes with Magento. Mostly, the questions are same: How does one put the price filter anywhere on the page? How does one set it’s on price ranges in that filter? What defines default price ranges. Is it possible to set price filter for all my products instead of just single category? Lot of questions. The answer might be simpler then you might think.

There are two ways to approach this problem. Head trough wall or stop and think approach.

Read more

How to track internal site search with Google Analytics?

How to track internal site search with Google Analytics?

Did you know that you can actually track what your visitors are searching for inside your website? We are going to explain you how it’s done via Google’s Analytics tool. It is possible to track your internal site searches if your internal search engine passes the search term in the query string as Google Analytics tracks everything entered in location bar of user’s browser.

Read more

Kapitol Reef :: Magento store with 1 product

Kapitol Reef :: Magento store with 1 product

Can an online store have only one product? Sure it can and we give you the one that just launched. Kapitol Reef was founded to develop, perfect, manufacture and market a new breed of snorkels based upon pressure-balanced breathing in the aquatic environment. The entire focus for this company is to deliver best-of-class products, starting with the snorkel. Kapitol Reef is in the market for many years and this week they published a new site. Similar to our work on Teraflex project, we used WordPress and Magento platforms for the development.

Read more

Magento MySQL database diagram

Magento MySQL database diagram

If you worked with osCommerce, Zen Cart, CRE Loaded or any similar eCommerce platform before, you might find Magento database structure quite confusing when you see it for the first time. I advise you not to rush too much figuring out what is what by glancing through database. Try to spend first few hours getting familiar with some background. For purposes of flexibility, the Magento database heavily utilizes an Entity-Attribute-Value (EAV) data model. As is often the case, the cost of flexibility is complexity. Is there something in Magento that is simple from developers point of view?

Read more

Making use of Magento getSingleton method

Making use of Magento getSingleton method

In one of my previous articles I showed you how to use getModel and getData methods in Magento. Although we should not put those to methods at the same level, since I’d say the getModel is a bit more higher. Higher in sense, you first use the geModel to create the instance of object then you use getData to retrieve the data from that instance. I have said it before, and I’m saying it again; Magento is a great peace of full OOP power of PHP. It’s architecture is something not yet widely seen in CMS solutions.

One of the architectural goodies of Magento is it’s Singleton design pattern. In short, Singleton design pattern ensures a class has only one instance. Therefore one should provide a global point of access to that single instance of a class.

Read more

UPS API Quest

UPS API Quest

I got one fairly simple request to develop a custom shipping calculation for Magento that will use some special calculation using UPS API. Right now, Magento only calculates weight and the client needs something more advanced. I worked on similar stuff before, so I guessed this will not be much different. First step was to find an API for UPS. Well, this post is all about the search for API. I’ll update it when I manage to find it.

Read more

Manual creation of Google Sitemap in Magento

Manual creation of Google Sitemap in Magento

Most of you probably know this, but let’s define what the sitemaps are. Sitemaps are a simple way for site creators to give search engines the information about pages on their site that are available for public. Basically, those are just 1 or more XML files that lists URLs for a site along with additional meta informatio about each URL (like last update, how often it changes, its importance relevant to other pages). With this in mind, search engines can be more clever while crawling the site. Click here see how sitemap of this site looks like.

Read more

FogBugz – Project Management Tool

FogBugz – Project Management Tool

Working on a project as only developer having direct contact with the client gives you the freedom not to think too much of a communication tool you will use. Couple of meetings, phone calls and an email will be just fine. After 3-4 weeks, you deliver the project and the communication is over. If that is your common scenario, than skip evaluation of this tool.

Read more

Designer’s Guide to Magento PDF download

Designer’s Guide to Magento PDF download

After many developed CRE Loaded’s online stores and watching Magento development progress for quite some time, I decided it was time to use Magento with my next client. My starting point for development was official Designer’s guide. I’m the type of guy who likes to have documents nice&clean, so I tried to print it but print was a mess. That’s when I decided to create PDF of the official documentation for easy print. This is probably the best starting tutorial for creating a fresh new Magento template.

Read more