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

Welcart Mode 1.0.2 をリリース

Welcart Mode 1.0.2 をリリースしました。


[更新内容]

  • 税別価格での「総額表示」修正

    Welcart Mode 1.0.2では、2021年4月1日より義務化される商品の「総額表示」の修正をおこなっております。当サイトのマイページより最新のテーマをダウンロードしていただき、運営されている WordPress の管理画面よりアップデートを行ってください。
    ※ 税別価格で総額を表示させる場合には、Welcart のバージョンも 2.1.4 以降をご利用いただく必要がございます。

  • 「業務パック割引」のレイアウト崩れ修正
  • ウィジェットカートをサイドバーに設置した際のポイントの2重表示の修正

アップデートが行えない場合

Welcart Mode 本体をカスタマイズされている場合は、下記の修正内容をもとにテンプレート・CSS の修正をおこなってください。

商品詳細ページの表示

売価の税込価格表示テンプレートタグの追加

usces_crform_the_itemPriceCr_taxincluded

タグ追加
welcart_mode/wc_templates/wc_item_single.php 168行目
welcart_mode/wc_templates/wc_item_single_data.php 174行目
welcart_mode/wc_templates/wc_item_single_service.php 170行目

<div class="field_price">
    <?php if ( usces_the_itemCprice( 'return' ) > 0 ) : ?>
        <span class="field_cprice"><?php usces_the_itemCpriceCr(); ?></span>
    <?php endif; ?>
    <?php usces_the_itemPriceCr(); ?><?php usces_guid_tax(); ?>
</div>
<?php usces_crform_the_itemPriceCr_taxincluded(); ?>

レイアウト調整

スタイル追加: style.css 387行目

.rightnum.tax {
    font-size: inherit;
}
/* -- .tax_inc_block -- */
.tax_inc_block {
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'sans-serif';
}

スタイル追加: usces_cart.css 153行目

.is-product .add-to-cart .skuimg + .is-cart .field_price {
    float: none;
    margin-top: 2px;
}
/* ---- .tax_inc_block ---- */
.is-product .add-to-cart .tax_inc_block {
    float: left;
    margin: -8px 0 8px;
    font-size: 12px;
    width: 100%;
}
.is-product .add-to-cart .skuimg + .is-cart .tax_inc_block {
    float: none;
    width: auto;
}
.is-product .add-to-cart .tax_inc_block em {
    margin-right: 3px;
}

WCEX SKU Select の対応

売価の税込価格表示テンプレートタグの追加

wcex_sku_select_crform_the_itemPriceCr_taxincluded

タグ追加
welcart_mode/wc_templates/wc_sku_select.php 156行目
welcart_mode/wc_templates/wc_sku_select.php 153行目

<div class="field_price">
<?php if( usces_the_itemCprice('return') > 0 ) : ?>
    <span class="field_cprice ss_cprice"><?php usces_the_itemCpriceCr(); ?></span>
<?php endif; ?>
    <span class="sell_price ss_price"><?php usces_the_itemPriceCr(); ?></span><?php usces_guid_tax(); ?>
    <span class="wcss_loading"></span>
</div>
<?php wcex_sku_select_crform_the_itemPriceCr_taxincluded(); ?>

WCEX Auto Delivery の対応

売価の税込価格表示テンプレートタグの追加

wcad_crform_the_itemPriceCr_taxincluded

タグ追加: welcart_mode/inc/welcart/customized.php 338行目

<div class="field_price">
<?php if( usces_the_itemCprice('return') > 0 ) : ?>
    <span class="field_cprice"><?php usces_the_itemCpriceCr(); ?></span>
<?php endif; ?>
    <?php wcad_the_itemPriceCr(); ?><?php usces_guid_tax(); ?>
</div>
<?php wcad_crform_the_itemPriceCr_taxincluded(); ?>

WCEX Auto Delivery + WCEX SKU Select の対応

売価の税込価格表示テンプレートタグの追加

wcex_sku_select_crform_the_itemRPriceCr_taxincluded

タグ追加: welcart_mode/inc/welcart/customized.php 432行目

<div class="field_price">
<?php if( usces_the_itemCprice('return') > 0 ) : ?>
    <span class="field_cprice ss_cprice_regular"><?php usces_the_itemCpriceCr(); ?></span>
<?php endif; ?>
    <span class="sell_price ss_price_regular"><?php wcad_the_itemPriceCr(); ?></span><?php usces_guid_tax(); ?><span class="wcss_loading"></span>
</div>
<?php wcex_sku_select_crform_the_itemRPriceCr_taxincluded(); ?>

商品一覧

売価の税込価格表示テンプレートタグの追加

usces_crform_the_itemPriceCr_taxincluded

タグ追加: welcart_mode/template_parts/loop/product.php 38行目
トップページ / 商品一覧ページ / 検索結果ページ / 複合検索結果ページ

