mafflog
random stuff for teh interwebs
  • About
  • Projects
  • Archives
Home » 2008 » October

Magento: access a dropdown attribute value

October 10, 2008 · in Development, How-Tos

In Magento it is possible to access a product’s attributes with a simple getter method. Let’s get the attribute test:

<?= $_product->getTest() ?>

This works as long as test is an attribute of type ‘text’. If the attribute is a dropdown, the method will just return the id of the selected option. To get the dropdown text, you need to call another method:

<?= $_product->getAttributeText('test') ?>

Debootstrap a Ubuntu Hardy DomU on a Debian Etch Xen Dom0

October 3, 2008 · in How-Tos, Linux, Server

Lately, I wanted set up a Ubuntu Hardy DomU on an existing Debian Etch Dom0 box. Usually, setting up Debian-based DomUs is very simple with xen-create-image and debootstrap (there are tons of tutorials out there dealing with this topic), but unfortunately Etch’s version of debootstrap doesn’t support Ubuntu Hardy. I spent a surprisingly long time on searching the net until I found a solution for this problem on a french site: Installer et configurer Xen sur Debian 4.0 Etch (it’s a complete howto for Xen on Debian Etch, but it deals with the Hardy part too). The author created a backport of the debootstrap package, which enables you to debootstrap Hardy.

First, you have to create the hardy.d directory (symlink) for xen-tools.

$ cd /usr/lib/xen-tools
$ ln -s ubuntu.d hardy.d

There’s a debian repository holding the backport package, however I got problems to use that repository on an amd64 box, so I downloaded and installed the package manually.

$ wget http://falcon.landure.fr/pool/etch/debootstrap/debootstrap_1.0.10_all.deb
$ dpkg -i debootstrap_1.0.10_all.deb

Now you should be able to debootstrap a Hardy DomU.

$ xen-create-image 
--hostname=hardy 
--ip=xxx.xxx.xxx.xxx 
--size=5Gb 
--memory=256Mb 
--dist=hardy 
--mirror=http://archive.ubuntu.com/ubuntu/
github github github

Search

Categories

  • Android
  • Development
  • Fun
  • General
  • Hardware
  • How-Tos
  • Kitchen
  • Linux
  • No Comment
  • Projects
  • Server
  • Snippets
  • Software
  • Video
  • Web
  • Windows
  • Wordpress

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Copyright © 2008-2013 mafflog