magento插件-将订单号改为日期流水号

如果使用MAGENTO默认后台生成的订单号,客户一看你做了多单一目了然,你肯定不 能让客户知道你做了多少单吧.这个插件可以帮你把日期+流水号做为订单号,再也不用为泄露商业机密发愁了吧.

[php]
<!–?php /** * Magento * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@magentocommerce.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade Magento to newer * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * * @category    Mage * @package     Mage_Eav * @copyright   Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0) */ /** * Enter description here… * * Properties: * – prefix * – pad_length * – pad_char * – last_id */ class Mage_Eav_Model_Entity_Increment_Numeric extends Mage_Eav_Model_Entity_Increment_Abstract { public function getNextId() { $last = $this—>getLastId();
if(!$last){$last=10000000;}
return  $showtime=date("YmdHis");

if (strpos($last, $showtime) === 0) {
$next = (int)substr($last,strlen($showtime),strlen($last));
$next=(int)$next+1;
return (String)$showtime.(String)$next;
} else {
$next =(int)$last+1;
return (String)$showtime.(String)$next;
}

}
}

[/php]


[url]下载地址[/url]


喜欢就赶紧下载吧。

标签

发表评论

评论已关闭。

评论列表(34)

  • zengsuyi

    2016.1.10 18:01

    应该挺不错的

  • binkedu

    2015.11.19 23:11

    非常期待

  • traky

    2015.8.23 15:08

    正在找这个插件,谢谢

  • traky

    2015.8.18 21:08

    看看,希望有用

  • huang

    2015.8.17 21:08

    看看到底有那么神秘嘛 🙂 😳

  • huang

    2015.8.17 21:08

    到底是什么啊

  • chbklmt

    2015.7.19 18:07

    看看,是什么实现的

  • a466355525

    2015.6.28 15:06

    想看看到底怎么弄的

  • tdw525

    2015.4.28 18:04

    谢谢分享,博主好人有好报

  • Ceen

    2015.3.6 00:03

    来试一下

  • VCTNNN

    2015.3.1 14:03

    看看怎么用

  • wumeiniang

    2015.1.27 19:01

    有试过可以用吗? 支持最新的版本吗? 谢谢

  • magentolearner

    2014.11.2 00:11

    这个插件怎么用呀。能说明一下么?

    • 辞了老衲

      2014.11.2 15:11

      首先,请根据文章说明修改相应代码。
      其次,也可以下载文后的附件,直接覆盖相应文件(在没有改变核心代码的前提下)
      如有问题,再留言

  • magentolearner

    2014.11.1 20:11

    正在找这样的插件,不知道这个好不好用。关键是还不怎么会用。

  • zjj201209222

    2014.10.7 19:10

    给个下载的机会啊~

    • 辞了老衲

      2014.10.9 17:10

      评论通过后可以直接下载。

  • zjj201209222

    2014.10.7 19:10

    下载看看

    • 辞了老衲

      2014.10.9 17:10

      欢迎下载!

  • 116272975

    2014.8.30 21:08

    看看这个插件到底如何

  • qq287767957

    2014.8.26 20:08

    好像是好东西,下载来看看

    • Lux

      2014.8.27 14:08

      欢迎使用后反馈。

  • aonqfewxs

    2014.6.22 20:06

    注册不容易啊,试下怎样

  • soartosky

    2014.6.11 15:06

    正在找这个,非常有用

  • cfcnn

    2014.5.24 15:05

    学习一下。

    • 辞了老衲

      2014.6.10 14:06

      共同学习!

  • chenqilong

    2014.5.10 16:05

    一直在寻找插件.最好可以通过修改代码实现.

  • Wit Meng

    2014.4.14 14:04

    回复后可以查看内容的。回复后可以查看内容的。回复后可以查看内容的。

    • 渋驀

      2014.4.14 23:04

      下不为例,请勿堆砌无意义词语!

  • test

    2014.4.9 02:04

    ?????????? 什么

    • 渋驀

      2014.4.11 22:04

      回复后可以查看内容的。

  • 渋驀

    2013.8.25 00:08

    此插件非常有用!

    • zjj201209222

      2014.10.7 19:10

      插件能发我一下吗:邮箱349613241@qq.com

    • 辞了老衲

      2014.10.9 17:10

      回复评论,审核通过以后可以直接下载。
      有时候博主不在,审核较慢。


Warning: error_log(/www/wwwroot/www.ctrol.cn/wp-content/plugins/spider-analyser/#log/log-3017.txt): failed to open stream: No such file or directory in /www/wwwroot/www.ctrol.cn/wp-content/plugins/spider-analyser/spider.class.php on line 2900