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


PHP XLite::getCustomerScript方法代码示例

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


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

示例1: doActionLocate

 /**
  * Place URL into engine's endpoints
  *
  * @return void
  */
 protected function doActionLocate()
 {
     $engines = \XLite\Core\Request::getInstance()->engines;
     if ($engines) {
         foreach ($this->getEngines() as $key => $engine) {
             if (in_array($key, $engines)) {
                 $url = urlencode(\XLite::getInstance()->getShopURL(\XLite\Core\Converter::buildURL('sitemap', '', array(), \XLite::getCustomerScript())));
                 $url = str_replace('%url%', $url, $engine['url']);
                 $request = new \XLite\Core\HTTP\Request($url);
                 $response = $request->sendRequest();
                 if (200 == $response->code) {
                     \XLite\Core\TopMessage::addInfo('Site map successfully registred on X', array('engine' => $key));
                 } else {
                     \XLite\Core\TopMessage::addWarning('Site map has not been registred in X', array('engine' => $key));
                 }
             }
         }
     }
     $postedData = \XLite\Core\Request::getInstance()->getData();
     $options = \XLite\Core\Database::getRepo('\\XLite\\Model\\Config')->findBy(array('category' => $this->getOptionsCategory()));
     $isUpdated = false;
     foreach ($options as $key => $option) {
         $name = $option->getName();
         $type = $option->getType();
         if (isset($postedData[$name]) || 'checkbox' == $type) {
             if ('checkbox' == $type) {
                 $option->setValue(isset($postedData[$name]) ? 'Y' : 'N');
             } else {
                 $option->setValue($postedData[$name]);
             }
             $isUpdated = true;
             \XLite\Core\Database::getEM()->persist($option);
         }
     }
     if ($isUpdated) {
         \XLite\Core\Database::getEM()->flush();
     }
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:43,代码来源:Sitemap.php

示例2: getWebhookURL

 /**
  * Get webhook URL
  *
  * @return string
  */
 public function getWebhookURL()
 {
     $url = explode('&xid=', \XLite::getInstance()->getShopURL(\XLite\Core\Converter::buildURL('callback', null, array(), \XLite::getCustomerScript()), \XLite\Core\Config::getInstance()->Security->customer_security));
     return $url[0];
 }
开发者ID:ashishCetuG,项目名称:xcart-plugin,代码行数:10,代码来源:Velocity.php

示例3: preprocessOpenGraphMetaTags

 /**
  * Preprocess Open Graph meta tags
  *
  * @param string $tags Tags content
  *
  * @return string
  */
 protected function preprocessOpenGraphMetaTags($tags)
 {
     $categoryURL = $this->getParent() ? \XLite\Core\Converter::makeURLValid(\XLite::getInstance()->getShopURL(\XLite\Core\Converter::buildURL('category', '', array('category_id' => $this->getCategoryId()), \XLite::getCustomerScript()))) : \XLite::getInstance()->getShopURL();
     return str_replace(array('[PAGE_URL]', '[IMAGE_URL]'), array($categoryURL, $this->getImage() ? $this->getImage()->getFrontURL() : ''), $tags);
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:12,代码来源:Category.php

示例4: buildProductPreviewURL

 /**
  * Defines the product preview URL
  *
  * @param integer $productId Product id
  *
  * @return string
  */
 public function buildProductPreviewURL($productId)
 {
     return \XLite\Core\Converter::buildURL('product', 'preview', array('product_id' => $productId), \XLite::getCustomerScript());
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:11,代码来源:Product.php

示例5: getSitemapURL

 /**
  * Get sitemap URL 
  * 
  * @return string
  */
 protected function getSitemapURL()
 {
     return \XLite::getInstance()->getShopURL(\XLite\Core\Converter::buildURL('sitemap', '', array(), \XLite::getCustomerScript()));
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:9,代码来源:Sitemap.php

示例6: getCallbackUrl

 /**
  * Get callback URL
  *
  * @param string $xpcBackReference Reference between X-Payments payment and X-Cart transaction
  * @param bool $forZeroAuth Call back for zero auth or regular order
  *
  * @return string
  */
 public static function getCallbackUrl($xpcBackReference)
 {
     if (!$forZeroAuth) {
         // Order callback
         $url = \XLite\Core\Converter::buildUrl('callback', 'callback', array('xpcBackReference' => $xpcBackReference), \XLite::getCustomerScript());
     } else {
         // Add new card callback
         $url = \XLite\Core\Converter::buildUrl('callback', 'callback', array('xpcBackReference' => $xpcBackReference, 'for_zero_auth' => '1'), \XLite::getCustomerScript());
     }
     return \XLite::getInstance()->getShopUrl($url);
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:19,代码来源:XPaymentsClient.php

示例7: getIframeUrl

 /**
  * Get iframe URL 
  *
  * @return string 
  */
 public function getIframeUrl()
 {
     static $url = null;
     if (!$url && $this->getAddressList()) {
         try {
             $url = \XLite\Module\CDev\XPaymentsConnector\Core\ZeroAuth::getInstance()->getIframeUrl($this->getProfile(), \XLite::getCustomerScript());
         } catch (\Exception $e) {
             $this->error = $e->getMessage();
         }
     }
     return $url;
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:17,代码来源:AddNewCard.php

示例8: getDownloadURL

 /**
  * Get download URL for customer front-end by key
  *
  * @return string
  */
 public function getDownloadURL(\XLite\Module\CDev\Egoods\Model\OrderItem\PrivateAttachment $attachment)
 {
     $params = $this->getGetterParams();
     $params['key'] = $attachment->getDownloadKey();
     return \XLite\Core\Converter::buildFullURL('storage', 'download', $params, \XLite::getCustomerScript());
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:11,代码来源:Storage.php

示例9: sendOrderTrackingInformationCustomer

 /**
  * Send notification about created profile to the user
  *
  * @param \XLite\Model\Order $order Order object
  *
  * @return void
  */
 public static function sendOrderTrackingInformationCustomer(\XLite\Model\Order $order)
 {
     $orderUrl = \XLite::getInstance()->getShopURL(\XLite\Core\Converter::buildURL('order', '', array('order_number' => $order->getOrderNumber()), \XLite::getCustomerScript()));
     static::register(array('order' => $order, 'trackingNumbers' => $order->getTrackingNumbers(), 'orderURL' => $orderUrl, 'address' => $order->getProfile()->getBillingAddress(), 'recipientName' => $order->getProfile()->getName()));
     static::compose(static::TYPE_ORDER_TRACKING_INFORMATION_CUSTOMER, static::getOrdersDepartmentMail(), $order->getProfile()->getLogin(), 'order_tracking_information', array(), true, \XLite::CUSTOMER_INTERFACE, static::getMailer()->getLanguageCode(\XLite::CUSTOMER_INTERFACE, $order->getProfile()->getLanguage()));
     \XLite\Core\OrderHistory::getInstance()->registerCustomerEmailSent($order->getOrderId(), 'Tracking information is sent to the customer');
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:14,代码来源:Mailer.php

示例10: buildLoc

 /**
  * Build location URL
  * 
  * @param array $loc Locationb as array
  *  
  * @return string
  */
 protected function buildLoc(array $loc)
 {
     $target = $loc['target'];
     unset($loc['target']);
     return \XLite\Core\Converter::buildURL($target, '', $loc, \XLite::getCustomerScript());
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:13,代码来源:SitemapGenerator.php

示例11: getGetterURL

 /**
  * Get attachment getter URL
  *
  * @return string
  */
 public function getGetterURL()
 {
     return \XLite\Core\Converter::buildURL('storage', 'download', $this->getGetterParams(), \XLite::getCustomerScript());
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:9,代码来源:Storage.php

示例12: getFrontURL

 /**
  * Get front URL
  *
  * @return string
  */
 public function getFrontURL()
 {
     return $this->getProductId() ? \XLite\Core\Converter::makeURLValid(\XLite::getInstance()->getShopURL(\XLite\Core\Converter::buildURL('product', '', array('product_id' => $this->getProductId()), \XLite::getCustomerScript()))) : null;
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:9,代码来源:Product.php

示例13: getFrontURL

 /**
  * Get front URL
  *
  * @return string
  */
 public function getFrontURL()
 {
     $url = null;
     if ($this->getId()) {
         $url = \XLite\Core\Converter::makeURLValid(\XLite::getInstance()->getShopURL(\XLite\Core\Converter::buildURL('newsMessage', '', array('id' => $this->getId()), \XLite::getCustomerScript(), true)));
     }
     return $url;
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:13,代码来源:NewsMessage.php

示例14: getIframeUrl

 /**
  * Get iframe URL
  *
  * @return string
  */
 public function getIframeUrl(\XLite\Model\Profile $profile, $interface = false)
 {
     if (!$interface) {
         $interface = \XLite::getCustomerScript();
     }
     $iframeUrl = false;
     // Prepare cart
     $cart = $this->createCart($profile);
     $preparedCart = $this->getPreparedCart($cart);
     if ($preparedCart) {
         $transaction = $cart->getFirstOpenPaymentTransaction();
         $this->getPaymentMethod()->getProcessor()->savePaymentSettingsToTransaction($transaction);
         $xpcBackReference = $transaction->getPublicId();
         $profile->setPendingZeroAuth($xpcBackReference);
         $profile->setPendingZeroAuthInterface($interface);
         \XLite\Core\Database::getEM()->flush();
         // Data to send to X-Payments
         $data = array('confId' => intval($this->getPaymentMethod()->getSetting('id')), 'refId' => $xpcBackReference, 'cart' => $preparedCart, 'language' => 'en', 'returnUrl' => $this->getClient()->getReturnUrl($xpcBackReference, true), 'callbackUrl' => $this->getClient()->getCallbackUrl($xpcBackReference, true));
         // For API v1.3 and higher we can send the template for iframe
         if (version_compare($this->getConfig()->xpc_api_version, '1.3') >= 0) {
             $data += array('saveCard' => 'Y', 'template' => 'xc5');
         }
         $init = $this->getClient()->getApiRequest()->send('payment', 'init', $data);
         if ($init->isSuccess()) {
             $response = $init->getResponse();
             $iframeUrl = $this->getConfig()->xpc_xpayments_url . '/payment.php?target=main&token=' . $response['token'];
             $transaction->setDataCell('xpc_txnid', $response['txnId'], 'X-Payments transaction id', 'C');
             $transaction->setDataCell('xpcBackReference', $xpcBackReference, 'X-Payments back reference', 'C');
             // AntiFraud service
             if (method_exists($transaction, 'processAntiFraudCheck')) {
                 $transaction->processAntiFraudCheck();
             }
             \XLite\Core\Database::getEM()->flush();
         } else {
             throw new \Exception($init->getError());
         }
     }
     return $iframeUrl;
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:44,代码来源:ZeroAuth.php

示例15: getWebhookURL

 /**
  * Get Webhook URL
  *
  * @return string
  */
 public function getWebhookURL()
 {
     return \XLite::getInstance()->getShopURL(\XLite\Core\Converter::buildURL('callback', null, array(), \XLite::getCustomerScript()), \XLite\Core\Config::getInstance()->Security->customer_security);
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:9,代码来源:Stripe.php


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