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

Welcart VOLL 1.0.2 をリリース

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

【変更点】

商品一覧ウィジェットが正しく動作しない不具合を修正

welcart_basic-voll/inc/front-customized.php 444行目~
add_filter( 'welcart_basic_filter_item_list', 'wcct_filter_item_list', 10 );
function wcct_filter_item_list( $html ){
        global $post;

        $html = '';
        $title   = empty( $instance['title'] ) ? '' : $instance['title'];
        $term_id = empty( $instance['term_id'] ) ? usces_get_cat_id( 'item' ) : $instance['term_id'];
        $number  = empty( $instance['number'] ) ? 10 : $instance['number'];
        
        $item_args = array(
            'cat'  => $term_id,
            'posts_per_page' => $number,
        ); 
        $item_query = new WP_Query( $item_args );
        if ( $item_query->have_posts() ) {
                if( !empty( $title ) ) {
                    echo $before_title . esc_html( $title ) . $after_title;
                }
                
                $html .= '<div class="item-list list-wrap grid cf">' . "\n";
                $html .= '<div class="grid-sizer"></div>' . "\n";
                while ( $item_query->have_posts() ) {
                    $item_query->the_post();
                    usces_the_item();
                    
                    $list = '';
                    
                    $list .= '<article class="grid-box" id="post-' . get_the_ID() . '">' . "\n" ;
                        
                        $list .= '<div class="inner item-info">' . "\n";
                            
                            $list .= wcct_get_produt_tag() . "\n";
                            $list .= '<div class="itemimg">' . "\n";
                                $list .= '<a href="' . get_permalink( get_the_ID() ) .'">' . "\n";
                                    $list .= usces_the_itemImage( 0, 300, 300, '', 'return' ) . "\n";
                                    if( wcct_get_options( 'display_soldout' ) && !usces_have_zaiko_anyone() ) {
                                        $list .= '<div class="itemsoldout">' . "\n";
                                            $list .= '<div class="text">' . "\n";
                                                $list .= __( 'SOLD OUT', 'welcart_basic_carina' ) . "\n";
                                                if( wcct_get_options( 'display_inquiry' ) ) {
                                                    $list .= '<span class="sub_text">' . wcct_get_options( 'display_inquiry_text' ) . '</span>' . "\n";
                                                }
                                            $list .= '</div>' . "\n";
                                        $list .= '</div>' . "\n";
                                    }
                                $list .= '</a>' . "\n";
                            $list .= '</div>' . "\n";
                            
                            $list .= get_welcart_basic_campaign_message() . "\n";

                            $list .= '<div class="itemname"><a href="' . get_permalink( get_the_ID() ) .'">' . usces_the_itemName( 'return' ) . '</a></div>' . "\n";

                            $list .= '<div class="itemprice">'.usces_crform( usces_the_firstPrice( 'return' ), true, false, 'return' ).usces_guid_tax('return').'</div>'."\n";
                        
                        $list .= '</div>' . "\n";
                    $list .= '</article>' . "\n";
                        
                    $html .= apply_filters( 'welcart_basic_filter_item_post', $list );
                }
                wp_reset_postdata();
                $html .= '</div>' . "\n";
    
        return $html;

    }

}
add_filter( 'welcart_basic_filter_item_list', 'wcct_filter_item_list', 10, 3 );
function wcct_filter_item_list( $html, $term_id, $number ) {
    $html = '';

    $item_args = array(
        'cat'  => $term_id,
        'posts_per_page' => $number,
    ); 
    $item_query = new WP_Query( $item_args );
    if ( $item_query->have_posts() ) {
        $html .= '<div class="item-list list-wrap grid cf">' . "\n";
        $html .= '<div class="grid-sizer"></div>' . "\n";
        while ( $item_query->have_posts() ) {
            $item_query->the_post();
            usces_the_item();
            $html .= '<article class="grid-box" id="post-' . get_the_ID() . '">' . "\n" ;
                $html .= '<div class="inner item-info">' . "\n";
                    $html .= wcct_get_produt_tag() . "\n";
                    $html .= '<div class="itemimg"><a href="' . get_permalink( get_the_ID() ) .'">' . usces_the_itemImage( 0, 300, 300, '', 'return' );
                        if( wcct_get_options( 'display_soldout' ) && !usces_have_zaiko_anyone() ) {
                            $html .= '<div class="itemsoldout"><div class="text">' . __( 'SOLD OUT', 'welcart_basic_carina' );
                                if( wcct_get_options( 'display_inquiry' ) ) {
                                    $html .= '<span class="sub_text">' . wcct_get_options( 'display_inquiry_text' ) . '</span>';
                                }
                            $html .= '</div></div>' . "\n";
                        }
                    $html .= '</a></div>' . "\n";
                    $html .= get_welcart_basic_campaign_message() . "\n";
                    $html .= '<div class="itemname"><a href="' . get_permalink( get_the_ID() ) .'">' . usces_the_itemName( 'return' ) . '</a></div>' . "\n";
                    $html .= '<div class="itemprice">'.usces_crform( usces_the_firstPrice( 'return' ), true, false, 'return' ).usces_guid_tax('return').'</div>'."\n";
                $html .= '</div>' . "\n";
            $html .= '</article>' . "\n";
        }
        $html .= '</div>' . "\n";
        wp_reset_postdata();
    }

    return $html;
}