Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

If you want to change the status of products automatically, the following module functions are available:

FunctionArgumentsInformation
getProductState'product', $pidReturns status of product as array
setProductState'product', $pid, $state$state must be on or off
getAllHiddenProducts'product'Returns all hidden products as array

The argument "product" is not a variable, but a fixed string. To leave open further integrations into the module for us, for example an integration of domains, the keyword "product" is passed.

...

Code Block
languagephp
linenumberstrue
<?php

require_once ('/path/to/modules/addons/hideproducts/autoload.php');

$pid = 1234;

try {
    $hideproducts = new dpl_hideproducts ();
    $getProductState = $hideproducts->getProductState ('product', $pid);
    
    var_dump ($getProductState);
} catch (Exception $e) {
    echo $e->getMessage();
}

...