ソニーペイメントサービスの2つの決済モジュール

Welcart Beldad 1.1 をリリース

Welcart Beldad 1.1 をリリースしました。


[更新内容]

WCEX Favorites 対応


Welcart Beldad を独自にカスタマイズしている方で「WCEX Favorites」を導入される場合には、下記の修正が必要となります。

「お気に入りリスト」ページへのリンク設置

ヘッダーのメンバーメニューに「お気に入りリスト」ページへのリンクを設置します。

フック追加: welcart_basic-beldad/header.php 110行目あたり

<?php if( usces_is_login() ): ?>
    <li><?php printf(__('Hello %s', 'usces'), usces_the_member_name('return')); ?></li>
    <li><a href="<?php echo USCES_MEMBER_URL; ?>"><?php _e('My page', 'welcart_basic') ?></a></li>
    <?php do_action( 'usces_theme_login_menu' ); ?>
    <li><?php usces_loginout(); ?></li>
<?php else: ?>
    <li><?php _e('guest', 'usces'); ?></li>
    <li><?php usces_loginout(); ?></li>
    <li><a href="<?php echo USCES_NEWMEMBER_URL; ?>"><?php _e('New Membership Registration','usces') ?></a></li>
<?php endif; ?>

※ do_action( ‘usces_theme_login_menu’ ) を追加

商品一覧にお気に入りアイコン設置

商品カテゴリーページや検索結果ページなどの商品一覧の各商品にお気に入りアイコンを設置します。

フック追加

: welcart_basic-beldad/front-page.php 245行目あたり
: welcart_basic-beldad/category.php 71行目あたり
: welcart_basic-beldad/search.php 39行目あたり
: welcart_basic-beldad/wc_search_page.php 59行目あたり

<div id="post-<?php the_ID(); ?>" <?php post_class('list'); ?>>
    <a href="<?php the_permalink(); ?>" rel="bookmark"> 
        <span class="thumbnail">
            <?php welcart_basic_campaign_message(); ?>
            <?php usces_the_itemImage( 0, 300, 300 ); ?>
            <?php do_action( 'usces_theme_favorite_icon' ); ?>
            <?php if ( wcct_get_options( 'display_soldout' ) && !usces_have_zaiko_anyone() ): ?>
                <span class="itemsoldout">

※ do_action( ‘usces_theme_favorite_icon’ ) を追加

商品詳細ページにお気に入りアイコン設置

商品詳細ページにお気に入りアイコンを設置します。
お気に入りアイコンの設置に伴いHTMLの構造の変更もおこなっております。

フック追加

: welcart_basic-beldad/wc_templates/wc_item_single.php 50行目あたり
: welcart_basic-beldad/wc_templates/wc_item_single_service.php 40行目あたり
: welcart_basic-beldad/wc_templates/wc_item_single_data.php 39行目あたり
: welcart_basic-beldad/wc_templates/wc_sku_select.php 52行目あたり
: welcart_basic-beldad/wc_templates/wc_sku_select_service.php 39行目あたり

【変更前】
<?php endif; ?>

<div id="itemimg-main" class="slider slider-for itemimg">
    <div><a href="<?php usces_the_itemImageURL(0); ?>" <?php echo apply_filters( 'usces_itemimg_anchor_rel', NULL ); ?>><?php usces_the_itemImage( 0, 600, 600, $post ); ?></a></div>
    <?php foreach( $imageid as $id ) : ?>
        <div><a href="<?php usces_the_itemImageURL($id); ?>" <?php echo apply_filters( 'usces_itemimg_anchor_rel', NULL ); ?>><?php usces_the_itemImage( $id, 600, 600, $post ); ?></a></div>
    <?php endforeach; ?>
    <?php do_action( 'usces_theme_favorite_icon' ); ?>
</div><!-- #itemimg-main -->
【変更後】
<?php endif; ?>

<div id="itemimg-main" class="itemimg">
    <div class="slider slider-for">
        <div><a href="<?php usces_the_itemImageURL(0); ?>" <?php echo apply_filters( 'usces_itemimg_anchor_rel', NULL ); ?>><?php usces_the_itemImage( 0, 600, 600, $post ); ?></a></div>
        <?php foreach( $imageid as $id ) : ?>
            <div><a href="<?php usces_the_itemImageURL($id); ?>" <?php echo apply_filters( 'usces_itemimg_anchor_rel', NULL ); ?>><?php usces_the_itemImage( $id, 600, 600, $post ); ?></a></div>
        <?php endforeach; ?>
    </div>
    <?php do_action( 'usces_theme_favorite_icon' ); ?>
</div><!-- #itemimg-main -->

※ do_action( ‘usces_theme_favorite_icon’ ) を追加
※ HTML構造の変更は、下記を参考にしてください。

HTML構造の変更

変更前 変更後
<div id="itemimg-main" class="slider 
slider-for itemimg">

    ・・・

</div>
<div id="itemimg-main" class="itemimg">
    <div class="slider slider-for">

        ・・・

    </div>
</div>

お気に入りリストページのテンプレート設置

Welcart Beldad 用のお気に入りリストページのテンプレートを設置します。

<設置手順>

  1. マイページの購入履歴より最新版のZipファイル(welcart_basic-beldad.1.1.zip)をダウンロードして解凍します。
  2. 解凍したファイル内の「wc_templates」の「member」フォルダ内に「wc_favorite_page.php」というテンプレートがございますので、お使いのテーマ内に同じ階層になるよう設置してください。
    welcart_basic-beldad/wc_templates/member/wc_favorite_page.php

WCEX Favorties 専用の CSS追加

お気に入りリストページのテンプレートと同様に お気に入り専用のCSSを設置します。

<設置手順>

  1. マイページの購入履歴より最新版のZipファイル(welcart_basic-beldad.1.1.zip)をダウンロードして解凍します。
  2. 解凍したファイル内の「asses」の「css」フォルダ内に「favorite.css」というCSSファイルがございますので、お使いのテーマ内に同じ階層になるよう設置してください。
    welcart_basic-beldad/assets/css/favorite.css

Welcart 商品一覧ウィジェットを「WCEX Favorites」に対応

Welcart 商品一覧ウィジェットを「WCEX Favorites」に対応しました。

フック追加: welcart_basic-beldad/inc/widget-customized.php 31行目あたり

function wcct_filter_item_list( $html, $term_id, $number ) {


    usces_the_item();
    $html .= '<div id="post-' . get_the_ID() . '" class="list">' . "\n";
        $html .= '<a href="' . get_permalink( get_the_ID() ) .'">' . "\n";
            $html .= '<div class="itemimg">' . "\n";
                $html .= get_welcart_basic_campaign_message() . "\n";
                $html .= usces_the_itemImage( 0, 300, 300, '', 'return' ) . "\n";
                $html .= apply_filters( 'usces_filter_theme_favorite_icon', '', 0 );
                if ( wcct_get_options( 'display_soldout' ) && !usces_have_zaiko_anyone() ) {


}
add_filter( 'welcart_basic_filter_item_list', 'wcct_filter_item_list', 10, 3 );

※ apply_filters( ‘usces_filter_theme_favorite_icon’, ”, 0 ) を追加

お気に入りボタンの色調整

変数追加: welcart_basic-beldad/inc/theme-customizer.php 1482行目あたり

$campaign_text          = get_theme_mod( 'campaign_text', '#c00' );

$soldout_bg             = get_theme_mod( 'soldout_bg', '#000' );
$soldout_bg_rgba        = 'rgba( ' . implode( ", ", wcct_rgb( $soldout_bg ) ) . ', .4 )';
$soldout_text           = get_theme_mod( 'soldout_text', '#fff' );

$favorite_bg            = 'rgba( ' . implode( ", ", wcct_rgb( $cart_button_bg ) ) . ', .1 )';

※ 「$favorite_bg」 を追加

スタイル追加: welcart_basic-beldad/inc/theme-customizer.php 1915行目あたり

#cart_table tfoot th.amount {
    color: <?php echo $price_color; ?>;
}