<?php if ( in_array( 'item-name', $item_cont ) ) : ?>
<h2><?php usces_the_itemName(); ?></h2>
<?php endif; ?>
<div class="price"><?php usces_the_firstPriceCr(); ?><?php usces_guid_tax(); ?></div>
<?php usces_crform_the_itemPriceCr_taxincluded(); ?>

レイアウト調整

スタイル追加: assets/css/extension-class.css 97行目

.column-grid .list .price {
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'sans-serif';
    font-size: 12px;
    margin-top: 4px;
}
/* ---- .tax_inc_block ---- */
.column-grid .list .tax_inc_block {
    font-size: 11px;<br />
}
.column-grid .list .tax_inc_block em {
    margin-right: 3px;
    font-size: 11px;<br />
}

関連商品

タグ追加: welcart_mode/inc/welcart/customized.php 203行目

$str .= '<div class="info">';
    $str .= '<h4>' . usces_the_itemName( 'return' ) . '</h4>';
    $str .= '<div class="price">' . usces_the_firstPriceCr( 'return' ) . usces_guid_tax( 'return' ) . '</div>';
    $str .= usces_crform_the_itemPriceCr_taxincluded( true, '', '', '', true, false, true, 'return' );
$str .= '</div>';

スタイル追加: usces_cart.css 554行目

.assistance_item li .price {
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'sans-serif';
    font-size: 13px;
    margin-top: 4px;
}
/* -- .tax_inc_block -- */
.assistance_item li .tax_inc_block {
    font-size: 11px;<br />
}
.assistance_item li .tax_inc_block em {
    margin-right: 3px;
    font-size: 11px;<br />
}

ウィジェット

「Welcart 商品一覧」ウィジェット

レイアウト調整

スタイル追加: assets/css/secondary.css 64行目

.secondary .column-grid .list .price {
    font-size: 12px;
    line-height: 1;
}
.secondary .column-grid .list .tax_inc_block {
    margin-top: 3px;
}

「ベストセラー」ウィジェット

売価の税込価格表示テンプレートタグの追加

usces_crform_itemPriceCr_taxincluded

タグ追加: welcart_mode/inc/welcart/customized.php 263行目

$list .= '<div class="name">' . usces_the_itemName( 'return', $post ) . '</div>' . "\n";
$list .= '<div class="price">' . usces_the_firstPriceCr( 'return', $post ) . usces_guid_tax('return') . '</div>' . "\n";
$list .= usces_crform_itemPriceCr_taxincluded( $post_id );
if( ! usces_have_zaiko_anyone( $post_id ) ) {
    $list .= '<div class="itemsoldout">' . __( 'Soldout' ) . '</div>' . "\n";
}

レイアウト調整

スタイル追加: assets/css/secondary.css 64行目

.secondary .widget_welcart_bestseller li .price {
    margin-top: 4px;
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'sans-serif';
    font-size: 12px;
    line-height: 1;
}
.secondary .widget_welcart_bestseller .tax_inc_block {
    margin-top: 3px;
    font-size: 11px;
}
.secondary .widget_welcart_bestseller .tax_inc_block em {
    margin-right: 3px;
    font-size: 11px;
}

スタイル追加: assets/css/front-page.css 253行目

.section-home.widget_welcart_bestseller li .price,
.section-home.widget_welcart_featured li .price {
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'sans-serif';
    font-size: 13px;
    margin-top: 4px;
}
/* -- .tax_inc_block -- */
.section-home.widget_welcart_bestseller li .tax_inc_block,
.section-home.widget_welcart_featured li .tax_inc_block {
    font-size: 12px;
}
.section-home.widget_welcart_bestseller li .tax_inc_block em,
.section-home.widget_welcart_featured li .tax_inc_block em {
    margin-right: 3px;
}

「おすすめ商品」ウィジェット

売価の税込価格表示テンプレートタグの追加

usces_crform_itemPriceCr_taxincluded

タグ追加: welcart_mode/inc/welcart/customized.php 234行目

$list .= '<div class="name">' . usces_the_itemName( 'return', $post ) . '</div>' . "\n";
$list .= '<div class="price">' . usces_the_firstPriceCr( 'return', $post ) . usces_guid_tax('return') . '</div>' . "\n";
$list .= usces_crform_itemPriceCr_taxincluded( $post_id );
if( ! usces_have_zaiko_anyone( $post_id ) ) {
    $list .= '<div class="itemsoldout">' . __( 'Soldout' ) . '</div>' . "\n";
}

レイアウト調整

スタイル追加: assets/css/secondary.css 104行目

