Skip to content

導入サンプル ​

本ページには、ユーザーの購入の流れを試せるオンラインデモと、そのままコピーして使える導入コードがあります。

オンラインデモ ​

以下は商品ページを模したデモです。購入ボタンをクリックすると、ユーザーが実際にたどる流れを確認できます。

📱 Live Demo - Click button to experience purchase flow

The following example shows the complete integration effect of RAKUFUN SDK

🎧 Authentic Japanese Products · International Shipping

RAKUFUN provides safe and reliable Japanese product purchasing services

Sony WH-1000XM5 Wireless Headphones

Sony WH-1000XM5 Wireless Noise Canceling Headphones

54,800円62,800円

🌟 Product Features

  • Industry-leading active noise cancellation technology
  • 30-hour ultra-long battery life
  • Quick Attention mode for instant environmental awareness
  • Multipoint connection, connect two devices simultaneously
  • Authentic Japanese import with manufacturer warranty

デモの購入ボタンはページ側で用意したもので、カスタムモードを使用しています。下記のコードはデフォルトモードで、SDK標準の画面下部パネルを使用します。

導入コード ​

デフォルトモード(画面下部に購入パネルを自動表示)の導入コードです。商品ページに追加し、商品情報を実際のデータに置き換えてください。

html
<!DOCTYPE html>
<html lang="ja">
<body>
    <!-- 商品ページのコンテンツ -->

    <script src="https://sdk.rakufun.com/rakufun-universal.min.js"></script>
    <script>
        // 表示中の商品の情報を設定する(画面下部パネルの購入ボタンをクリックしたときに使用されます)
        rakufun.setUIProductData({
            url: window.location.href,
            title: "Sony WH-1000XM5 Wireless Headphones",
            price: "54800",
            description: "業界最高クラスのノイズキャンセリング機能、連続再生時間30時間。",
            images: ["https://images.unsplash.com/photo-1583394838336-acd977736f90?w=800"],
            condition: "New",
            brand: "Sony",
            minQuantity: "1",
            maxStock: "50",
            shippingInfo: "0",
            deliveryTime: "2-4 days",
            precautions: "メーカー1年保証付き。",
            productParameters: "重量:250g、バッテリー駆動時間:30時間"
        });
    </script>
</body>
</html>

導入後の動作:

  • 日本国外からのアクセス時に、画面下部にRAKUFUNの購入パネルが表示されます(日本国内のIPアドレスでは初期設定で非表示)
  • ユーザーがパネルの購入ボタンをクリックすると、新しいタブでRAKUFUNの商品ページが開き、上記で設定した商品情報が引き渡されます

次のステップ ​


ご不明な点がございましたら、service@rakufun.com までお問い合わせください。

MITライセンスに基づいて公開