I'm Hannah a jeweller from Kent, United Kingdom. I am developing my website and I have hit a roadblock, I was wondering if anyone could point me in the right direction please?

I am using the latest version of Magento. I created a custom css class using amazing instructions here -


I adapted it to my theme and it is working amazingly. The css class is stored in an SQL database, and this is then called and echo'd to the front end code, so I can use it with css to style individual options.

I would like to do this with each individual sub-option but with the already existing SKU field. (Not the main product SKU, the individual option SKU , screenshot attached)

With the css class to add it to the front-end, the webpage said to use - <div class="input-box <?php echo $option->getCssClass() ?>">

I am trying to add SKU to this with either:

<?php echo $option->getSku() ?>

OR <?php echo $value->getSku() ?>

but I cant get either to work, any ideas? I'm not trying to do anything fancy, but just to echo the individual options SKU to the individual options div class.

P.s I had to remove the underscore in $_option to get it to work with cssclass, which is why it is slightly different to the instruction page. As you can see by the screenshot I am using a custom options extension, although this SKU on the options is in a standard magento install with no options.

This is the page I am trying to do it on - http://alexafay.com/design-your-own-necklace.html

Thanks, Hannah

enter image description here

1 Answer 1


I have no clue what $option is, but when it is an object of type Mage_Catalog_Model_Product_Option ->getSku() should work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.