View Single Post
  #4  
Old 06-03-2015, 04:02 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Math IF/ELSE in version 5

You need to add the following method into the class suggested by Alex:

PHP Code:
protected function isVisible()
{
    
$return parent::isVisible();

    if (
$this->getProduct()->getInventory()->getAvailableAmount() > 10) {
        
$return false;
    }

    return 
$return;



and it should do the trick.

Did not test the code though.
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote