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

Welcart Carina 1.0.3 をリリース

Welcart Carina 1.0.3 をリリースしました。

今回の更新内容は次の通りです。

  1. Welcart Basic 1.2.5「検索フォームのID重複」修正に伴うテンプレート修正とスタイル調整
  2. 商品詳細ページ:タブリストのスタイル調整(IE閲覧時)
  3. トップページ:ウィジェットタイトルのスタイル調整(IE閲覧時)
  4. ヘッダー・フッター部分のボーダーが表示されない不具合を修正(IE閲覧時)
  5. the_excerpt() の末尾の文字(「…」)を UTF-8 から Shift-JISに変更
  6. 商品売り切れ時の商品グリッドのレイアウト崩れ(アーカイブ・タグ一覧ページ)
  7. 商品売り切れ時、商品お問い合わせフォームから送信したメール本文に商品名が記載されない不具合を修正
  8. 購入制限数と在庫数が等しい場合の数量フィールド値が制限されていない不具合を修正

1. 「検索フォームのID重複」修正に伴うテンプレート修正とスタイル調整

「検索」ウィジェットまたは「Welcart キーワード検索」ウィジェットを設置した場合、ヘッダーに設置されいてる検索フォームの「テキストボックス」と「送信ボタン」の ID属性値が重複してしまうことが原因で「HTML の文法違反」と見なされてしまうため、Welcart Basic 1.2.5 から、ヘッダーの検索フォームと「検索」ウィジェットの ID属性値を変更しております。

注意
Welcart Basic のみを最新バージョン(v.1.2.5)にアップグレードした場合、Welcart Carina のバージョンが古いと上記画像のようなレイアウト崩れを起こします。Welcart Basic 1.2.5 にアップグレードした際は、Welcart Carina も最新バージョン(1.0.3)にアップグレードしてください。
Welcart Carina をカスタマイズしている場合は、下記の修正内容を参考にお使いのテーマを修正ください。

Welcart Basic 1.2.5 で作成した関数「get_head_search_form()」の適用
welcart_basic-nova/header.php 59行目

<?php get_search_form(); ?>
<?php 
if(function_exists('get_head_search_form')) {
    get_head_search_form();
}else {
    get_search_form();
}
?>

スタイル修正

セレクタ名変更: welcart_basic-carina/style.css 319行目・1135行目

.search-box #searchsubmit
.search-box .searchsubmit

セレクタ名変更: welcart_basic-carina/style.css 591行目

.widget_search #s
.widget_search .search-text

セレクタ名変更: welcart_basic-carina/style.css 594行目

.widget_search #searchsubmit
.widget_search #searchsubmit

セレクタ名変更: welcart_basic-carina/inc/theme-customizer.css 1415行目

.search-box #searchsubmit
.search-box .searchsubmit

セレクタ追加: welcart_basic-carina/inc/theme-customizer.css 1416行目

.search-box .searchsubmit:hover,
.widget_search .searchsubmit,
.widget_search .searchsubmit:hover,

WordPress 4.7 以降をご利用のお客様へ

WordPress 4.7 以降「カスタムCSS」という機能が追加されております。こちらの機能を利用し以下のスタイルをコピペするだけでもレイアウト崩れを防ぐことは可能ですが、Welcart Carina では「カラーデザイン」の変更機能を搭載しているため、正常に表示させるには、上記「theme-customzier.php」の【セレクタ名の変更・追加】作業を行う必要がございます。

※Welcart Carina をカスタマイズされている場合に限ります。

.search-box .searchsubmit {
    height: 35px;
    font-size: 20px;
    padding: 0 10px;
    line-height: 35px;
}
.widget_search .search-text {
    padding: 0 30px 0 5px;
}
.widget_search .searchsubmit {
    height: 35px;
    padding: 0 10px;
    line-height: 35px;
}
@media screen and (min-width: 62.5em) {
    
    .search-box .searchsubmit {
        position: absolute;
        width: auto;
        height: 44px;
        padding: 0 15px;
        line-height: 44px;
        -moz-box-shadow: none;
        -webkit-box-shadow: none;
        box-shadow: none;
    }
    
}

