本博客基于Opencart2.1.0.1源码,架设在阿里云香港机房!  技术交流QQ群:103164069
vim catalog/model/checkout/order.php
 public function addOrder($data) {
  $this->event->trigger('pre.order.add', $data);
  $UltimoPedido = $this->db->query("SELECT * FROM `" . DB_PREFIX . "order` ORDER BY `" . DB_PREFIX . "order`.`order_id` DESC LIMIT 1");
  if(isset($UltimoPedido->row['order_id'])){
   $UltimoPedido = rand(2,6)+$UltimoPedido->row['order_id'];
  }
  else{
   $UltimoPedido = rand(2,6);
  }
  $this->db->query("INSERT INTO `" . DB_PREFIX . "order` SET order_id= '" . $this->db->escape($UltimoPedido) . "', invoice_prefix =

Write a review

Please login or register to review
浏览次数:441

opencart订单号更改成随机数

  • Product Code: opencart订单号更改成随机数
  • Availability: In Stock
  • ¥0.00