A-A+

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

2013年07月02日 灵犀一指 评论 34 条 阅读 3,880 人 次

如果使用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 条留言  访客:34 条  博主:0 条

  1. zengsuyi
  2. binkedu
  3. traky
  4. traky
  5. huang
  6. huang
  7. chbklmt
  8. a466355525
  9. tdw525
  10. Ceen
  11. VCTNNN
  12. wumeiniang
  13. magentolearner
    • 辞了老衲
  14. magentolearner
  15. zjj201209222
    • 辞了老衲
  16. zjj201209222
    • 辞了老衲
  17. 116272975
  18. qq287767957
    • Lux
  19. aonqfewxs
  20. soartosky
  21. cfcnn
    • 辞了老衲
  22. chenqilong
  23. Wit Meng
    • 渋驀
  24. test
    • 渋驀
  25. 渋驀
    • zjj201209222
      • 辞了老衲

评论已关闭!