Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
tig-robertgrundeken committed Feb 3, 2020
2 parents 3e05edd + 669d46d commit 15d7e6a
Show file tree
Hide file tree
Showing 16 changed files with 162 additions and 59 deletions.
2 changes: 1 addition & 1 deletion assets/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
}

#gls-order-label img {
height: 18px;
height: 12px;
}

#gls-label-amount {
Expand Down
2 changes: 1 addition & 1 deletion assets/css/admin.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions assets/css/frontend.css
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@
display :none;
}

.gls-parcel-shops .gls-parcel-shop .table.container {
.gls-parcel-shops .gls-parcel-shop .table.gls-container {
border: 1px solid #D4D9E3;
border-radius: 5px;
width: 100%;
Expand All @@ -264,7 +264,7 @@
transform: scale(0);
}

.gls-parcel-shops .gls-parcel-shop .table.container.active {
.gls-parcel-shops .gls-parcel-shop .table.gls-container.active {
background: #fff;
height: unset;
display :table;
Expand All @@ -276,42 +276,42 @@
transform: scale(1);
}

.gls-parcel-shops .gls-parcel-shop .table.container .row {
.gls-parcel-shops .gls-parcel-shop .table.gls-container .gls-row {
display :table !important;
width: 100%;
padding-bottom: 3px;
}

.gls-parcel-shops .gls-parcel-shop .table.container .row:nth-child(1){
.gls-parcel-shops .gls-parcel-shop .table.gls-container .gls-row:nth-child(1){
display :none !important;
}

.gls-parcel-shops .gls-parcel-shop .table.container .row .cell{
.gls-parcel-shops .gls-parcel-shop .table.gls-container .gls-row .gls-cell{
display :table-cell;
}

.gls-parcel-shops .gls-parcel-shop .table.container .row .cell.day-of-the-week {
.gls-parcel-shops .gls-parcel-shop .table.gls-container .gls-row .gls-cell.day-of-the-week {
width: 30%;
padding-right: 7px;
}

.gls-parcel-shops .gls-parcel-shop .table.container .row .cell.opening-hours {
.gls-parcel-shops .gls-parcel-shop .table.gls-container .gls-row .gls-cell.opening-hours {
width: 70%;
}

/* Close */

.gls-parcel-shops .gls-parcel-shop .table.container {
.gls-parcel-shops .gls-parcel-shop .table.gls-container {
position: relative;
}

.gls-parcel-shops .gls-parcel-shop .table.container .close {
.gls-parcel-shops .gls-parcel-shop .table.gls-container .gls-close {
position: absolute;
right: 15px;
top: 12px;
}

.gls-parcel-shops .gls-parcel-shop .table.container .close svg {
.gls-parcel-shops .gls-parcel-shop .table.gls-container .gls-close svg {
display :inline;
vertical-align: middle;
margin-left: 5px;
Expand Down
2 changes: 1 addition & 1 deletion assets/css/frontend.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions assets/js/frontend/checkout.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jQuery(
this.$checkout_form.on('click', '.gls-tab-pickup',
function() { gls_delivery_options_form.toggle_tabs.call(this, '.gls-tab-delivery', '.gls-delivery-options', '.gls-parcel-shops')}
);
this.$checkout_form.on('click', '.open-business-hours-link, .close', this.toggle_business_hours);
this.$checkout_form.on('click', '.open-business-hours-link, .gls-close', this.toggle_business_hours);
},

/**
Expand Down Expand Up @@ -315,7 +315,7 @@ jQuery(

var i = 0;
option.businessHours.forEach(function(business_hours) {
gls_delivery_options_form.map_parcel_shop_business_hours(business_hours, template, template.find('.parcel-business-hours > .row')[i]);
gls_delivery_options_form.map_parcel_shop_business_hours(business_hours, template, template.find('.parcel-business-hours > .gls-row')[i]);
i++;
});

Expand Down Expand Up @@ -387,8 +387,8 @@ jQuery(
set_background_color: function(selectedDeliveryOption) {
var notSelectedDeliveryOptions = $('.woocommerce-checkout input[name="gls_delivery_option"]:not(:checked)');

notSelectedDeliveryOptions.parents('.container').removeClass('gls-highlight');
selectedDeliveryOption.parents('.container').addClass('gls-highlight');
notSelectedDeliveryOptions.parents('.gls-container').removeClass('gls-highlight');
selectedDeliveryOption.parents('.gls-container').addClass('gls-highlight');
},

/**
Expand All @@ -409,11 +409,11 @@ jQuery(
*/
toggle_business_hours: function () {
if (this.className === 'open-business-hours-link') {
$(this).next('.table.container').toggleClass('active');
$(this).next('.table.gls-container').toggleClass('active');
$(this).addClass('active');
} else {
$(this).parent('.table.container').removeClass('active');
$(this).parent('.table.container').prev('.open-business-hours-link').removeClass('active');
$(this).parent('.table.gls-container').removeClass('active');
$(this).parent('.table.gls-container').prev('.open-business-hours-link').removeClass('active');
}
},
};
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "tig/gls-woocommerce",
"description": "GLS plugin for WooCommerce",
"description": "GLS NL plugin for WooCommerce",
"require": {
"php": "~7.0|~7.1|~7.2|~7.3|~7.4",
"setasign/fpdi-fpdf": "^2.2"
},
"type": "woocommerce-plugin",
"license": "CC-BY-NC-ND-3.0",
"version": "1.1.0",
"version": "1.1.3",
"authors": [
{
"name": "TIG",
Expand Down
9 changes: 5 additions & 4 deletions gls-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
/**
* @formatter:off
* Plugin Name: GLS for WooCommerce
* Plugin URI: https://tig.nl/
* Description: Send and process orders in WooCommerce using GLS' shipping services.
* Version: 1.1.0
* Plugin URI: https://gls-group.eu/NL/nl/home
* Description: GLS offers shipping solutions nationally and internationally in Europe and worldwide. By using this plugin you can integrate GLS shipping methods in WooCommerce.
* Version: 1.1.3
* Author: TIG
* Author URI: https://tig.nl/
* License: GPL2v2 or later
* Text Domain: gls-woocommerce
* WC Requires at least: 3.8.1
* WC Tested up to: 3.9
* @formatter:on
*/

Expand Down Expand Up @@ -136,4 +138,3 @@ function GLS()
}

add_action('woocommerce_loaded', 'tig_gls_init_after_woocommerce');

2 changes: 1 addition & 1 deletion includes/admin/class-gls-admin-meta-boxes.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function add_meta_boxes() {
}

foreach (wc_get_order_types('order-meta-boxes') as $type) {
add_meta_box('gls-order-label', '<img src="' . GLS()->plugin_url('/assets/images/gls-logo.png') . '">' . '&nbsp;', 'GLS_Admin_Meta_Box_Order_Label::output', $type, 'side', 'high');
add_meta_box('gls-order-label', '<img src="' . GLS()->plugin_url('/assets/images/gls-logo.png') . '">' . '&nbsp;&nbsp;' . __('Create labels', 'gls-woocommerce'), 'GLS_Admin_Meta_Box_Order_Label::output', $type, 'side', 'high');
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ public function delivery_options_settings()
echo wp_kses_post($option->get_method_description());
break;
case 'additional_fee':
echo "<input type='text' class='short wc_input_price' value='$additional_fee' name='additional_fee[$option->id]' />";
echo "<input step='0.01' type='number' class='short' value='$additional_fee' name='additional_fee[$option->id]' />";
break;
case 'status':
echo '<a class="gls-delivery-option-method-toggle-enabled" href="' . esc_url(admin_url('admin.php?page=wc-settings&tab=tig_gls&section=' . strtolower($option->id))) . '">';
Expand Down
4 changes: 2 additions & 2 deletions includes/class-gls-delivery-options.php
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ public static function disable_shipping_rates_cache($packages) {
$session = WC()->session;
$shipping_method = $session->get('chosen_shipping_methods');

if (!GLS()->is_gls_selected(reset($shipping_method))) {
if (is_array($shipping_method) && !GLS()->is_gls_selected(reset($shipping_method))) {
return $packages;
}

Expand All @@ -385,7 +385,7 @@ public static function adjust_shipping_rate($rates){
$session = WC()->session;
$shipping_method = $session->get('chosen_shipping_methods');

if (!GLS()->is_gls_selected(reset($shipping_method))) {
if (is_array($shipping_method) && !GLS()->is_gls_selected(reset($shipping_method))) {
return $rates;
}

Expand Down
2 changes: 1 addition & 1 deletion includes/class-gls.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ final class GLS
*
* @var string
*/
public $version = '1.1.0';
public $version = '1.1.3';

/**
* The single instance of the class.
Expand Down
Binary file modified languages/gls-woocommerce-nl_NL.mo
Binary file not shown.
Loading

0 comments on commit 15d7e6a

Please sign in to comment.