2. 商品詳細ページ:タブリストのスタイル調整(IE閲覧時)

スタイル追加: welcart_basic-carina/usces_cart.css 371行目

@media all and (-ms-high-contrast: none){
    .tab-list li::before {
        border-top-style: none;
    }
    .tab-list li.select::before {
        border-top-style: solid; /* IE10以上 */
    }
}
※ IE用のスタイルを追加

3. トップページ:ウィジェットタイトルのスタイル調整(IE閲覧時)

スタイル追加: welcart_basic-carina/style.css 785行目

.home-widget h2,
.front-il h2,
.info-area h2 {
    font-size: 24px;
    margin: 0 0 20px;
    text-align: center;
    letter-spacing: normal;
}
※「lettr-spacing」の値を「initial」から「normal」に変更

4. ヘッダー・フッター部分のボーダーが表示されない不具合を修正(IE閲覧時)

スタイル追加: welcart_basic-carina/inc/theme-customizer.php 1378行目

.site:before,
.footer-widget:before {
    background-image: -webkit-gradient(linear,0 0,100% 0, color-stop(.5,<?php echo $sub_bg; ?>), color-stop(.5,transparent),to(transparent));
    background-image: -moz-linear-gradient(left, <?php echo $sub_bg; ?> 50%, transparent 50%, transparent);
    background-image: -ms-linear-gradient(left, <?php echo $sub_bg; ?> 50%, transparent 50%, transparent);
    background-image: -o-linear-gradient(left, <?php echo $sub_bg; ?> 50%, transparent 50%, transparent);
    background-image: linear-gradient(left, <?php echo $sub_bg; ?> 50%, transparent 50%, transparent);    
}

5. the_excerpt() の末尾の文字(「…」)を UTF-8 から Shift-JISに変更

文字列の修正: welcart_basic-carina/functions.php 148行目

function wcct_excerpt_more( $more ) {
    return '…';
}
add_filter( 'excerpt_more', 'wcct_excerpt_more' );
function wcct_excerpt_more( $more ) {
    return '...';
}
add_filter( 'excerpt_more', 'wcct_excerpt_more' );

6. 商品売り切れ時の商品グリッドのレイアウト崩れ(アーカイブ・タグ一覧ページ)

スタイル修正: welcart_basic-carina/style.css 888行目

.item-content .itemsoldout {
    color: #e00;
    font-size: .85714em;
    font-weight: bold;
    height: 22px;
    text-align: right;
}
.item-content .itemsoldout {
    position: absolute;
    color: #fff;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-size: 18px;
    background-color: rgba(0,0,0,0.6);
    text-align: center;
    letter-spacing: 2px;
    z-index: 2;
}

スタイル追加: welcart_basic-carina/style.css 901行目

.item-content .itemsoldout .inner {
    position: absolute;
    font-weight: normal;
    top: 50%;
    width: 100%;
    -webkit-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
}

7. 商品売り切れ時、商品お問い合わせフォームから送信したメール本文に商品名が記載されない不具合を修正

js ファイルの追加:welcart_basic-carina/js/wcct-customized.js

( function( $ ) {
    
    $(function() {
        var pair = location.search.substring(1).split('&');
        var arg = new Object;
        for( var i = 0; pair[i]; i++ ) {
            var kv = pair[i].split('=');
            arg[kv[0]] = kv[1];
        }
        if( undefined != arg.from_item && undefined != arg.from_sku ) {
            $('.wpcf7-submit').on('click', function() {
                var form = $(this).parents('form');
                form.attr('action', $(this).data('action'));
                $('<input>').attr({
                    'type': 'hidden',
                    'name': 'from_item',
                    'value': arg.from_item
                }).appendTo(form);
                $('<input>').attr({
                    'type': 'hidden',
                    'name': 'from_sku',
                    'value': arg.from_sku
                }).appendTo(form);
            });
        }
    })

} )( jQuery );

