0

Urapidflow has an issue which casued by a security patch and even their new version does not resolve the issue, the path for module file that I want to write an override is:

app\code\community\Unirgy\RapidFlow\Block\Adminhtml\Profile\Edit\Tab\Upload.php

anyways I have to rewrite the following:

  $this->getUploader()->getConfig()

this should be

 $this->getUploader()->getUploaderConfig()

to work fine. here is the module path: Unirgy_RapidFlow_Block_Adminhtml_Profile_Edit_Tab_Upload

I am creating a module to rewrite the functions inside it, here is what I did:

app\code\local\Scosche\Unirgy\etc\config.xml

<config>
    <modules>
        <Scosche_Unirgy>
            <version>0.0.1</version>
        </Scosche_Unirgy>
    </modules>
    <global>
        <blocks>
            <scosche_unirgy>
                <class>Scosche_Unirgy_Block</class>
            </scosche_unirgy>
             <unirgy_rapidFlow>
                <rewrite>
                    <adminhtml_profile_edit_tab_upload>Scosche_Unirgy_Block_Adminhtml_Profile_Edit_Tab_Upload</adminhtml_profile_edit_tab_upload>
                </rewrite>
             </unirgy_rapidFlow>
        </blocks>
    </global>
</config>

This is wrong for some reason I created the same folders and path on scosche module but although I can see module is active in Advanced configuration, it is not working, app\code\community\Unirgy\RapidFlow\etc\config.xml:

<blocks>
    <urapidflow><class>Unirgy_RapidFlow_Block</class></urapidflow>
</blocks>

please let me know what's wrong.enter image description here

7
  • Are you sure that unirgy_rapidFlow is the correct block alias? Meaning, is this the one that can be found under app/code/*SCOPE*/Unirgy/RapidFlow/etc/config.xml inside the <blocks> node? Commented Mar 6, 2018 at 23:59
  • it is app\code\community\Unirgy\RapidFlow\Block\Adminhtml\Profile\Edit\Tab\Upload.php
    – Nickool
    Commented Mar 7, 2018 at 0:38
  • That doesn't say anything about the alias used for Unirgy_RapidFlow_Block - this you need to check in the config.xml of the module first. Commented Mar 7, 2018 at 0:49
  • Show us ***Unirgy/RapidFlow/etc/config.xml file please. Commented Mar 7, 2018 at 0:55
  • @ChristophFarnleitner I updated the question, sorry I got your mean now, alias is urapidflow
    – Nickool
    Commented Mar 7, 2018 at 1:04

1 Answer 1

2

As discussed in the comments, one common mistake is the assumption that for example a model or block rewrite is to be done based on Vendor_Modulename.

This means, to create a proper rewrite for a core and/or a third party module the one must take a look at the modules etc/config.xml and find the actual alias/identifier that is defined for the model or block in question.

A basic example:

In case you want to rewrite a certain method of app/code/core/Mage/Catalog/Block/Product.php you'll first have to check in app/code/core/Mage/Catalog/etc/config.xml to find something like this:

<config>
    [...]
    <global>
        [...]
        <blocks>
            <catalog> <!-- this is our node of interest -->
                <class>Mage_Catalog_Block</class>
            </catalog>
        </blocks>
        [...]
    </global>
    [...]
</config>

This tells us, that our rewrites must be based on catalog (rather than mage_catalog or anything else). This then will allow us to rewrite a block class in our custom module by setting up something like the following:

<config>
    [...]
    <global>
        [...]
        <blocks>
             <catalog> <!-- based on what we found in app/code/core/Mage/Catalog/etc/config.xml/ -->
                <rewrite>
                    <product>Vendor_Module_Block_Product</product>
                </rewrite>
             </catalog>
        </blocks>
        [...]
    </global>
    [...]
</config>

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.