Welcart VOLL 1.0.1 をリリースしました。
今回の更新内容は次の通りです。
- Welcart Basic 1.2.5「検索フォームのID重複」修正に伴うテンプレート修正とスタイル調整
- カスタムカラー:ヘッダーメニューのスタイル修正
- スマホメニューの開閉動作のバグ修正
- スマホメニューのアイコンサイズの変更
- 業務パック割引を適用した場合の商品詳細ページのスタイル修正
- Welcart Basic 1.2.5「スマホ閲覧時、キャッチフレーズを設定していない場合の…」修正によるスタイル調整
- 商品売り切れ時、商品お問い合わせフォームから送信したメール本文に商品名が記載されない不具合を修正
1. 「検索フォームのID重複」修正に伴うテンプレート修正とスタイル調整
「検索」ウィジェットまたは「Welcart キーワード検索」ウィジェットを設置した場合、ヘッダーに設置されいてる検索フォームの「テキストボックス」と「送信ボタン」の ID属性値が重複してしまうことから「HTML の文法違反」と見なされてしまうため、Welcart Basic 1.2.5 から、ヘッダーの検索フォームと「検索」ウィジェットの ID属性値を変更しております。
注意

Welcart Basic のみを最新バージョン(v.1.2.5)にアップグレードした場合、Welcart VOLL のバージョンが古いと上記画像のようなレイアウト崩れを起こします。Welcart Basic 1.2.5 にアップグレードした際は、Welcart VOLL も最新バージョン(1.0.1)にアップグレードしてください。
Welcart VOLL をカスタマイズしている場合は、下記の修正内容を参考にお使いのテーマを修正ください。
Welcart Basic 1.2.5 で作成した関数「get_head_search_form()」の適用:
welcart_basic-voll/header.php 118行目
<? php get_search_form(); ?>
|
<? php
if(function_exists('get_head_search_form')) {
get_head_search_form();
}else {
get_search_form();
}
?>
|
スタイル修正:
セレクタ名変更:welcart_basic-voll/style.css 509行目・2074行目
.search-box #searchsubmit
|
.search-box .searchsubmit
|
セレクタ名変更:welcart_basic-voll/style.css 836行目・843行目
.widget_search .search-text
|
セレクタ名変更:welcart_basic-voll/style.css 837行目・846行目
.widget_search #searchsubmit
|
.widget_search .searchsubmit
|
セレクタ名変更:welcart_basic-voll/inc/theme-customizer.php 1370行目
.search-box #searchsubmit
|
.search-box .searchsubmit
|
セレクタ名変更:welcart_basic-voll/inc/theme-customizer.php 1498行目
.widget_search #searchsubmit
|
.widget_search .searchsubmit
|
WordPress 4.7 以降をご利用のお客様へ
WordPress 4.7 以降「カスタムCSS」という機能が追加されております。こちらの機能を利用し以下のスタイルをコピペするだけでもレイアウト崩れを防ぐことは可能ですが、Welcart VOLL では「カラーデザイン」の変更機能を搭載しているため、正常に表示させるには、上記「theme-customzier.php」の【セレクタ名の変更】作業を行う必要がございます。
※Welcart VOLL をカスタマイズされている場合に限ります。
.search-box input[type="text"],
.search-box .searchsubmit {
background: none;
}
.search-box input[type="text"] {
padding-right: 2.858em;
}
.search-box .searchsubmit {
font-size: 1.385em;
font-weight: normal;
height: 35px;
margin-left: -2px;
padding: 0 .714em;
border: none;
line-height: 35px;
}
.widget_search .search-text,
.widget_search .searchsubmit{
height: 40px;
padding: 0 .714em;
background: none;
line-height: 40px;
}
.widget_search .search-text {
background: none;
}
.widget_search .searchsubmit{
border: none;
}
@media screen and (min-width: 62.5em) {
.search-box .searchsubmit {
position: absolute;
height: 50px;
line-height: 50px;
}
}
|
2. カスタムカラー:ヘッダーメニューのスタイル修正
セレクタ名変更: welcart_basic-voll/inc/theme-customizer.php 1619行目
.mobile_menu{
background: none;
}
|
.mobile_menu_wrap{
background: none;
}
|
スタイル削除: welcart_basic-voll/style.css 2015行目
.mobile_menu_wrap {
background: none;
}
|
3. スマホメニューの開閉動作のバグ修正
コード修正: welcart_basic-voll/js/front-customized.js 3行目から34行目
$(window).on('load resize', function() {
var windowWidth = window.innerWidth;
var windowHeight = window.innerHeight;
var state = false;
var scrollpos;
var headerH = $('.fixed-box').outerHeight();
if ( windowWidth <= 1000 ) {
$('.mobile_menu').css('height', $('body').height() + 'px');
$('.mobile_menu_wrap').css('height', windowHeight + 'px');
var _touch = ('ontouchstart' in document) ? 'touchstart' : 'click';
$('.menu-trigger').on(_touch,function(){
$('.site').toggleClass('menu-on');
if(state == false) {
scrollpos = $(window).scrollTop();
$('body').addClass('body-fixed').css({'top': -scrollpos});
state = true;
} else {
$('body').removeClass('body-fixed').css({'top': 0});
window.scrollTo( 0 , scrollpos );
state = false;
}
});
} else {
$('.site').removeClass('menu-on');
$('.mobile_menu_wrap,.mobile_menu').css('height', '');
}
});
|
$(window).on('load resize', function() {
var windowWidth = window.innerWidth;
var windowHeight = window.innerHeight;
var state = false;
var scrollpos;
var _touch = ('ontouchstart' in document) ? 'touchstart' : 'click';
if ( windowWidth <= 1000 ) {
$('.mobile_menu').css('height', $('body').height() + 'px');
$('.mobile_menu_wrap').css('height', windowHeight + 'px');
$('.menu-trigger').on(_touch,function(){
if(state == false) {
scrollpos = $(window).scrollTop();
$('body').addClass('body-fixed').css({'top': -scrollpos});
state = true;
} else {
$('body').removeClass('body-fixed').css({'top': 0});
window.scrollTo( 0 , scrollpos );
state = false;
}
});
} else {
$('.mobile_menu_wrap,.mobile_menu').css('height', '');
}
});
|
コード修正: welcart_basic-voll/js/front-customized.js 3行目から34行目
$( document ).ready( function() {
var windowWidth = window.innerWidth;
if ( 1000 <= windowWidth ) {
var cat_over = $('.category-area .cat_box .over').outerHeight();
$('.category-area .cat_box .over').css('bottom', '-' + cat_over + 'px');
}
} );
|
$( document ).ready( function() {
var windowWidth = window.innerWidth;
var cat_over = $('.category-area .cat_box .over').outerHeight();
var _touch = ('ontouchstart' in document) ? 'touchstart' : 'click';
if ( 1000 <= windowWidth ) {
$('.category-area .cat_box .over').css('bottom', '-' + cat_over + 'px');
}
if ( windowWidth <= 1000 ) {
$('.menu-trigger').on(_touch,function(){
$('.site').toggleClass('menu-on');
});
} else {
$('.site').removeClass('menu-on');
}
} );
|
4. スマホメニューアイコンのサイズ変更
スタイル修正: welcart_basic-voll/style.css 278行目
.menu-bar {
position: absolute;
top: 1.785em;
left: 1.071em;
}
|
.menu-bar {
position: absolute;
top: 1.428em;
left: 1.071em;
}
|
スタイル修正: welcart_basic-voll/style.css 400行目
.menu-trigger {
position: relative;
width: 1.429em;
height: 1.429em;
cursor: pointer;
}
|
.menu-trigger {
position: relative;
width: 2.5em;
height: 1.786em;
cursor: pointer;
}
|
スタイル修正: welcart_basic-voll/style.css 418行目
.menu-trigger span:nth-of-type(2) {
top: 9px;
}
|
.menu-trigger span:nth-of-type(2) {
top: 12px;
}
|
スタイル修正: welcart_basic-voll/style.css 425行目
.menu-on .menu-trigger span:nth-of-type(1) {
top: -11px;
}
.menu-on .menu-trigger span:nth-of-type(3) {
bottom: -11px;
}
|
.menu-on .menu-trigger span:nth-of-type(1) {
top: -9px;
}
.menu-on .menu-trigger span:nth-of-type(3) {
bottom: -9px;
}
|
5. 業務パック割引を適用した場合の商品詳細ページのスタイル修正
セレクタ追加: welcart_basic-voll/inc/theme-customizer.php 1121行目
.item-info .itemGpExp,
.item-info .itemGpExp dt,
.item-info .itemGpExp dd,
|
6. Welcart Basic 1.2.5 にアップグレードした際のキャッチフレーズのスタイル調整
スタイル追加: welcart_basic-voll/style.css 245行目
.site-description {
min-height: auto;
}
|
7. 商品売り切れ時、商品お問い合わせフォームから送信したメール本文に商品名が記載されない不具合を修正
コード追加:welcart_basic-voll/js/front-customized.js 98行目あたり
( 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 );
|
ファイル修正:welcart_basic-voll/inc/front-customized.php 356行目
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;
}
}
|