2

I want to override the SalesRule model for my custom module, but it already used in another third party module. But the problem is my override is loading always first.

And the third party module's override is stopped because of mine.

So what I have done for solution, added the depends tag in the module declarations.

<codePool>local</codePool>
<depends>
      <RandW_RewardPoint/>
</depends>

In my module config.xml

<salesrule>
    <rewrite>
        <validator>Toy_Gift_Model_Validator</validator>
    </rewrite>
</salesrule>

Third party config.xml

<salesrule>
    <rewrite>
        <validator>RandW_RewardPoint_Model_Validator</validator>
    </rewrite>
</salesrule>

And in my Validator.php

class Toy_Gift_Model_Validator extends RandW_RewardPoint_Model_Validator  {

But its not working as expected, still always working from my module. My idea is both should work. Please give me a solution.

Your Answer

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

Browse other questions tagged or ask your own question.