This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Created by PhpStorm. | |
* User: Mat | |
* Date: 6/19/2017 | |
* Time: 3:33 AM | |
*/ | |
$sc = $modx->getService('simplecart','SimpleCart',$modx->getOption('simplecart.core_path',null,$modx->getOption('core_path').'components/simplecart/').'model/simplecart/',$scriptProperties); | |
if (!($sc instanceof SimpleCart)) return ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Warning: this code is for demonstration purposes only | |
*/ | |
if (!preg_match("/\.pdf$/", $input)) { | |
return "PDF file not specified."; | |
} | |
$options = explode('&', $modx->getOption('options', $scriptProperties, null)); | |
if(empty($options)){ |