WCEX SKU Selectのカスタマイズについて

フォーラム 拡張プラグイン WCEX SKU Selectのカスタマイズについて

  • このトピックには5件の返信、3人の参加者があり、最後にbrjにより6年、 7ヶ月前に更新されました。
6件の投稿を表示中 - 1 - 6件目 (全6件中)
  • 投稿者
    投稿
  • #83615
    brj
    参加者

    ——————————————-
    WordPress のバージョン:(4.8.1)
    Welcart のバージョン:(1.9.3)
    Welcart専用の拡張プラグイン:(例 DLSeller、Mobileなど)
    ご利用のテーマ:(welthemesのwalden)
    症状を確認したブラウザ:safari
    サーバー:(ロリポップ)
    SSLの利用:(あり)
    WordPress のパーマリンク設定:(/%category%/%postname%.html)
    ——————————————–

    お世話になっております。
    welthemesのwaldenというテーマを利用しています。
    http://demo4.welthemes.com

    WCEX SKU Selectを購入し導入したいと思っていたのですが、オリジナルテーマを利用している場合、設定が必要なんだそうなんです。
    https://www.welcart.com/docs/SkuSelect/themes.html#themes2-2

    どうしてもうまくいきません…
    ご教授頂けましたら幸いです。よろしくお願いいたします。

    <?php
    /**
     * <meta content="charset=UTF-8">
     * @package Welcart
     * @subpackage Welcart walden theme
     */
    get_header();
    ?>
    <div class="two-column itemsingle clearfix">
    <div class="catbox">
    
    <?php if (have_posts()) : the_post(); ?>
    
    <div> id="post-<?php the_ID(); ?>">
    
    <div class="storycontent">
    
    <?php usces_remove_filter(); ?>
    <?php usces_the_item(); ?>
    <?php usces_have_skus(); ?>
    
    <div>
    
    <div class="alpha">
    
     <script language="javascript">
      $(document).ready(
      function (){
      $("#itemgallery").PikaChoose({carousel:true,transition:[0]});
      });
     </script>
     		
     <div class="pikachoose">
     	<ul id="itemgallery" class="jcarousel-skin-pika">
     	<li><?php usces_the_itemImage(0, 750, 480, $post); ?></li>
     	<?php $imageid = usces_get_itemSubImageNums(); ?>
     	<?php foreach ( $imageid as $id ) : ?>
     	<li><?php usces_the_itemImage($id, 750, 480, $post); ?></li>
     	<?php endforeach; ?>
     	</ul>
     </div>
     
    </div><!-- .alpha-->
    <div class="beta">	
     
     <?php if(usces_sku_num() === 1) : usces_have_skus(); ?>
     <!--1SKU(SKUを1つしかもたない時の表示)-->
      <div class="text-section">
      <h1 class="item_page_title"><?php the_title(); ?></h1>
     		<div class="exp">
     		<?php the_content(); ?>
     		<?php if( $item_custom = usces_get_item_custom( $post->ID, 'list', 'return' ) ) : ?>
     		<div class="field">
     			<?php echo $item_custom; ?>
     		</div>
     		<?php endif; ?>
     	</div><!-- end of exp -->
      </div>
     	
     	<section class="orderitem">
     	
     	<div class="stockstatus">
     		<?php if( usces_the_itemCprice('return') > 0 ) : ?>
     		<dl>
     			<dt class="field_name"><?php _e('List price', 'usces'); ?><?php usces_guid_tax(); ?></dt>
     			<dd class="field_cprice"><span class="ss_cprice"><?php usces_the_itemCpriceCr(); ?></span></dd>
     		</dl>
     		<?php endif; ?>
     		<dl>
     			<dt class="field_name"><?php _e('selling price', 'usces'); ?><?php usces_guid_tax(); ?></dt>
     			<dd class="field_price"><span class="ss_cprice"><?php usces_the_itemPriceCr(); ?></span></dd>
     		</dl>
     		<dl>
      		<dt class="field_name"><?php _e('stock status', 'usces'); ?></dt>
      		<dd><span class="ss_stockstatus"><?php usces_the_itemZaiko(); ?></span></dd>
     		</dl>
     		
     		<?php if( $item_custom = usces_get_item_custom( $post->ID, 'list', 'return' ) ) : ?>
     		<div class="field"><?php echo $item_custom; ?></div>
     		<?php endif; ?>
     	</div>
     	
     	<div class="actionform">
      	<form action="<?php echo USCES_CART_URL; ?>" method="post">
      	<?php //usces_the_itemGpExp(); ?>
      	<div class="skuform">
        <?php wcex_sku_select_form(); ?>
        <div class="wcss_loading"></div>
      	<?php if (usces_is_options()) : ?>
      		<table class='skusingle'>
      		<?php while (usces_have_options()) : ?>
      			<tr><th><?php usces_the_itemOptName(); ?></th><td><?php usces_the_itemOption(usces_getItemOptName(),''); ?></td></tr>
      		<?php endwhile; ?>
      		</table>
      	<?php endif; ?>
      	<?php if( !usces_have_zaiko() ) : ?>
      		<div class="zaiko_status"><?php echo apply_filters('usces_filters_single_sku_zaiko_message', __('Sold Out', 'usces')); ?></div>
      	<?php else: ?>
      		<div class="addtocart"><?php _e('Quantity', 'usces'); ?><?php usces_the_itemQuant(); ?><?php usces_the_itemSkuUnit(); ?><?php usces_the_itemSkuButton(__('Add to Shopping Cart', 'usces'), 0); ?></div>
      		<div class="error_message"><?php usces_singleitem_error_message($post->ID, usces_the_itemSku('return')); ?></div>
        <?php endif; ?>
      	</div><!-- end of skuform -->
      	<?php echo apply_filters('single_item_single_sku_after_field', NULL); ?>
      	<?php do_action('usces_action_single_item_inform'); ?>
      	</form>    
     	</div>
     	</section><!-- end of action-section -->
     	
     	
     <?php elseif(usces_sku_num() > 1) : usces_have_skus(); ?>
     <?php //else: ?>
     <!--some SKU(複数のSKUを持っている場合:SKUごとに注文番号やオプション、価格、カートに入れるボタンを表示します)-->
      <div class="text-section">
       <h1 class="item_page_title"><?php usces_the_itemName(); ?></h1>
      	<div class="exp">
      		<?php the_content(); ?>
      		<?php if( $item_custom = usces_get_item_custom( $post->ID, 'list', 'return' ) ) : ?>
      		<div class="field">
      			<?php echo $item_custom; ?>
      		</div>
      		<?php endif; ?>
      	</div><!-- end of exp -->
      </div>
     
     
     <section class="orderitem">
     <form action="<?php echo USCES_CART_URL; ?>" method="post">
     	
     <div class="skuform">
     <?php wcex_sku_select_form(); //追記?>
     <div class="wcss_loading"></div>
    
     <?php do { ?>
     <div class="skumultibox clearfix"> 
    
     <h3><?php usces_the_itemSkuDisp(); ?><span>注文番号<?php usces_the_itemSku(); ?></span></h3>
     <div class="stockstatus">
       <?php if( usces_the_itemCprice('return') > 0 ) : ?>
       <dl>
         <dt class=""><?php _e('List price', 'usces'); ?><?php usces_guid_tax(); ?></dt>
         <dd class="field_cprice"><span class="ss_cprice"><?php usces_the_itemCpriceCr(); ?></span></dd>
       </dl>
       <?php endif; ?>			
       <dl>
         <dt class=""><?php _e('selling price', 'usces'); ?><?php usces_guid_tax(); ?></dt>
         <dd class="field_price"><span class="ss_price"><?php usces_the_itemPriceCr(); ?></span></dd>
       </dl>
       <dl>
         <dt class=""><?php _e('stock status', 'usces'); ?></dt>
         <dd class=""><span class="ss_stockstatus"><?php usces_the_itemZaiko(); ?></span></dd>
       </dl>
     </div>
     	
     <div class="actionform">
     	
     			<?php if (usces_is_options()) : ?>
     					<table class='item_option'>
     			<?php while (usces_have_options()) : ?>
     						<tr>
     							<th><?php usces_the_itemOptName(); ?></th>
     							<td><?php usces_the_itemOption(usces_getItemOptName(),''); ?></td>
     						</tr>
     			<?php endwhile; ?>
     					</table>
     		<?php endif; ?>
     	
       <div class="zaiko_status itemsoldout"><span class="ss_stockstatus"><?php echo apply_filters('usces_filters_single_sku_zaiko_message', esc_html(usces_get_itemZaiko( 'name' ))); ?></span></div>
       <div class="zaiko_status itemsoldout"><span class="ss_stockstatus"><?php echo apply_filters('usces_filters_single_sku_zaiko_message', __('Sold Out', 'usces')); ?></span></div>
       <div class="c-box"><?php _e('Quantity', 'usces'); ?><?php usces_the_itemQuant(); ?><?php usces_the_itemSkuUnit(); ?><?php usces_the_itemSkuButton(__('Add to Shopping Cart', 'usces'), 0); ?></div>
       <div class="addtocart"><?php _e('Quantity', 'usces'); ?> <?php usces_the_itemQuant(); ?><?php usces_the_itemSkuUnit(); ?><?php usces_the_itemSkuButton(__('Add to Shopping Cart', 'usces'), 0); ?></div> 
       <?php //endif; ?>
       <p class="error"><?php usces_singleitem_error_message($post->ID, usces_the_itemSku('return')); ?></p>
     </div>
     
     </div><!-- skumultibox -->
     <?php } while (usces_have_skus()); ?>
     	
     	
     	</div><!-- end of skuform -->
     	<?php echo apply_filters('single_item_multi_sku_after_field', NULL); ?>
     	<?php do_action('usces_action_single_item_inform'); ?>
     	</form>
     	</section>
     <?php endif; ?>
      
     <?php usces_assistance_item( $post->ID, __('An article concerned', 'usces') ); ?>
    
    </div><!-- end of beta -->
    
    </div><!-- end of itemspage -->
    </div><!-- end of storycontent -->
    </div>
    
    <?php else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>
    
    </div><!-- end of catbox -->
    
    <div class="relatedbox">
    <h3>You may also like</h3>
    <div class="clearfix thumbindex">
    <?php related_items_list(); ?>
    </div>
    </div><!-- end of relatedbox -->
    
    </div><!-- end of content -->
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>
    #83667
    nanbu
    キーマスター

    こんにちは

    そのコードは wc_item_single.php テンプレートかと思います。それを修正するのはハードルが高いのではないかと思います。ドキュメントにあります通り、wc_templatesフォルダ内に、WCEX SKU Selectに同梱されているwc_sku_select.phpを置いて、それでスタイルを調整していくやり方が良いかと思います。

    #83668
    brj
    参加者

    そうでした。。。申し訳ありません。。。ご指摘ありがとうございます!
    wc_sku_select.phpを今現在設置はしているのですが全く機能していない状態です。
    もしお時間ありましたらご確認よろしくお願いいたします。

    <?php
    /**
    * <meta content=”charset=UTF-8″>
    * @package Welcart
    * @subpackage Welcart walden theme
    */
    get_header();
    ?>

    <?php if (have_posts()) : the_post(); ?>

    id=”post-<?php the_ID(); ?>”>

    <?php usces_remove_filter(); ?>
    <?php usces_the_item(); ?>
    <?php usces_have_skus(); ?>

    <script language=”javascript”>
    $(document).ready(
    function (){
    $(“#itemgallery”).PikaChoose({carousel:true,transition:[0]});
    });
    </script>

    <ul id=”itemgallery” class=”jcarousel-skin-pika”>

  • <?php usces_the_itemImage(0, 750, 480, $post); ?>
  • <?php $imageid = usces_get_itemSubImageNums(); ?>
    <?php foreach ( $imageid as $id ) : ?>

  • <?php usces_the_itemImage($id, 750, 480, $post); ?>
  • <?php endforeach; ?>

    <!– .alpha–>

    <?php if(usces_sku_num() === 1) : usces_have_skus(); ?>
    <!–1SKU(SKUを1つしかもたない時の表示)–>

    <h1 class=”item_page_title”><?php the_title(); ?></h1>

    <?php the_content(); ?>
    <?php if( $item_custom = usces_get_item_custom( $post->ID, ‘list’, ‘return’ ) ) : ?>

    <?php echo $item_custom; ?>

    <?php endif; ?>

    <!– end of exp –>

    <section class=”orderitem”>

    <?php if( usces_the_itemCprice(‘return’) > 0 ) : ?>
    <dl>
    <dt class=”field_name”><?php _e(‘List price’, ‘usces’); ?><?php usces_guid_tax(); ?></dt>
    <dd class=”field_cprice”><span class=”ss_cprice”><?php usces_the_itemCpriceCr(); ?></span></dd>
    </dl>
    <?php endif; ?>
    <dl>
    <dt class=”field_name”><?php _e(‘selling price’, ‘usces’); ?><?php usces_guid_tax(); ?></dt>
    <dd class=”field_price”><span class=”ss_cprice”><?php usces_the_itemPriceCr(); ?></span></dd>
    </dl>
    <dl>
    <dt class=”field_name”><?php _e(‘stock status’, ‘usces’); ?></dt>
    <dd><span class=”ss_stockstatus”><?php usces_the_itemZaiko(); ?></span></dd>
    </dl>

    <?php if( $item_custom = usces_get_item_custom( $post->ID, ‘list’, ‘return’ ) ) : ?>

    <?php echo $item_custom; ?>

    <?php endif; ?>

    <form action=”<?php echo USCES_CART_URL; ?>” method=”post”>
    <?php //usces_the_itemGpExp(); ?>

    <?php wcex_sku_select_form(); ?>

    <?php if (usces_is_options()) : ?>
    <table class=’skusingle’>
    <?php while (usces_have_options()) : ?>
    <tr><th><?php usces_the_itemOptName(); ?></th><td><?php usces_the_itemOption(usces_getItemOptName(),”); ?></td></tr>
    <?php endwhile; ?>
    </table>
    <?php endif; ?>
    <?php if( !usces_have_zaiko() ) : ?>

    <?php echo apply_filters(‘usces_filters_single_sku_zaiko_message’, __(‘Sold Out’, ‘usces’)); ?>

    <?php else: ?>

    <?php _e(‘Quantity’, ‘usces’); ?><?php usces_the_itemQuant(); ?><?php usces_the_itemSkuUnit(); ?><?php usces_the_itemSkuButton(__(‘Add to Shopping Cart’, ‘usces’), 0); ?>
    <?php usces_singleitem_error_message($post->ID, usces_the_itemSku(‘return’)); ?>

    <?php endif; ?>

    <!– end of skuform –>
    <?php echo apply_filters(‘single_item_single_sku_after_field’, NULL); ?>
    <?php do_action(‘usces_action_single_item_inform’); ?>
    </form>

    </section><!– end of action-section –>

    <?php elseif(usces_sku_num() > 1) : usces_have_skus(); ?>
    <?php //else: ?>
    <!–some SKU(複数のSKUを持っている場合:SKUごとに注文番号やオプション、価格、カートに入れるボタンを表示します)–>

    <h1 class=”item_page_title”><?php usces_the_itemName(); ?></h1>

    <?php the_content(); ?>
    <?php if( $item_custom = usces_get_item_custom( $post->ID, ‘list’, ‘return’ ) ) : ?>

    <?php echo $item_custom; ?>

    <?php endif; ?>

    <!– end of exp –>

    <section class=”orderitem”>
    <form action=”<?php echo USCES_CART_URL; ?>” method=”post”>

    <?php wcex_sku_select_form(); //追記?>

    <?php do { ?>

    <h3><?php usces_the_itemSkuDisp(); ?><span>注文番号<?php usces_the_itemSku(); ?></span></h3>

    <?php if( usces_the_itemCprice(‘return’) > 0 ) : ?>
    <dl>
    <dt class=””><?php _e(‘List price’, ‘usces’); ?><?php usces_guid_tax(); ?></dt>
    <dd class=”field_cprice”><span class=”ss_cprice”><?php usces_the_itemCpriceCr(); ?></span></dd>
    </dl>
    <?php endif; ?>
    <dl>
    <dt class=””><?php _e(‘selling price’, ‘usces’); ?><?php usces_guid_tax(); ?></dt>
    <dd class=”field_price”><span class=”ss_price”><?php usces_the_itemPriceCr(); ?></span></dd>
    </dl>
    <dl>
    <dt class=””><?php _e(‘stock status’, ‘usces’); ?></dt>
    <dd class=””><span class=”ss_stockstatus”><?php usces_the_itemZaiko(); ?></span></dd>
    </dl>

    <?php if (usces_is_options()) : ?>
    <table class=’item_option’>
    <?php while (usces_have_options()) : ?>
    <tr>
    <th><?php usces_the_itemOptName(); ?></th>
    <td><?php usces_the_itemOption(usces_getItemOptName(),”); ?></td>
    </tr>
    <?php endwhile; ?>
    </table>
    <?php endif; ?>

    <span class=”ss_stockstatus”><?php echo apply_filters(‘usces_filters_single_sku_zaiko_message’, esc_html(usces_get_itemZaiko( ‘name’ ))); ?></span>
    <span class=”ss_stockstatus”><?php echo apply_filters(‘usces_filters_single_sku_zaiko_message’, __(‘Sold Out’, ‘usces’)); ?></span>
    <?php _e(‘Quantity’, ‘usces’); ?><?php usces_the_itemQuant(); ?><?php usces_the_itemSkuUnit(); ?><?php usces_the_itemSkuButton(__(‘Add to Shopping Cart’, ‘usces’), 0); ?>
    <?php _e(‘Quantity’, ‘usces’); ?> <?php usces_the_itemQuant(); ?><?php usces_the_itemSkuUnit(); ?><?php usces_the_itemSkuButton(__(‘Add to Shopping Cart’, ‘usces’), 0); ?>

    <?php //endif; ?>
    <p class=”error”><?php usces_singleitem_error_message($post->ID, usces_the_itemSku(‘return’)); ?></p>

    <!– skumultibox –>
    <?php } while (usces_have_skus()); ?>

    <!– end of skuform –>
    <?php echo apply_filters(‘single_item_multi_sku_after_field’, NULL); ?>
    <?php do_action(‘usces_action_single_item_inform’); ?>
    </form>
    </section>
    <?php endif; ?>

    <?php usces_assistance_item( $post->ID, __(‘An article concerned’, ‘usces’) ); ?>

    <!– end of beta –>

    <!– end of itemspage –>

    <!– end of storycontent –>

    <?php else: ?>
    <p><?php _e(‘Sorry, no posts matched your criteria.’); ?></p>
    <?php endif; ?>

    <!– end of catbox –>

    <h3>You may also like</h3>

    <?php related_items_list(); ?>

    <!– end of relatedbox –>

    <!– end of content –>

    <?php get_sidebar(); ?>

    <?php get_footer(); ?>

    • この返信は6年、 7ヶ月前にwelcartが編集しました。
    #83671
    welcart
    キーマスター

    表示が壊れておりましたのでblockquoteを入れさせていただきました。

    #83672
    nanbu
    キーマスター

    申し訳ございませんが、そのコードを見ても原因を特定することができません。
    SKUSelectは、ajaxを使用していますので、JavaScriptにエラーが有ると動作しません。

    wc_sku_select.phpを編集する前に、まずは動作するかどうかを確認する必要があります。まだ編集する前のwc_sku_select.phpで動作しない場合は、そのテンプレート以外に原因があると考えられます。

    原因を切り分けていく必要があるかと思います。

    #83674
    brj
    参加者

    お返事ありがとうございます!
    原因は様々あるということですね…

    「JavaScript」や「編集する前のwc_sku_select.phpで動作確認」をしてみたほうが良いということですね。
    ありがとうございます!
    真っ暗だった道が少し見えてきました。
    頑張ります。

6件の投稿を表示中 - 1 - 6件目 (全6件中)
  • このトピックに返信するにはログインが必要です。