I have a product with custom option of text area type. now i want to set some default text which should be use when user doesn't fill any text and this text will go to cart with product.

I have searched everywhere but not getting how to do this ?

Please help if anyone know about this.


You can do this via observer in custom module:

<?xml version="1.0"?>
    <!-- some config here -->
    <!-- some config here-->

And Model/Observer.php

class My_Module_Model_Observer
    public function catalogProductPrepareSave($observer)
         * @var $product Mage_Catalog_Model_Product
        $product = $observer->getEvent()->getProduct();
            $product->setSomeAttribute("Some default value here");
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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