Plugin Directory

Changeset 3006227


Ignore:
Timestamp:
12/06/2023 02:38:39 PM (2 years ago)
Author:
managedorg
Message:

helpwith_enable added

Location:
managedorg-product-driver
Files:
59 added
3 edited

Legend:

Unmodified
Added
Removed
  • managedorg-product-driver/trunk/donative.php

    r3002739 r3006227  
    44Plugin URI: https://wordpress.org/plugins/managedorg-product-driver/
    55Description: Managedorg Product Driver for Amazon Business Integration.
    6 Version: 1.0.7.8
     6Version: 1.0.7.9
    77Author: Managedorg
    88Author URI: https://managedorg.io/
     
    1111   
    1212if (!class_exists('MODD_Donation')) :
    13 define('MODD_VERSION', '1.0.7.8');
     13define('MODD_VERSION', '1.0.7.9');
    1414define('MODD_PLUGIN_URL', plugin_dir_url(__FILE__));
    1515define('MODD_PLUGIN_MAIN_PATH', plugin_dir_path(__FILE__));
     
    274274        $helpwith_description ='';
    275275        $priority_first = '';
     276        $helpwith_enable = '';
    276277       
    277278        $a = shortcode_atts( array(
     
    297298            'helpwith_label'=>'',
    298299            'helpwith_description'=>'',
    299             'priority_first'=>''
     300            'priority_first'=>'',
     301            'helpwith_enable'=>''
    300302           
    301303        ), $atts );
     
    362364        if($a['priority_first'] != ''){
    363365            $priority_first = esc_attr($a['priority_first']);
     366        }
     367        if($a['helpwith_enable'] != ''){
     368            $helpwith_enable = esc_attr($a['helpwith_enable']);
    364369        }
    365370        $myContent = '';
     
    388393            if (!empty($priority_first)) {
    389394                $myContent .= ' data-priority_first="'.$priority_first.'"';
     395            }
     396            if (!empty($helpwith_enable) || $helpwith_enable ==0) {
     397                $myContent .= ' data-helpwith_enable="'.$helpwith_enable.'"';
    390398            }
    391399           
  • managedorg-product-driver/trunk/js/modd_myscript.js

    r3002739 r3006227  
    123123    if($("#modd_campaign_list_div").data("helpwith_description") != undefined && $("#modd_campaign_list_div").data( "helpwith_description") !== null) {
    124124        helpwith_description = $("#modd_campaign_list_div").data( "helpwith_description" );
     125    }
     126   
     127    var helpwith_enable = 1;
     128    if($("#modd_campaign_list_div").data("helpwith_enable") != undefined && $("#modd_campaign_list_div").data( "helpwith_enable") !== null) {
     129        helpwith_enable = $("#modd_campaign_list_div").data( "helpwith_enable" );
    125130    }
    126131   
     
    20192024                 st="none"
    20202025                }
     2026                if(helpwith_enable == 1){
    20212027                cartItemContent += '<p class="roundup-p" style="display:'+st+'"><input type="checkbox" name="modd_servicebox" id="modd_servicebox" class="form-check-input roundup-checkbox "'+cart_checkbox_checked+' style="position: initial !important; margin-left: 1px;" /><label for="modd_servicebox" class="form-check-label servicebox-label" >'+helpwith_checkbox_text+'</label>';
    2022                 cartItemContent += '</p>';
     2028                cartItemContent += '</p>';
     2029                }               
    20232030               
    20242031                cartItemContent += '</div>';
     
    20472054                cartItemContent += '</div>';
    20482055               
    2049                 cartItemContent += '<div class="modd_cart_summary_row modd_surcharge_div">';
    2050                 cartItemContent += '<div class="modd_cart_summary_label modd-tooltip">'+helpwith_label+' &nbsp;<i class="fa fa-question-circle"></i> <span class="modd-tooltiptext">'+helpwith_description+'</span></div>';
    2051                 cartItemContent += '<div class="modd_cart_summary_value" id="modd_cart_surcharge">$0.00</div>';
    2052                 cartItemContent += '</div>';
     2056                if(helpwith_enable ==1) {
     2057                    cartItemContent += '<div class="modd_cart_summary_row modd_surcharge_div">';
     2058                    cartItemContent += '<div class="modd_cart_summary_label modd-tooltip">'+helpwith_label+' &nbsp;<i class="fa fa-question-circle"></i> <span class="modd-tooltiptext">'+helpwith_description+'</span></div>';
     2059                    cartItemContent += '<div class="modd_cart_summary_value" id="modd_cart_surcharge">$0.00</div>';
     2060                    cartItemContent += '</div>';
     2061                }
    20532062               
    20542063                //Handing
     
    21262135            }
    21272136            var cartItemAmt = parseInt(itemQty) * parseFloat(itemObj.PRODUCT_AMOUNT);
    2128            
    2129             if(itemObj.scharge !==null && itemObj.scharge !== undefined && itemObj.scharge !== 'undefined') {
    2130                 surcharges = itemObj.scharge;
    2131                 surcharge_types = itemObj.stype;
    2132             }
    2133            
     2137            if(helpwith_enable == 1) {
     2138                if(itemObj.scharge !==null && itemObj.scharge !== undefined && itemObj.scharge !== 'undefined') {
     2139                    surcharges = itemObj.scharge;
     2140                    surcharge_types = itemObj.stype;
     2141                }
     2142            }
    21342143            s_check.push(surcharges);
    21352144            s_type.push(surcharge_types);
     
    24222431        surcharges = parseFloat(surcharges).toFixed(2);
    24232432        cSubmit.surcharge = surcharges;
     2433        if(helpwith_enable !== 1){
     2434            cSubmit.surcharge = 0;
     2435        }
    24242436        cSubmit.roundup = parseFloat(cartObj.RoundUP);
    24252437        cSubmit.donation = parseFloat(cashDonationAmount);
     
    25482560                    surcharges =  s_check[0];
    25492561                }
    2550                 if($("#modd_servicebox").prop('checked') == false){
     2562                if($("#modd_servicebox").prop('checked') == false || helpwith_enable !==1){
    25512563                    surcharges = 0;
    25522564                } else {
     
    28732885        surcharges = parseFloat(surcharges).toFixed(2);
    28742886        cSubmit.surcharge = surcharges;
     2887        if(helpwith_enable !== 1){
     2888            cSubmit.surcharge = 0;
     2889        }
    28752890        cSubmit.roundup = parseFloat(cartObj.RoundUP);
    28762891        cSubmit.donation = parseFloat(cashDonationAmount);
  • managedorg-product-driver/trunk/readme.txt

    r3002739 r3006227  
    33Tags: Managedorg, Product Driver, Donation, Donation Driver, Charity, Fund Raiser, Fund, Donate, Donate Now, Donation Campaign, Campaign
    44Requires at least: 4.7
    5 Tested up to: 6.3.2
    6 Stable tag: 1.0.7.8
     5Tested up to: 6.4.1
     6Stable tag: 1.0.7.9
    77Requires PHP: 7.0
    88License: GPLv2 or later
     
    4444    helpwith_label ---> Change 'Help with' checkbox label. e.g., helpwith_label="my new label"
    4545    helpwith_description ---> Change 'Help with' checkbox description. e.g., helpwith_description="my new description"
     46    helpwith_enable ---> For removing 'Help With' checkbox. Use helpwith_description="0"
    4647
    4748
     
    164165* Pricing format modified.
    165166
    166 = 1.0.7.8=
     167= 1.0.7.9=
    167168* New design
    168169* New shortcode attributes products_per_page, campaigns_per_page, cart_checkbox
Note: See TracChangeset for help on using the changeset viewer.