Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Leaderboard

Popular Content

Showing content with the highest reputation on 02/08/2014 in all areas

  1. system/library/mylibrary.php <?php class Mylibrary { private $config; private $db; private $data = array(); private $log; public function __construct($registry) { $this->config = $registry->get('config'); $this->customer = $registry->get('customer'); $this->session = $registry->get('session'); $this->db = $registry->get('db'); $this->tax = $registry->get('tax'); $this->weight = $registry->get('weight'); $this->log = $registry->get('log'); // ... зависит от того, доступ к каким данным вам понадобится в вашей библиотеке. } public function write_text($string) { print_r($string); } } ?>index.php require_once(DIR_SYSTEM . 'library/cart.php'); require_once(DIR_SYSTEM . 'library/mylibrary.php'); // + ... // Cart $registry->set('cart', new Cart($registry)); // Mylibrary // + $registry->set('mylibrary', new Mylibrary($registry)); // +admin/index.php по аналогииcatalog/controller/common/header.php $this->mylibrary->write_text('ololo');admin/controller/common/header.php $this->mylibrary->write_text('abc');
    1 point
  2. огромное спасибо, вы как всегда спец, спасибо за быстрый отклик и настройку (а это редкость) модуль супер как впрочим и все ваши модули)) теперь жду обновления функционала)))
    1 point
Guest
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.