「usces_the_item」の検索結果

フォーラム 検索 「usces_the_item」の検索結果

15件の結果を表示中 - 286 - 300件目 (全529件中)
  • 投稿者
    検索結果
  • Oka
    参加者

    WordPress のバージョン:3.8

    Welcart のバージョン:1.2.10.2


    お世話になります。

    thumbnail_boxに表示される商品名の文字数を制限したいのですが、

    どのようにすればよいのでしょうか?

    下コード部分に関数を入れるとは思うのですが、どのようにすればよいか

    わかりません。お手数ですが、お教えいただけますようお願い致します。

    (例えば、15文字まで表示したい。後は・・・となるようにする)

    <div class="thumtitle">" rel="bookmark"><?php usces_the_itemName(); ?></div>

    理想のサンプルとしての画像を添付致します。初歩的な質問で申し訳ありませんが、宜しくお願い致します。

    [attachment=17696,329]

    #68114

    返信が含まれるトピック: [解決済み] カートを非表示

    yskysmr
    キーマスター

    こんにちは。

    デフォルトテーマの wc_item_single.php を、既に修正されていますでしょうか。デフォルトでは、175行目が存在しません。

    「(usces_the_itemSkuButton)を削除」とのことですが、wc_item_single.php では usces_the_itemSkuButton が 2回出現します。単一 SKU の場合と、複数 SKU の場合です。

    また、wc_item_single.php にはこれらの条件分岐が複雑に入っていますので、ソースを削除される場合は、条件分岐の整合性に十分に気をつけてください。

    #58560

    トピック: [解決済み] カートを非表示

    フォーラム内 使い方全般
    kiyo0333
    参加者

    動作に関するご質問の場合は必ずご記入ください。


    WordPress のバージョン:3.8

    Welcart のバージョン: 1.3.10.2

    ご利用のテーマ:オリジナル

    症状を確認したブラウザ:

    サーバー(会社名、サービス名):IE10

    SSLの利用: 無し WordPress のパーマリンク設定:


    はじめまして。

    カートを非表示にしたく、こちらのページにたどり着きました。

    過去に似たような質問があり試行錯誤をしながら試しておりますが、うまく反映されません。

    試みた事(

    wc_item_single.phpより以下(usces_the_itemSkuButton)を削除

    58行目~82行目まで削除

    168行目~175行目まで削除

    他にすべき点があれば教えて頂けないでしょうか。

    #67624
    eott
    参加者

    >>スマホのカートボタンのソースが間違っているようです。

    との事ですが、ソースというのは

    <?php usces_the_itemSkuButton(__(‘Add to Shopping Cart’, ‘usces’), 0); ?>”>

    の事でしょうか。

    PC用テーマとスマホ用テーマのカートボタンのソースは同じものを使用しており、確認してみましたが間違いを発見できませんでした。

    お手数ですが、改めてご教授いただけると幸いです。

    ちなみにサイトURLは変更になり、

    http://unsound.info/

    となっております。

    #67969
    TK
    参加者

    yskysmr様

    ご返事ありがとうございます。

    自分なりに見よう見まねでフィルターフックを試行錯誤してみたのですが、残念ながらクリア出来ませんでした。見当違いでしたらお恥ずかしいのですが、一応ソース記載します。

    お忙しいところすみませんが、お手本ご教授頂ければ幸いです。

    宜しくお願いいたします。

    //Item list layout 販売価格が¥0だったら¥-と表示させる
    add_filter('item_list_layout_filter_list_price','custom_item_list_layout_filter_list_price');
    function custom_item_list_layout_filter_list_price($price){
    if (usces_the_itemPrice('return') == 0 ){
    $price = '¥-';
    return $price;
    }
    }

    #56793

    トピック: ループ以外で商品名を取得

    フォーラム内 使い方全般
    mint1414
    参加者

    動作に関するご質問の場合は必ずご記入ください。


    WordPress のバージョン:3.7.1

    Welcart のバージョン:1.3.9

    ご利用のテーマ:デフォルト

    症状を確認したブラウザ:

    サーバー(会社名、サービス名):ロリポップ

    SSLの利用: 共用SSL

    WordPress のパーマリンク設定:


    お世話になっております

    商品詳細ページでパンくずリストを表示させようと思っていますが、

    商品名を表示させるタグが、usces_the_itemName()しか見つけることが

    できません。

    内容を見るとループ処理内で使用とあり思い通りの結果になりませんでした。

    投稿IDから商品名のみを表示させるタグありましたら、教えてください。

    #56314
    kent0312
    参加者

    動作に関するご質問の場合は必ずご記入ください。


    WordPress のバージョン:3.6

    Welcart のバージョン:1.37

    ご利用のテーマ:デフォルトテーマをカスタム

    症状を確認したブラウザ:firefox(mac)

    サーバー(会社名、サービス名):xserver

    SSLの利用: 共用SSL

    WordPress のパーマリンク設定:/%category%/%postname%/


    素晴らしいプラグイン、ありがとうございます。

    いつもお世話になっております。

    現在、商品一覧ページを作成しております。

    「商品一覧から直接カートへ入れたい」のトピックを参考に、

    複数skuがある商品は別々に表示させ、それぞれカートに入れるという仕様になっております。

    さらに、複数skuのある商品画像をSKUコードと紐づけてそれぞれ別の画像を表示させるようにしたいと思っています。

    そこで、ガイド本を参考に、bks_the_itemImageという関数を作成しました。

    以下function.phpに書き込んだ内容

    function bks_the_itemImage($ptitle = NULL, $width = 100, $height = 100, $out ='') {
    global $usces;

    if( empty($ptitle) )
    return;

    $picposts = query_posts(array('post_type'=>'attachment','name'=>$ptitle));
    if( empty($picposts) )
    return;

    $pictid = $picposts[0]->ID;
    $html = wp_get_attachment_image( $pictid, array($width, $height), false );

    if($out == 'return'){
    return $html;
    }else{
    echo $html;
    }
    }

    表示させたい場所に記載する内容

    <?php bks_the_itemImage(usces_the_itemSku('return'), 150, 150); ?>

    これで、商品詳細ページではskuごとの画像を表示させることが出来たのですが、

    商品一覧ページで同じことをすると、"複数skuを表示した商品"以降の商品が表示されなくなってしまいます。

    解決法がわかりましたら、ご教授頂ければと思います。

    以下長いですがコードです。以下コードで表示させた結果が添付の商品画像①です。

    以下コード内、複数SKUのループ部分の

    <?php usces_the_itemImage(0, 150, 150); ?>

    <?php bks_the_itemImage(usces_the_itemSku('return'), 150, 150); ?>

    に置き換えると 添付の商品一覧②のような状態になります。

    複数SKUごとのSKU画像は表示されるのですが、その後の商品が表示されなくなります。

    複数SKUの商品は 1行目右端2つのコリアンダーパウダーです。

    <?php if (have_posts()) : ?>
    <div class="item-wrap">
    <?php while (have_posts()) : the_post(); ?>
    <?php usces_remove_filter(); ?>
    <?php usces_the_item(); ?>
    <?php if(usces_sku_num() === 1) : usces_have_skus(); ?>
    <div class="itembox">
    <?php if ( !usces_have_zaiko_anyone() ) : ?>
    <div class="itemimg sold"><a href="<?php the_permalink() ?>"><?php usces_the_itemImage(0, 150, 150); ?></a></div>
    <h2 id="post-<?php the_ID(); ?>" class="itemtitle"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf( esc_attr__( 'Permalink to %s', 'uscestheme' ), the_title_attribute( 'echo=0' ) ); ?>"><?php the_title(); ?></a></h2>
    <p class="itemsku">内容量:<?php usces_the_itemSkuDisp(); ?></p>
    <p class="itemprice"><?php usces_the_itemPriceCr(); ?><?php usces_guid_tax(); ?></p>
    <div class="soldout">SOLD OUT</div>
    <p class="linktxt"><a href="<?php the_permalink() ?>">more info...</a></p>
    <?php else : ?>
    <div class="itemimg"><a href="<?php the_permalink() ?>"><?php usces_the_itemImage(0, 150, 150); ?></a></div>
    <h2 id="post-<?php the_ID(); ?>" class="itemtitle"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf( esc_attr__( 'Permalink to %s', 'uscestheme' ), the_title_attribute( 'echo=0' ) ); ?>"><?php the_title(); ?></a></h2>
    <p class="itemsku">内容量:<?php usces_the_itemSkuDisp(); ?></p>
    <p class="itemprice"><?php usces_the_itemPriceCr(); ?><?php usces_guid_tax(); ?></p>
    <?php
    usces_the_item();
    usces_have_skus()
    ?>
    <?php usces_direct_intoCart($post->ID,usces_the_itemSku('return'), false, 'カートへ入れる'); ?>
    <p class="linktxt"><a href="<?php the_permalink() ?>">more info...</a></p>
    <?php endif; ?>
    </div><!-- end of item-box -->

    <?php elseif(usces_sku_num() > 1) : usces_have_skus(); ?>
    <?php do { ?>
    <div class="itembox">
    <?php if( !usces_have_zaiko() ) : ?>
    <div class="itemimg sold"><a href="<?php the_permalink() ?>"><?php bks_the_itemImage(usces_the_itemSku('return'), 150, 150); ?></a></div>
    <h2 id="post-<?php the_ID(); ?>" class="itemtitle"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf( esc_attr__( 'Permalink to %s', 'uscestheme' ), the_title_attribute( 'echo=0' ) ); ?>"><?php the_title(); ?></a></h2>
    <p class="itemsku">内容量:<?php usces_the_itemSkuDisp(); ?></p>
    <p class="itemprice"><?php usces_the_itemPriceCr(); ?><?php usces_guid_tax(); ?></p>
    <div class="soldout">SOLD OUT</div>
    <p class="linktxt"><a href="<?php the_permalink() ?>">more info...</a></p>
    <?php else : ?>
    <div class="itemimg"><a href="<?php the_permalink() ?>"><?php usces_the_itemImage(0, 150, 150); ?></a></div>
    <h2 id="post-<?php the_ID(); ?>" class="itemtitle"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf( esc_attr__( 'Permalink to %s', 'uscestheme' ), the_title_attribute( 'echo=0' ) ); ?>"><?php the_title(); ?></a></h2>
    <p class="itemsku">内容量:<?php usces_the_itemSkuDisp(); ?></p>
    <p class="itemprice"><?php usces_the_itemPriceCr(); ?><?php usces_guid_tax(); ?></p>
    <?php usces_direct_intoCart($post->ID,usces_the_itemSku('return'), false, 'カートへ入れる'); ?>
    <p class="linktxt"><a href="<?php the_permalink() ?>">more info...</a></p>
    <?php endif; ?>
    </div><!-- end of item-box -->
    <?php } while (usces_have_skus()); ?>
    <?php endif; ?>

    <?php endwhile; ?>
    <?php else : ?>
    <div id="post-0" class="post error404 not-found">
    <h2 class="entry-title"><?php _e( 'Not Found', 'uscestheme' ); ?></h2>
    <div class="entry-content">
    <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'uscestheme' ); ?></p>
    <?php get_search_form(); ?>
    </div><!-- .entry-content -->
    </div><!-- #post-0 -->

    <?php endif; ?>

    #55310

    トピック: [未解決] is_item_zaikoでエラー

    フォーラム内 バグ報告
    mint1414
    参加者

    動作に関するご質問の場合は必ずご記入ください。


    WordPress のバージョン:3.6.1

    Welcart のバージョン:1.3.5

    ご利用のテーマ:Welcart_Default

    症状を確認したブラウザ:Chrome

    サーバー(会社名、サービス名):

    SSLの利用: 無し | 専用SSL | 共用SSL

    WordPress のパーマリンク設定:


    お世話になります。

    商品詳細ページ(wc_item_single.php)を下記のように変更したところ、

    エラーが出るようになってしまいました。

    「Warning: trim() expects parameter 1 to be string, array given in G:InstantWP_4.3.1iwpserverhtdocswordpresswp-contentpluginsusc-e-shopclassesusceshop.class.php on line 6116」

    上記は、ローカルのエラーですが本番環境でも同様にエラーを確認しています。

    そこで、上記ファイルを確認すると、

    function is_item_zaiko( $post_id, $sku )内の、$zaiko_num = trim($this->getItemZaikoNum($post_id, $sku));

    でエラーになっていると考えて、trim関数をはずしたらエラーは

    出なくなったのですが、根本的な解決になっていないと思いますので

    どうぞよろしくお願いいたします。

    <wc_item_single.php変更分>

    <div id="content">
    <div id="frame3">
    <div id="plist">
    <ul><li><a href="<?php echo home_url(); ?>/">HOME</a></li>
    <?php $cats = get_ordered_category();?>
    <?php foreach ($cats as $cat):?>
    <?php if ($cat -> parent != 0 && $cat -> parent !=17) {?>
    <li>></li>
    <li><?php echo $cat -> name;?></li>
    <?php }?>
    <?php endforeach; ?>
    </ul>
    </div><!-- end of plist -->

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

    <div class="item_img">
    <a href="<?php the_permalink(); ?>" rel="<?php usces_the_itemImageURL(0); ?>" class="zoom"><?php /*usces_the_itemImage(0, 600, 500);*/ ?><img src="<?php usces_the_itemImageURL(1); ? />" /></a>
    <div class="item_thumimg">
    <?php $imageid = usces_get_itemSubImageNums(); ?>
    <?php foreach ( $imageid as $id ) : ?>
    <a href="<?php usces_the_itemImageURL($id); ?>" <?php echo apply_filters('usces_itemimg_anchor_rel', NULL); ?>><img src="<?php usces_the_itemImageURL($id); ? />" /></a>
    <?php endforeach; ?>
    </div><!-- end of .item_thumimg -->
    </div><!-- end of .item_img -->

    <div class="storycontent">

    <?php usces_remove_filter(); ?>
    <?php usces_the_item(); ?>
    <div id="item_page1">
    <div class="top1">
    <p class="item_name"><?php usces_the_itemName(); ?></p>
    <?php if(usces_sku_num() > 0) : usces_have_skus(); ?>
    <!-- <div class="exp clearfix"> -->
    <!-- <div class="field"> -->
    <!-- 販売価格がある場合は、販売価格を表示・ない場合は定価を表示 -->
    <?php if( usces_the_itemPrice('return') > 0 ) : ?>
    <div class="item_nameprice"><?php usces_the_itemPriceCr(); ?><?php usces_guid_tax(); ?></div>
    <?php else: ?>
    <div class="item_nameprice"><?php usces_the_itemCpriceCr(); ?><?php usces_guid_tax(); ?></div>
    <?php endif; ?>

    <!-- </div> -->
    <div class="field"><?php /*_e('stock status', 'usces'); ?> : <?php usces_the_itemZaikoStatus();*/ ?></div>
    <div class="contents">
    <?php remove_filter ('the_content', 'wpautop'); ?>
    <p class="contentcolor"><?php the_content(); ?></p>
    </div><!-- end of .contents -->
    <!-- </div><!-- end of exp -->
    <?php endif; ?>
    </div><!-- end of .top1 -->
    </div><!-- end of #item_page1 -->
    <?php else: ?>
    <div id="item_page1">
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    </div><!-- end of #item_page1 -->
    <?php endif; ?>

    <?php if(usces_sku_num() === 1) : usces_have_skus(); ?>
    <!--1SKU-->
    <div id="item_page2">
    <div class="top1"></div>
    <?php if( $item_custom = usces_get_item_custom( $post->ID, 'list', 'return' ) ) : ?>
    <div class="contents">
    <div class="field"><?php echo $item_custom; ?></div>
    </div><!-- end of .contents -->
    <?php endif; ?>
    <form action="<?php echo USCES_CART_URL; ?>" method="post">
    <?php usces_the_itemGpExp(); ?>
    <div class="skuform" align="right">
    <?php if (usces_is_options()) : ?>
    <table class='item_option'>
    <caption><?php _e('Please appoint an option.', 'usces'); ?></caption>
    <?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', esc_html(usces_get_itemZaiko( 'name' ))); ?></div>
    <?php else: ?>
    <div style="margin-top:10px"><?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>
    <?php do_action('usces_action_single_item_outform'); ?>
    </div><!-- end of #item_page2 -->
    <?php elseif(usces_sku_num() > 1) : usces_have_skus(); ?>
    <!--some SKU-->
    <div id="item_page2">
    <div class="top1"></div>
    <?php if( $item_custom = usces_get_item_custom( $post->ID, 'list', 'return' ) ) : ?>
    <div class="contents">
    <div class="field"><?php echo $item_custom; ?></div>
    </div><!-- end of .contents -->
    <?php endif; ?>
    <form action="<?php echo USCES_CART_URL; ?>" method="post">
    <div class="skuform">
    <table class="skumulti">
    <thead>
    <tr>
    <th rowspan="2" class="thborder"><?php _e('order number', 'usces'); ?></th>
    <th colspan="2"><?php _e('Title', 'usces'); ?></th>
    <?php if( usces_the_itemCprice('return') > 0 ) : ?>
    <th colspan="2">(<?php _e('List price', 'usces'); ?>)<?php _e('selling price', 'usces'); ?><?php usces_guid_tax(); ?></th>
    <?php else : ?>
    <th colspan="2"><?php _e('selling price', 'usces'); ?><?php usces_guid_tax(); ?></th>
    <?php endif; ?>
    </tr>
    <tr>
    <th class="thborder"><?php _e('stock status', 'usces'); ?></th>
    <th class="thborder"><?php _e('Quantity', 'usces'); ?></th>
    <th class="thborder"><?php _e('unit', 'usces'); ?></th>
    <th class="thborder">&nbsp;</th>
    </tr>
    </thead>
    <tbody>
    <?php do { ?>
    <tr>
    <td rowspan="2"><?php usces_the_itemSku(); ?></td>
    <td colspan="2" class="skudisp subborder"><?php usces_the_itemSkuDisp(); ?>
    <?php if (usces_is_options()) : ?>
    <table class='item_option'>
    <caption><?php _e('Please appoint an option.', 'usces'); ?></caption>
    <?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; ?>
    </td>
    <td colspan="2" class="subborder price">
    <?php if( usces_the_itemCprice('return') > 0 ) : ?>
    <span class="cprice">(<?php usces_the_itemCpriceCr(); ?>)</span>
    <?php endif; ?>
    <span class="price"><?php usces_the_itemPriceCr(); ?></span>
    <br /><?php usces_the_itemGpExp(); ?>
    </td>
    </tr>
    <tr>
    <td class="zaiko"><?php usces_the_itemZaikoStatus(); ?></td>
    <td class="quant"><?php usces_the_itemQuant(); ?></td>
    <td class="unit"><?php usces_the_itemSkuUnit(); ?></td>
    <?php if( !usces_have_zaiko() ) : ?>
    <td class="button"><?php echo apply_filters('usces_filters_multi_sku_zaiko_message', esc_html(usces_get_itemZaiko( 'name' ))); ?></td>
    <?php else : ?>
    <td class="button"><?php usces_the_itemSkuButton(__('Add to Shopping Cart', 'usces'), 0); ?></td>
    <?php endif; ?>
    </tr>
    <tr>
    <td colspan="5" class="error_message"><?php usces_singleitem_error_message($post->ID, usces_the_itemSku('return')); ?></td>
    </tr>

    <?php } while (usces_have_skus()); ?>
    </tbody>
    </table>
    </div><!-- end of skuform -->
    <?php echo apply_filters('single_item_multi_sku_after_field', NULL); ?>
    <?php do_action('usces_action_single_item_inform'); ?>
    </form>
    <?php do_action('usces_action_single_item_outform'); ?>
    </div><!-- end of #item_page2 -->
    <?php endif; ?>
    <?php usces_assistance_item( $post->ID, __('An article concerned', 'usces') ); ?>

    </div><!-- end of .storycontent -->
    </div><!-- end of #frame3 -->
    </div><!-- end of content -->

    #54647
    keigo
    参加者

    動作に関するご質問の場合は必ずご記入ください。


    WordPress のバージョン:3.6.1

    Welcart のバージョン:1.3.4

    ご利用のテーマ:hipster

    症状を確認したブラウザ:Firfox

    サーバー(会社名、サービス名):さくらスタンダード

    SSLの利用: 無し | 専用SSL | 共用SSL

    WordPress のパーマリンク設定:


    ご教授ください。

    既存の質問のHTMLの変更はやってはみたものの

    商品一覧にて売り切れ表示が出ず、アイテムページに

    入らないと在庫があるのかどうかを確認できない状態です。

    <div class=”clearfix rcmnd”>

    <?php $reco_ob = new wp_query(array(‘category_name’=>’itemreco’, ‘posts_per_page’=>8, ‘post_status’=>’publish’)); ?>

    <?php if ($reco_ob->have_posts()) : while ($reco_ob->have_posts()) : $reco_ob->the_post(); usces_the_item(); ?>

    <div class=”thumbnail_box”>

    <div class=”thumimg”>“><?php usces_the_itemImage($number = 0, $width = 290, $height = 400 ); ?></div>

    <div class=”thumtitle”>” rel=”bookmark”><?php usces_the_itemName(); ?></div>

    <?php if (usces_is_skus()) : ?>

    <div class=”price”><?php usces_crform( usces_the_firstPrice(‘return’), true, false ); ?></div>

    <?php endif; ?>

    </div>

    <?php endwhile; else: ?>

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

    <?php endif; wp_reset_query(); ?>

    </div>

    を具体的どうすれば良いのか教えてください。

    Welcart初心者です、よろしくお願いします!

    #67574
    yasumax
    キーマスター

    「usces_the_itemSkuButton 」のことですか?

    それとも「usces_direct_intoCart」のことですか?

    どちらのことでしょうか?

    「usces_direct_intoCart」でしたら下記トピックをご参照ください。

    https://www.welcart.com/forum/topic.php?id=3375

    #67477
    yasumax
    キーマスター

    こんにちは。

    <?php usces_direct_intoCart($post->ID, usces_the_itemSku('return'), false, 'カートへ入れる'); ?>

    上記のように第4引数に表示したい文章をいれてください。

    #53462
    kent0312
    参加者

    初めまして。

    いつもお世話になっております。

    現在サイトのトップページに商品一覧を表示して、

    usces_direct_intoCart を使用して直接カートに入れられるようにしています。以下コードです。

    <?php usces_direct_intoCart($post->ID,usces_the_itemSku(‘return’)); ?>

    出力されるボタンは

    “Add To Cart”

    と表示されますが、このボタンのvalueの値を変更することは可能でしょうか?

    具体的には

    “カートに入れる”

    と表示させたいと希望しています。

    どうぞよろしくお願い致します。

    #67476
    orrly
    参加者

    ループ内に<?php usces_the_item(); usces_have_skus() ?>を追加し

    ボタンを表示したい場所に下記を追加した所

    <?php usces_direct_intoCart($post->ID, usces_the_itemSku(‘return’)); ?>

    思ったとおりの動きになりました。

    もう一点質問なのですが、usces_direct_intoCartで追加されたボタンの文言が

    Add to cartと表示されていて、これを変更したいのですが

    どこを編集したらいいのでしょうか?

    #67541
    kaichi
    参加者

    自己解決できました.

    以下のように global $post; の後に、 usces_have_skus(); を追加するとOKになりました.

    これは、同書籍のページ182「在庫状態やカート投入ボタンを表示させる」の項目を学習していた際に気付きました.

    お騒がせしました.

    ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー

    /* 商品名、商品コード、価格、在庫ステータスなどを表示させたい ************/

    add_filter( ‘usces_filter_item_list_loopimg’, ‘my_filter_item_list_informations’, 11, 2);

    function my_filter_item_list_informations($html, $content){

    global $post;

    usces_have_skus();

    $item_name = usces_the_itemName(‘return’);

    $item_code = usces_the_itemCode(‘return’);

    $item_zaiko = usces_the_itemZaikoStatus(‘return’);

    $item_price = usces_the_firstPriceCr(‘return’);

    $html = ‘<div class=”loopimg”>

    ID) . ‘”>’ . usces_the_itemImage(0, 200, 200, $post, ‘return’) . ‘

    </div>

    <div class=”item_information”>

    商品名  :<span class=”item_name”>’ . esc_html($item_name) . ‘</span>

    商品コード:<span class=”item_code”>’ . esc_html($item_code) . ‘</span>

    在庫状態 :<span class=”item_zaiko”>’ . esc_html($item_zaiko) . ‘</span>

    販売価格 :<span class=”item_price”>’ . $item_price . ‘</span>

    </div>

    <div class=”loopexp”>

    <div class=”field”>’ . $content . ‘</div>

    </div>

    ‘;

    return $html;

    }

    #53052
    orrly
    参加者

    動作に関するご質問の場合は必ずご記入ください。


    WordPress のバージョン:3.6

    Welcart のバージョン:1.3.5

    ご利用のテーマ:welcartデフォルト

    症状を確認したブラウザ:firefox

    サーバー(会社名、サービス名):Xサーバー

    SSLの利用: 共用SSL

    WordPress のパーマリンク設定:/archives/%post_id%


    カテゴリーページに価格とカートに入れる機能を追加をしたのですが

    カートに入れるを押してカート画面へ遷移すると

    商品名は正しく入力されているのですが、値段が0円になってしまい困っています。

    さらに在庫以上の個数を入力して、カートに入れるを押しても遷移出来てしまいます。

    以下は現在までに行った工程です。

    archive.phpをコピーしcategory.phpを作成し

    値段表示を追加

    <div class=”price” align=”right”>¥<?php usces_the_firstPrice(); ?><?php usces_guid_tax(); ?></div>

    商品詳細ページからカートに入れるの機能をコピー

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

    <?php usces_the_itemGpExp(); ?>

    <div class=”skuform” align=”right”>

    <?php if (usces_is_options()) : ?>

    <table class=’item_option’>

    <caption><?php _e(‘Please appoint an option.’, ‘usces’); ?></caption>

    <?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’, esc_html(usces_get_itemZaiko( ‘name’ ))); ?></div>

    <?php else : ?>

    <div style=”margin-top:10px”><?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>

    <?php do_action(‘usces_action_single_item_outform’); ?>

    以上の事を行いました。

    初歩的な質問ですが、よろしくお願いします。

15件の結果を表示中 - 286 - 300件目 (全529件中)