Plugin Directory

Changeset 3301592


Ignore:
Timestamp:
05/27/2025 03:08:47 PM (10 months ago)
Author:
datalogics
Message:

2.6.42

Location:
datalogics
Files:
87 added
7 edited

Legend:

Unmodified
Added
Removed
  • datalogics/assets/readme-he_IL.txt

    r3297644 r3301592  
    44Requires at least: 5.0
    55Tested up to: 6.8
    6 Stable tag: 2.6.41
     6Stable tag: 2.6.42
    77Requires PHP: 7.4
    88License: GPLv2 or later
  • datalogics/trunk/README.txt

    r3297644 r3301592  
    44Requires at least: 5.0
    55Tested up to: 6.8
    6 Stable tag: 2.6.41
     6Stable tag: 2.6.42
    77Requires PHP: 7.4
    88License: GPLv2 or later
  • datalogics/trunk/actions.php

    r3297644 r3301592  
    442442    $data = [];
    443443
    444     $datalogics_shipping_method = get_option('datalogics_shipping_method',[]);
    445 
    446     if (is_string($datalogics_shipping_method)) {
    447         $datalogics_shipping_method = json_decode($datalogics_shipping_method,true);
    448     }
    449 
    450444    $url = datalogics_REST_API.'/w_get_shipping_stores';
    451445   
     
    482476            if($response->success){
    483477               
    484                 if($response->success != 0){
     478                if($response->success == 1){
     479
     480                    $datalogics_shipping_method = get_option('datalogics_shipping_method',[]);
     481
     482                    if (is_string($datalogics_shipping_method)) {
     483                        $datalogics_shipping_method = json_decode($datalogics_shipping_method,true);
     484                    }
     485
     486                    //var_dump($datalogics_shipping_method);
    485487
    486488                    $data = $response->data;
     
    16351637    return;
    16361638}
     1639
     1640
     1641
     1642
     1643add_action( 'woocommerce_product_options_inventory_product_data', 'datalogics_optical_woocommerce_product_custom_fields' );
     1644
     1645
     1646
     1647
     1648function datalogics_optical_woocommerce_product_custom_fields () {
     1649
     1650    global $woocommerce, $post;
     1651
     1652    $datalogics_pickup_allowed = 'datalogics_pickup_allowed';
     1653
     1654    echo '<div class="product_custom_field">';
     1655
     1656    $options = [
     1657        ''=>__('Choose', 'datalogics'),
     1658        '0'=>__('Yes', 'datalogics'),
     1659        '1'=>__('No', 'datalogics')
     1660    ];
     1661
     1662    $value = get_post_meta( $post->ID, $datalogics_pickup_allowed, true );
     1663
     1664    woocommerce_wp_select(array(
     1665        'id' => $datalogics_pickup_allowed,
     1666        'label' => __('Datalogics Available for pickup locations?', 'datalogics'),
     1667        'options' => $options, //this is where I am having trouble
     1668        'value' => $value,
     1669    ));
     1670
     1671
     1672    echo '</div>';
     1673
     1674}
     1675
     1676add_action( 'woocommerce_process_product_meta', 'datalogics_pickup_woocommerce_product_custom_fields_save' );
     1677
     1678function datalogics_pickup_woocommerce_product_custom_fields_save($post_id)
     1679{
     1680    $datalogics_pickup_allowed = 'datalogics_pickup_allowed';
     1681
     1682    if (isset($_POST[$datalogics_pickup_allowed])) {
     1683        $woocommerce_custom_product_text_field = sanitize_text_field(wp_unslash($_POST[$datalogics_pickup_allowed]));
     1684        update_post_meta($post_id, $datalogics_pickup_allowed, esc_attr($woocommerce_custom_product_text_field));
     1685    }
     1686
     1687}
     1688
     1689
     1690function datalogics_add_custom_information_to_order_email($order, $sent_to_admin, $plain_text, $email) {
     1691
     1692    $ncode_platform_id = get_post_meta($order->get_id(), 'datalogics_n_code_platform_id',true);
     1693
     1694    $datalogics_n_code = get_post_meta($order->get_id(), 'datalogics_n_code',true);
     1695
     1696    $ncode_ex = explode("-",$datalogics_n_code);   
     1697   
     1698    if (count($ncode_ex)==2) {
     1699        $datalogics_n_code = $ncode_ex[1];
     1700        $ncode_platform_id = $ncode_ex[0];
     1701    }
     1702
     1703
     1704    $ncode_list = datalogics_get_shipping_locations();
     1705                       
     1706    if (isset($ncode_list)) { 
     1707        $ncode_list_pass = false;
     1708        foreach ($ncode_list as $platform_id => $locations){
     1709            if (!empty($locations)) {
     1710                $ncode_list_pass = true;
     1711                break;
     1712            }
     1713        }
     1714        if ($ncode_list_pass==true) {
     1715
     1716            foreach ($ncode_list as $platform_id => $locations){                                                       
     1717                foreach ($locations as $values){
     1718                    foreach($values as $value) {
     1719
     1720                        if($value['n_code']==$datalogics_n_code && $platform_id==$ncode_platform_id) {
     1721
     1722                            // Display the custom information in the email template
     1723                            echo '<h2>'.esc_html__('Custom Information:','datalogics').'</h2>';
     1724                            echo '<p>';
     1725                            echo esc_html__('Pick your order from pickup location:','datalogics');
     1726                            echo esc_html($value['name'] .', '.$value['city'].', '.$value['street']);
     1727                            if (isset($value['remarks'])) {
     1728                                echo esc_html('<br>' . $value['remarks']);
     1729                            }
     1730                            echo '</p>';
     1731
     1732                        }
     1733                    }
     1734                }
     1735            }
     1736        }
     1737    }
     1738
     1739}
     1740add_action('woocommerce_email_after_order_table', 'datalogics_add_custom_information_to_order_email', 10, 4);
     1741
  • datalogics/trunk/datalogics.php

    r3297644 r3301592  
    1010    License: GPLv2 or later
    1111    License URI: https://www.gnu.org/licenses/gpl-2.0.html
    12     Version: 2.6.41
     12    Version: 2.6.42
    1313*/
    1414
  • datalogics/trunk/languages/datalogics-he_IL.po

    r3291430 r3301592  
    44"Report-Msgid-Bugs-To: \n"
    55"POT-Creation-Date: 2021-11-17 09:49+0000\n"
    6 "PO-Revision-Date: 2025-05-05 21:14+0000\n"
     6"PO-Revision-Date: 2025-05-27 15:06+0000\n"
    77"Last-Translator: David\n"
    88"Language-Team: עִבְרִית\n"
     
    1717
    1818#. %s: shipping class name
    19 #: shipping_class.php:246 shipping_class.php:659
     19#: shipping_class.php:246 shipping_class.php:660
    2020#, php-format
    2121msgid "\"%s\" shipping class cost"
    2222msgstr ""
    2323
    24 #: shipping_class.php:430 shipping_class.php:863
     24#: shipping_class.php:431 shipping_class.php:864
    2525msgid "(Free shipping)"
    2626msgstr "(משלוח חינם)"
    2727
    28 #: shipping_class.php:197 shipping_class.php:612
     28#: shipping_class.php:197 shipping_class.php:613
    2929msgid "Above this Weight value this shipping method wont be available."
    3030msgstr "משקל מעבר לערך שמוגדר לא יאפשר ללקוח בחירה של שיטת המשלוח הזו."
     
    3636msgstr "חשבון"
    3737
    38 #: shipping_class.php:217 shipping_class.php:632
     38#: shipping_class.php:217 shipping_class.php:633
    3939msgid "Additional price for every threshold increment."
    4040msgstr ""
    4141"מחיר נוסף עבור כל תוספת סף.\n"
    4242
    43 #: shipping_class.php:215 shipping_class.php:630
     43#: shipping_class.php:215 shipping_class.php:631
    4444msgid "Additional Price Per Threshold"
    4545msgstr ""
     
    9090msgstr "שליחת הזמנות מרוכזת"
    9191
    92 #: shipping_class.php:267 shipping_class.php:680
     92#: shipping_class.php:267 shipping_class.php:681
    9393msgid "Calculation type"
    9494msgstr ""
     
    102102msgstr "בדיקת רשיון"
    103103
    104 #: actions.php:1563 shipping_class.php:1085 shipping_class.php:1129
     104#: actions.php:1657
     105msgid "Choose"
     106msgstr ""
     107
     108#: actions.php:1612 shipping_class.php:1086 shipping_class.php:1130
    105109msgid "Choose Location"
    106110msgstr "בחירת נקודה"
    107111
    108 #: actions.php:1190
     112#: actions.php:1725
     113msgid "Custom Information:"
     114msgstr "מידע נוסף:"
     115
     116#: actions.php:1239
    109117msgid "Customer Address"
    110118msgstr "כתובת הלקוח"
    111119
    112 #: actions.php:1189
     120#: actions.php:1238
    113121msgid "Customer Name"
    114122msgstr "שם הלקוח"
     
    134142msgstr "החשבון שלכם ב DATALOGICS"
    135143
     144#: actions.php:1666
     145msgid "Datalogics Available for pickup locations?"
     146msgstr "האם זמין לאיסוף מנקודות מסירה?"
     147
    136148#: shipping_class.php:141 shipping_class.php:182
    137149msgid "Datalogics Door2Door"
     
    146158msgstr ""
    147159
    148 #: shipping_class.php:554 shipping_class.php:597
     160#: shipping_class.php:555 shipping_class.php:598
    149161msgid "Datalogics Pickup"
    150162msgstr "איסוף מנקודת חלוקה DataLogics"
    151163
    152 #: shipping_class.php:553 shipping_class.php:564
     164#: shipping_class.php:554 shipping_class.php:565
    153165msgid "Datalogics Pickup Shipping"
    154166msgstr "איסוף מנקודת חלוקה DataLogics"
    155167
    156 #: shipping_class.php:303 shipping_class.php:713
     168#: shipping_class.php:303 shipping_class.php:714
    157169msgid "Datalogics Shipping"
    158170msgstr ""
    159171
    160 #: actions.php:1111
     172#: actions.php:1160
    161173msgid "Delivery Address"
    162174msgstr "כתובת למשלוח"
    163175
    164 #: shipping_class.php:1083
     176#: shipping_class.php:1084
    165177msgid "Distance from destination"
    166178msgstr "מרחק מהיעד"
     
    175187msgstr "עריכת משלוח"
    176188
    177 #: shipping_class.php:285 shipping_class.php:695
     189#: shipping_class.php:285 shipping_class.php:696
    178190msgid "Enable"
    179191msgstr "הפעלה"
    180192
    181 #: shipping_class.php:204 shipping_class.php:619
     193#: shipping_class.php:204 shipping_class.php:620
    182194msgid "Enable Custom Weight-Based Shipping"
    183195msgstr "אפשר מחיר משלוח מותאם אישית מבוסס משקל"
    184196
    185 #: shipping_class.php:287 shipping_class.php:697
     197#: shipping_class.php:287 shipping_class.php:698
    186198msgid "Enable this shipping."
    187199msgstr "הפעלת משלוח"
    188200
    189 #: shipping_class.php:229 shipping_class.php:642
     201#: shipping_class.php:229 shipping_class.php:643
    190202msgid "Enter a cost (excl. tax) or sum, e.g. <code>10.00 * [qty]</code>."
    191203msgstr ""
     
    203215msgstr "לתמיכה ושירות יש ליצור קשר באמצעות:"
    204216
    205 #: shipping_class.php:190 shipping_class.php:605
     217#: shipping_class.php:190 shipping_class.php:606
    206218msgid "Free Shipping from"
    207219msgstr "משלוח חינם מסכום"
     
    244256msgstr "מדריך התקנה"
    245257
    246 #: actions.php:871
     258#: actions.php:920
    247259msgid "Invalid or missing security token."
    248260msgstr ""
     
    252264msgstr "דואר ישראל"
    253265
    254 #: actions.php:1557 shipping_class.php:1083
     266#: actions.php:1606 shipping_class.php:1084
    255267msgid "km"
    256268msgstr "ק\"מ"
    257269
    258 #: shipping_class.php:1027
     270#: shipping_class.php:1028
    259271msgid "list"
    260272msgstr "רשימה"
    261273
    262 #: shipping_class.php:293 shipping_class.php:703
     274#: shipping_class.php:293 shipping_class.php:704
    263275msgid "List type for locations."
    264276msgstr "סוג הרשימה לנקודות"
     
    268280msgstr "טוען מידע..."
    269281
    270 #: shipping_class.php:1020
     282#: shipping_class.php:1021
    271283msgid "locate"
    272284msgstr "איתור"
    273285
    274 #: shipping_class.php:1031
     286#: shipping_class.php:1032
    275287msgid "map"
    276288msgstr "מפה"
    277289
    278 #: shipping_class.php:195 shipping_class.php:610
     290#: shipping_class.php:195 shipping_class.php:611
    279291msgid "Max Weight"
    280292msgstr "משקל מקסימלי"
     
    288300msgstr ""
    289301
    290 #: actions.php:1172
     302#: actions.php:1221
    291303msgid "My Orders List"
    292304msgstr "רשימת הזמנות"
    293305
    294 #: shipping_class.php:248 shipping_class.php:259 shipping_class.php:661
    295 #: shipping_class.php:672
     306#: shipping_class.php:248 shipping_class.php:259 shipping_class.php:662
     307#: shipping_class.php:673
    296308msgid "N/A"
    297309msgstr ""
     
    301313msgstr "מספר הנקודה"
    302314
    303 #: shipping_class.php:257 shipping_class.php:670
     315#: actions.php:1659
     316msgid "No"
     317msgstr ""
     318
     319#: shipping_class.php:257 shipping_class.php:671
    304320msgid "No shipping class cost"
    305321msgstr ""
     
    309325msgstr "לא נבחרה צורת משלוח בהזמנה זו"
    310326
    311 #: actions.php:1260
     327#: actions.php:1309
    312328msgid "No tracking yet"
    313329msgstr "אין מספר מעקב עדיין"
    314330
    315 #: actions.php:1125
     331#: actions.php:1174
    316332msgid "No. of Items"
    317333msgstr "מספר הפריטים"
    318334
    319335#. %d is the number of minutes between occurrences
    320 #: actions.php:530
     336#: actions.php:567
    321337#, php-format
    322338msgid "Once every %d minutes"
    323339msgstr ""
    324340
    325 #: actions.php:1192
     341#: actions.php:1241
    326342msgid "Order Date"
    327343msgstr "תאריך ההזמנה"
     
    343359msgstr "נושא מידע על אספקת ההזמנה"
    344360
    345 #: actions.php:1135 actions.php:1270
     361#: actions.php:1184 actions.php:1319
    346362msgid "Order History"
    347363msgstr "היסטוריית ההזמנה"
    348364
    349 #: actions.php:1041 actions.php:1139 actions.php:1202 actions.php:1274
     365#: actions.php:1090 actions.php:1188 actions.php:1251 actions.php:1323
    350366msgid "Order in the system"
    351367msgstr "ההזמנה נקלטה במערכת"
    352368
    353 #: actions.php:1079 actions.php:1095
     369#: actions.php:1128 actions.php:1144
    354370msgid "Order No."
    355371msgstr "מספר הזמנה"
    356372
    357 #: actions.php:1188
     373#: actions.php:1237
    358374msgid "Order Number"
    359375msgstr "מספר ההזמנה"
    360376
    361 #: actions.php:1115
     377#: actions.php:1164
    362378msgid "Order Placed"
    363379msgstr "הזמנה נקלטה"
    364380
    365 #: actions.php:1121 actions.php:1191
     381#: actions.php:1170 actions.php:1240
    366382msgid "Order Value"
    367383msgstr "סך ההזמנה"
     
    371387msgstr "הזמנות נבחרו"
    372388
    373 #: shipping_class.php:272 shipping_class.php:685
     389#: shipping_class.php:272 shipping_class.php:686
    374390msgid "Per class: Charge shipping for each shipping class individually"
    375391msgstr ""
    376392
    377 #: shipping_class.php:273 shipping_class.php:686
     393#: shipping_class.php:273 shipping_class.php:687
    378394msgid "Per order: Charge shipping for the most expensive shipping class"
    379395msgstr ""
     396
     397#: actions.php:1727
     398msgid "Pick your order from pickup location:"
     399msgstr "נקודת המסירה שנבחרה:"
    380400
    381401#: class_wc_shipping_order_email.php:226
     
    393413msgstr "יש ליצור קשר עם התמיכה של תוסף DATALOGICS"
    394414
    395 #: shipping_class.php:1155
     415#: shipping_class.php:1158
    396416msgid "Please fill pickup city"
    397417msgstr "יש לרשום את עיר האיסוף"
    398418
    399 #: shipping_class.php:1037
     419#: shipping_class.php:1038
    400420msgid "Please fill your address on the search field"
    401421msgstr "יש למלא את הכתובת בשדה החיפוש"
    402422
    403 #: shipping_class.php:1019
     423#: shipping_class.php:1020
    404424msgid "Please fill your address.."
    405425msgstr "מלאו את הכתובת.."
     
    409429msgstr "הדפסת תווית משלוח"
    410430
    411 #: actions.php:1107
     431#: actions.php:1156
    412432msgid "Recipient"
    413433msgstr "נמען"
     
    421441msgstr "איסוף"
    422442
    423 #: actions.php:1087
     443#: actions.php:1136
    424444msgid "Search"
    425445msgstr "חיפוש"
    426446
    427 #: actions.php:1072
     447#: actions.php:1121
    428448msgid "Search for any package with your order number or shipping number."
    429449msgstr "חפש חבילה בעזרת מספר ההזמנה או מספר השילוח שלך."
     
    457477msgstr "סטטוס מעקב משלוח"
    458478
    459 #: shipping_class.php:233 shipping_class.php:646
     479#: shipping_class.php:233 shipping_class.php:647
    460480msgid "Shipping class costs"
    461481msgstr ""
    462482
    463 #: shipping_class.php:185 shipping_class.php:600
     483#: shipping_class.php:185 shipping_class.php:601
    464484msgid "Shipping Cost"
    465485msgstr "עלות משלוח"
    466486
    467 #: actions.php:1102
     487#: actions.php:1151
    468488msgid "Shipping Details"
    469489msgstr "פרטי המשלוח"
    470490
    471 #: actions.php:1083
     491#: actions.php:1132
    472492msgid "Shipping No."
    473493msgstr "מספר משלוח"
    474494
    475 #: shipping_class.php:291 shipping_class.php:701
     495#: shipping_class.php:291 shipping_class.php:702
    476496msgid "Show locations on:"
    477497msgstr "הצגת נקודות ב:"
    478498
    479 #: shipping_class.php:1035
     499#: shipping_class.php:1036
    480500msgid "Showing 20 stores closed to your location"
    481501msgstr "מציג 20 נקודות איסוף הקרובות למיקומך"
    482502
    483 #: actions.php:1194
     503#: actions.php:1243
    484504msgid "Status"
    485505msgstr "סטטוס"
     
    502522msgstr "ההזמנה "
    503523
    504 #: actions.php:1090
     524#: actions.php:1139
    505525msgid "There is not shipping match your order number and shipping ID"
    506526msgstr "אין שילוב בין מספר ההזמנה שלך וזיהוי המשלוח"
    507527
    508528#. %s: URL for link.
    509 #: shipping_class.php:237 shipping_class.php:650
     529#: shipping_class.php:237 shipping_class.php:651
    510530#, php-format
    511531msgid ""
     
    532552msgstr ""
    533553
    534 #: shipping_class.php:179 shipping_class.php:300 shipping_class.php:594
    535 #: shipping_class.php:710
     554#: shipping_class.php:179 shipping_class.php:300 shipping_class.php:595
     555#: shipping_class.php:711
    536556msgid "Title"
    537557msgstr "כותרת"
    538558
    539 #: shipping_class.php:181 shipping_class.php:302 shipping_class.php:596
    540 #: shipping_class.php:712
     559#: shipping_class.php:181 shipping_class.php:302 shipping_class.php:597
     560#: shipping_class.php:713
    541561msgid "Title to be display on site"
    542562msgstr "כותרת שתוצג באתר"
     
    554574msgstr "מעקב אחר המשלוח"
    555575
    556 #: actions.php:1193
     576#: actions.php:1242
    557577msgid "Tracking Number"
    558578msgstr "מספר מעקב"
    559579
    560 #: shipping_class.php:229 shipping_class.php:642
     580#: shipping_class.php:229 shipping_class.php:643
    561581msgid ""
    562582"Use <code>[qty]</code> for the number of items, <br/><code>[cost]</code> for "
     
    569589msgstr "צפיה במוצר"
    570590
    571 #: shipping_class.php:202 shipping_class.php:617
     591#: shipping_class.php:202 shipping_class.php:618
    572592msgid "Weight Calculation Enable/Disable"
    573593msgstr "הפעלת חישוב משקל"
    574594
    575 #: shipping_class.php:208 shipping_class.php:623
     595#: shipping_class.php:208 shipping_class.php:624
    576596msgid "Weight Threshold (kg)"
    577597msgstr "סף משקל (ק\"ג)"
    578598
    579 #: shipping_class.php:210 shipping_class.php:625
     599#: shipping_class.php:210 shipping_class.php:626
    580600msgid "Weight threshold for additional charges (e.g., 20.5 kg)."
    581601msgstr ""
     
    590610msgid "Welcome to Israel Post Domestic Shipping"
    591611msgstr "ברוכים הבאים לתוסף דואר ישראל"
     612
     613#: actions.php:1658
     614msgid "Yes"
     615msgstr ""
    592616
    593617#: templates/emails/customer-note.php:65
     
    596620msgstr "אתם יכולים לעקוב אחרי ההזמנה שלכם באמצעות הקישור למטה"
    597621
    598 #: shipping_class.php:1298
     622#: shipping_class.php:1301
    599623msgid ""
    600624"You did not choose pickup location. <a href=\"#datalogics-choose-location\">"
  • datalogics/trunk/shipping_class.php

    r3291430 r3301592  
    390390
    391391                    foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
     392                       
    392393
    393394
     
    11471148                    //var_dump($ncode_list);
    11481149
     1150                    //var_dump(count($ncode_list));
     1151
    11491152                    if (!empty($ncode_list)) {
    11501153
Note: See TracChangeset for help on using the changeset viewer.