Plugin Directory

Changeset 2000173


Ignore:
Timestamp:
12/22/2018 08:28:32 AM (7 years ago)
Author:
RPG84
Message:

4.6.48

  • Removed the search in extra fields in item select, mainly because it causes too much issues.
  • Counter for amount of items found should be accurate now in item select search results.
Location:
tradetracker-store
Files:
71 added
3 edited

Legend:

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

    r1996856 r2000173  
    33* Plugin Name: Tradetracker-Store
    44* Plugin URI: http://wpaffiliatefeed.com
    5 * Version: 4.6.47
     5* Version: 4.6.48
    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/menu/itemselect.php

    r1996856 r2000173  
    218218    if(isset($_GET['search']) && $_GET['search'] !=""){
    219219        $keyword = $_GET['search'];
     220            if($_GET['title']=='yes'){
     221        $searchtitle = "and CONVERT(`name` USING utf8) LIKE '%$keyword%'";
     222    }
     223    if($_GET['description']=='yes'){
     224        if(isset($searchtitle)){
     225            $searchdescription = "or CONVERT(`description` USING utf8) LIKE '%$keyword%'";
     226        } else {
     227            $searchdescription = "and CONVERT(`description` USING utf8) LIKE '%$keyword%'";
     228        }
     229    }
    220230        $searchlink = "&search=".$keyword;
    221         $countquery=$wpdb->get_row("SELECT COUNT(DISTINCT ".$ttstoretable.".productID) as cnt FROM (".$ttstoretable.", ".$ttstorecattable.") left join ".$ttstoreextratable." on (".$ttstoreextratable.".`productID` = ".$ttstoretable.".`productID`) and ".$ttstoreextratable.".`extravalue` LIKE '%$keyword%' where ".$ttstorecattable.".productID = ".$ttstoretable.".productID and (CONVERT(`name` USING utf8) LIKE '%Naxos%' or CONVERT(`description` USING utf8) LIKE '%$keyword%' or ".$ttstoreextratable.".`extravalue` != null) ".$searchcategorieselect." ".$searchxmlfeed." ");
     231        $countquery=$wpdb->get_row("SELECT COUNT(DISTINCT ".$ttstoretable.".productID) as cnt FROM (".$ttstoretable.", ".$ttstorecattable.") where ".$ttstorecattable.".productID = ".$ttstoretable.".productID $searchtitle $searchdescription ".$searchcategorieselect." ".$searchxmlfeed." ");
    222232    } else {
    223233        $searchlink = "";
     
    361371        <input type="hidden" name="order" value="<?php echo $order;?>">
    362372        <input class="s" type="text" name="search" value="<?php if(isset($keyword)) {  echo $keyword;} ?>">
    363         <?php if(!isset($_GET['title'])&&!isset($_GET['description'])&&!isset($_GET['extra'])){ ?>
     373        <?php if(!isset($_GET['title'])&&!isset($_GET['description'])){ ?>
    364374            <input type="checkbox" name="title" checked="checked" value="yes">title
    365375            <input type="checkbox" name="description" checked="checked" value="yes">description
    366             <input type="checkbox" name="extra" checked="checked" value="yes">extra fields
    367376        <?php
    368377            $filterurl = '';
     
    379388                $descriptionurl = '';
    380389            }
    381             if(isset($_GET['extra']) && $_GET['extra']=='yes'){
    382                 $extraurl = '&extra=yes';
    383             } else {
    384                 $extraurl = '';
    385             }
    386                 $filterurl = $titleurl."".$descriptionurl."".$extraurl;
     390                $filterurl = $titleurl."".$descriptionurl;
    387391            ?>
    388392            <input type="checkbox" name="title" <?php if($_GET['title']=='yes'){ echo "checked=\"checked\""; }?> value="yes">title
    389393            <input type="checkbox" name="description" <?php if($_GET['description']=='yes'){ echo "checked=\"checked\""; }?> value="yes">description
    390             <input type="checkbox" name="extra" <?php if($_GET['extra']=='yes'){ echo "checked=\"checked\""; }?> value="yes">extra fields
    391394        <?php } ?>
    392395
     
    421424        }
    422425    }
    423     if($_GET['extra']=='yes'){
    424         if(isset($searchtitle) || isset($searchdescription)){
    425             $searchextra = "or `extravalue` LIKE '%$keyword%'";
    426         } else {
    427             $searchextra = "or `extravalue` LIKE '%$keyword%'";
    428         }
    429     }
    430     $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."");
     426    $visits=$wpdb->get_results("SELECT ".$ttstoretable.".*, ".$ttstorecattable.".categorieid, ".$ttstorecattable.".categorie FROM ".$ttstoretable.", ".$ttstorecattable." where ".$ttstorecattable.".productID = ".$ttstoretable.".productID and (".$searchtitle." ".$searchdescription.") ".$searchcategorieselect." ".$searchxmlfeed." group by ".$ttstoretable.".productID ORDER BY ".$order." ASC  LIMIT ".$currentpage.", ".$limit."");
    431427} else {
    432428    if(isset($_GET['selected']) && $_GET['selected']=="yes"){
  • tradetracker-store/trunk/readme.txt

    r1996856 r2000173  
    44Tags: tradetracker, store, productfeed, affiliate, daisycon, zanox, cleafs, tradedoubler, paidonresults, M4N, xml productfeed
    55Requires at least: 4
    6 Tested up to: 5.0.1
    7 Stable tag: 4.6.47
     6Tested up to: 5.0.2
     7Stable tag: 4.6.48
    88
    99A plugin that lets you import an XML productfeed from TradeTracker.
     
    4242
    4343== Changelog ==
     44= 4.6.48 =
     45- Removed the search in extra fields in item select, mainly because it causes too much issues.
     46- Counter for amount of items found should be accurate now in item select search results.
     47
    4448= 4.6.47 =
    4549- In item select it also shows description when you hover over the title of the item.
Note: See TracChangeset for help on using the changeset viewer.