Category / E-Commerce

Warning: SimpleXMLElement::addAttribute() [simplexmlelement.addattribute]: Attribute already exists

Warning: SimpleXMLElement::addAttribute() [simplexmlelement.addattribute]: Attribute already exists

I’ll be short on this one. For those of you in Magento theme developement, if you ever see this message

Warning: SimpleXMLElement::addAttribute() [simplexmlelement.addattribute]: Attribute already exists

Most likely you have layout problem. So dive into your theme /layout folder and quick check to see if it relly is the messed up layout in your theme is to rename entire /layout folder to something like /_layout. This way Magento will propagate to using default theme /layout folder. If the refresehed page now works, you located the error to be in /layout folder. Now do the same for few of the files inside the layout folder.

In my example I have added the following into catalog.xml under section

<remove name=”tags_popular” />

And that caused my Customer page to be broken after customer logs in.

Hope this help someone.

0

User friendly product availability message in Magento

User friendly product availability message in Magento

Here is a little something to use on template/catalog/product/view.phtml page. I got few inquiries on how to get the “in_stock” status of a product. Here is a working sample code that shows different messages when and if the product is in stock or out of stock. Read more

0

Divided site search in Magento and WordPress integration

Divided site search in Magento and WordPress integration

Our client often want WordPress and Magento integration. This “integration” should be taken with more loosely terms in mind. Not gonna go in details of what I think by that.

Anyhow… One of the things we often do at client request is special Search functionality. Special in terms, choose to search from Articles (WordPress) or Products (Magento). As you can see on the image below.

In order to avoid repaeating some code from WordPress header file to Magetno header file I wrote a small class. Read more

2

Sort (show) products by sold quantity in Magento

Sort (show) products by sold quantity in Magento

Recently I wrote a post on Show products on sale in Magento. This one is somewhat of an upgrade to that post. In the previous post I mentioned, I had the case where I modified

app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php

There I made some changes to the _construct() function. In order to implement another cool feature in our grid/list category product view I will make some additional modifications to Toolbar.php and the _construct() function. Read more

3

Advanced search in Magento and how to use it in your own way

Featured Image

It’s been a while since my last post. I’ve been working on Magento quite actively last two months. I noticed this negative trend in my blogging; more I know about Magento, the less I write about it. Some things just look so easy now, and they start to feel like something I should not write about. Anyhow…. time to share some wisdom with community :) Read more

41

Custom price filter in Magento

Featured Image

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

15

Show products on sale in Magento

Show products on sale in Magento

By default Magento (up to 1.1.6 version) does not have item on sale list view. If you were to open the http://demo.magentocommerce.com link and go to Furniture > Living Room you would get a grid (or a list) view of all the products inside the category Living Room as displayed on the picture below.

Filters available by default

Filters available by default

As you can see, you have three filters available by default (Best Value, Name and Price). So what if we want to add another one here? Read more

1

Kapitol Reef :: Magento store with 1 product

Featured Image

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

7

How to add login form on home page in Magento

How to add login form on home page in Magento

I found a interesting question on Magento forums. Some of the clients would like to see the login box on home page. Here is a quick howto. Read more

2

Magento MySQL database diagram

Featured Image

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

27