vehiclefits / vfmagento

A set of modules for adding vehicle specific features to your Magento shopping cart.
http://vehiclefits.com
Open Software License 3.0
22 stars 18 forks source link

Elite_Vaf_Model_Observer::bootsrap set process url via configuration option #64

Open kylecannon opened 11 years ago

kylecannon commented 11 years ago

For the product to be more extendable instead of calling the VF_Singleton:: getInstance()->setProcessURL(); with no configuration option change (SEE: https://github.com/vehiclefits/vfmagento/blob/master/app/code/local/Elite/Vaf/Model/Observer.php#L40) how about making it a configuration option to be able to change it ion the config.ini file?

joshribakoff commented 11 years ago

The Magento extension is not a framework - that's what the library repo is for. I think when in doubt we should do what Mac does - keep things simple.

What would be the use case for this? If someone is overriding the AJAX logic & changing the URL the AJAX hits, they can just override the observer & inject their own values. Its a developer oriented change.

The config.ini is for settings that users want to change (not developers). Maybe I'm wrong but it just seems like something no user would use, and would be "cleaner" for a developer to do by overriding the bootstrap event with his own logic. May make sense to move it a function in the observer class, so someone overriding the observer only has to override the value that returns this URL.