「usces_the_item」の検索結果
-
検索結果
-
WordPress のバージョン:3.8
Welcart のバージョン:1.2.10.2
お世話になります。
thumbnail_boxに表示される商品名の文字数を制限したいのですが、
どのようにすればよいのでしょうか?
下コード部分に関数を入れるとは思うのですが、どのようにすればよいか
わかりません。お手数ですが、お教えいただけますようお願い致します。
(例えば、15文字まで表示したい。後は・・・となるようにする)
<div class="thumtitle">" rel="bookmark"><?php usces_the_itemName(); ?></div>
理想のサンプルとしての画像を添付致します。初歩的な質問で申し訳ありませんが、宜しくお願い致します。
[attachment=17696,329]
トピック: [解決済み] カートを非表示
動作に関するご質問の場合は必ずご記入ください。
WordPress のバージョン:3.8
Welcart のバージョン: 1.3.10.2
ご利用のテーマ:オリジナル
症状を確認したブラウザ:
サーバー(会社名、サービス名):IE10
SSLの利用: 無し WordPress のパーマリンク設定:
はじめまして。
カートを非表示にしたく、こちらのページにたどり着きました。
過去に似たような質問があり試行錯誤をしながら試しておりますが、うまく反映されません。
試みた事(
wc_item_single.phpより以下(usces_the_itemSkuButton)を削除
58行目~82行目まで削除
168行目~175行目まで削除
他にすべき点があれば教えて頂けないでしょうか。
トピック: ループ以外で商品名を取得
動作に関するご質問の場合は必ずご記入ください。
WordPress のバージョン:3.7.1
Welcart のバージョン:1.3.9
ご利用のテーマ:デフォルト
症状を確認したブラウザ:
サーバー(会社名、サービス名):ロリポップ
SSLの利用: 共用SSL
WordPress のパーマリンク設定:
お世話になっております
商品詳細ページでパンくずリストを表示させようと思っていますが、
商品名を表示させるタグが、usces_the_itemName()しか見つけることが
できません。
内容を見るとループ処理内で使用とあり思い通りの結果になりませんでした。
投稿IDから商品名のみを表示させるタグありましたら、教えてください。
トピック: [解決済み] 商品一覧ページでのSKU画像表示
動作に関するご質問の場合は必ずご記入ください。
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; ?>トピック: [未解決] is_item_zaikoでエラー
動作に関するご質問の場合は必ずご記入ください。
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"> </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 -->トピック: [解決済み] 売り切れ表示のカスタマイズについて
動作に関するご質問の場合は必ずご記入ください。
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初心者です、よろしくお願いします!
初めまして。
いつもお世話になっております。
現在サイトのトップページに商品一覧を表示して、
usces_direct_intoCart を使用して直接カートに入れられるようにしています。以下コードです。
<?php usces_direct_intoCart($post->ID,usces_the_itemSku(‘return’)); ?>
出力されるボタンは
“Add To Cart”
と表示されますが、このボタンのvalueの値を変更することは可能でしょうか?
具体的には
“カートに入れる”
と表示させたいと希望しています。
どうぞよろしくお願い致します。
動作に関するご質問の場合は必ずご記入ください。
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’); ?>
以上の事を行いました。
初歩的な質問ですが、よろしくお願いします。