.secondary .widget_welcart_featured li .price {
    margin-top: 4px;
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'sans-serif';
    font-size: 12px;
    line-height: 1;
}
.secondary .widget_welcart_featured .tax_inc_block {
    margin-top: 3px;
    font-size: 11px;
}
.secondary .widget_welcart_featured .tax_inc_block em {
    margin-right: 3px;
    font-size: 11px;
}

コーディネート

タグ追加: welcart_mode/inc/coordinates/src/Models/AssociatedSkus.php 25行目

private $totalPrice = 0;
/**
 * Total units price of all associated SKUs
 *
 * @var int
 */
private $totalPrice_taxincluded = 0;

タグ追加: welcart_mode/inc/coordinates/src/Models/AssociatedSkus.php 95行目

if ( ( isset( $usces->options['tax_display'] ) && 'deactivate' == $usces->options['tax_display'] ) || ( isset( $usces->options['tax_mode'] ) && 'include' == $usces->options['tax_mode'] ) ) {
    $price_taxincluded = 0;
} else {
    $tax_rate = $this->get_sku_tax_rate( $sku_post_id, $values['code'] );
    $tax = (float) sprintf( '%.3f', (float) $values['price'] * (float) $tax_rate / 100 );
    $tax = usces_tax_rounding_off( $tax );
    $this->totalPrice_taxincluded += (int) $values['price'] + $tax;
    $price_taxincluded = (int) $values['price'] + $tax;
}

タグ追加: welcart_mode/inc/coordinates/src/Models/AssociatedSkus.php 117行目

'price' => (int)$values['price'],
'price_taxincluded' => $price_taxincluded,
'unit' => $values['unit'],

タグ追加: welcart_mode/inc/coordinates/src/Models/AssociatedSkus.php 195行目

/**
* Returns total units price of all associated SKUs
*
* @author Evan D Shaw <evandanielshaw@gmail.com>
* @return int
*/
public function getTotalPrice_taxincluded() {
    return $this->totalPrice_taxincluded;
}
/**
 * Get the applicable tax rate
 *
 * @param  int    $post_id Post ID.
 * @param  string $sku SKU Code.
 * @return int
 */
public function get_sku_tax_rate( $post_id, $sku ) {
    global $usces;
    $skus = $usces->get_skus( $post_id, 'code' );
    if ( isset( $skus[ $sku ]['taxrate'] ) ) {
        $applicable_taxrate = $skus[ $sku ]['taxrate'];
    } else {
        $applicable_taxrate = 'standard';
    }
    if ( 'reduced' == $applicable_taxrate ) {
        $tax_rate = $usces->options['tax_rate_reduced'];
    } else {
        $tax_rate = $usces->options['tax_rate'];
    }
    return $tax_rate;
}

タグ追加: welcart_mode/inc/coordinates/src/template-functions.php 37行目

if ( 0 < $meta->getTotalPrice_taxincluded() ) {
    $totalPrice_taxincluded = apply_filters( 'welcart_mode_filter_coordinate_sku_totalprice_taxincluded', '<p class="tax_inc_block">(<em class="tax tax_inc_label">' . __( 'tax-included', 'usces' ) . '</em>' . $usces->get_currency( $meta->getTotalPrice_taxincluded(), true, false ) . ')</p>', $meta->getTotalPrice_taxincluded() );
}

タグ追加: welcart_mode/inc/coordinates/src/template-functions.php 45行目

<dt><?php _e('Total Price', 'welcart_mode'); ?></dt>
<dd><?php echo esc_html($totalPrice); ?><em><?php echo $tax; ?></em><?php echo $totalPrice_taxincluded; ?></dd>

タグ追加: welcart_mode/inc/coordinates/src/template-functions.php 73行目

<?php
    if ( isset( $sku['price_taxincluded'] ) && $sku['price_taxincluded'] > 0 ) :
        $price_taxincluded = apply_filters( 'welcart_mode_filter_coordinate_sku_price_taxincluded', '<p class="tax_inc_block">(<em class="tax tax_inc_label">' . __( 'tax-included', 'usces' ) . '</em>' . $usces->get_currency( $sku['price_taxincluded'], true, false ) . ')</p>', $sku['price_taxincluded'] );
        echo $price_taxincluded;
    endif;
?>
<nav class="item_link">

ショートコード

売価の税込価格表示テンプレートタグの追加

usces_crform_the_itemPriceCr_taxincluded

タグ追加: welcart_mode/inc/welcart/shortcode.php 67行目

$retHtml     .= '<div class="info">' . "\n";
    $retHtml     .= '<h2>' . usces_the_itemName( 'return' ) . '</h2>' . "\n";
    $retHtml     .= '<div class="price">' . usces_the_firstPriceCr( 'return' ) . usces_guid_tax( 'return' ) . '</div>' . "\n";
    $retHtml     .= usces_crform_the_itemPriceCr_taxincluded( true, '', '', '', true, false, true, 'return' );
$retHtml     .= '</div>' . "\n";