测试下markdown

今天开始也用markdown了,测试下,基本OK,只是与代码高亮插件CODECOLOR还是有一些冲突, 一直用的CodeColor兼容有问题,CODECOLOR几年不更新了,算了,换用SyntaxHighlighter Evolved 兼容完美


Sinbury.com重建方案 基于wrodpress重建,自适应主题,在线询盘,询盘可跟踪

Sinbury.com重建草案-技术 基于wrodpress重建,自适应主题,完善的询盘系统(可保存和跟踪来源 以便之后广告投放效果检测),所有页面重定向到新版页面,
服务器可用现有VPS,或购买10或20美元一月的Linode VPS(可安装相关VPN等翻墙工具 方便稳定 谷歌分析也可排除内部人员数据),
安装DirectAdmin控制面板,方便网站部署及之后站群营销群站建设

Sinbury.com重建方案

网站定位

品牌、产品宣传,网上营销,电子商务(后期拓展)。

栏目内容规划

栏目菜单

  • Products 产品
    • Featured Products 特色产品
    • Tailor-made 定制服务
    • Category A 分类 A
    • Category Z 分类 B
    • PDF Catalogue
  • Customers 客户案例
  • FAQ 常见问题
  • About 关于
    • News & Events 新闻
    • Contact 联系

技术方案

程序

  • WordPress
  • 插件
    • Contact Form 7 询盘系统核心插件
    • Really Simple CAPTCHA 防垃圾询盘
    • Flamingo 将询盘存入数据库
    • WP Mail SMTP 使用SMTP发邮件 邮件可以保存到邮件服务器
    • WP Super Cache 缓存插件 提高网站的加载速度
    • WordPress SEO by Yoast 搜索引擎优化
    • Better Anchor Links 锚链接 SEO
    • Google Analytics by Yoast 谷歌分析统计插件
    • EWWW Image Optimizer 图像优化 减少图片体积 提高网站的加载速度
    • All In One Schema.org Rich Snippets 搜索引擎微数据
    • NextScripts: Social Networks Auto-Poster 同步产品信息到各SNS网站(或许可用之前已购买激活码 可选)
    • Multilingual Press 或 WPML 多语种站点支持(后期拓展)(WPML为付费插件 29美金起 http://wpml.org/purchase/)
    • WooCommerce 在线商城系统 非定制小单在线交易(后期拓展)
    • AddThis 分享插件(可选)
    • Disqus 评论插件(可选)
    • WordPress Social Login 用Twitter, Facebook, Google, Yahoo等社交网络帐号登录(可选)
  • 主题 自适应主题备选
    • Jupiter http://artbees.net/themes/jupiter/ 58美金
    • Avada http://theme-fusion.com/avada/ 58美金
    • X http://theme.co/x/ 63美金
    • uDesign http://idesignmywebsite.com/u-design/ 58美金

服务器

  • Linode VPS(Linode 2GB套餐: 双核 2G内存 48G硬盘 3T月流量 250M出口宽带) 伦敦机房 近期法兰克福机房上线之后可以迁移过去(如果强调翻墙用途可选择日本机房) 月付 20美金
  • DirectAdmin控制面板 方便网站部署管理及之后站群营销群站建设 399人民币
  • CSF防火墙 增强服务安全性
  • Shadowsocks 翻墙用
  • PPTP VPN 翻墙用
  • Backup Service 自动备份服务 可选 月付 5美金

预算

  • Linode VPS(Linode 2GB套餐)月付 20美金 (如暂无站群营销计划以及翻墙资源消耗不多 可用Linode 1GB套餐 后期有需要可升级)
  • VPS自动备份服务(可选) 月付 5美金(Linode 1GB套餐备份服务价格为2.5美金)
  • DirectAdmin控制面板终身版本 399人民币(可选 但建议安装)
  • WordPress主题 58~63美金
  • WPML $29 $79 $195三档(可选 建议后期有需求再购买)

    最低预算$58+月付$12.5
    建议预算$58+¥399+月付$12.5

进度安排 大约十个工作日

  • 站点定位及功能分析 1天
  • 网站技术方案 1天
  • 服务器环境配置 1天
  • 安装调试插件和主题 2天
  • 栏目内容规划 1天
  • 图片设计 2天//如使用当前图片则无需此项
  • 产品页面布局 及其它页面制作 1天
  • 产品添加及SEO 2~3天
  • 原网站URL重定向 1天

markdown代码高亮插件兼容测试

一直用的CodeColor兼容有问题,CODECOLOR几年不更新了,算了,换用SyntaxHighlighter Evolved 兼容完美

Magento Make Tracking for Royalmail Available (Meanbee Royal Mail Domestic and International Shipping)

/**
 * 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 support@meanbee.com so we can send you a copy immediately.
 *
 * @category   Meanbee
 * @package    Meanbee_Royalmail
 * @copyright  Copyright (c) 2008 Meanbee Internet Solutions (http://www.meanbee.com)
 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 */

class Meanbee_Royalmail_Model_Shipping_Carrier_Royalmail
    extends Mage_Shipping_Model_Carrier_Abstract
    implements Mage_Shipping_Model_Carrier_Interface {

    protected $_code = 'royalmail';
	
/* Make Tracking for Royalmail Available. JungleHi 20150212 http://stackoverflow.com/questions/6666044/add-new-carrier-to-magento-for-order-tracking-initial-citylink */
	public function isTrackingAvailable()
	{
		return true;
	}

/* Fix empty tracking info bug. JungleHi 20150212 http://magento.stackexchange.com/questions/18022/show-tracking-link-for-custom-shipping-method */	
	public function getTrackingInfo($tracking)
	{
		$track = Mage::getModel('shipping/tracking_result_status');
		$track->setUrl('https://www.royalmail.com/track-your-item?trackNumber=' . $tracking)
			->setTracking($tracking)
			->setCarrierTitle($this->getConfigData('name'));
		return $track;
	}	

    public function collectRates(Mage_Shipping_Model_Rate_Request $request) {
        if (!$this->getConfigFlag('active')) {
            return false;
        }

        $freeBoxes = 0;
        $removeWeight = 0;
        if ($request->getAllItems()) {
            foreach ($request->getAllItems() as $item) {
                if ($item->getFreeShipping() && !$item->getProduct()->getTypeInstance()->isVirtual()) {
                    $freeBoxes += $item->getQty();
                    $removeWeight += $item->getWeight() * $item->getQty();
                }
            }
        }
        $this->setFreeBoxes($freeBoxes);

        $result = Mage::getModel('shipping/rate_result');

        if (count($this->getAllowedMethods()) > 0) {
            foreach ($this->getAllowedMethods() as $key => $value) {
                $obj = Mage::getModel("royalmail/shipping_carrier_royalmail_$key");

                if ($obj === false) {
                    Mage::log("Error loading royal mail: $key");
                    continue;
                }
                
                $obj->setWeightUnit($this->getConfigData('weight_unit'));

                $obj->setNegativeWeight($removeWeight);

                $cost = $obj->getCost($request);

                if ($cost !== null) {
                    $method = Mage::getModel('shipping/rate_result_method');

                    $method->setCarrier($this->_code);
                    $method->setCarrierTitle($this->getConfigData('title'));

                    $method->setMethod($key);
                    $method->setMethodTitle($value);

                    if ($request->getFreeShipping() === true || $request->getPackageQty() == $this->getFreeBoxes()) {
                        $price = '0.00';
                    } else {
                        $price = $this->_performRounding($this->getFinalPriceWithHandlingFee($cost));
                    }

                    $method->setPrice($price);
                    $method->setCost($price);

                    $result->append($method);
                    
                    if ($price == '0.00') {
                        break; // No more free methods
                    }
                }
            }
        }

        return $result;
    }

    protected function _performRounding($number) {
        $old = $number;

        switch ($this->getConfigData('rounding_rule')) {
            case 'pound':
                $number = round($number);
                break;
            case 'pound-up':
                $number = ceil($number);
                break;
            case 'pound-down':
                $number = floor($number);
                break;
            case 'fifty':
                $number = round($number * 2) / 2;
                break;
            case 'fifty-up':
                $number = ceil($number * 2) / 2;
                break;
            case 'fifty-down':
                $number = floor($number * 2) / 2;
                break;
        }

        // Incase it rounds to 0
        if ($number == 0) {
            $number = ceil($old);
        }

        return $number;
    }

    public function getAllowedMethods() {
        $allowed = explode(',', $this->getConfigData('allowed_methods'));
        $arr = array();
        foreach ($allowed as $k) {
            $method_name = $this->getMethods($k);
            if ($method_name) {
                $arr[$k] = $method_name;
            }
        }

        return $arr;
    }

    public function getMethods($name=null) {
        $codes = array(
                // To maintain backwards comparability we need to keep letter and largeletter indices the same
                'letter' => 'First Class Letter',
                'largeletter' => 'First Class Large Letter',
                'secondclassletter' => 'Second Class Letter',
                'secondclasslargeletter' => 'Second Class Large Letter',

                'secondclass' => 'Second Class Parcel',
                'secondclassrecordedsignedfor' => 'Second Class Parcel (Signed for)',

                'firstclass' => 'First Class Parcel',
                'firstclassrecordedsignedfor' => 'First Class Parcel (Signed for)',

                'specialdeliverynextday' => 'Special Delivery Guaranteed by 1pm (Up to 500GBP Insurance)',

                'specialdelivery9am' => 'Special Delivery Guaranteed by 9am (Up to 2,500GBP Insurance)',

                'internationalstandard' => 'International Standard (up to 5kg)',
                'internationaltrackedsigned' => 'International Tracked & Signed (Up to 250GBP Compensation)',
                'internationaltracked' => 'International Tracked (Up to 250GBP Compensation)',
                'internationalsigned' => 'International Signed (Up to 250GBP Compensation)',
                'internationaleconomy' => 'International Economy'
        );
        
        if ($name !== null) {
            if (isset($codes[$name])) {
                return $codes[$name];
            } else {
                return null;
            }
        } else {
            return $codes;
        }
    }
}
One Comment

Add a Comment

Your email address will not be published.