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


PHP Cart66Common::replaceQueryString方法代码示例

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


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

示例1: downloadFile

 public function downloadFile($attrs)
 {
     $link = false;
     if (isset($attrs['path'])) {
         $path = urlencode($attrs['path']);
         Cart66Common::log('[' . basename(__FILE__) . ' - line ' . __LINE__ . "] encoded {$path}");
         $nvp = 'task=member_download&path=' . $path;
         $url = Cart66Common::replaceQueryString($nvp);
         if (Cart66Common::isLoggedIn()) {
             $link = '<a class="Cart66DownloadFile" href="' . $url . '">' . $attrs['text'] . '</a>';
         } else {
             $link = $attrs['text'];
         }
     }
     return $link;
 }
开发者ID:rbredow,项目名称:allyzabbacart,代码行数:16,代码来源:Cart66ShortcodeManager.php

示例2: _e

    ?>
</a></span>
              <p id="what_is_price_description_answer" class="label_desc" style="max-width: 400px; display:none;"><?php 
    _e('(Optional) If you leave this blank, Cart66 will display a price description based on the information that defines this subscription. You may customize that message and briefly describe how you plan to bill your customer. This will be the message that showsup next to your add to cart buttons and also in the shopping cart.', 'cart66');
    ?>
 
              </p>
            </li>
          </ul>
          
          <ul style="margin: 15px 0px;">
            <li>
              <label class="med">&nbsp;</label>
              <?php 
    if ($data['subscription']->id > 0) {
        $url = Cart66Common::replaceQueryString('page=cart66-paypal-subscriptions');
        echo "<a href=\"{$url}\" class='button-secondary linkButton'>Cancel</a>";
    }
    ?>
              <input type="submit" name="save" value="<?php 
    _e('Save', 'cart66');
    ?>
" id="Save" class="button-primary" style="width: 60px;"/>
            </li>
          </ul>
          
        </form>
        <?php 
} else {
    ?>
          <p class="description"><?php 
开发者ID:rbredow,项目名称:allyzabbacart,代码行数:31,代码来源:paypal-subscriptions.php

示例3: accountsPage


//.........这里部分代码省略.........
                 $account = new Cart66Account($_REQUEST['accountId']);
                 $account->deleteMe();
                 $account->clear();
             }
         } elseif (isset($_REQUEST['accountId']) && is_numeric($_REQUEST['accountId'])) {
             if (isset($_REQUEST['opt_out'])) {
                 $account = new Cart66Account();
                 $account->load($_REQUEST['accountId']);
                 $data = array('opt_out' => $_REQUEST['opt_out']);
                 $account->setData($data);
                 $account->save();
                 $account->clear();
             }
             // Look in query string for account id
             $account = new Cart66Account();
             $account->load($_REQUEST['accountId']);
             $id = $account->getCurrentAccountSubscriptionId(true);
             $data['plan'] = new Cart66AccountSubscription($id);
             // Return even if plan is expired
             if (date('Y', strtotime($data['plan']->activeUntil)) <= 1970) {
                 $data['activeUntil'] = '';
             } else {
                 $data['activeUntil'] = date('m/d/Y', strtotime($data['plan']->activeUntil));
             }
         }
         if ($_SERVER['REQUEST_METHOD'] == 'POST' && Cart66Common::postVal('cart66-action') == 'save account') {
             $acctData = $_POST['account'];
             // Format or unset password
             if (empty($acctData['password'])) {
                 unset($acctData['password']);
             } else {
                 $acctData['password'] = md5($acctData['password']);
             }
             // Strip HTML tags on notes field
             $acctData['notes'] = strip_tags($acctData['notes'], '<a><strong><em>');
             $planData = $_POST['plan'];
             $planData['active_until'] = date('Y-m-d 00:00:00', strtotime($planData['active_until']));
             // Updating an existing account
             if ($acctData['id'] > 0) {
                 $account = new Cart66Account($acctData['id']);
                 $account->setData($acctData);
                 $account_errors = $account->validate();
                 $sub = new Cart66AccountSubscription($planData['id']);
                 if ($planData['product_id'] != 'spreedly_subscription') {
                     $sub->setData($planData);
                     $subscription_product = new Cart66Product($sub->product_id);
                     $sub->subscription_plan_name = $subscription_product->name;
                     $sub->feature_level = $subscription_product->feature_level;
                     $sub->subscriber_token = '';
                 } else {
                     unset($planData['product_id']);
                     $sub->setData($planData);
                 }
                 $subscription_errors = $sub->validate();
                 $errors = array_merge($account_errors, $subscription_errors);
                 if (count($errors) == 0) {
                     $account->save();
                     $sub->save();
                     $account->clear();
                     $sub->clear();
                 } else {
                     $data['errors'] = $errors;
                     $data['plan'] = $sub;
                     $data['activeUntil'] = date('m/d/Y', strtotime($sub->activeUntil));
                 }
             } else {
                 // Creating a new account
                 $account = new Cart66Account();
                 $account->setData($acctData);
                 $account_errors = $account->validate();
                 if (count($account_errors) == 0) {
                     $sub = new Cart66AccountSubscription();
                     $sub->setData($planData);
                     $subscription_errors = $sub->validate();
                     if (count($subscription_errors) == 0) {
                         $account->save();
                         $sub->billingFirstName = $account->firstName;
                         $sub->billingLastName = $account->lastName;
                         $sub->billingInterval = 'Manual';
                         $sub->account_id = $account->id;
                         $subscription_product = new Cart66Product($sub->product_id);
                         $sub->subscription_plan_name = $subscription_product->name;
                         $sub->feature_level = $subscription_product->feature_level;
                         $sub->save();
                         $account->clear();
                         $data['just_saved'] = true;
                     } else {
                         $data['errors'] = $subscription_errors;
                     }
                 } else {
                     $data['errors'] = $account_errors;
                 }
             }
         }
         $data['url'] = Cart66Common::replaceQueryString('page=cart66-accounts');
         $data['account'] = $account;
     }
     $view = Cart66Common::getView('admin/accounts.php', $data);
     echo $view;
 }
