I want to extend oxbasket class to add a new function. But its not working. That func say A() is called on oxbasket object not on my object say mybasketobj.
I am calling that function from basket.tpl eg. $oxcmp_basket->A() where oxcmp_basket contain oxbasket object not mybasketobj. I have registered that in admin using oxbasket => myfolder/core/mybasketobj.
Erro message is ''Function ‘A’ does not exist or is not accessible! (oxBasket) ''
Any help is appreciated.
a) You are shure that you set the method to public?
b) You have described the class in well form? (class [B]mybasketobj[/B] extends [B]mybasketobj_parent[/B]{})
c) When you put in your class a instance-variable, you can see the variable with a vardump?
class myClass extends myClass_parent{
public $foo='bar
}
d) Try this for debugging. It is a better structered vardump and It shows the public methods of objects, too.
e) You are shure that your class is loaded?
[{$oxbasket|@get_class}]
When it displays mybasketobj, its correct… if mybasketobj is last in chain and $oxbasket is the right template variable.
Same here. It’s not working for me neither. I am not able to overload oxbasket and I am pretty sure, my implementation and the modules settings are correct.
Edit: Never mind. Deleting cookies solved it magically…