Re: [解決済み] 商品一覧ページに売切の表示を出したいのですが。

フォーラム 拡張プラグイン [解決済み] 商品一覧ページに売切の表示を出したいのですが。 Re: [解決済み] 商品一覧ページに売切の表示を出したいのですが。

#62607
ipd
参加者

nanbu様ありがとうございます!!

下記の様に書いたら完璧でした!、ですが売り切れになっている商品も在庫ありの表示になってしまいます…どうしてでしょうか?…これはフィルターフックの問題では有りませんよね…

文字も赤にできません…

質問ばかりで申し訳有りません。

<?php

add_filter(‘item_list_layout_filter_list’, ‘my_item_list_layout_filter_list’, 10, 3);

function my_item_list_layout_filter_list(){

global $usces;

$args = func_get_args();

$post = $args[1];

$opts = $args[2];

$width = $opts;

$colum = $opts;

$limargin = $opts;

$lipadding = $opts;

$liborder = $opts;

$liwidth = ($width + $limargin) / $colum – $limargin – ($lipadding * 2) – ($liborder * 2);

$liheight = $opts – $lipadding * 2;

$txtheight = $opts;

$imgwidth = $liwidth;

$imgheight = $liheight – $txtheight;

$border = $liborder ? ” : ‘border:0px’;

$list = ‘<li id=”ill_li” class=”item_list_layout_li” style=”text-align: center; overflow: hidden; display: block; float: left; padding:’.$lipadding.’px; width:’.$liwidth.’px; height:’.$liheight.’px; margin-right:’.$limargin.’px; margin-bottom:’.$limargin.’px; ‘.$border.'”>ID) . ‘”>’ . usces_the_itemImage(0, $imgwidth, $imgheight, $post, ‘return’ ) . ‘<div class=”thumtitle”>’ . esc_html(usces_the_itemName(‘return’)) . ‘</div><div class=”price”>’ . __(‘$’, ‘usces’) . number_format(usces_the_firstPrice(‘return’)) . $usces->getGuidTax() . ‘</div><div class=”exp”>’ . $excerpt . ‘</div><div class=”zaiko”>’ . esc_html(usces_the_itemZaiko(‘return’)) . ” . “”;

return $list;

}

?>