Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

BAM

Newbie
  
  • Posts

    4
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

BAM's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Week One Done
  • One Month Later
  • One Year In
  • Conversation Starter

Recent Badges

0

Reputation

  1. при этом пробовал прописать $data['runMyFunc'] = $this->url->link('common/product', 'token=' . $this->session->data['token'], true); в public function index(){ ... } , результат без изменений понимаю что должно быть просто, но вот где затупил не понимаю
  2. public function runMyFunc() { $this->load->language('catalog/product'); $this->load->model('catalog/product'); $data['runMyFunc'] = $this->url->link('common/product', 'token=' . $this->session->data['token'], true); if (($this->request->server['REQUEST_METHOD'] == 'POST')) { $this->model_catalog_product->MyFunc($this->request->post); } }
  3. Добрый день. Есть задача, в Админке, в разделе Товары, в верхней части, слева от кнопки "добавить товар" (обозначена как +), разместить форму (поле input и кнопку выполнить), по нажатию на которую запустится функция MyFunc(), которая увеличит или уменьшит цену каждого товара на указанную в поле input величину; Что удалось сделать: в /admin/model/catalog/product.php прописал тело функции MyFunc(); в /admin/controller/catalog/product.php прописал тело контроллера (могу ошибаться в терминологии) runMyFunc(); в которой идет вызов $this->model_catalog_product->MyFunc($this->request->post); в /admin/view/template/catalog/edit_product_list.tpl прописал форму <INPUT TYPE="number" style="width:70px;" data-toggle="tooltip" ID="myVal" value="20"><-<input formaction="<?php echo $runMyFunc;?>" type="button" form="form-product" data-toggle="tooltip" class="btn btn-primary" value="Выполнить"> в итоге форма отображается, но ошибка в том что $runMyFunc не определена, соответственно вызов MyFunc() не происходит. Подскажите, что делаю не так и куда смотреть? Версия ocStore 2.3
Guest
×
  • 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.