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

strelok190

Новичок
  
  • Posts

    4
  • Joined

  • Last visited

strelok190's Achievements

Rookie

Rookie (2/14)

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

Recent Badges

0

Reputation

  1. <?php class ControllerExtensionModuleDelivery extends Controller { public function index() { $this->language->load('extension/module/delivery'); $this->load->model('extension/module/delivery'); $data['heading_title'] = $this->language->get('heading_title'); $data['textSuccess'] = $this->language->get('textSuccess'); $data['textErrorEmeil'] = $this->language->get('textErrorEmeil'); $data['textNotValid'] = $this->language->get('textNotValid'); $data['textRegisterEmail'] = $this->language->get('textRegisterEmail'); $data['action'] = $this->url->link('extension/module/delivery', '', 'SSL'); if ($this->request->server['REQUEST_METHOD'] == 'POST') { if(!empty($this->request->post['name'])){ $name = $this->request->post['name']; } else{ 25 $rez = explode('@', $this->request->post['email']); $name = $rez[0]; } 28 $email = $this->request->post['email']; if($this->model_extension_module_delivery->validate($email) != 0) { $test = $this->model_extension_module_delivery->checkEmail($email); if(empty($test)) { $data = array(); $data['email'] = $email; $data['name'] = $name; $this->model_extension_module_delivery->addData($data); echo 'success'; } else { echo 'issetEmail'; } } else { echo 'notValid'; } } return $this->load->view('extension/module/delivery', $data); } } ?> при оформлении заказа ничего не происходит. в логах 2 ошибки: 2019-10-18 1:55:14 - PHP Notice: Undefined index: email in /home/c/cn81365/public_html/catalog/controller/extension/module/delivery.php on line 25 2019-10-18 1:55:14 - PHP Notice: Undefined index: email in /home/c/cn81365/public_html/catalog/controller/extension/module/delivery.php on line 28
  2. Warning: Division by zero in /home/c/cn81365/public_html/system/storage/modification/catalog/controller/product/category.php on line 227 Крилит что на 0 гделить нельзя, не могу разобраться. этоны нужно осивить нулевыми вот строка: $data['products'][] = array( 'percent' => sprintf($this->language->get('-%s'), (round((($result['price'] - $result['special'])/$result['price']) * 100 ,0 ))) . ' %', заранее спасипотому что откликнувшимся!!!
×
×
  • 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.