Plugin Engine

Plugin Engine
Plugin Engine
Brand: Modules
Product Code: OTH00213
Availability: In Stock
Price: $0.00
Qty:     - OR -   Add to Wish List
Add to Compare

Plugin Engine

PLUGIN ENGINE
=============

You add this line to file system/startup.php:

require_once(DIR_SYSTEM . 'engine/plugin.php');

You add to index.php files this lines about after line 38:

// Plugin
$plugin = new Plugin($registry);
$registry->set('plugin', $plugin); 

This engine use in extension:

You add eg. file my.php to folder system/library/extension

Example extension code:

<?php
class ControllerCatalogMyExtension{
public function index(){
$this->plugin->lib('my');
$my = new My(); // or: $my = new My($this->registry);
/* Do something */
}
}
?>



Update 12.02.2015:

In this package is example file extension/product.php

You can try this, catalog/product/product.php line 165 (version 1.5.6.4);

//$product_info = $this->model_catalog_product->getProduct($product_id);
$this->plugin->lib('product');
$find = new Product($this->registry);
$product_info = $find->get($product_id);

This plugin engine owing to not need write vqmod / ocmod file to files system/engine/*
 
Version
Versions 1.4.7, 1.4.8, 1.4.8b, 1.4.9, 1.4.9.1, 1.4.9.2, 1.4.9.3, 1.4.9.4, 1.4.9.5, 1.5.0, 1.5.0.1, 1.5.0.2, 1.5.0.3, 1.5.0.4, 1.5.0.5, 1.5.1, 1.5.1.1, 1.4.9.6, 1.5.1.2, 1.5.1.3, 1.5.2, 1.5.2.1, 1.5.3, 1.5.3.1, 1.5.4, 1.5.4.1, 1.5.5, 1.5.5.1, 1.5.6, 1.5.6.1, 1.5.6.2, 1.5.6.3, 1.5.6.4, 2.0.0.0, 2.0.1.0, 2.0.1.1, 2.0.2.0, 2.0.3.1, 2.1.0.1, 2.1.0.2

Write a review

Your Name:


Your Review: Note: HTML is not translated!

Rating: Bad           Good

Enter the code in the box below:



ThemerZ - Free Opencart Themes - Wordpress Templates - HTML Template - Theme © 2024