All I am planning to do is to replace instances of VariableStream, which contain chain-extended classes, with cached class files in system/cache.Qphoria wrote:lol I think we can let this idea die.. it isn't planned to happen in any of the modification/override systems.straightlight wrote:is it going to be by author from the system/cache folder ?
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
When I copy product.php to override engine relative dir, the system will show more error message.
like this :
- Notice: Undefined variable: shippable in var://catalog_view_theme_default_template_product_product_tpl on line 312
Notice: Undefined variable: ms_digital_product in var://catalog_view_theme_default_template_product_product_tpl on line 315
Notice: Undefined variable: shippable in var://catalog_view_theme_default_template_product_product_tpl on line 318
Notice: Undefined variable: shippable in var://catalog_view_theme_default_template_product_product_tpl on line 325
Notice: Undefined variable: ms_digital_product in var://catalog_view_theme_default_template_product_product_tpl on line 328
Notice: Undefined variable: shippable in var://catalog_view_theme_default_template_product_product_tpl on line 331
So the template file cannot get the variables from vqmod files.
Have any idea ?
Opencart 1.5.6.1
Multimerch 4.3
Override Engine 1.5.6.1
Vqmod 2.4.1
Sorry for my english.
Thank for your support.
If you also use a VQmod XML script to modify product.php, it should normally target the original catalog/controller/product.php via VQmod, resulting in the cached file:
vqmod/vqcache/vq2-catalog_controller_product_product.php
If you then want to further modify the product.php using the Override Engine, your should create a file in:
override/myaddon/catalog/controller/product/product.php
which looks like this:
Code: Select all
class myaddon_ControllerProductProduct extends ControllerProductProduct {
.....
// overridden methods in here
.....
}
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Your problem description is too vague. Please provide some more details, especially what error messages you get in your server's error_log (ask webhost for them), and in your system/logs/error.txt.adglobal wrote:Override Engine Not working for me i am using Open cart v-1.5.6.1 please help me on this. I have VQmod also installed and i have placed all the files in proper location still not working please help me on this.
Thanks in Advance.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
We are working day and nightKeep working dude
We already have a new Override Engine 7.0 beta for the upcoming OpenCart 2.0!
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
JNeuhoff wrote:Please check your system/logs/error.txt for any further clues as to why it might not work. Also check your server's error_log.nsnaveen wrote:I installed the opencart-1-5-4-x-override-engine-5-1 as said. but after installing whn i open admin iam getting this error
Notice: Cannot find controller class file for route 'common/maintenance' in /home/isdccom/public_html/naudidhi2/system/engine/factory.php on line 155
can any one help me please.
thanks in advance
nsnaveen
Also make sure the file /home/isdccom/public_html/naudidhi2/catalog/controller/common/maintenance.php actually exists. Also, have you extended this class and overridden some of its methods for an addon?
My problem
Notice: Cannot find controller class file for route '' in /home/user1901/public_html/system/engine/factory.php on line 152
1. Server error log and opencart error log display the same error message
2. maintenance.php is original (No modification, no themes no nothing)
3. Error on factory file; line 152
$i = strrpos( $route, '/' );
if ($i===FALSE) {
trigger_error("Cannot find controller class file for route '$route'");
exit;
}
I finally have found a way to Unit Test classes that have been modded by using Override Engine!
It's dirty but it works.
1) In addition to including the Unit Test php file you'll have to require_once the files you are to test.
I.e.
Code: Select all
<?php
require_once ('OpenCartTest.php');
require_once(OC_ROOT . 'system/engine/model.php');
require_once(OC_ROOT . 'catalog/model/catalog/product.php');
require_once (OVERRIDE_ENGINE_FWMODS_ROOT . 'catalog/model/catalog/product.php');
2) In the test where such class is needed, just use this code:
Code: Select all
public function testUpdateViewed() {
// $model = $this->loadModelByRoute('catalog/product');
$factory = new Factory($this->registry);
$this->registry->set('factory', $factory );
$model = $factory->newModel('catalog/product');
// Tests are valid for GB
$geo_zone_id = GetDeliveryGeoZone($this->registry);
$product_id = TEST_PRODUCT_ID; // = Apple Cinema product
// Load original viewed counter
$original_viewed = $this->getViewed($geo_zone_id, $product_id);
echo $original_viewed;
// Adds 1 using the model
$model->updateViewed($product_id);
// Checks if the viewed counter really incremented by 1
$updated_viewed = $this->getViewed($geo_zone_id, $product_id);
$this->assertEquals($updated_viewed, $original_viewed + 1);
}
// $model = $this->loadModelByRoute('catalog/product');
is the line you'd use if your test case did not involve an Override Engine affected class.
The rest is just dumb test code that makes sure the Product's updateViewed() function now works based by product id + geozone id (a Customer requirement).
This is getViewed() code for those who wonder. However it's completely irrelevant to this topic so you'll never use it. It's just to show the test flow.
Code: Select all
protected function getViewed($geo_zone_id, $product_id) {
$query = $this->db->query("SELECT * FROM fw_local_product WHERE geo_zone_id = $geo_zone_id AND product_id = $product_id");
$this->assertNotCount(0, $query->rows);
$this->assertCount(1, $query->rows);
return $query->row['viewed'];
}
Heavy OpenCart Customizations. Current project in progress: fleurworld.com
Unless you guys come up with a more specific problem description, exactly what what did to lead up to this error, I can't help you. I am simply unable to reproduce your error without further details.nfs wrote: My problem
Notice: Cannot find controller class file for route '' in /home/user1901/public_html/system/engine/factory.php on line 152
1. Server error log and opencart error log display the same error message
2. maintenance.php is original (No modification, no themes no nothing)
3. Error on factory file; line 152
$i = strrpos( $route, '/' );
if ($i===FALSE) {
trigger_error("Cannot find controller class file for route '$route'");
exit;
}
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
On a local dev environment, all works great.
When I upload all the files to my 1.5.6.1 OpenCart, all I get is a blank page. No errors, also not in /system/log, not in apache log.
I have tried to debug a bit and came to the conclusion that when I put a var_dump($file); to the readTemplate function in factory.php, the only template that gets read is '/catalog/view/theme/default/template/common/column_left.tpl'.
As opposed to my local site, where a lot of templates get read which is obviously to be expected.
Why does it not load all the templates on the remote site?
for the lines like $i = strrpos( $file, '/controller/' ); to $i = strrpos( $file, '/controller/' ); (without the forward slash). Because I'm on a shared server, I had to set the directories in config.php like this: define('DIR_SYSTEM', 'system/');, so the checks in factory.php failed. It probably has something to do with this but I can't get my finger behind it.
Any help appreciated!
Code: Select all
root@fi1:/var/www/vhosts/irrelevant.com/httpdocs/oc# unzip /root/opencart-1.5.6.1.zip
[...]
inflating: opencart-1.5.6.1/upload/system/library/weight.php
creating: opencart-1.5.6.1/upload/system/logs/
extracting: opencart-1.5.6.1/upload/system/logs/index.html
inflating: opencart-1.5.6.1/upload/system/startup.php
root@fi1:/var/www/vhosts/irrelevant.com/httpdocs/oc# mv opencart-1.5.6.1/upload/* .
Croot@fi1:/var/www/vhosts/irrelevant.com/httpdocs/oc# chmod -R g+w *
root@fi1:/var/www/vhosts/irrelevant.com/httpdocs/oc# chgrp -R www-data *
root@fi1:/var/www/vhosts/irrelevant.com/httpdocs/oc# mv admin/config-dist.php admin/config.php
root@fi1:/var/www/vhosts/irrelevant.com/httpdocs/oc# mv config-dist.php config.php
[configure via web interface]
root@fi1:/var/www/vhosts/irrelevant.com/httpdocs/oc# mv install xxxinstall
[shop working fine with demo data]
root@fi1:/var/www/vhosts/irrelevant.com/httpdocs/oc# unzip /root/opencart-1-5-6-1-override-engine-6-1.zip read*
Archive: /root/opencart-1-5-6-1-override-engine-6-1.zip
inflating: readme.txt
root@fi1:/var/www/vhosts/irrelevant.com/httpdocs/oc# unzip /root/opencart-1-5-6-1-override-engine-6-1.zip upload/*
[..]
inflating: upload/system/startup.php.original
creating: upload/vqmod/
inflating: upload/vqmod/vqprotect.txt
root@fi1:/var/www/vhosts/irrelevant.com/httpdocs/oc# chmod -R g+w upload/*
root@fi1:/var/www/vhosts/irrelevant.com/httpdocs/oc# chgrp -R www-data upload/*
root@fi1:/var/www/vhosts/irrelevant.com/httpdocs/oc# cp -f -R upload/* .
[..]
There is nothing in system/logs
There is nothing in the web server error log.
The access log just has the GET with an ok (200) result.
Is there anything I can enable to get some sort of log or error out of it in order to locate the problem?
I have a little question.
After using OE for some months I have to say that it's quite of an excellent addition to OpenCart and along with vQMod allows for very deep, low side effects customization in a lot of places.
It's also quite elegant in usage and tends to be "neutral" with respect of the objects using it.
But it has a sore spot: it declares a var stream wrapper and keeps it "locked" even once OE's task for an object is over.
As of now I quite inelegantly deal with it with this ugly hack:
Code: Select all
protected function modelProductSetUp() {
$var_registered = in_array("var", stream_get_wrappers());
if ($var_registered) {
stream_wrapper_unregister("var");
}
...
[ Do stuff with $factory that would otherwise raise a "stream already defined" error ]
$model = $factory->newModel('catalog/product');
return $model;
}
Heavy OpenCart Customizations. Current project in progress: fleurworld.com
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Thank you very much!JNeuhoff wrote:Our upcoming version 7 of the Override Engine will use cached files, stored in the folder system/cache/override, instead of the variable stream. This will also make debugging a lot easier. We have already implemented it for upcoming OpenCart 2.0 and will backport it for the OpenCart 1.5.x releases.
Do we have to expect compatibility issues with version 6 or will it be a "plug and play" replacement with no side effects?
Heavy OpenCart Customizations. Current project in progress: fleurworld.com
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
The Override Enginbe has only been tested for normal web servers, including shared web hosts. However, you will need your own home directory and the 'public_html' or similar withing your home folder, and the config.php settings for the various paths should always including the trailing '/'. Oterwise it will be such a mess it's not worth the time and effort to support a 1 out of 1000 non-standard configuration.rubendejong wrote:I should also have mentioned that I had to change the function newInstance in /system/engine/factory.php,
for the lines like $i = strrpos( $file, '/controller/' ); to $i = strrpos( $file, '/controller/' ); (without the forward slash). Because I'm on a shared server, I had to set the directories in config.php like this: define('DIR_SYSTEM', 'system/');, so the checks in factory.php failed. It probably has something to do with this but I can't get my finger behind it.
Any help appreciated!
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Have re-run the VQmod installer after installing the Override Engine?irrelevnt wrote: Now the web interface now gives blank screen - view source reveals no code, (nothing was received)
There is nothing in system/logs
There is nothing in the web server error log.
The access log just has the GET with an ok (200) result.
Is there anything I can enable to get some sort of log or error out of it in order to locate the problem?
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Users browsing this forum: No registered users and 58 guests