Plugin Directory

Changeset 1593738


Ignore:
Timestamp:
02/11/2017 08:15:47 AM (9 years ago)
Author:
RPG84
Message:
  • If you deselect a category while you have selected items then it will only display the items of the remaining selected categories.
Location:
tradetracker-store
Files:
71 added
3 edited

Legend:

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

    r1584214 r1593738  
    33* Plugin Name: Tradetracker-Store
    44* Plugin URI: http://wpaffiliatefeed.com
    5 * Version: 4.6.38
     5* Version: 4.6.39
    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

    r1583787 r1593738  
    1717            $ttslidertheme = "base";
    1818        }
     19    }
    1920        if(get_option("Tradetracker_usecss") == "1"){
    2021            wp_register_style( 'tt_store_css', get_option('Tradetracker_csslink'));
     
    2324        wp_register_style( 'tt_slider_css', "//ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/themes/".$ttslidertheme."/jquery-ui.css");
    2425        wp_enqueue_style( 'tt_slider_css');
    25     }
    2626}     
    2727   
     
    423423                    $Tradetracker_amount_i = "LIMIT ".$multi_val->multiamount."";
    424424                }
    425                 $totalitems=count($wpdb->get_results("SELECT id FROM ".$ttstoretable.", ".$ttstorecattable." where ".$ttstorecattable.".productID = ".$ttstoretable.".productID ".$priceselect." group by ".$ttstoretable.".productID ".$Tradetracker_amount_i.""));
     425        $nonexisting = $wpdb->get_results("SELECT productID from ".$ttstoreitemtable." where storeID = '".$winkelvol."'");
     426        if(count($nonexisting)>0){
     427            $Tradetracker_productid1 = array();
     428            foreach($nonexisting as $term){
     429                $Tradetracker_productid1[] = $term->productID;
     430            }
     431            $Tradetracker_productid1 = implode(",", $Tradetracker_productid1);
     432        }
     433                $productID = $Tradetracker_productid1;
     434                $productID = str_replace(",", "' or ".$ttstoretable.".productID='", $productID);
     435       
     436
     437                $totalitems=count($wpdb->get_results("SELECT id FROM ".$ttstoretable.", ".$ttstorecattable." where ".$ttstorecattable.".productID = ".$ttstoretable.".productID and (".$ttstoretable.".productID='".$productID."') ".$multixmlfeed." ".$categorieselect." ".$priceselectcur." group by ".$ttstoretable.".productID ORDER BY ".$multisorting." ".$multiorder." ".$Tradetracker_amount_i.""));
    426438            }
    427439            if(isset($_GET['ipp']) && is_numeric($_GET['ipp']) && $_GET['ipp']>"0"){
     
    597609                $productID = $Tradetracker_productid;
    598610                $productID = str_replace(",", "' or ".$ttstoretable.".productID='", $productID);
    599                 $totalitems=count($wpdb->get_results("SELECT id FROM ".$ttstoretable.", ".$ttstorecattable." where ".$ttstorecattable.".productID = ".$ttstoretable.".productID and (".$ttstoretable.".productID='".$productID."') ".$priceselectcur." group by ".$ttstoretable.".productID ".$Tradetracker_amount_i.""));
     611                $totalitems=count($wpdb->get_results("SELECT id FROM ".$ttstoretable.", ".$ttstorecattable." where ".$ttstorecattable.".productID = ".$ttstoretable.".productID and (".$ttstoretable.".productID='".$productID."') ".$multixmlfeed." ".$categorieselect." ".$priceselectcur." group by ".$ttstoretable.".productID ".$Tradetracker_amount_i.""));
    600612            }
    601613            if(isset($_GET['ipp']) && is_numeric($_GET['ipp']) && $_GET['ipp']>"0"){
     
    678690                    $productID = str_replace(",", "' or ".$ttstoretable.".productID='", $productID);
    679691                    if(isset($productID) && $productID != ""){
    680                         $wherequery = "where (".$ttstoretable.".productID='".$productID."') ".$priceselectcur;
    681                         $wherequery1 = "where (t.productID='".$productID1."') ".$priceselectcur;
     692                        $wherequery = "where (".$ttstoretable.".productID='".$productID."') ".$multixmlfeed." ".$categorieselect." ".$priceselectcur;
     693                        $wherequery1 = "where (t.productID='".$productID1."') ".$multixmlfeed." ".$categorieselect." ".$priceselectcur;
    682694                    } else {
    683                         $wherequery = "where 1=1 ".$priceselectcur;
     695                        $wherequery = "where 1=1 ".$multixmlfeed." ".$categorieselect." ".$priceselectcur;
    684696                    }
    685                     $visits=$wpdb->get_results("SELECT * FROM ".$ttstorecattable.", ".$ttstoretable." as t JOIN (SELECT(FLOOR(max(id) * rand())) as maxid FROM ".$ttstoretable." $wherequery ".$Tradetracker_amount_i.") as tt on t.id >= tt.maxid ".$wherequery1." and ".$ttstorecattable.".productID = t.productID group by t.productID  ".$Tradetracker_amount_i."");
     697                    $visits=$wpdb->get_results("SELECT * FROM ".$ttstorecattable.", ".$ttstoretable." as t JOIN (SELECT(FLOOR(max(id) * rand())) as maxid FROM ".$ttstoretable.", ".$ttstorecattable." $wherequery ".$Tradetracker_amount_i.") as tt on t.id >= tt.maxid ".$wherequery1." and ".$ttstorecattable.".productID = t.productID group by t.productID  ".$Tradetracker_amount_i."");
    686698                }
    687699            }
     
    700712                    $productID = $Tradetracker_productid;
    701713                    $productID = str_replace(",", "' or ".$ttstoretable.".productID='", $productID);
    702                     $visits=$wpdb->get_results("SELECT * FROM ".$ttstoretable.", ".$ttstorecattable." where ".$ttstorecattable.".productID = ".$ttstoretable.".productID and (".$ttstoretable.".productID='".$productID."') ".$priceselectcur." group by ".$ttstoretable.".productID ORDER BY ".$multisorting." ".$multiorder." ".$Tradetracker_amount_i."");
     714                    $visits=$wpdb->get_results("SELECT * FROM ".$ttstoretable.", ".$ttstorecattable." where ".$ttstorecattable.".productID = ".$ttstoretable.".productID and (".$ttstoretable.".productID='".$productID."') ".$multixmlfeed." ".$categorieselect." ".$priceselectcur." group by ".$ttstoretable.".productID ORDER BY ".$multisorting." ".$multiorder." ".$Tradetracker_amount_i."");
    703715                }
    704716            }
  • tradetracker-store/trunk/readme.txt

    r1584214 r1593738  
    55Requires at least: 4
    66Tested up to: 4.7.2
    7 Stable tag: 4.6.38
     7Stable tag: 4.6.39
    88
    99A plugin that lets you import an XML productfeed from TradeTracker.
     
    4343== Changelog ==
    4444= 4.6.38 =
     45- If you deselect a category while you have selected items then it will only display the items of the remaining selected categories.
     46
     47= 4.6.38 =
    4548- Selecting none in the item select and saving will now also save when no items are selected.
    4649
Note: See TracChangeset for help on using the changeset viewer.