Plugin Directory

Changeset 2938129


Ignore:
Timestamp:
07/13/2023 10:46:55 AM (3 years ago)
Author:
torod
Message:

Fix Mino bugs

Location:
torod
Files:
387 added
4 edited

Legend:

Unmodified
Added
Removed
  • torod/trunk/inc/torod.php

    r2938040 r2938129  
    406406                if($issetStatusOrder){
    407407                    if($order->get_billing_address_1() != $order->get_shipping_address_1()){
    408                         $address = $order->get_shipping_address_1()." ".$order->get_shipping_address_2();
     408                        $zip = $order->get_shipping_postcode() ? $order->get_shipping_postcode():'';
     409                        $address = $order->get_shipping_address_1()." ".$order->get_shipping_address_2()."".$zip;
    409410                    }else{
    410                         $address = $order->get_billing_address_1()." ".$order->get_billing_address_2();
     411                        $zip = $order->get_billing_postcode() ? $order->get_billing_postcode():'';
     412                        $address = $order->get_billing_address_1()." ".$order->get_billing_address_2()." ".$zip;
    411413                    }
    412414                    if($order->get_billing_city() != $order->get_shipping_city() && $order->get_shipping_city() != ''){
     
    433435                    $detailsorder = $this->orderDetails($order);
    434436                    $cityid = (!$city) ? 3 : $city;
     437
     438                    $weight_json = json_decode($this->orderDetails($order),true);
     439                    $weight_array = array_column($weight_json , 'weight');
     440                    $total_weight = array_sum($weight_array);
     441
    435442                    $data = [
    436443                      "name"             => $name,
     
    440447                      "order_total"      => $order->get_total(),
    441448                      "payment"          => $paymentname,
    442                       "weight"           => '100',
     449                      "weight"           => $total_weight,
    443450                      "no_of_box"        => 1,
    444451                      "type"             => "address_city",
     
    586593                $product_id = $variation_id>0 ? $variation_id : $item->get_product_id();
    587594                $product = $item->get_product();
     595                //$weight = $this->order_total_weight($product->get_weight())*$item->get_quantity();
    588596                // Set specific data for each item in the array
    589597                $items_data[] = [
     
    664672                    $issetStatusOrder = $this->issetOrderInStatus($order->get_Status());
    665673                    if($order->get_billing_address_1() != $order->get_shipping_address_1()){
    666                         $address = $order->get_shipping_address_1()." ".$order->get_shipping_address_2();
     674                        $zip = $order->get_shipping_postcode() ? $order->get_shipping_postcode():'';
     675                        $address = $order->get_shipping_address_1()." ".$order->get_shipping_address_2()." ".$zip;
    667676                    }else{
    668                         $address = $order->get_billing_address_1()." ".$order->get_billing_address_2();
    669                     }
    670                     if($order->get_billing_city() != $order->get_shipping_city()){
     677                        $zip = $order->get_billing_postcode() ? $order->get_billing_postcode():'';
     678                        $address = $order->get_billing_address_1()." ".$order->get_billing_address_2()." ".$zip;
     679                    }
     680                    if($order->get_billing_city() != $order->get_shipping_city() && $order->get_shipping_city() !=''){
    671681                        $statename = $order->get_shipping_state();
    672682                        $cityname = $order->get_shipping_city();
     
    696706                    $detailsorder = $this->orderDetails($order);
    697707                    $cityid = ($city && is_numeric($city)) ? $city : 3;
     708
     709                    $weight_json = json_decode($this->orderDetails($order),true);
     710                    $weight_array = array_column($weight_json , 'weight');
     711                    $total_weight = array_sum($weight_array);
     712
     713
    698714                    $data = [
    699715                      "name"             => $name,
     
    703719                      "order_total"      => $order->get_total(),
    704720                      "payment"          => $paymentname,
    705                       "weight"           => '100',
     721                      "weight"           => $total_weight,
    706722                      "no_of_box"        => 1,
    707723                      "type"             => "address_city",
  • torod/trunk/readme.md

    r2938050 r2938129  
    55Tested up to: 6.2.2
    66Requires PHP: 7
    7 Stable tag: 1.2
     7Stable tag: 1.3
    88License: MIT
    99License URI: https://opensource.org/licenses/MIT
  • torod/trunk/readme.txt

    r2938050 r2938129  
    55Tested up to: 6.2.2
    66Requires PHP: 7
    7 Stable tag: 1.2
     7Stable tag: 1.3
    88License: MIT
    99License URI: https://opensource.org/licenses/MIT
  • torod/trunk/torod-mmar.php

    r2938050 r2938129  
    55    Plugin URI: https://torod.co
    66    Description: A web platform that enables you to compare shipping prices, print shipping labels, track orders, and manage returns from a single place. No Contracting, no coding required.
    7     Version: 1.2
     7    Version: 1.3
    88    Author: Torod Holding LTD
    99    Text Domain: torod
Note: See TracChangeset for help on using the changeset viewer.