<?php if (is_file(CMSAPI_Value::Get('prefs.external_path_fs') . "/plugins/plenigo/current/src/Plenigo.php")) { require_once CMSAPI_Value::Get('prefs.external_path_fs') . "/plugins/plenigo/current/src/Plenigo.php"; } if (is_file(CMSAPI_Value::Get('prefs.external_path_fs') . "/plugins/plenigo/current/cache.php")) { require_once CMSAPI_Value::Get('prefs.external_path_fs') . "/plugins/plenigo/current/cache.php"; } class cl6Plugin_plenigo extends cl6PluginCore { public static $PIO = NULL; protected static $secret; protected static $companyId; private static $initialized = false; private static $productType; protected $error; private $product; public $cache; public function __construct($hOptions = array()) { parent::__construct($hOptions); $this->basePath = $this->hConfig["path_fs"] . "/"; $this->templatePath = $this->basePath . "templates/"; if (class_exists('Cache')) { $this->cache = new Cache(array('name' => 'plenigo-cache', 'path' => __DIR__ . '/cache/', 'extension' => '.cache.php')); } } public static function PIO($sClass = '') { return parent::PIO(__CLASS__); }
public static function checkoutPlenigoProduct($params) { $id = $params['id'] ? $params['id'] : CMSAPI_Value::get("param.id"); $plenigoCheckoutCode = parent::productGetManagedCheckoutCode($id); // now we can use this snippet in a link or button return $plenigoCheckoutCode; }