Magento Themes and Magento Extensions

ADDING A CSS CLASS TO LAST DIV USING JQUERY

Share
Posted on November 24th, 2012 | Posted by admin

This is an issue I come across from time to time, especially when using wordpress or anything else that dynamically produces content.

The scenario is you have a list of posts on a page and you’re not able to add a class to the last item in the list (say to remove a separating border).

One option would be to to use the pseudo css class :last-child in your css e.g:

Magento Use Custom Product Attributes to Add CMS Static Block to Product Page

Share
Posted on November 23rd, 2012 | Posted by admin

The Magento shopping cart has wonderful tools like attributes that makes it easy for users to control custom content on your products. Recently, I have had a client that needs to display the same information over multiple products. So rather than manually adding it on one product, I thought it would be easier to link a custom cms static block to the product page. While this seems like an easy thing to do, Magento makes this a bit complicated to set up. So this tutorial is meant to show you how to do this! After this tutorial you will be able to control static cms blocks from any product in your Magento store.

So let’s begin.
Setting up your Custom Product Attribute.
First we need to set up a custom product attribute correctly in magento. This will let us create a few cms static blocks and link them to our product. First login to your magento backend and go to Catalog > Attribute > Manage Attributes. Once the page reloads click on “Add New Attribute”. This will take you to a page where you can set up your attribute.

Magento import complex category

Share
Posted on November 22nd, 2012 | Posted by admin

Magento import complex category

$new_category = $inv->call($sess,”catalog_category.create”, array($par, array(“name”=>$cd['name'],”is_active”=>$cd['is_active'],”available_sort_by”

=>array(‘price’),”default_sort_by”=>”price”,”include_in_menu”=>1,”position”=>$cd['position'],

”level”=>$cd['level'],”parent_id”=>$cd['parent_id'],”created_at”=>$cd['created_at'],”updated_at”

=>$cd['updated_at'],”url_key”=>$cd['url_key'],”description”=>$cd['description'],”image”

=>$cd['image'],”meta_title”=>$cd['meta_title'],”meta_keywords”=>$cd['meta_keywords'],”meta_description”=>$cd['meta_description'],”display_mode”=>$cd['display_mode']) ));

Magento: Facebox and jQuery installation.

Share
Posted on November 21st, 2012 | Posted by admin

Facebox and jQuery
After installing Magento, I hated all of the popup windows that are used in Magento, so I decided to use Facebox, I have used it in many of my web projects over the years, so I decided to use it on my current e-commerce project. This is by no means a step by step guide, I am making the basic assumtion that you know how to code and understand PHTML, XML, JavaScript, CSS and all of the other tools that power Magento

JavaScript header placement
When you add javascript or CSS files in magento, you will have to specify the location of these files so that Magento can add the information into the header tag when it builds the pages. All of the construction of the webpages are driven by XML files, so you will have to understand how XML works before you start messing around with the files in Magento.

Moving a Magento-shop to a new server

Share
Posted on November 20th, 2012 | Posted by admin

The other day I had to move a live Magento-shop to a new server. Since I have (at the moment) a very limited experience with Magento, I started Googling a bit.

I found a post on the Magento Wiki about moving servers, however when following it I stumbled upon some quite annoying errors.

To start from the beginning, the first thing I did was to download the entire shop from the original FTP-server. Afterwards I exported all tables in the Magento SQL-database.

Before I uploaded the physical files to the new server, I had to change the database name, username and password. These informations were easy to change, since they’re stored in the file