• プラグイン一覧
    - WCEX Item Combo Set
    - WCEX Amazon Pay
    - WCEX Wishlist お気に入りリスト
  • リリース情報
  • お役立ちコラム
  • お問い合わせ
  • サポート
    • よくある質問
      • WCEX Amazon Pay
      • WCEX Wishlist お気に入りリスト
      • wcex-item-combo-set
    • リファレンス
      • WCEX Amazon Pay
      • WCEX Wishlist お気に入りリスト
      • wcex-item-combo-set
新規会員登録
ログイン
新規会員登録
ログイン
カート
  • プラグイン一覧
    • - WCEX Item Combo Set
    • - WCEX Amazon Pay
    • - WCEX Wishlist お気に入りリスト
  • リリース情報
  • お役立ちコラム
  • サポート
    • - よくある質問
      • - WCEX Amazon Pay
      • - WCEX Wishlist お気に入りリスト
      • - wcex-item-combo-set
    • - リファレンス
      • - WCEX Amazon Pay
      • - WCEX Wishlist お気に入りリスト
      • - wcex-item-combo-set
  • お問い合わせ
Aivec APPs > WCEX Amazon Pay > クラス > PayAndShip
レファレンス
バージョン
2.6.4
絞り込み:

目次

  • ソース
  • 関数

フック

  • アクション
  • フィルター

ファンクション

    クラス

    PayAndShip

    Checkout review page for shipped division item(s)

    ソース #ソース

    ファイル: src/Views/CheckoutReview/PayAndShip/PayAndShip.php

    class PayAndShip extends Container
    {
        /**
         * Amazon checkout details component instance
         *
         * @var AmazonCheckoutDetails
         */
        private $checkoutDetailsComp;
    
        /**
         * Unloads `deliveryForm` component if an address error exists
         *
         * @author Evan D Shaw <evandanielshaw@gmail.com>
         * @param bool $load
         * @return bool
         */
        protected function filterLoadDeliveryForm($load) {
            if (!empty($this->checkoutDetailsComp->getAddressError())) {
                return false;
            }
            return $load;
        }
    
        /**
         * Returns `AmazonCheckoutDetails` component with appropriate checkout session ID
         *
         * @author Evan D Shaw <evandanielshaw@gmail.com>
         * @return AmazonCheckoutDetails
         */
        protected function getAmazonCheckoutDetailsComponent() {
            $this->checkoutDetailsComp = new AmazonCheckoutDetails($this->module, $_REQUEST['amazonCheckoutSessionId']);
            return $this->checkoutDetailsComp;
        }
    
        /**
         * Returns `PurchaseButton` component
         *
         * @author Evan D Shaw <evandanielshaw@gmail.com>
         * @return PurchaseButton
         */
        protected function getPurchaseButtonComponent() {
            return new PurchaseButton('payandship', $this->module->getChargeType(), 'quickpay');
        }
    
        /**
         * Includes `delivery_info_script.php` if no address error
         *
         * @author Evan D Shaw <evandanielshaw@gmail.com>
         * @return void
         */
        protected function afterTemplateInclude() {
            if (empty($this->checkoutDetailsComp->getAddressError())) {
                wcexaap_include_delivery_info_script();
            }
        }
    
        /**
         * Displays address error at top of page
         *
         * @author Evan D Shaw <evandanielshaw@gmail.com>
         * @param string $emessage
         * @return string
         */
        public function filterTemplateTopErrorMessage($emessage) {
            if (!empty($this->checkoutDetailsComp->getAddressError())) {
                $emessage = $this->checkoutDetailsComp->getAddressErrorMessageBox(
                    'updateShippingAddressButton1',
                    'template-top'
                );
            }
            return $emessage;
        }
    
        /**
         * Displays address error at bottom of page
         *
         * @author Evan D Shaw <evandanielshaw@gmail.com>
         * @param string $emessage
         * @return string
         */
        public function filterTemplateBottomErrorMessage($emessage) {
            if (!empty($this->checkoutDetailsComp->getAddressError())) {
                $emessage = $this->checkoutDetailsComp->getAddressErrorMessageBox(
                    'updateShippingAddressButton2',
                    'template-bottom'
                );
            }
            return $emessage;
        }
    
        /**
         * Binds address change to our custom address error buttons
         *
         * @author Evan D Shaw <evandanielshaw@gmail.com>
         * @return void
         */
        protected function loadCustomAssets() {
            if (!empty($this->checkoutDetailsComp->getAddressError())) {
                (new ChangeActions($this->module))->load(
                    $this->checkoutDetailsComp->getCheckoutSessionId(),
                    ['updateShippingAddressButton1', 'updateShippingAddressButton2']
                );
            }
        }
    }
    

    ソースを伸ばす ソースを縮める


    関数 #関数

    Top ↑

    • afterTemplateInclude — Includes `delivery_info_script.php` if no address error
    • filterLoadDeliveryForm — Unloads `deliveryForm` component if an address error exists
    • filterTemplateBottomErrorMessage — Displays address error at bottom of page
    • filterTemplateTopErrorMessage — Displays address error at top of page
    • getAmazonCheckoutDetailsComponent — Returns `AmazonCheckoutDetails` component with appropriate checkout session ID
    • getPurchaseButtonComponent — Returns `PurchaseButton` component
    • loadCustomAssets — Binds address change to our custom address error buttons

    • 新規会員登録
    • ログイン
      • プラグイン一覧
      • 会社概要
      • リリース情報
      • よくある質問
      • お役立ちコラム
      • お問い合わせ
      • 個人情報保護方針
      • 特定商取引法に基づく表記
      • 情報セキュリティ基本方針
      • 利用規約

    アイベック合同会社は「Welcart」「Amazon Pay」の公式パートナーです。

    ※Amazon、Amazon.co.jp、Amazon Payおよびそれらのロゴは、Amazon.com,inc.またはその関連会社の商標です。
    ※LINE Pay、およびLINE Pay 提携サービスのロゴは、法律上保護を受ける商標です。

    © 2025 Aivec llc All Rights Reserved.