Changeset 2586272
- Timestamp:
- 08/21/2021 07:08:13 AM (5 years ago)
- Location:
- postbar-shipping/trunk
- Files:
-
- 25 added
- 6 edited
-
assets/css/postbar-admin.css (modified) (1 diff)
-
assets/images/postbar-small-.png (added)
-
assets/images/postbar-small.png (modified) (previous)
-
assets/js/postbar-shipping-shop-order.js (modified) (6 diffs)
-
assets/js/postbar-shipping.js (modified) (8 diffs)
-
libs (added)
-
libs/PostexApi.php (added)
-
libs/functions.php (added)
-
libs/new-order.php (added)
-
libs/order-tracking.php (added)
-
libs/orederInvoice.php (added)
-
libs/postbar-admin-settings-defaults.php (added)
-
libs/postbar-admin-settings-header.php (added)
-
libs/postbar-admin-settings-receiver.php (added)
-
libs/postbar-admin-settings-sender.php (added)
-
libs/postbar-admin-settings-user-data.php (added)
-
libs/postbar-admin-settings.php (added)
-
libs/postbar-api-views.php (added)
-
libs/postbar-shipping-method-class.php (added)
-
libs/postbar-shipping-method.php (added)
-
libs/postbar-shipping-modal-selector.php (added)
-
libs/postex-admin-help.php (added)
-
libs/woo-methods-cart.php (added)
-
libs/woo-methods-checkout.php (added)
-
libs/woo-methods.php (added)
-
postkhone-shipping.php (modified) (5 diffs)
-
readme.txt (modified) (3 diffs)
-
views (added)
-
views/admin (added)
-
views/front (added)
-
views/front/shipping-calculator.php (added)
Legend:
- Unmodified
- Added
- Removed
-
postbar-shipping/trunk/assets/css/postbar-admin.css
r2364724 r2586272 239 239 } 240 240 #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 247 242 } 248 243 #btn_CSHM_opener:hover{ 249 background: linear-gradient(#d3d3d3, #fcfcfc); 244 250 245 } 251 246 #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 262 248 } 263 249 #conditional_shipping_modal.unvisible{ -
postbar-shipping/trunk/assets/js/postbar-shipping-shop-order.js
r2328152 r2586272 2 2 3 3 jQuery(function($){ 4 4 $("#retrayservice").on("click" , function(){ 5 //getServices(); 6 alert('hi'); 7 }); 5 8 /***** new order form fields validation *****/ 6 9 function validateNewOrderFormFields(){ … … 143 146 function getServices() 144 147 { 145 $("#admin_services_content_container").html('دریافت اطلاعات ...'); 146 $.ajax({ 148 149 jQuery("#admin_services_content_container").html('دریافت اطلاعات ...'); 150 jQuery.ajax({ 147 151 type: "POST", 148 url: $("#admin_ajax_url").val(),152 url: jQuery("#admin_ajax_url").val(), 149 153 data : { 150 154 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(), 153 157 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(), 157 163 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(), 166 172 dispatch_date : '', 167 173 TruckType : '', 168 174 VechileOptions : '', 169 175 PackingLoad : '', 170 IsCOD : $("#IsCOD").val() 176 PaymentType : jQuery("#paymentType").val(), 177 IsCOD : jQuery("#IsCOD").val() 171 178 }, 172 179 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 178 190 /***** Get Services *****/ 179 191 … … 327 339 Reciver_Address : $("#Reciver_Address").val(), 328 340 Reciver_Email : $("#Reciver_Email").val(), 341 PaymentType : $("#paymentType").val(), 329 342 IsCOD : $("#IsCOD").val(), 330 343 … … 353 366 var successMessage = result.message + "<br />"; 354 367 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; 356 369 successMessage = successMessage + "<div class='postex-mt-15'><a class='postex-pdf-btn' href='"+invoice_link+"' target='_blank'>دریافت فاکتور</a></div>"; 357 370 $("#postbarNewOrderMessage").html( successMessage ); … … 383 396 /**** Change payment method *****/ 384 397 function handlePaymentMethod(){ 385 if($("# IsCOD").val() == "true")398 if($("#paymentType").val() == "cod") 386 399 $("#CodGoodsPrice_row").show(); 387 400 else … … 389 402 } 390 403 $(document).ready(function(){ handlePaymentMethod(); }); 391 $("# IsCOD").on('change', function(){404 $("#paymentType").on('change', function(){ 392 405 handlePaymentMethod(); 393 406 getServices(); -
postbar-shipping/trunk/assets/js/postbar-shipping.js
r2364724 r2586272 52 52 $("#shipping_rows_container").html(result); 53 53 } 54 }); 54 }); 55 55 } 56 56 } … … 85 85 $("#postbar_IsCOD_container").show(); 86 86 $("#postex_shipping_services_container").show(); 87 } 87 } 88 88 } 89 89 }); … … 128 128 $("#postbar_reciever_townId").html(result); 129 129 checkConditionalShipping(); 130 getShippingServices(); 130 getShippingServices(); 131 131 } 132 132 }); … … 150 150 $(this).find("input[type=radio]").prop("checked", true); 151 151 }); 152 /***** End: Click on shipping rows *****/ 152 /***** End: Click on shipping rows *****/ 153 153 154 154 /***** modal confirm changes *****/ 155 155 function postex_modal_confirm_changes(){ 156 //loading on 156 //loading on 157 157 $("#postex_modal_btn_save").addClass('loading'); 158 158 … … 206 206 } 207 207 $("#postex_modal_btn_save").click(function(e){ 208 e.preventDefault(); 209 postex_modal_confirm_changes(); 208 e.preventDefault(); 209 postex_modal_confirm_changes(); 210 210 }); 211 211 /***** End: modal confirm changes *****/ … … 226 226 227 227 should_get_postex_services = true; 228 228 229 229 if ( cart_update_timeout !== undefined ) { 230 230 clearTimeout( cart_update_timeout ); 231 231 } 232 232 233 233 var cart_update_timeout = setTimeout(function() { 234 234 $(".woocommerce [name='update_cart']").trigger("click"); 235 }, 1500 ); 236 235 }, 1500 ); 236 237 237 }); 238 238 … … 240 240 if(should_get_postex_services){ 241 241 should_get_postex_services = false; 242 checkConditionalShipping(); 242 checkConditionalShipping(); 243 243 getShippingServices(); 244 244 postex_modal_confirm_changes(); … … 248 248 249 249 } 250 250 251 251 252 252 }); -
postbar-shipping/trunk/postkhone-shipping.php
r2364724 r2586272 4 4 * Plugin URI: https://postex.ir/ 5 5 * Description: ارسال و رهگیری مرسولات پستی در ووکامرس به همراه محسابه خودکار هزینه حمل و نقل براساس آدرس مبدا، مقصد، وزن و ابعاد مرسوله، با استفاده از سرویسهای پستی شرکتهای مختلف مانند پستبار، اوبار، اسنپ باکس و چاپار و غیره 6 * Version: 2.2.26 * Version: 3.0 7 7 * Author: Postex Team 8 8 * Author URI: https://postex.ir/ … … 24 24 25 25 // Class PostbarShipping 26 class Post barShipping {26 class PostexShipping { 27 27 28 28 protected $plugin_name; … … 54 54 // plugin deactivation 55 55 function postex_shipping_deactivation() { 56 require_once(' inc/postbar-shipping-method-class.php');56 require_once('libs/postbar-shipping-method-class.php'); 57 57 $WC_Shipping_Postbar = new WC_Shipping_Postbar; 58 58 $process_admin_options = array( $WC_Shipping_Postbar, 'process_admin_options' ); … … 91 91 function include_files() 92 92 { 93 include_once( $this->plugin_path() . '/ inc/functions.php' );93 include_once( $this->plugin_path() . '/libs/functions.php' ); 94 94 } 95 95 96 96 function woocommerce_postbar_init() 97 97 { 98 include_once( $this->plugin_path() . '/ inc/postbar-shipping-method.php' );98 include_once( $this->plugin_path() . '/libs/postbar-shipping-method.php' ); 99 99 } 100 100 … … 102 102 // End: Class PostbarShipping 103 103 104 new Post barShipping;104 new PostexShipping; 105 105 106 106 } -
postbar-shipping/trunk/readme.txt
r2364724 r2586272 5 5 Requires at least: 4.4 6 6 Donate link: https://postex.ir/ 7 Tested up to: 5. 58 Stable tag: 2.2.29 Requires PHP: 5.67 Tested up to: 5.7 8 Stable tag: 3.0 9 Requires PHP: 7.4 10 10 License: GPLv3 11 11 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 33 33 = Minimum Requirements = 34 34 35 * WordPress 4.4or greater36 * PHP version 5.6or greater35 * WordPress 5.7 or greater 36 * PHP version 7.4 or greater 37 37 * MySQL version 5.0 or greater 38 38 * WooCommerce … … 52 52 هرگونه نظرات و سوالات خود را از طریق کارشناسان شرکت پستِکس ارائه بفرمایید. (https://postex.ir) 53 53 54 = آیا راهنمای پلاگین موجود است؟ =55 56 بله پس از نصب پلاگین، راهنمای تنظیمات پلاگین قابل مشاهده است.57 54 58 55 == Screenshots ==
Note: See TracChangeset
for help on using the changeset viewer.