Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

Изменения в файлах без VQMOD


beeper
 Share

Recommended Posts

Вопрос в следуюещём:

требуется усиновить модуль отправки SMS, в некоторые файлы нужно вручную внести изменения

Как это "грамматически" правильно сгделать?

 

К примеру, в файлe controller.php нужно в строку 

public function __construct($registry) {
$this->registry = $registry;
}

 

добавить

 

<operation>
<search position="before">
<![CDATA[public function __construct($registry) {]]>
</search>
<add>
<![CDATA[ ## AlphaSms.ua [bEGIN] protected function alphasms_net_init(){ # Load language $this->load->language('module/alphasms_net'); $this->registry->set('alphasms_net_logger', new Log('alphasms_net.log')); if ($this->config->get('alphasms_net_login') && $this->config->get('alphasms_net_password') && file_exists(DIR_SYSTEM . 'library/alphasms_net_gateway.php')){ # Load VipSMS.net library require_once(DIR_SYSTEM . 'library/alphasms_net_gateway.php'); $gateway = new AlphaSmsNetGateway( $this->config->get('alphasms_net_login'), $this->config->get('alphasms_net_password') ); # Set sign $alphasms_net_sign = $this->config->get('alphasms_net_sign'); $gateway->setSign($alphasms_net_sign); # Add to global registry $this->registry->set('alphasms_net_gateway', $gateway); return true; } } ## AlphaSms.ua [END] ]]>
</add>

 

Как эи строка должна в итоге выглягдеть?

Заранее спасипотому что!

 

Файлы для примера прилагаю

 

Даже файлы для правки

system/engine/controller.php

admin/model/sale/order.php

catalog/controller/information/contact.php

catalog/controller/account/quickregister.php

catalog/controller/account/register.php

catalog/controller/checkout/register.php

catalog/controller/checkout/simplecheckout.php

catalog/controller/checkout/success.php

admin/controller/sale/order.php

 

alphasms_net.xml

controller.php

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • 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.