开发者ID:rbredow,项目名称:allyzabbacart,代码行数:101,代码来源:Cart66Admin.php

示例4: updateMembershipProductIds

 public function updateMembershipProductIds()
 {
     global $wpdb;
     $output = false;
     // Check for subscriptions lacking a product id
     $sql = 'SELECT id from ' . Cart66Common::getTableName('account_subscriptions') . " WHERE product_id='0' OR product_id IS NULL";
     $needyAccountSubscriptions = $wpdb->get_results($sql);
     Cart66Common::log('[' . basename(__FILE__) . ' - line ' . __LINE__ . "] " . count($needyAccountSubscriptions) . " accounts found that need to have a product id updated.");
     if (count($needyAccountSubscriptions) > 0) {
         // accounts needing product id have been found
         foreach ($needyAccountSubscriptions as $accountId) {
             $account = new Cart66AccountSubscription($accountId->id);
             $accountProductId = $account->getProductId();
             if ($accountProductId && !is_array($accountProductId)) {
                 $account->updateProductId($accountProductId);
                 Cart66Common::log('[' . basename(__FILE__) . ' - line ' . __LINE__ . "] Adding Product id: {$accountProductId} to account id: {$accountId->id} ");
             } elseif (is_array($accountProductId)) {
                 $latestProductId = $account->findLatestProductId($accountProductId);
                 Cart66Common::log('[' . basename(__FILE__) . ' - line ' . __LINE__ . "] Multiple products found for account {$accountId->id}");
                 if ($latestProductId) {
                     Cart66Common::log('[' . basename(__FILE__) . ' - line ' . __LINE__ . "] Latest membership product id found, id: {$latestProductId}");
                     $account->updateProductId($latestProductId);
                 }
             } else {
                 $output[] = "The subscription id:{$accountId->id} belonging to {$account->billing_first_name} {$account->billing_last_name} does not have a product ID associated with it. This will prevent notifications from being sent out. Please <a href='" . Cart66Common::replaceQueryString('page=cart66-accounts&accountId=' . $account->account_id) . "'>edit the account</a> and select a product ID.";
                 Cart66Common::log('[' . basename(__FILE__) . ' - line ' . __LINE__ . "] No products were found matching the feature level and subscription plan name of the account id: {$accountId->id}");
             }
         }
     }
     return $output;
 }
开发者ID:rbredow,项目名称:allyzabbacart,代码行数:31,代码来源:Cart66MembershipReminders.php

示例5: trim

$stats = trim(Cart66Setting::getValue('status_options'));
if (strlen($stats) >= 1) {
    $stats = explode(',', $stats);
    ?>
      <p style="float: left; clear: both; margin-top:0; padding-top: 0;"><?php 
    _e('Filter Orders by Status', 'cart66');
    ?>
:
        <?php 
    foreach ($stats as $s) {
        $s = trim(strtolower($s));
        Cart66Common::log('[' . basename(__FILE__) . ' - line ' . __LINE__ . "] Order status query: WHERE status='{$s}'");
        $tmpRows = $order->getOrderRows("WHERE status='{$s}'", null, null, 'id');
        $n = count($tmpRows);
        if ($n > 0) {
            $url = Cart66Common::replaceQueryString("page=cart66_admin&status={$s}");
            echo "<a href=\"{$url}\">" . ucwords($s) . " (" . count($tmpRows) . ")</a> &nbsp;|&nbsp; ";
        } else {
            echo ucwords($s) . " (0) &nbsp;|&nbsp;";
        }
    }
    ?>
        <a href="?page=cart66_admin">All (<?php 
    echo count($order->getOrderRows("WHERE `status` != 'checkout_pending'", null, null, 'id'));
    ?>
)</a>
      </p>
  <?php 
} else {
    echo "<p style=\"float: left; clear: both; color: #999; font-size: 11px; both; margin-top:0; padding-top: 0;\">" . __("You should consider setting order status options such as new and complete on the \n        <a href='?page=cart66-settings'>Cart66 Settings page</a>.", "cart66") . "</p>";
}
开发者ID:arraysoftlab,项目名称:tracy-thedarkroom.com,代码行数:31,代码来源:orders.php

示例6: getSubscriptionManagementLink

 public function getSubscriptionManagementLink($returnUrl = null)
 {
     $url = false;
     if ($this->isSpreedlySubscription()) {
         if (!isset($returnUrl)) {
             $returnUrl = '?return_url=' . Cart66Common::getCurrentPageUrl();
         }
         $spreedly = Cart66Setting::getValue('spreedly_shortname');
         $url = "https://spreedly.com/{$spreedly}/subscriber_accounts/" . $this->subscriberToken . $returnUrl;
     } elseif ($this->isPayPalSubscription()) {
         if ($this->isActive()) {
             $url = Cart66Common::replaceQueryString('cart66-task=CancelRecurringPaymentsProfile');
         }
     }
     return $url;
 }
开发者ID:rbredow,项目名称:allyzabbacart,代码行数:16,代码来源:Cart66AccountSubscription.php


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