Plugin Directory

Changeset 2586272


Ignore:
Timestamp:
08/21/2021 07:08:13 AM (5 years ago)
Author:
postexir
Message:

Version 3.0

Location:
postbar-shipping/trunk
Files:
25 added
6 edited

Legend:

Unmodified
Added
Removed
  • postbar-shipping/trunk/assets/css/postbar-admin.css

    r2364724 r2586272  
    239239}
    240240#btn_CSHM_opener{
    241     padding: 6px 20px;
    242     border-radius: 10px;
    243     border: 1px solid #898989;
    244     cursor: pointer;
    245     background: linear-gradient(#fcfcfc, #d3d3d3);
    246     outline: 0;
     241
    247242}
    248243#btn_CSHM_opener:hover{
    249     background: linear-gradient(#d3d3d3, #fcfcfc);
     244
    250245}
    251246#conditional_shipping_modal{
    252     position: fixed;
    253     top: 0;
    254     bottom: 0;
    255     right: 0;
    256     left: 0;
    257     background-color: rgba(0, 0, 0, 0.65);
    258     z-index: 9999999999999999;
    259     overflow: auto;
    260     display: flex;
    261     align-items: center;
     247
    262248}
    263249#conditional_shipping_modal.unvisible{
  • postbar-shipping/trunk/assets/js/postbar-shipping-shop-order.js

    r2328152 r2586272  
    22
    33jQuery(function($){
    4 
     4    $("#retrayservice").on("click" , function(){
     5        //getServices();
     6       alert('hi');
     7       });
    58    /***** new order form fields validation *****/
    69    function validateNewOrderFormFields(){
     
    143146    function getServices()
    144147    {
    145         $("#admin_services_content_container").html('دریافت اطلاعات ...');
    146         $.ajax({
     148
     149        jQuery("#admin_services_content_container").html('دریافت اطلاعات ...');
     150        jQuery.ajax({
    147151            type: "POST",
    148             url: $("#admin_ajax_url").val(),
     152            url: jQuery("#admin_ajax_url").val(),
    149153            data : {
    150154                action : "ajaxAdminPostbarServicesHTML",
    151                 security: $("#nonce_ajaxAdminPostbarServicesHTML").val(),
    152                 selected_ServiceId : $("#primary_selected_ServiceId").val(),
     155                security: jQuery("#nonce_ajaxAdminPostbarServicesHTML").val(),
     156                selected_ServiceId : jQuery("#primary_selected_ServiceId").val(),
    153157                ListType : 0,
    154                 senderStateId : $("#Sender_StateId").val(),
    155                 senderTownId : $("#Sender_townId").val(),
    156                 boxType : $("#boxType").val(),
     158                senderStateId : jQuery("#Sender_StateId").val(),
     159                senderTownId : jQuery("#Sender_townId").val(),
     160                boxType : jQuery("#boxType").val(),
     161                insurance:jQuery("#InsuranceId option:selected").html(),
     162                cartonsize:jQuery("#CartonSizeId option:selected").html(),
    157163                receiver_ForeginCountry : '',
    158                 receiverStateId : $("#Reciver_StateId").val(),
    159                 receiverTownId : $("#Reciver_townId").val() ,
    160                 weightItem : $("#Weight").val(),
    161                 AproximateValue : $("#ApproximateValue").val(),
    162                 height : $("#height").val(),
    163                 width : $("#width").val(),
    164                 length : $("#length").val(),
    165                 Content : $("#GoodsType").val(),
     164                receiverStateId : jQuery("#Reciver_StateId").val(),
     165                receiverTownId : jQuery("#Reciver_townId").val() ,
     166                weightItem : jQuery("#Weight").val(),
     167                AproximateValue : jQuery("#ApproximateValue").val(),
     168                height : jQuery("#height").val(),
     169                width : jQuery("#width").val(),
     170                length : jQuery("#length").val(),
     171                Content : jQuery("#GoodsType").val(),
    166172                dispatch_date : '',
    167173                TruckType : '',
    168174                VechileOptions : '',
    169175                PackingLoad : '',
    170                 IsCOD : $("#IsCOD").val()
     176                PaymentType : jQuery("#paymentType").val(),
     177                IsCOD : jQuery("#IsCOD").val()
    171178            },
    172179            success: function (result) {
    173                 $("#admin_services_content_container").html(result);
    174             }
    175         });
    176     }
    177     $(document).ready(function(){ getServices(); });
     180                jQuery("#admin_services_content_container").html(result);
     181            }
     182        });
     183    }
     184    jQuery(document).ready(function(){
     185 
     186
     187        //getServices();
     188    });
     189   
    178190    /***** Get Services *****/
    179191
     
    327339                        Reciver_Address : $("#Reciver_Address").val(),
    328340                        Reciver_Email : $("#Reciver_Email").val(),
     341                        PaymentType : $("#paymentType").val(),
    329342                        IsCOD : $("#IsCOD").val(),
    330343
     
    353366                            var successMessage = result.message + "<br />";
    354367                            successMessage = successMessage + "سفارش شما در سامانه باربری پستِکس با شناسه " + result.orderId + " به ثبت رسید.";
    355                             var invoice_link = result.site_url + "/wp-content/plugins/postbar-shipping/inc/orederInvoice.php?orderid=" + result.orderId + "&token=" + result.token;
     368                            var invoice_link = result.site_url + "/wp-content/plugins/postbar-shipping/libs/orederInvoice.php?orderid=" + result.orderId + "&token=" + result.token;
    356369                            successMessage = successMessage + "<div class='postex-mt-15'><a class='postex-pdf-btn' href='"+invoice_link+"' target='_blank'>دریافت فاکتور</a></div>";
    357370                            $("#postbarNewOrderMessage").html( successMessage );
     
    383396    /**** Change payment method *****/
    384397    function handlePaymentMethod(){
    385         if($("#IsCOD").val() == "true")
     398        if($("#paymentType").val() == "cod")
    386399            $("#CodGoodsPrice_row").show();
    387400        else   
     
    389402    }
    390403    $(document).ready(function(){ handlePaymentMethod(); });
    391     $("#IsCOD").on('change', function(){
     404    $("#paymentType").on('change', function(){
    392405        handlePaymentMethod();       
    393406        getServices();
  • postbar-shipping/trunk/assets/js/postbar-shipping.js

    r2364724 r2586272  
    5252                    $("#shipping_rows_container").html(result);
    5353                }
    54             });   
     54            });
    5555        }
    5656    }
     
    8585                    $("#postbar_IsCOD_container").show();
    8686                    $("#postex_shipping_services_container").show();
    87                 }               
     87                }
    8888            }
    8989        });
     
    128128                    $("#postbar_reciever_townId").html(result);
    129129                    checkConditionalShipping();
    130                     getShippingServices();                   
     130                    getShippingServices();
    131131                }
    132132            });
     
    150150            $(this).find("input[type=radio]").prop("checked", true);
    151151        });
    152         /***** End: Click on shipping rows *****/       
     152        /***** End: Click on shipping rows *****/
    153153
    154154        /***** modal confirm changes *****/
    155155        function postex_modal_confirm_changes(){
    156             //loading on 
     156            //loading on
    157157            $("#postex_modal_btn_save").addClass('loading');
    158158
     
    206206        }
    207207        $("#postex_modal_btn_save").click(function(e){
    208             e.preventDefault();           
    209             postex_modal_confirm_changes();           
     208            e.preventDefault();
     209            postex_modal_confirm_changes();
    210210        });
    211211        /***** End: modal confirm changes *****/
     
    226226
    227227            should_get_postex_services = true;
    228  
     228
    229229            if ( cart_update_timeout !== undefined ) {
    230230                clearTimeout( cart_update_timeout );
    231231            }
    232      
     232
    233233            var cart_update_timeout = setTimeout(function() {
    234234                $(".woocommerce [name='update_cart']").trigger("click");
    235             }, 1500 ); 
    236      
     235            }, 1500 );
     236
    237237        });
    238238
     
    240240            if(should_get_postex_services){
    241241                should_get_postex_services = false;
    242                 checkConditionalShipping(); 
     242                checkConditionalShipping();
    243243                getShippingServices();
    244244                postex_modal_confirm_changes();
     
    248248
    249249    }
    250    
     250
    251251
    252252});
  • postbar-shipping/trunk/postkhone-shipping.php

    r2364724 r2586272  
    44 * Plugin URI: https://postex.ir/
    55 * Description: ارسال و رهگیری مرسولات پستی در ووکامرس به همراه محسابه خودکار هزینه حمل و نقل براساس آدرس مبدا، مقصد، وزن و ابعاد مرسوله، با استفاده از سرویسهای پستی شرکتهای مختلف مانند پستبار، اوبار، اسنپ باکس و چاپار و غیره
    6  * Version: 2.2.2
     6 * Version: 3.0
    77 * Author: Postex Team
    88 * Author URI: https://postex.ir/
     
    2424
    2525    // Class PostbarShipping
    26     class PostbarShipping {
     26    class PostexShipping {
    2727
    2828        protected $plugin_name;
     
    5454        // plugin deactivation
    5555        function postex_shipping_deactivation() {
    56             require_once('inc/postbar-shipping-method-class.php');
     56            require_once('libs/postbar-shipping-method-class.php');
    5757            $WC_Shipping_Postbar = new WC_Shipping_Postbar;
    5858            $process_admin_options = array( $WC_Shipping_Postbar, 'process_admin_options' );
     
    9191        function include_files()
    9292        {
    93             include_once( $this->plugin_path() . '/inc/functions.php' ); 
     93            include_once( $this->plugin_path() . '/libs/functions.php' ); 
    9494        }
    9595       
    9696        function woocommerce_postbar_init()
    9797        {
    98             include_once( $this->plugin_path() . '/inc/postbar-shipping-method.php' );
     98            include_once( $this->plugin_path() . '/libs/postbar-shipping-method.php' );
    9999        }
    100100       
     
    102102    // End: Class PostbarShipping
    103103
    104     new PostbarShipping;
     104    new PostexShipping;
    105105
    106106}
  • postbar-shipping/trunk/readme.txt

    r2364724 r2586272  
    55Requires at least: 4.4
    66Donate link: https://postex.ir/
    7 Tested up to: 5.5
    8 Stable tag: 2.2.2
    9 Requires PHP: 5.6
     7Tested up to: 5.7
     8Stable tag: 3.0
     9Requires PHP: 7.4
    1010License: GPLv3
    1111License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    3333= Minimum Requirements =
    3434
    35 * WordPress 4.4 or greater
    36 * PHP version 5.6 or greater
     35* WordPress 5.7 or greater
     36* PHP version 7.4 or greater
    3737* MySQL version 5.0 or greater
    3838* WooCommerce
     
    5252هرگونه نظرات و سوالات خود را از طریق کارشناسان شرکت پستِکس ارائه بفرمایید. (https://postex.ir)
    5353
    54 = آیا راهنمای پلاگین موجود است؟ =
    55 
    56 بله پس از نصب پلاگین، راهنمای تنظیمات پلاگین قابل مشاهده است.
    5754
    5855== Screenshots ==
Note: See TracChangeset for help on using the changeset viewer.