Post by JNeuhoff » Thu Apr 16, 2015 5:15 pm

atnaples:

None of this has anything to do with the Override Engine.

catalog/model/checkout/order.php,
catalog/model/checkout/voucher.php,
catalog/model/openbay/ebay_order.php
admin/model/sale/voucher.php
system/library/openbay.php

are all buggy, and they all should use

Code: Select all

$language->load($order_info['language_directory']);
instead of

Code: Select all

$language->load('default')

As regards the admin/controller/extension/modification.php file:

This is about OCmod, which was changed again by Daniel, see e.g. this forum post

MHC Web Design
Override Engine * Integrated VQMod * Multilingual SEO * Instant Option Price Calculator * TrustPilot Reviews * Download Options * Free Download Buttons * Export/Import Tool


User avatar
Newbie

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by atnaples » Thu Apr 16, 2015 9:58 pm

what about index.php

$language = $factory->newLanguage($languages[$code]['directory']);

if you look at 1.5.6.4, there are order.php and order.php.original in /catalog/model/checkout, but since 2.0.1 they are gone

User avatar
Newbie

Posts

Joined
Thu Dec 11, 2014 7:20 am

Post by JNeuhoff » Fri Apr 17, 2015 12:19 am

atnaples wrote:what about index.php

$language = $factory->newLanguage($languages[$code]['directory']);

if you look at 1.5.6.4, there are order.php and order.php.original in /catalog/model/checkout, but since 2.0.1 they are gone
That's because there already is this code in library/language.php, in method load:

