[解決済み] Slide Showcaseについて

フォーラム 拡張プラグイン [解決済み] Slide Showcaseについて

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

    nanbu様

    お久しぶりです、毎日フォーラムをチェックして参考にさせて頂いております。

    質問なのですが、スライド・ショーケース拡張プラグイン Slide Showcaseを再度使用してみようと思うのですが、スライド・ショーケース拡張プラグイン Slide Showcaseは1列でスライドと言う形式ですがこれを、<?php wcex_slide_showcase( ‘welcart_1’ ); ?> 、<?php wcex_slide_showcase( ‘welcart_2’ ); ?>とコードを二つ並べるのでは無く

    <?php wcex_slide_showcase( ‘welcart_1’ ); ?>の1コードで商品を2列にカスタマイズする事は可能な物なのでしょうか?

    宜しくお願い致します。

    #62756
    nanbu
    キーマスター

    こんにちは。

    残念ながら、「Slide Showcase」は1行表示しかできません。

    カスタマイズも不可能かと思います。

    #62757
    ipd
    参加者

    nanbu様

    了解致しました。

    縦型にして対応する事に致しました。

    そこで問題なのですが、ループ有り、無しに関わらずNEXTで進めていくと商品が終わっても白い画面で進み続けるのです……商品の一覧が終わったらループするか、進めなくするにはどうしたら良いのでしょうか?

    #62758
    nanbu
    キーマスター

    テストしておりますが、そのような症状は確認できませんでした。

    まずはJavaScript にエラーがでていないか確認してみてください。

    また、他のプラグインを停止するなど、いろいろ試してみてください。

    #62759
    ipd
    参加者

    JavaScript にエラーは出ていませんでした。

    Slide ShowcaseとWekcart以外のプラグインを停止しても同じ症状です…

    良ければ現物をご覧の上ご確認下さい。

    http://www.gents-company.com/web-store/?cat=6

    戻るで進めるとループするんですが…

    縦型で2列にするためcssをいじってますがそれが原因になりますでしょうか?

    素晴らしいプラグインですので是非使用したいものでして…

    お忙しいと思いますが宜しくお願い致します。

    #62760
    ipd
    参加者

    最悪はループ有りでcssでNEXTボタン自体なくして戻るボタンだけでループさせて使う方法しか思いつきません…

    また、大変申し訳ないのですが、Item List Layoutでの売切れ表示をSlide Showcaseで同じ様にやるにはどのようなコードにしたら良いのか教えて頂けませんでしょうか、宜しくお願い致します。

    #62761
    nanbu
    キーマスター

    前にもお話いたしましたが、残念ながら、「Slide Showcase」は1行(1ライン)表示しかできません。スタイルシートで2段にしているのが原因かと思います。

    Slide Showcase には、slide_showcase_filter_list というフックが有ります。後はItem List Layout の時と同じ要領です。

    add_filter('slide_showcase_filter_list', 'my_showcase_filter_list', 10, 2);
    function my_showcase_filter_list($html, $post){

    $list = '<li><a href="' . get_permalink($post->ID) . '">' . usces_the_itemImage($number = 0, $width = 130, $height = 130, $post, 'return' ) . '<div class="thumtitle">' . esc_html(usces_the_itemName('return')) . '</div></a><div class="price">' . __('$', 'usces') . number_format(usces_the_firstPrice('return')) . $usces->getGuidTax() . '</div></li>' . "n";

    return $list;
    }

    #62762
    ipd
    参加者

    分かりました、ではNEXTボタン無くして対応致します。

    コードを置き換えたのですがエラーだらけで…

    下記部分は変更しなくて良いのでしょうか?

    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’;

    usces_have_skus();

    #62763
    nanbu
    キーマスター

    そのまま設置してみて頂けますか?

    #62764
    ipd
    参加者

    そのまま置き換えて下記コードを設置致しましたが売切れの商品が売切れと表示されません…

    エラーは出ておりませんが。

    <?php

    add_filter('slide_showcase_filter_list', 'my_showcase_filter_list', 10, 2);
    function my_showcase_filter_list($html, $post){
    $args = func_get_args();
    $post = $args[1];
    $opts = $args[2];
    $width = $opts['width'];
    $colum = $opts['colum'];
    $limargin = $opts['limargin'];
    $lipadding = $opts['lipadding'];
    $liborder = $opts['liborder'];
    $liwidth = ($width + $limargin) / $colum - $limargin - ($lipadding * 2) - ($liborder * 2);
    $liheight = $opts['liheight'] - $lipadding * 2;
    $txtheight = $opts['txtheight'];
    $imgwidth = $liwidth;
    $imgheight = $liheight - $txtheight;
    $border = $liborder ? '' : 'border:0px';
    usces_have_skus();

    $list = '
    <li><a>ID) . '">' . usces_the_itemImage($number = 0, $width = 130, $height = 130, $post, 'return' ) . '<div class="thumtitle">' . esc_html(usces_the_itemName('return')) . '</div></a><div class="price">' . __('$', 'usces') . number_format(usces_the_firstPrice('return')) . $usces->getGuidTax() . '<div class="zaiko">' . esc_html(!usces_have_zaiko_anyone() ? 'SOLD OUT' : ''). '</div></li>
    ' . "n";

    return $list;
    }
    ?>

    #62766
    nanbu
    キーマスター

    この様にしてください。

    add_filter('slide_showcase_filter_list', 'my_showcase_filter_list', 10, 2);
    function my_showcase_filter_list($html, $post){
    $list = '<li><a href="' . get_permalink($post->ID) . '">' . usces_the_itemImage($number = 0, $width = 130, $height = 130, $post, 'return' ) . '<div class="thumtitle">' . esc_html(usces_the_itemName('return')) . '</div></a><div class="price">' . __('$', 'usces') . number_format(usces_the_firstPrice('return')) . $usces->getGuidTax() . '</div></li>' . "n";
    return $list;
    }

    #62767
    ipd
    参加者

    置き換えましたが5行目でエラーがでてます…

    <?php
    add_filter('slide_showcase_filter_list', 'my_showcase_filter_list', 10, 2);
    function my_showcase_filter_list($html, $post){

    $html = '
    <li><a>ID) . '">' . usces_the_itemImage($number = 0, $width = 130, $height = 130, $post, 'return' ) . '<div class="thumtitle">' . esc_html(usces_the_itemName('return')) . '</div></a><div class="price">' . __('$', 'usces') . number_format(usces_the_firstPrice('return')) . $usces->getGuidTax() . '</div></li>
    ' . "n";

    return $list;
    }

    ?>

    usces_have_zaiko_anyone()などが有りませんがこれでも売切れた物のみ売切れを表示できるのですか??

    #62768
    nanbu
    キーマスター

    フィルター設置のようなカスタマイズも含めまして、プログラミングで大切なのは、うまく行かない時その原因がどこにあるかを的確に把握することです。

    ipd さんは今うまく行かない原因は何だと推測しますか?

    私が提示したコードに間違いがあるのでしょうか。それともipd さんが書き換えた部分に間違いがあるのでしょうか。

    実は私もどちらが原因なのか判りません。何故ならば、私が提示いたしましたコードをそのまま設置して、エラーが出たかどうかの回答をipd さんから戴いていないからです。

    次の手順をご説明したいので、私が提示いたしましたコードをそのまま設置してエラーが出るかどうかの回答をいただけますでしょうか。

    よろしくお願いいたします。

    #62769
    ipd
    参加者

    そのまま設置しましたら下記エラーが出ます。

    /functions.php on line 4

    #62770
    nanbu
    キーマスター

    ありがとうございます。

    では、この様にしてみていただけますでしょうか。

    add_filter('slide_showcase_filter_list', 'my_showcase_filter_list', 10, 2);
    function my_showcase_filter_list($html, $post){
    global $usces;
    $list = '<li><a href="' . get_permalink($post->ID) . '">' . usces_the_itemImage($number = 0, $width = 130, $height = 130, $post, 'return' ) . '<div class="thumtitle">' . esc_html(usces_the_itemName('return')) . '</div></a><div class="price">' . __('$', 'usces') . number_format(usces_the_firstPrice('return')) . $usces->getGuidTax() . '</div></li>' . "n";
    return $list;
    }

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