There is a function in opencart which I need to replace as following:
protected function validateDelete() {
if (!$this->user->hasPermission('modify', 'catalog/download')) {
$this->error['warning'] = $this->language->get('error_permission');
Should be:
protected function validateDelete() {
if (!$this->user->hasPermission('delete', 'catalog/download')) {
$this->error['warning'] = $this->language->get('error_permission_delete');
I have tried:
<search position="replace"><![CDATA[
protected function validateDelete() {
if (!$this->user->hasPermission('modify',]]></search>
<add><![CDATA[
protected function validateDelete() {
if (!$this->user->hasPermission('delete',
]]></add>
but its not working. The third line appears in multiple locations, so cant just replace in single line.
Please help