Code: Select all

	public function load($filename) {
		if (!empty($this->factory)) {
			$_ = $this->factory->loadLanguage($filename);
			$this->data = array_merge( $this->data, $_ );
			return $this->data;
		}
		.....
And the index.php has this:

Code: Select all

// Language
$language = $factory->newLanguage($languages[$code]['directory']);
$language->load($languages[$code]['directory']);
$registry->set('language', $language);

MHC Web Design
Override Engine * Integrated VQMod * Multilingual SEO * Instant Option Price Calculator * TrustPilot Reviews * Download Options * Free Download Buttons * Export/Import Tool


User avatar
Newbie

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by atnaples » Tue Apr 21, 2015 9:49 pm

Could you guys to keep your override engine and vqmod compatible with the previous version?

For ex: Danial decided that ocmod does not need to support wild card (*) or parenthesis "{}" you could do it for *.vqmod.xml?

User avatar
Newbie

Posts

Joined
Thu Dec 11, 2014 7:20 am

Post by JNeuhoff » Wed Apr 22, 2015 4:23 pm

Both our Override Engine and VQmod for OpenCart 2.x are backward compatible within the OpenCart 2.x line of versions. They are designed to be fully integrated into OpenCart and to work together with each other as well as with OCmod. And VQmod (be it our integrated version or Qphoria's/Jay's external version) continue to support the same wildcards as in previous versions.

MHC Web Design
Override Engine * Integrated VQMod * Multilingual SEO * Instant Option Price Calculator * TrustPilot Reviews * Download Options * Free Download Buttons * Export/Import Tool


User avatar
Newbie

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by faiz555kr » Sat May 02, 2015 4:21 pm

Hi ,

After install the extension, I received this error message, please help!

Notice: Cannot find language file '/home3/myb365/public_html/domain.com/shop/catalog/language/english/default.php' in /home3/myb365/public_html/domain.com/shop/system/engine/factory.php on line 574

Newbie

Posts

Joined
Sat May 02, 2015 4:20 pm

Post by faiz555kr » Sat May 02, 2015 4:25 pm

Hi ,

After install the extension, I received this error message, please help!

Notice: Cannot find language file '/home3/myb365/public_html/domain.com/shop/catalog/language/english/default.php' in /home3/myb365/public_html/domain.com/shop/system/engine/factory.php on line 574

Newbie

Posts

Joined
Sat May 02, 2015 4:20 pm

Post by JonathanBray0292 » Wed May 27, 2015 11:51 pm

Hi, when I upload the index.php form the override file the front end of my website doesn't work. I wonder if you could take a look for me.


Posts

Joined
Wed Mar 04, 2015 7:16 am

Post by JNeuhoff » Thu May 28, 2015 1:44 am

JonathanBray0292 wrote:Hi, when I upload the index.php form the override file the front end of my website doesn't work. I wonder if you could take a look for me.
Send me a PM with your FTP and OpenCart admin details, and I'll take a look at it. Quite often people forget to clear the system/modifcation cache in the admin backend (Extensions > Modifications > Clear) before installing the Override Engine which then causes this problem.

MHC Web Design
Override Engine * Integrated VQMod * Multilingual SEO * Instant Option Price Calculator * TrustPilot Reviews * Download Options * Free Download Buttons * Export/Import Tool


User avatar
Newbie

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by steveking198 » Mon Jul 13, 2015 3:58 am

Hi,

First of all, thanks for your extension. I'm a PHP Developer and find it much more logical than using vQmod.

I've come across a possible bug although it may be me using it wrong.

My custom admin template won't override the default one and I've narrowed it down to the Factory class loadView method.

The check is if the called class starts with Controller, but if the controller is an extended one (in the override folder) then it's never going to start with controller, it's going to start with my_addon.

Example, when I var_dump $backtrace[2] which is what's being checked in that method, the class is my_addon_ControllerSettingSetting

Am I missing something here or is this a bug?

Cheers

Newbie

Posts

Joined
Mon Jul 13, 2015 3:52 am

Post by JNeuhoff » Wed Jul 15, 2015 12:09 am

As explained in my PM, I also post it here for the benefit of other users of the Override Engine:

Basically, when you plan to extend the admin/controller/catalog/product.php class, you'd most likely also want to want the modify the admin/view/template/catalog/product_form.tpl and admin/language/english/catalog/product.php files, hence you'd have these files:

override/mystuff/admin/controller/catalog/product.php
override/mystuff/admin/language/english/catalog/product.php

The override/mystuff/admin/controller/catalog/product.php usually is the one which modifies both the controller and the template, it has to look something like this:

Code: Select all

    <?php
    class mystuff_ControllerCatalogProduct extends ControllerCatalogProduct {

       // overridden method
       public function preRender( $template_buffer, $template_name, &$data ) {
          if ($template_name != 'catalog/product_form.tpl') {
             return parent::preRender( $template_buffer, $template_name, $data );
          }

          // add additional or modified controller variables
          $this->load->language('catalog/product');
          $this->load->model('catalog/product');
          $data['xxxx'] = ....;

          // modify the the template, to use the additional or modified variables
          $this->load->helper( 'modifier' );
          $search = '.....';
          $add = <<<'EOT'
    ..... template modifications ....
    EOT;
          $template_buffer = Modifier::modifyStringBuffer( $template_buffer,$search,$add,'after',0 );

          // call parent preRender method
          return parent::preRender( $template_buffer, $template_name, $data );
       }
    }
    ?>

MHC Web Design
Override Engine * Integrated VQMod * Multilingual SEO * Instant Option Price Calculator * TrustPilot Reviews * Download Options * Free Download Buttons * Export/Import Tool


User avatar
Newbie

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by straightlight » Wed Jul 15, 2015 12:41 am

What it means above is that the extension class needs to be initiated first in order for the core class to integrate these add-ons. Otherwise, pre-loading the other way around would mean that any previous line of this method 'x' would not be modifiable.

@JNeuhoff: It would be great knowing in details, as demonstrated above, how other controllers with $this->load->controller can be used with the modified helper class as well as linking model classes by affecting the original SQL strings from the models (replace) without having to create a new SQL query.

Tired of paying for service fees to export your database from other databases over Opencart?

Try those extensions for FREE: http://www.opencart.com/index.php?route ... aightlight

Regards,
Straightlight


Newbie

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by NNToan » Sun Jul 26, 2015 6:58 pm

Hello,

I'm wondering how could I override something in system folder?

Is it okay if I add new folder in override addon folder, something like this /override/opencart_slim_framework/system/slim
And from my override controller, eg: /override/opencart_slim_framework/catalog/controller/product/product.php, could I extend or call api from "slim" folder?

Newbie

Posts

Joined
Tue Jun 30, 2015 9:22 am

Post by JNeuhoff » Mon Jul 27, 2015 7:57 pm

No, your slim folder needs to be in 'system/slim'. Then you should be able to extend existing OpenCart core classes in your override/opencart_slim_framework, e.g. your /override/opencart_slim_framework/catalog/controller/product/product.php would start like this:

Code: Select all

<?php
class opencart_slim_framework_ControllerProductProduct extends ControllerProductProduct {
.....
}
?>

MHC Web Design
Override Engine * Integrated VQMod * Multilingual SEO * Instant Option Price Calculator * TrustPilot Reviews * Download Options * Free Download Buttons * Export/Import Tool


User avatar
Newbie

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by NNToan » Mon Jul 27, 2015 9:32 pm

I found a bug with Override Engine for OpenCart 2.0.3.1

It show me an error if I'm using PHP 5.6.X, everything will be fine if I'm using PHP 5.5 or lower

Code: Select all

Fatal error: Class "Factory" not found in /something/path/index.php line 50
??? ??? ??? ???

Newbie

Posts

Joined
Tue Jun 30, 2015 9:22 am

Post by JNeuhoff » Tue Jul 28, 2015 2:36 am

If you send me a PM with your OpenCart and FTP login details then I can take a look at it, otherwise I am unable to reproduce this error.

MHC Web Design
Override Engine * Integrated VQMod * Multilingual SEO * Instant Option Price Calculator * TrustPilot Reviews * Download Options * Free Download Buttons * Export/Import Tool


User avatar
Newbie

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by NNToan » Tue Jul 28, 2015 5:41 pm

JNeuhoff wrote:If you send me a PM with your OpenCart and FTP login details then I can take a look at it, otherwise I am unable to reproduce this error.
Thanks for your response. I sent you a PM with information, and please consider about my last question. I think you deserve to get more.

Newbie

Posts

Joined
Tue Jun 30, 2015 9:22 am

Post by NNToan » Wed Jul 29, 2015 7:41 pm

This module is uncompatiable with theme Journal 2.

I do some small test and found, because Journal 2 modify loader.php to add __get and __set
But OverrideEngine itself come with __get and __set, so I remove that from ocmod.xml

And well, Journal 2 unable to use!

Could you explain why?

Newbie

Posts

Joined
Tue Jun 30, 2015 9:22 am

Post by diegolupi » Fri Aug 28, 2015 2:23 am

Hello,

I have a theme for version 2.x
and it is not working if I use Override Engine for OpenCart.

I'll have two stores with the same management, but different themes.
One must use the Override Engine for OpenCart, and the other not.

The theme should not use it gives me error.

As I can fix this?

Newbie

Posts

Joined
Fri Aug 28, 2015 2:22 am

User avatar
Newbie

Posts

Joined
Wed Dec 05, 2007 3:38 am

Who is online

Users browsing this forum: No registered users and 12 guests