-
-
Save Fi1osof/86d19bd9e5299756de55 to your computer and use it in GitHub Desktop.
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 | |
require_once MODX_CORE_PATH . 'components/basket/processors/basket/web/public/action.class.php'; | |
class modSiteWebPublicBasketActionProcessor extends modBasketWebPublicActionProcessor{ | |
public static function getInstance(modX &$modx,$className,$properties = array()) { | |
// Здесь мы имеем возможность переопределить реальный класс процессора | |
if(!empty($properties['basket_action']) && !self::$actualClassName){ | |
switch($properties['basket_action']){ | |
case 'products_add': | |
require dirname(dirname(dirname(__FILE__))) . '/basket/orders/products/add.class.php'; | |
self::$actualClassName = 'modSiteWebBasketOrdersProductsAddProcessor'; | |
break; | |
default:; | |
} | |
} | |
return parent::getInstance($modx,$className,$properties); | |
} | |
} | |
return 'modSiteWebPublicBasketActionProcessor'; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment