当前位置: 首页>>代码示例>>PHP>>正文


PHP convert::raw2js方法代码示例

本文整理汇总了PHP中convert::raw2js方法的典型用法代码示例。如果您正苦于以下问题:PHP convert::raw2js方法的具体用法?PHP convert::raw2js怎么用?PHP convert::raw2js使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在convert的用法示例。


在下文中一共展示了convert::raw2js方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init

    /**
     * Standard SS function
     * if set to false, user can edit order, if set to true, user can only review order
     **/
    public function init()
    {
        parent::init();
        Requirements::themedCSS('CheckoutPage');
        Requirements::javascript('ecommerce/javascript/EcomPayment.js');
        Requirements::customScript('
			if (typeof EcomOrderForm != "undefined") {
				EcomOrderForm.set_TermsAndConditionsMessage(\'' . convert::raw2js($this->TermsAndConditionsMessage) . '\');
			}', "TermsAndConditionsMessage");
        $this->steps = EcommerceConfig::get("CheckoutPage_Controller", "checkout_steps");
        if ($this->HasCheckoutSteps) {
            $this->currentStep = $this->request->Param("ID");
            if ($this->currentStep && in_array($this->currentStep, $this->steps)) {
                //do nothing
            } else {
                $this->currentStep = array_shift($this->steps);
            }
        }
    }
开发者ID:nieku,项目名称:silverstripe-ecommerce,代码行数:23,代码来源:CheckoutPage.php

示例2: init

    /**
     * Standard SS function
     * if set to false, user can edit order, if set to true, user can only review order
     **/
    public function init()
    {
        parent::init();
        Requirements::themedCSS('CheckoutPage', 'ecommerce');
        $ajaxifyArray = EcommerceConfig::get("CheckoutPage_Controller", "ajaxify_steps");
        if (count($ajaxifyArray)) {
            foreach ($ajaxifyArray as $js) {
                Requirements::javascript($js);
            }
        }
        Requirements::javascript('ecommerce/javascript/EcomPayment.js');
        Requirements::customScript('
			if (typeof EcomOrderForm != "undefined") {
				EcomOrderForm.set_TermsAndConditionsMessage(\'' . convert::raw2js($this->TermsAndConditionsMessage) . '\');
			}', "TermsAndConditionsMessage");
        $this->steps = EcommerceConfig::get("CheckoutPage_Controller", "checkout_steps");
        $this->currentStep = $this->request->Param("ID");
        if ($this->currentStep && in_array($this->currentStep, $this->steps)) {
            //do nothing
        } else {
            $this->currentStep = array_shift($this->steps);
        }
        //redirect to current order -
        // this is only applicable when people submit order (start to pay)
        // and then return back
        if ($checkoutPageCurrentOrderID = Session::get("CheckoutPageCurrentOrderID")) {
            if (!$this->currentOrder || $this->currentOrder->ID != $checkoutPageCurrentOrderID) {
                if ($order = Order::get_by_id_if_can_view(intval($checkoutPageCurrentOrderID))) {
                    Session::clear("CheckoutPageCurrentOrderID");
                    Session::set("CheckoutPageCurrentOrderID", 0);
                    Session::save();
                    return $this->redirect($order->Link());
                }
            }
        }
        if ($this->currentOrder) {
            //we make sure all the OrderModifiers are up to date....
            Session::set("CheckoutPageCurrentOrderID", $this->currentOrder->ID);
        }
    }
开发者ID:helpfulrobot,项目名称:sunnysideup-ecommerce,代码行数:44,代码来源:CheckoutPage.php


注:本文中的convert::raw2js方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。