/* favorites */
.favorite-button .add-favorite {
    background-color: <?php echo $favorite_bg; ?>;
    border-color: <?php echo $cart_button_bg; ?>;
    color: <?php echo $cart_button_bg; ?>;
}
.favorite-button .add-favorite:hover {
    background-color: <?php echo $cart_button_bg; ?>;
    color: <?php echo $cart_button_text; ?>;
}

#tofavorite-content .tofavorite-page-link a,
#tofavorite-content .tologin-page-link a,
#tofavorite-content .tologin-newmember-page-link a {
    background-color: <?php echo $cart_button_bg; ?>;
    color: <?php echo $cart_button_text; ?>;
}
#tofavorite-content .tofavorite-page-link a:hover,
#tofavorite-content .tologin-page-link a:hover,
#tofavorite-content .tologin-newmember-page-link a:hover {
    background-color: <?php echo $cart_button_rgba; ?>;
}

#tofavorite-content #tofavorite-close,
.send .back_to_mypage {
    background-color: <?php echo $sub_button2_rgba; ?>;
    color: <?php echo $sub_button2_text; ?>;
}
#tofavorite-content #tofavorite-close:hover,
.send .back_to_mypage:hover {
    background-color: <?php echo $sub_button2_bg; ?>;
}

/* =Nav,Icon,Button,Table
-------------------------------------------------------------- */

※ 「/* .wcex favorites */」(ハイライトされている部分まで)を追加

Welcart Basic 1.4 アップデートによるヘッダーのレイアウト崩れ修正

親テーマの Welcart Basic 1.4 では、ヘッダーのレイアウト調整をおこなっております。
それに伴い、Welcart beldad が最新バージョンでない場合にはレイアウト崩れが発生します。Welcart beldad を独自にカスタマイズしている方は、下記を参考にCSS の修正をおこなってください。

スタイル追加: welcart_basic-beldad/style.css 3142行目あたり

@media screen and (min-width: 55em) {

    header .inner {
        display: block;
        width: auto;
        padding-bottom: 0;
    }
    header .top {
        min-height: 45px;
        max-width: 1070px;
        margin: 0 auto;
        padding-right: 0;
        padding-left: 0;
    }

}

※ 「display: block;」を追加

スタイル追加: welcart_basic-beldad/style.css 3143行目あたり

ベストセラーウィジェットで商品タグのレイアウト調整

スタイル追加: welcart_basic-beldad/style.css 1892行目あたり

.home-widget .widget_welcart_featured .opt-tag li,
.home-widget .widget_welcart_bestseller .opt-tag li {
    display: inline-block;
    float: none;
    width: auto;
    padding: 0 5px;
}
.no-sidebar .lower .widget_welcart_bestseller li .opt-tag li {
    margin: 2px 0;
    width: auto;
}

.home-widget .widget_welcart_bestseller .inner {

ベストセラーウィジェットで商品タグのレイアウト調整

デバイス幅を「1000px」で表示した場合のヘッダーのレイアウト崩れを修正しました。

スタイル追加: welcart_basic-beldad/assets/js/wcct-customized.js 88行目あたり

変更前
var SubNav      = $('.sub-navigation ul').innerWidth();

if ( 1000 <= windowWidth ) {
    $('.site-description').css('margin-right', SubNav + 54 + 'px');
} else {
    $('.site-description').css('margin-right', 0);
}
変更後
var SubNav      = $('.sub-navigation ul').innerWidth();

if ( 1000 < windowWidth ) {
    $('.site-description').css('margin-right', SubNav + 54 + 'px');
} else {
    $('.site-description').css('margin-right', 0);
}

※ 「=」を削除

スタイル追加: welcart_basic-beldad/assets/js/wcct-customized.js 96行目あたり

変更前
var html    = $('html');

if ( windowWidth <= 1000 ) {
    
    //Mobile header = Menu
    $(document).on('click', 'header .menus .iconbtn', function () {

変更後
var html    = $('html');

if ( windowWidth < 1000 ) {
    
    //Mobile header = Menu
    $(document).on('click', 'header .menus .iconbtn', function () {

※ 「=」を削除