The upgrade happens the first time your magento application boots. Usually this is the first http request that gets to a magento page. So basically you just need to look at a page to trigger the database update.
An alternative approach is to use the handy magerun cli tool to trigger the updates:
n98-magerun.phar sys:setup:run
I like this approach as it gives you full control over when the updates happen. You can put the site in maintenance mode so no traffic gets to magento and triggers the update when your not expecting, run the updates manually from your cli, test and then when your ready take the site out of maintenance.
You should ensure that you have your module registration XML in app/etc/modules/Mt_Quote2Sales.xml
, which should tell Magento that your module exists and is on the local code pool.
Second, you should tell Magento in that file that it should depend on your community module. This will immediately help by ensuring that it is loaded after the community module (which makes sense, because you're extending it). An example of this XML file might be:
# File: app/etc/modules/Mt_Quote2Sales.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<Mt_Quote2Sales>
<codePool>local</codePool>
<active>true</active>
<depends>
<Bobcares_Quote2Sales />
</depends>
</Mt_Quote2Sales>
</modules>
</config>
Third, as the others have mentioned already, remove the community
component from your require path - include paths are not code pool specific, essential when extending controllers, which don't follow the autoloader's convention:
require_once 'Bobcares/Quote2Sales/controllers/RequestController.php';
class Mt_Quote2Sales_RequestController extends Bobcares_Quote2Sales_RequestController
{
}
Lastly, if it is still not working, you should create a simple frontAction which dumps out something and load it in the browser. If your XML is configured correctly, you might have a conflict with another module.
Make sure you clear or disable your cache.
Edit
I've just seen that you've posted your attempt to rewrite a helper - unlike the controller configuration where you can just tell Magento that your controller should be loaded before the one you're extending, with models/helpers/blocks you need to rewrite the path for it:
# File: app/code/local/Mt/Quote2Sales/etc/config.xml
...
<global>
<helpers>
<quote2sales>
<rewrite>
<data>Mt_Quote2Sales_Helper_Data</data>
</rewrite>
</quote2sales>
</helpers>
</global>
...
You can test this using magerun
(if you have it), or with a simple ad hoc script like so:
# File ./test.php
<?php
require_once 'app/Mage.php';
Mage::app();
$test = Mage::helper('quote2sales');
var_dump(get_class($test)); // Mt_Quote2Sales_Helper_Data if you're configured correctly
Best Answer
You do not write validation properly.
If your form button type is submit(
<button type="submit"
), then you don't have to use the code above.Because VarienForm onsubmit call magento validate check
if form's button type is button(
<button type="button"
) then you need(this.validator && this.validator.validate()) {
...first,you need to add a on click function
onclick="registerForm.submit(this)"
.Then you need to define function of this varien form