Plugin Directory

Changeset 1599073


Ignore:
Timestamp:
02/19/2017 12:57:40 PM (9 years ago)
Author:
RPG84
Message:
  • You can now select within which fields you want to search in the item select screen
Location:
tradetracker-store
Files:
71 added
4 edited

Legend:

Unmodified
Added
Removed
  • tradetracker-store/trunk/Tradetracker-Store.php

    r1593738 r1599073  
    33* Plugin Name: Tradetracker-Store
    44* Plugin URI: http://wpaffiliatefeed.com
    5 * Version: 4.6.39
     5* Version: 4.6.40
    66* Description: A Plugin that will add a TradeTracker affiliate feed to your site with several options to choose from.
    77* Author: Robert Braam
  • tradetracker-store/trunk/front.php

    r1593738 r1599073  
    1717            $ttslidertheme = "base";
    1818        }
     19        wp_register_style( 'tt_slider_css', "//ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/themes/".$ttslidertheme."/jquery-ui.css");
     20        wp_enqueue_style( 'tt_slider_css');
    1921    }
    2022        if(get_option("Tradetracker_usecss") == "1"){
     
    2224            wp_enqueue_style( 'tt_store_css');
    2325        }
    24         wp_register_style( 'tt_slider_css', "//ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/themes/".$ttslidertheme."/jquery-ui.css");
    25         wp_enqueue_style( 'tt_slider_css');
    2626}     
    2727   
  • tradetracker-store/trunk/menu/itemselect.php

    r1584214 r1599073  
    350350        </div>
    351351        <div id="ttstoreboxoptions" style="max-height:<?php echo $adminheight; ?>px;">
    352     <?php echo "<form class=\"\" action=\"admin.php\" method=\"get\">
    353         <input type=\"hidden\" name=\"page\" value=\"tt-store\">
    354         <input type=\"hidden\" name=\"option\" value=\"itemselect\">
    355         <input type=\"hidden\" name=\"function\" value=\"select\">
    356         <input type=\"hidden\" name=\"multiid\" value=\"".$multiid."\">
    357         <input type=\"hidden\" name=\"limit\" value=\"".$limit."\">
    358         <input type=\"hidden\" name=\"order\" value=\"".$order."\">
    359         <input class=\"s\" type=\"text\" name=\"search\" value=\"\">
    360 
    361         <input class=\"searchsubmit\" type=\"submit\" title=\"search item\" value=\"Search\">
    362         </form>"; ?>
     352        <form class="" action="admin.php" method="get">
     353        <input type="hidden" name="page" value="tt-store">
     354        <input type="hidden" name="option" value="itemselect">
     355        <input type="hidden" name="function" value="select">
     356        <input type="hidden" name="multiid" value="<?php echo $multiid;?>">
     357        <input type="hidden" name="limit" value="<?php echo $limit;?>">
     358        <input type="hidden" name="order" value="<?php echo $order;?>">
     359        <input class="s" type="text" name="search" value="<?php echo $keyword;?>">
     360        <input type="checkbox" name="title" <?php if($_GET['title']=='yes'){ echo "checked=\"checked\""; }?> value="yes">title
     361        <input type="checkbox" name="description" <?php if($_GET['description']=='yes'){ echo "checked=\"checked\""; }?> value="yes">description
     362        <input type="checkbox" name="extra" <?php if($_GET['extra']=='yes'){ echo "checked=\"checked\""; }?> value="yes">extra fields
     363
     364        <input class="searchsubmit" type="submit" title="search item" value="Search">
     365        </form>
    363366<table width="<?php echo $adminwidth-30; ?>" border="0">
    364367    <tr>
     
    379382if(isset($_GET['search']) && $_GET['search']!=""){
    380383    $keyword = $_GET['search'];
    381     $visits=$wpdb->get_results("SELECT ".$ttstoretable.".*, ".$ttstorecattable.".categorieid, ".$ttstorecattable.".categorie FROM ".$ttstoretable.", ".$ttstorecattable." where ".$ttstorecattable.".productID = ".$ttstoretable.".productID and (MATCH(name,description) AGAINST ('$keyword'  IN BOOLEAN MODE) or `extravalue` LIKE '%$keyword%') ".$searchcategorieselect." ".$searchxmlfeed." group by ".$ttstoretable.".productID ORDER BY ".$order." ASC  LIMIT ".$currentpage.", ".$limit."");
     384    if($_GET['title']=='yes'){
     385        $searchtitle = "MATCH(name) AGAINST ('$keyword'  IN BOOLEAN MODE)";
     386    }
     387    if($_GET['description']=='yes'){
     388        if(isset($searchtitle)){
     389            $searchdescription = "or MATCH(description) AGAINST ('$keyword'  IN BOOLEAN MODE)";
     390        } else {
     391            $searchdescription = "MATCH(description) AGAINST ('$keyword'  IN BOOLEAN MODE)";
     392        }
     393    }
     394    if($_GET['extra']=='yes'){
     395        if(isset($searchtitle) || isset($searchdescription)){
     396            $searchextra = "or `extravalue` LIKE '%$keyword%'";
     397        } else {
     398            $searchextra = "or `extravalue` LIKE '%$keyword%'";
     399        }
     400    }
     401    $visits=$wpdb->get_results("SELECT ".$ttstoretable.".*, ".$ttstorecattable.".categorieid, ".$ttstorecattable.".categorie FROM ".$ttstoretable.", ".$ttstorecattable." where ".$ttstorecattable.".productID = ".$ttstoretable.".productID and (".$searchtitle." ".$searchdescription." ".$searchextra.") ".$searchcategorieselect." ".$searchxmlfeed." group by ".$ttstoretable.".productID ORDER BY ".$order." ASC  LIMIT ".$currentpage.", ".$limit."");
    382402} else {
    383403    if(isset($_GET['selected']) && $_GET['selected']=="yes"){
     
    490510                    $Tradetracker_extra_val = get_option("Tradetracker_extra");
    491511                    if(!empty($Tradetracker_extra_val)){
    492                         if(in_array($extra[extrafield], $Tradetracker_extra_val, true)) {
    493                             $extraname .= "<td><b>".$extra[extrafield]."</b></td>";
    494                             $extravar .= "<td>".$extra[extravalue]."</td>";
     512                        if(in_array($extra['extrafield'], $Tradetracker_extra_val, true)) {
     513                            $extraname .= "<td><b>".$extra['extrafield']."</b></td>";
     514                            $extravar .= "<td>".$extra['extravalue']."</td>";
    495515                        }
    496516                    }
  • tradetracker-store/trunk/readme.txt

    r1593738 r1599073  
    55Requires at least: 4
    66Tested up to: 4.7.2
    7 Stable tag: 4.6.39
     7Stable tag: 4.6.40
    88
    99A plugin that lets you import an XML productfeed from TradeTracker.
     
    4242
    4343== Changelog ==
    44 = 4.6.38 =
     44= 4.6.40 =
     45- You can now select within which fields you want to search in the item select screen
     46
     47= 4.6.39 =
    4548- If you deselect a category while you have selected items then it will only display the items of the remaining selected categories.
    4649
Note: See TracChangeset for help on using the changeset viewer.