js ファイルの読み込み:welcart_basic-carina/functions.php 129行目

function wcct_enqueue_styles() {
    
    wp_enqueue_script( 'wcct-customized', get_stylesheet_directory_uri() . '/js/wcct-customized.js', array(), '1.0' );

}
add_action( 'wp_enqueue_scripts', 'wcct_enqueue_styles' , 9 );

ファイル修正:welcart_basic-carina/inc/front-customized.php 328行目

if( defined('WPCF7_VERSION') ) {
    add_filter('wpcf7_mail_components', 'wcct_mail_components', 10, 3);
    function wcct_mail_components($components, $current_form, $mail_object){
        global $usces;
        
        $post_id = isset($_GET['from_item']) ? $_GET['from_item']: '';
        if( strlen($post_id) > 0 ){
            $itemname = $usces->getItemName($post_id);
            $skucode = isset($_GET['from_sku']) ? $_GET['from_sku']: '';
            $skuname = ( strlen($skucode) > 0 ) ? $usces->getItemSkuDisp($post_id, $skucode): '';
    
            $body = $components['body'];
            
            if( strlen($itemname) > 0 && strlen($skuname) > 0 ){
                $components['body'] = __( 'item name', 'usces' ) . ':'.$itemname. ' '. $skuname. "\n". $body;
            }elseif( strlen($itemname) > 0 ){
                $components['body'] = __( 'item name', 'usces' ) . ':'.$itemname. "\n". $body;
            }
        }
        return $components;
    }
}
if( defined('WPCF7_VERSION') ) {
    add_filter('wpcf7_mail_components', 'wcct_mail_components', 10, 3);
    function wcct_mail_components($components, $current_form, $mail_object){
        global $usces;
        
        $post_id = isset($_POST['from_item']) ? $_POST['from_item']: '';
        if( strlen($post_id) > 0 ){
            $itemname = $usces->getItemName($post_id);
            $skucode = isset($_POST['from_sku']) ? $_POST['from_sku']: '';
            $skuname = ( strlen($skucode) > 0 ) ? $usces->getItemSkuDisp($post_id, $skucode): '';
    
            $body = $components['body'];
            
            if( strlen($itemname) > 0 && strlen($skuname) > 0 ){
                $components['body'] = __( 'item name', 'usces' ) . ':'.$itemname. ' '. $skuname. "\n". $body;
            }elseif( strlen($itemname) > 0 ){
                $components['body'] = __( 'item name', 'usces' ) . ':'.$itemname. "\n". $body;
            }
        }
        return $components;
    }
}

8. 購入制限数と在庫数が等しい場合の数量フィールド値が制限されていない不具合を修正

テンプレート修正:welcart_basic-nova/inc/front-customized.php 384行目

function wcct_the_itemQuant_select( $max = null ) {
    global $post, $usces;
    if( empty( $max ) )
        $max = 50;
    $zaiko = usces_the_itemZaikoNum('return');
    $sku_enc = urlencode( usces_the_itemSku('return') );
    $restriction = $usces->getItemRestriction($post->ID);
    
    if( ('' != $zaiko && 0 < $zaiko && '' != $restriction && $zaiko >= $restriction) || ( '' == $zaiko && '' != $restriction) ) {
        $max = $restriction;
    }elseif( ( '' != $zaiko && 0 < $zaiko && '' != $restriction && $zaiko < $restriction ) || ( '' != $zaiko && '' == $restriction) ) {
        $max = $zaiko;
    }
    
    $select = '<select name ="quant[' . $post->ID . '][' . $sku_enc . ']" id ="quant[' . $post ->ID . '][' . $sku_enc . ']" class="skuquantity" onkeydown="if(event.keyCode == 13) {return false;}">' . "\n";
        for($i =1; $i<=$max; $i++) {
            $select .= '<option value="' . $i . '">' . $i . '</option>' . "\n";
        }
    $select .= '</select>';
    
    echo $select;
}


Welcart Basic 最新リリース情報