Extending Yii Modules

Hi ,

I need to use yii-shop extension in my application . I have got it installed and its working fine . But the issue is that my product model will be completely different from the model provided by the extension. I can do it by adding attributes to the product model and tweak the views and controllers(if required) accordingly . in that case I will have to hack the extension code , is there any best practice guide for extending community contributed yii modules.

Thanks,

Basant

I thought of that. Yii-Shop is a good way to start but lack some things. There is no article number (EAN) for instance. As far as I could see no page that the customer can log in to. I didn’t like the way the cart looks and will change that. When it’s empty it doesn’t display but I want it to show “cart is empty”. Therefore I removed the “return false” from the init and run functions. Lots of small things to change but probably best to change as little as possible. I created a new theme. That way I don’t have to do anything with the original views.

How about creating new model, which inherits the model of the module, and even its controller?

Hi,

Yes that seems the only way , thanks