2087 Posts in 1007 Topics by 455 members
|Go to End|
15 April 2010 at 2:59pm
How do I override certain functions in e-commerce module without modifying the core files?
To be specific, I want to override the "AllowPurchase" and "addToCart" functions in Product.php
Jatinder Singh Thind
21 March 2012 at 11:49am
Did you find a way to solve this?
26 March 2012 at 12:43pm Last edited: 26 March 2012 12:44pm
AllowPurcahse on Product class has been deprecated, and replaced with canPurchase a while back.
You should be able to override / modify this function by creating an extension of Product that implements the canPurchase function. See silverstripe documentation on how to create extensions.
|Go to Top|