Changeset 2000371
- Timestamp:
- 12/22/2018 05:39:13 PM (7 years ago)
- Location:
- tradetracker-store
- Files:
-
- 71 added
- 3 edited
-
tags/4.6.49 (added)
-
tags/4.6.49/Tradetracker-Store.php (added)
-
tags/4.6.49/cache (added)
-
tags/4.6.49/debug.php (added)
-
tags/4.6.49/front.php (added)
-
tags/4.6.49/functions.php (added)
-
tags/4.6.49/images (added)
-
tags/4.6.49/images/No_image.png (added)
-
tags/4.6.49/images/ajax-loader.gif (added)
-
tags/4.6.49/images/more.png (added)
-
tags/4.6.49/import (added)
-
tags/4.6.49/import/database.php (added)
-
tags/4.6.49/import/xml.php (added)
-
tags/4.6.49/import/xmlsplit.php (added)
-
tags/4.6.49/js (added)
-
tags/4.6.49/js/expand.js (added)
-
tags/4.6.49/menu (added)
-
tags/4.6.49/menu/expand.js (added)
-
tags/4.6.49/menu/faq.php (added)
-
tags/4.6.49/menu/images (added)
-
tags/4.6.49/menu/images/Premium-addons.png (added)
-
tags/4.6.49/menu/images/add-edit-stores.png (added)
-
tags/4.6.49/menu/images/debug.png (added)
-
tags/4.6.49/menu/images/enhanced-distribution.png (added)
-
tags/4.6.49/menu/images/item-selection.png (added)
-
tags/4.6.49/menu/images/kruisje.png (added)
-
tags/4.6.49/menu/images/layout-settings.png (added)
-
tags/4.6.49/menu/images/more.png (added)
-
tags/4.6.49/menu/images/overlay.png (added)
-
tags/4.6.49/menu/images/product-page.png (added)
-
tags/4.6.49/menu/images/screenshot-1.png (added)
-
tags/4.6.49/menu/images/tb-close.png (added)
-
tags/4.6.49/menu/images/vinkje.png (added)
-
tags/4.6.49/menu/images/xml-feed-options.png (added)
-
tags/4.6.49/menu/itemselect.php (added)
-
tags/4.6.49/menu/layout.php (added)
-
tags/4.6.49/menu/main.js (added)
-
tags/4.6.49/menu/menu.css (added)
-
tags/4.6.49/menu/menu.php (added)
-
tags/4.6.49/menu/news.php (added)
-
tags/4.6.49/menu/pluginsettings.php (added)
-
tags/4.6.49/menu/premium.php (added)
-
tags/4.6.49/menu/releaselog.php (added)
-
tags/4.6.49/menu/search.php (added)
-
tags/4.6.49/menu/showlayout.php (added)
-
tags/4.6.49/menu/store.php (added)
-
tags/4.6.49/menu/style.css (added)
-
tags/4.6.49/menu/xmlfeed.php (added)
-
tags/4.6.49/menu/xmloption.php (added)
-
tags/4.6.49/readme.txt (added)
-
tags/4.6.49/screenshot-1.png (added)
-
tags/4.6.49/screenshot-2.png (added)
-
tags/4.6.49/screenshot-3.png (added)
-
tags/4.6.49/splits (added)
-
tags/4.6.49/tinymce (added)
-
tags/4.6.49/tinymce/cart.png (added)
-
tags/4.6.49/tinymce/test.js (added)
-
tags/4.6.49/tinymce/tinyTT.php (added)
-
tags/4.6.49/tinymce/tinymce.php (added)
-
tags/4.6.49/tinymce/ttmce.js (added)
-
tags/4.6.49/translation (added)
-
tags/4.6.49/translation/default.mo (added)
-
tags/4.6.49/translation/default.po (added)
-
tags/4.6.49/translation/tradetracker-store-nl_NL.mo (added)
-
tags/4.6.49/translation/tradetracker-store-nl_NL.po (added)
-
tags/4.6.49/translation/ttstore-nl_NL.mo (added)
-
tags/4.6.49/translation/ttstore-nl_NL.po (added)
-
tags/4.6.49/uninstall.php (added)
-
tags/4.6.49/upgrading.php (added)
-
tags/4.6.49/widget (added)
-
tags/4.6.49/widget/widget.php (added)
-
trunk/Tradetracker-Store.php (modified) (1 diff)
-
trunk/menu/itemselect.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tradetracker-store/trunk/Tradetracker-Store.php
r2000173 r2000371 3 3 * Plugin Name: Tradetracker-Store 4 4 * Plugin URI: http://wpaffiliatefeed.com 5 * Version: 4.6.4 85 * Version: 4.6.49 6 6 * Description: A Plugin that will add a TradeTracker affiliate feed to your site with several options to choose from. 7 7 * Author: Robert Braam -
tradetracker-store/trunk/menu/itemselect.php
r2000173 r2000371 218 218 if(isset($_GET['search']) && $_GET['search'] !=""){ 219 219 $keyword = $_GET['search']; 220 if($_GET['title']=='yes'){ 221 $searchtitle = "and CONVERT(`name` USING utf8) LIKE '%$keyword%'"; 220 221 if(preg_match("/\bor\b/i", $keyword, $matches1)){ 222 list($a, $b) = explode(' or ', $keyword); 223 $keywordor = "1"; 224 } 225 if(preg_match("/\band\b/i", $keyword, $matches1)){ 226 list($a, $b) = explode(' and ', $keyword); 227 $keywordand = "1"; 228 } 229 if($_GET['title']=='yes'){ 230 if($keywordor=="1"){ 231 $searchtitle = "CONVERT(`name` USING utf8) LIKE '%$a%' or CONVERT(`name` USING utf8) LIKE '%$b%'"; 232 } else if ($keywordand=="1"){ 233 $searchtitle = "(CONVERT(`name` USING utf8) LIKE '%$a%' and CONVERT(`name` USING utf8) LIKE '%$b%')"; 234 } else { 235 $searchtitle = "CONVERT(`name` USING utf8) LIKE '%$keyword%'"; 236 } 222 237 } 223 238 if($_GET['description']=='yes'){ 224 if(isset($searchtitle)){ 225 $searchdescription = "or CONVERT(`description` USING utf8) LIKE '%$keyword%'"; 239 if($keywordor=="1"){ 240 if(isset($searchtitle)){ 241 $searchdescription = "or CONVERT(`description` USING utf8) LIKE '%$a%' or CONVERT(`name` USING utf8) LIKE '%$b%'"; 242 } else { 243 $searchdescription = "CONVERT(`description` USING utf8) LIKE '%$a%' or CONVERT(`name` USING utf8) LIKE '%$b%'"; 244 } 245 } else if ($keywordand=="1"){ 246 if(isset($searchtitle)){ 247 $searchdescription = "or (CONVERT(`description` USING utf8) LIKE '%$a%' and CONVERT(`name` USING utf8) LIKE '%$b%')"; 248 } else { 249 $searchdescription = "CONVERT(`description` USING utf8) LIKE '%$a%' and CONVERT(`name` USING utf8) LIKE '%$b%'"; 250 } 226 251 } else { 227 $searchdescription = "and CONVERT(`description` USING utf8) LIKE '%$keyword%'"; 252 if(isset($searchtitle)){ 253 $searchdescription = "or CONVERT(`description` USING utf8) LIKE '%$keyword%'"; 254 } else { 255 $searchdescription = "CONVERT(`description` USING utf8) LIKE '%$keyword%'"; 256 } 228 257 } 229 258 } 230 259 $searchlink = "&search=".$keyword; 231 $countquery=$wpdb->get_row("SELECT COUNT(DISTINCT ".$ttstoretable.".productID) as cnt FROM (".$ttstoretable.", ".$ttstorecattable.") where ".$ttstorecattable.".productID = ".$ttstoretable.".productID $searchtitle $searchdescription".$searchcategorieselect." ".$searchxmlfeed." ");260 $countquery=$wpdb->get_row("SELECT COUNT(DISTINCT ".$ttstoretable.".productID) as cnt FROM (".$ttstoretable.", ".$ttstorecattable.") where ".$ttstorecattable.".productID = ".$ttstoretable.".productID and ($searchtitle $searchdescription) ".$searchcategorieselect." ".$searchxmlfeed." "); 232 261 } else { 233 262 $searchlink = ""; … … 414 443 if(isset($_GET['search']) && $_GET['search']!=""){ 415 444 $keyword = $_GET['search']; 445 if(preg_match("/\bor\b/i", $keyword, $matches1)){ 446 list($a, $b) = explode(' or ', $keyword); 447 $keywordor = "1"; 448 } 449 if(preg_match("/\band\b/i", $keyword, $matches1)){ 450 list($a, $b) = explode(' and ', $keyword); 451 $keywordand = "1"; 452 } 416 453 if($_GET['title']=='yes'){ 417 $searchtitle = "CONVERT(`name` USING utf8) LIKE '%$keyword%'"; 454 if($keywordor=="1"){ 455 $searchtitle = "CONVERT(`name` USING utf8) LIKE '%$a%' or CONVERT(`name` USING utf8) LIKE '%$b%'"; 456 } else if ($keywordand=="1"){ 457 $searchtitle = "(CONVERT(`name` USING utf8) LIKE '%$a%' and CONVERT(`name` USING utf8) LIKE '%$b%')"; 458 } else { 459 $searchtitle = "CONVERT(`name` USING utf8) LIKE '%$keyword%'"; 460 } 418 461 } 419 462 if($_GET['description']=='yes'){ 420 if(isset($searchtitle)){ 421 $searchdescription = "or CONVERT(`description` USING utf8) LIKE '%$keyword%'"; 463 if($keywordor=="1"){ 464 if(isset($searchtitle)){ 465 $searchdescription = "or CONVERT(`description` USING utf8) LIKE '%$a%' or CONVERT(`name` USING utf8) LIKE '%$b%'"; 466 } else { 467 $searchdescription = "CONVERT(`description` USING utf8) LIKE '%$a%' or CONVERT(`name` USING utf8) LIKE '%$b%'"; 468 } 469 } else if ($keywordand=="1"){ 470 if(isset($searchtitle)){ 471 $searchdescription = "or (CONVERT(`description` USING utf8) LIKE '%$a%' and CONVERT(`name` USING utf8) LIKE '%$b%')"; 472 } else { 473 $searchdescription = "CONVERT(`description` USING utf8) LIKE '%$a%' and CONVERT(`name` USING utf8) LIKE '%$b%'"; 474 } 422 475 } else { 423 $searchdescription = "CONVERT(`description` USING utf8) LIKE '%$keyword%'"; 476 if(isset($searchtitle)){ 477 $searchdescription = "or CONVERT(`description` USING utf8) LIKE '%$keyword%'"; 478 } else { 479 $searchdescription = "CONVERT(`description` USING utf8) LIKE '%$keyword%'"; 480 } 424 481 } 425 482 } -
tradetracker-store/trunk/readme.txt
r2000173 r2000371 5 5 Requires at least: 4 6 6 Tested up to: 5.0.2 7 Stable tag: 4.6.4 87 Stable tag: 4.6.49 8 8 9 9 A plugin that lets you import an XML productfeed from TradeTracker. … … 42 42 43 43 == Changelog == 44 = 4.6.49 = 45 - You can now use or while searching for items in item select example: beach or resort 46 - You can now use and while searching for items in item select example: beach and resort 47 44 48 = 4.6.48 = 45 49 - Removed the search in extra fields in item select, mainly because it causes too much issues.
Note: See TracChangeset
for help on using the changeset viewer.