Plugin Directory

Changeset 2901821


Ignore:
Timestamp:
04/20/2023 01:11:13 PM (3 years ago)
Author:
dipakraval
Message:

1.0.3

Location:
frequently-woo-bought
Files:
256 added
5 edited

Legend:

Unmodified
Added
Removed
  • frequently-woo-bought/trunk/App/FBIBase.php

    r2867662 r2901821  
    111111    }
    112112
    113     public function frequently_bought_items_callback() {
     113    public function frequently_bought_items_callback($attr) {
    114114        ob_start();
    115115
     
    132132
    133133        $suggestion = get_post_meta(get_the_ID(),"frequently_bought_items",true);
    134 
    135         if(!empty($suggestion)){           
    136             require_once(FBI_DIR_PATH . 'template/FBIDesign.php');
     134        // print_r($suggestion);
     135        if(!empty($suggestion)){     
     136            if(!empty($attr["theme"])){
     137                switch($attr["theme"]){
     138                    case "one":
     139                        require_once(FBI_DIR_PATH . 'template/templates/FBILayoutOne.php');
     140                        break;
     141                    default:
     142                        require_once(FBI_DIR_PATH . 'template/FBIDesign.php');
     143                        break;
     144                }
     145            }else{
     146                require_once(FBI_DIR_PATH . 'template/FBIDesign.php');
     147            }
     148           
    137149        }
    138150
     
    192204            'buy-together',
    193205            array($this, 'FBI_admin_page'),
    194             'dashicons-cart'
     206            FBI_DIR_URI . "assets/images/logo.svg"
    195207        );
    196208        add_submenu_page(
     
    249261                        foreach($products as $product){
    250262                            $selected = "";
    251                             if( in_array($product["id"],$selected_products) ){
    252                                 $selected = "selected";
    253                             }                           
     263                            if(!empty($selected_products)){
     264                                if( in_array($product["id"],$selected_products) ){
     265                                    $selected = "selected";
     266                                } 
     267                            }                         
    254268                            echo '<option value="'.$product["id"].'" '.$selected.'>'.$product["name"].'</option>';
    255269                        }
    256270                    ?>
    257                 </select><br>
     271                </select>
     272
     273                <br>
    258274                <p>Note : Select Frequently bought items that's display on product page</p>
    259275            </div><?php
  • frequently-woo-bought/trunk/assets/css/FBIStyle.css

    r2801929 r2901821  
    9090    letter-spacing: .05em;
    9191    color: #fff;
    92     border: 1px solid #000;
    93     background-color: #000;
     92    /* border: 1px solid #000; */
     93    /* background-color: #000; */
    9494    line-height: 24px;
    9595    text-transform: uppercase;
    96     border-radius: 3px;
     96    /* border-radius: 3px; */
    9797    cursor: pointer;
    9898}
     
    219219}
    220220
     221
     222
     223
     224
     225/**
     226* Theme one
     227*/
     228
     229#FBI_theme_one .freuuency_box .frequency-price-box .products-box {
     230    display: flex;
     231}
     232#FBI_theme_one .freuuency_box .frequency-price-box .h1 h1 {
     233    font-size: 32px;
     234    font-family: system-ui;
     235    font-weight: 700;
     236}
     237#FBI_theme_one .freuuency_box .frequency-price-box .products-box .img{
     238    width: 12%;
     239}
     240#FBI_theme_one .freuuency_box .frequency-price-box .products-box .img img {
     241    width: 100%;
     242    margin-bottom: -9px;
     243    margin-top: -6px;
     244}
     245#FBI_theme_one .freuuency_box .frequency-price-box .products-box .img::after{
     246   
     247    content: "+";
     248    font-size: 26px;
     249    font-weight: 900;
     250    padding: 4px 12px;
     251    background: #f4f4f4;
     252    border-radius: 30px;
     253    margin-left: 57px;
     254    position: relative;
     255
     256}
     257#FBI_theme_one .freuuency_box .frequency-price-box .products-box .intro-products {
     258    padding-left: 15px;
     259}
     260#FBI_theme_one .freuuency_box .frequency-price-box .products-box .intro-products .h2 h2 {
     261    margin-top: 0px;
     262    margin-bottom: 0px;
     263    font-size: 20px;
     264    font-family: system-ui;
     265    font-weight: 700;
     266}
     267#FBI_theme_one .freuuency_box .frequency-price-box .products-box .intro-products .price-teg h3 {
     268    font-family: system-ui;
     269}
     270#FBI_theme_one .freuuency_box .frequency-price-box .products-box:last-child .img::after {
     271    content: "";
     272    background: none;
     273   
     274}
     275#FBI_theme_one .freuuency_box .footar {
     276    display: flex;
     277    border-top: 1px solid;
     278    margin-top: 15px;
     279}
     280#FBI_theme_one .freuuency_box .footar .price {
     281    display: flex;
     282}
     283#FBI_theme_one .freuuency_box .footar .price .h2 h2 {
     284    font-size: 20px;
     285    font-family: system-ui;
     286    font-weight: 600;
     287    color: gray;
     288}
     289#FBI_theme_one .freuuency_box .footar .price .h3 h3 {
     290    font-size: 19px;
     291    font-family: system-ui;
     292    font-weight: 700;
     293}
     294#FBI_theme_one .freuuency_box .footar .btn {
     295   
     296    margin-top: 14px
     297}
     298#FBI_theme_one .freuuency_box .footar .btn button {
     299    padding: 10px 20px;
     300    border-radius: 19px;
     301    border: none;
     302    background: #04da88;
     303    font-size: 15px;
     304    font-family: system-ui;
     305    font-weight: 600;
     306}
     307
     308#adminmenu .toplevel_page_buy-together .wp-menu-image img{
     309    opacity: 1 !important;
     310}
     311
     312@media  (max-width:1024px) {
     313    #FBI_theme_one .freuuency_box .frequency-price-box .h1 h1 {
     314        font-size: 43px;
     315        font-weight: 700;
     316    }
     317    #FBI_theme_one .freuuency_box .frequency-price-box .products-box .img {
     318        width: 20%;
     319    }
     320    #FBI_theme_one .freuuency_box .frequency-price-box .products-box .intro-products .h2 h2  {
     321        font-size: 26px;
     322        font-weight: 700;
     323    }
     324    #FBI_theme_one .freuuency_box .frequency-price-box .products-box .intro-products .price-teg h3 {
     325   
     326        font-size: 19px;
     327        font-weight: 700;
     328    }
     329    #FBI_theme_one .freuuency_box .frequency-price-box .products-box .img::after {
     330        font-size: 31px;
     331        font-weight: 900;
     332        padding: 7px 16px;
     333        margin-left: 82px;
     334    }
     335    #FBI_theme_one .freuuency_box .footar .price .h2 h2 {
     336        font-size: 23px;
     337    }   
     338    #FBI_theme_one .freuuency_box .footar .price .h3 h3 {
     339        font-size: 21px;
     340    }
     341    #FBI_theme_one .freuuency_box .footar .btn button {
     342        padding: 15px 28px;
     343        font-size: 20px;
     344        font-weight: 700;
     345        border-radius: 30px;
     346    }
     347}
     348@media (max-width:991px) {
     349    #FBI_theme_one .freuuency_box .frequency-price-box .products-box .img::after {
     350        margin-left: 70px
     351    }
     352   
     353}
     354@media (max-width: 768px) {
     355#FBI_theme_one .freuuency_box .frequency-price-box .products-box .img::after {
     356    margin-left: 54px;
     357}
     358}
     359@media (max-width:540px) {
     360    #FBI_theme_one .freuuency_box .frequency-price-box .h1 h1 {
     361        font-size: 31px;
     362    }
     363    #FBI_theme_one .freuuency_box .frequency-price-box .products-box .img {
     364        width: 23%;
     365    }
     366    #FBI_theme_one .freuuency_box .frequency-price-box .products-box .intro-products .h2 h2 {
     367        font-size: 16px;
     368    }
     369    #FBI_theme_one .freuuency_box .frequency-price-box .products-box .intro-products .price-teg h3 {
     370        font-size: 13px;
     371        font-weight: 700;
     372    }
     373    #FBI_theme_one .freuuency_box .frequency-price-box .products-box .img::after {
     374        margin-left: 42px;
     375        padding: 5px 12px;
     376    }
     377    #FBI_theme_one .freuuency_box .footar .price .h2 h2 {
     378        font-size: 18px;
     379    }
     380    #FBI_theme_one .freuuency_box .footar .price .h3 h3 {
     381        font-size: 16px;
     382    }
     383    #FBI_theme_one .freuuency_box .footar .btn {
     384       
     385        margin-top: 10px;
     386    }
     387    #FBI_theme_one .freuuency_box .footar .btn button {
     388        padding: 9px 22px;
     389        font-size: 11px;
     390    }   
     391    #FBI_theme_one .freuuency_box .footar {
     392        display: block;
     393    }
     394}
     395@media (max-width:410px) {
     396    #FBI_theme_one .freuuency_box .frequency-price-box .h1 h1 {
     397        font-size: 27px;
     398    }
     399    #FBI_theme_one .freuuency_box .frequency-price-box .products-box .intro-products .price-teg h3 {
     400        margin-top: 5px;
     401        margin-bottom: 5px;
     402        font-size: 14px;
     403    }
     404    #FBI_theme_one .freuuency_box .frequency-price-box .products-box .intro-products .h2 h2 {
     405        font-size: 14px;
     406        margin-top: -5px;
     407    }
     408    #FBI_theme_one .freuuency_box .frequency-price-box .products-box .img::after {
     409        margin-left: 35px;
     410        padding: 0px 6px;
     411        font-size: 23px;
     412    }
     413   
     414}
     415@media (max-width:375px) {
     416    #FBI_theme_one .freuuency_box .frequency-price-box .h1 h1 {
     417        font-size: 25px;
     418    }
     419    #FBI_theme_one .freuuency_box .frequency-price-box .products-box .intro-products .h2 h2 {
     420        font-size: 14px;
     421    }
     422    #FBI_theme_one .freuuency_box .frequency-price-box .products-box .img {
     423        width: 26%;
     424    }
     425}
     426
     427/**
     428* Theme one - End
     429*/
     430
     431
     432
     433
     434
     435
     436
    221437@keyframes spinners {
    222438    0% {
  • frequently-woo-bought/trunk/assets/js/FBIAdminScript.js

    r2867662 r2901821  
    11jQuery(document).ready(function() {
    22    jQuery('.FBI_bought_item_selected').select2({
    3         maximumSelectionLength: 3
     3        maximumSelectionLength: 5
    44    });
    55});
  • frequently-woo-bought/trunk/buy-together.php

    r2867662 r2901821  
    33/**
    44 * Plugin Name: Frequently bought items
    5  * Plugin URI: https://insixus.locad.ca/
     5 * Plugin URI: https://insixus.com/
    66 * Description: Find best together bought products from past order using Machine Learning
    77 * Version: 1.0.2
     
    99 * Text Domain: buy-together
    1010 * Domain Path: /languages
    11  * Author URI: https://insixus.locad.ca
     11 * Author URI: https://insixus.com
    1212 * License: GPLv3 or later
    1313 * License URI: http://www.gnu.org/licenses/gpl-3.0.html
  • frequently-woo-bought/trunk/template/FBIDesign.php

    r2867662 r2901821  
    1717                                $price = 0.0;                       
    1818                                $i = 0;
     19                                // print_r($suggestion);
    1920                                foreach($suggestion as $key=>$product){
    2021
    21                                     $i++;if($i>3){break;}
     22                                    $i++;if($i>5){break;}
    2223
    2324                                    if(!empty($product)){
     
    5657                        foreach($suggestion as $key=>$product){
    5758
    58                             $i++;if($i>3){break;}
     59                            $i++;if($i>5){break;}
    5960
    6061                            if(!empty($product)){
Note: See TracChangeset for help on using the changeset viewer.