Code Monkey home page Code Monkey logo

gls-magento2's Introduction

TIG GLS Netherlands for Magento 2

TIG GLS tested 2.3.x versions TIG GLS tested 2.4.x versions

We created this extension to easily integrate GLS' Delivery Services into Magento 2.

What does it do?

  • Add GLS as a shipping method to Magento 2's checkout.
    • Show available Delivery Options in The Netherlands depending on zipcode and shipping date, such as:
      • Express Delivery (e.g. before 9.00 AM, 12.00 AM or 5.00 PM),
      • Saturday Delivery,
      • Delivery to a ParcelShop (sorted by distance from zipcode),
    • Ship outside The Netherlands using Standard Delivery.
    • Use table rates to set different shipping rates per country and order subtotal.
  • Easily create, delete or print labels from within the Shipment-view:
    • Including ShopReturn-label (if enabled).
  • Enable/disable Express Delivery Services separately,
  • Offer discounts or calculate additional for specific Delivery Services.

Installation using Composer

composer require tig/gls-magento2

Installation without using Composer

Clone or download the contents of this repository into app/code/TIG/GLS.

Development Mode

After installation, run bin/magento setup:upgrade to make the needed database changes and remove/empty Magento 2's generated files and folders.

Production Mode

After installation, run:

  1. bin/magento setup:upgrade
  2. bin/magento setup:di:compile
  3. bin/magento setup:static-content:deploy [locale-codes, e.g. nl_NL en_US]
  4. `bin/magento cache:flush

Done!

Configuration

API credentials

To use this module you need API credentials provided by GLS. These can be entered in Stores / Configuration / Sales / GLS.

Shipping Method

To configure the shipping method's handling fees, available services, etc. go to Stores / Configuration / Sales / Shipping Methods / GLS.

Store Address and E-mail addresses

Because each label requires a valid Sender Address, it is mandatory to configure a store address at Stores / Configuration / General / General / Store Information. The House Number should be entered in Street Address Line 2.

GLS will notify your customers with emails about the delivery time. The sender name and sender email are from the Magento configuration located at Stores / Configuration / Store Email Addresses / Customer Support.

Table Rates (Price vs Destination)

To configure different handling fees for different countries, setup table rates in Stores / Configuration / Sales / Shipping Methods / GLS using Website as the Scope.

Start by using the Export CSV button, which results in an empty CSV-file with the following columns:

  • Country: (2 or 3 lettered) country codes according to ISO standards.
  • Region/State: Specify a region or state to make the shipping applicable only to this region. Keep in mind that this field is optional in the checkout for some countries. Wildcard = *
  • Zip/Postal Code: This should the the exact postal code. E.g. for The Netherlands and without postal code validation you should have 2 lines in your CSV-file per postal code, e.g. 1014BA and 1014 BA. Wildcard = *
  • Order Subtotal (and above): apply this shipping rate if the total cart value exceeds this amount (e.g. 100.) Defaults to 0.
  • Shipping Price: e.g. 9.95 (using a period as delimiter) is added to the amount specified as Handling Fee in Stores / Configuration / Sales / Shipping Methods / GLS.

gls-magento2's People

Contributors

tig-bartrusschenberg avatar tig-daanvandenbergh avatar tig-dennisvanderhammen avatar tig-jaspersmits avatar tig-kevinvandijk avatar tig-lucas-hoeffnagel avatar tig-mickeybeijer avatar tig-mvonk avatar tig-robertgrundeken avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gls-magento2's Issues

[BUG] Magento 2.4.5 Delivery Methods won't open

To Reproduce
Steps to reproduce the behavior:

  1. install the latest version v1.4.0
  2. Go to Admin -> Configuration -> Sales -> Delivery Method

Expected result
I can see the delivery options.

Actual result
I get greeted by an error as stated below:

1 exception(s):
Exception #0 (BadMethodCallException): Missing required argument $objectOrClass of TIG\GLS\Service\ServicesReflectionClass.

Exception #0 (BadMethodCallException): Missing required argument $objectOrClass of TIG\GLS\Service\ServicesReflectionClass.
#1 Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime() called at [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:34]
#2 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments() called at [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:59]
#3 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create() called at [vendor/magento/framework/ObjectManager/ObjectManager.php:70]
#4 Magento\Framework\ObjectManager\ObjectManager->get() called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:170]
#5 Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument() called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:276]
#6 Magento\Framework\ObjectManager\Factory\AbstractFactory->getResolvedArgument() called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:239]
#7 Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime() called at [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:34]
#8 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments() called at [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:59]
#9 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create() called at [vendor/magento/framework/ObjectManager/ObjectManager.php:70]
#10 Magento\Framework\ObjectManager\ObjectManager->get() called at [vendor/magento/module-config/Model/Config/SourceFactory.php:37]
#11 Magento\Config\Model\Config\SourceFactory->create() called at [vendor/magento/module-config/Model/Config/Structure/Element/Field.php:443]
#12 Magento\Config\Model\Config\Structure\Element\Field->_getOptionsFromSourceModel() called at [vendor/magento/module-config/Model/Config/Structure/Element/Field.php:379]
#13 Magento\Config\Model\Config\Structure\Element\Field->getOptions() called at [generated/code/Magento/Config/Model/Config/Structure/Element/Field/Interceptor.php:230]
#14 Magento\Config\Model\Config\Structure\Element\Field\Interceptor->getOptions() called at [vendor/magento/module-config/Block/System/Config/Form.php:394]
#15 Magento\Config\Block\System\Config\Form->_initElement() called at [vendor/magento/module-config/Block/System/Config/Form.php:316]
#16 Magento\Config\Block\System\Config\Form->initFields() called at [generated/code/Magento/Config/Block/System/Config/Form/Interceptor.php:32]
#17 Magento\Config\Block\System\Config\Form\Interceptor->initFields() called at [vendor/magento/module-config/Block/System/Config/Form.php:256]
#18 Magento\Config\Block\System\Config\Form->_initGroup() called at [vendor/magento/module-config/Block/System/Config/Form.php:302]
#19 Magento\Config\Block\System\Config\Form->initFields() called at [generated/code/Magento/Config/Block/System/Config/Form/Interceptor.php:32]
#20 Magento\Config\Block\System\Config\Form\Interceptor->initFields() called at [vendor/magento/module-config/Block/System/Config/Form.php:256]
#21 Magento\Config\Block\System\Config\Form->_initGroup() called at [vendor/magento/module-config/Block/System/Config/Form.php:202]
#22 Magento\Config\Block\System\Config\Form->initForm() called at [generated/code/Magento/Config/Block/System/Config/Form/Interceptor.php:23]
#23 Magento\Config\Block\System\Config\Form\Interceptor->initForm() called at [vendor/magento/module-config/Block/System/Config/Form.php:542]
#24 Magento\Config\Block\System\Config\Form->_beforeToHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1094]
#25 Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1099]
#26 Magento\Framework\View\Element\AbstractBlock->_loadCache() called at [vendor/magento/framework/View/Element/AbstractBlock.php:660]
#27 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [generated/code/Magento/Config/Block/System/Config/Form/Interceptor.php:536]
#28 Magento\Config\Block\System\Config\Form\Interceptor->toHtml() called at [vendor/magento/framework/View/Layout.php:578]
#29 Magento\Framework\View\Layout->_renderBlock() called at [vendor/magento/framework/View/Layout.php:555]
#30 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#31 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#32 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#33 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Element/AbstractBlock.php:507]
#34 Magento\Framework\View\Element\AbstractBlock->getChildHtml() called at [vendor/magento/module-config/view/adminhtml/templates/system/config/edit.phtml:32]
#35 include() called at [vendor/magento/framework/View/TemplateEngine/Php.php:71]
#36 Magento\Framework\View\TemplateEngine\Php->render() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#37 Magento\Framework\View\TemplateEngine\Php\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#38 Magento\Framework\View\TemplateEngine\Php\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#39 Magento\Framework\View\TemplateEngine\Php\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/View/TemplateEngine/Php/Interceptor.php:23]
#40 Magento\Framework\View\TemplateEngine\Php\Interceptor->render() called at [vendor/magento/framework/View/Element/Template.php:263]
#41 Magento\Framework\View\Element\Template->fetchView() called at [vendor/magento/framework/View/Element/Template.php:293]
#42 Magento\Framework\View\Element\Template->_toHtml() called at [vendor/magento/module-backend/Block/Template.php:141]
#43 Magento\Backend\Block\Template->_toHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1095]
#44 Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1099]
#45 Magento\Framework\View\Element\AbstractBlock->_loadCache() called at [vendor/magento/framework/View/Element/AbstractBlock.php:660]
#46 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [vendor/magento/framework/View/Layout.php:578]
#47 Magento\Framework\View\Layout->_renderBlock() called at [vendor/magento/framework/View/Layout.php:555]
#48 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#49 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#50 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#51 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#52 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#53 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#54 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#55 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#56 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#57 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#58 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#59 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#60 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#61 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#62 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#63 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#64 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#65 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#66 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#67 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#68 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#69 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#70 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#71 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#72 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#73 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#74 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#75 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#76 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#77 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#78 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#79 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#80 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#81 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#82 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#83 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#84 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#85 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#86 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#87 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#88 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#89 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#90 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#91 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:975]
#92 Magento\Framework\View\Layout->getOutput() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:347]
#93 Magento\Framework\View\Layout\Interceptor->getOutput() called at [vendor/magento/framework/View/Result/Page.php:260]
#94 Magento\Framework\View\Result\Page->render() called at [vendor/magento/framework/View/Result/Layout.php:171]
#95 Magento\Framework\View\Result\Layout->renderResult() called at [generated/code/Magento/Backend/Model/View/Result/Page/Interceptor.php:140]
#96 Magento\Backend\Model\View\Result\Page\Interceptor->renderResult() called at [vendor/magento/framework/App/Http.php:120]
#97 Magento\Framework\App\Http->launch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#98 Magento\Framework\App\Http\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#99 Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#100 Magento\Framework\App\Http\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:23]
#101 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:264]
#102 Magento\Framework\App\Bootstrap->run() called at [pub/index.php:30]

Workaround
None

** Please complete the following information**

  • Magento version: 2.4.5
  • PHP version: 8.1
  • TIG GLS version: 1.4.0

[QUESTION] Change flat price on store view

Question
Ask your question in an arbitrary form without insulting someone. Please make sure it's worded well enough to be understood and remove this line.

Using GLS I want to be able to change the price for flat rate on scope = Store view.
How can this be achieved?

[BUG] Languages not supported?

To Reproduce
Steps to reproduce the behavior:

  1. Setup a multistore with various languages, install the plugin etc. Make sure it's all working fine IN DUTCH
  2. Switch the store view to another language (tested fr_FR and sv_SE) and try to order

Expected result
Having deliveryOptions available in the correct language

Actual result
No deliveryOptions available. The 'gls/deliveryoptions/services?postcode=XXX&country=XXX&_=XXXX' route returns '[]' (empty array). When calling that same url through the main/dutch store it DOES give the proper results

Workaround
TIG/GLS/Service/DeliveryOptions/Services.php:74 $langCode -> Change into 'NL' (hardcoded language)

I assume GLS only supports a limited amount of languages OR the language code is passed on wrongly. In either case I'd love to have a fallback to English

** Please complete the following information**

  • Magento version: Mage 2.4.3-p1
  • PHP version: 7.4.X
  • TIG GLS version: 2.6 Sorry, 1.4.0

[BUG] Something (?) went wrong while importing GLS rates

To Reproduce
Steps to reproduce the behavior:

  1. Go to Configuration -> Sales -> Shipping Methods
  2. Switch to 'website configuration scope'
  3. Click on Export CSV
  4. Upload that same CSV on the 'import rates'
  5. Click save
  6. "Something" went wrong

Expected result
A clean import of GLS rates. Other then that, a more clear error message. At first I was thinking I broke the CSV, but since it also breaks on the data it exports itself I guess something else is up.

Actual result
Shows error Something went wrong while importing GLS rates.. No database changes are made as far as I can see.

Workaround
Manually hack this into the database, with the risk of many unintended side-effects

Screenshots
Nope

** Please complete the following information**

  • Magento version: "magento/product-community-edition": "2.3.4",
  • PHP version: 7.3.23
  • TIG GLS version: 1.3.2

[BUG] GLS Api error when name is too long

To Reproduce
Steps to reproduce the behavior:

  1. Buy a product in Magento store, enter a very long name or two long names (first name and second name together should exceed length 30)
  2. Go through checkout and choose GLS
  3. In the backend of your shop, create a shipment and push the button "GLS - Create Label"

Expected result
A label

Actual result
Errors:

  • An error occurred while creating the label. V009: One or more properties are containing data with an invalid format [Status: 400]
  • The following shipping field contains errors: The value Name1 cannot exceed 30 characters.

Workaround
On the frontend of the shop I have added validators to the names to make sure no one can enter a name longer then 30 characters. Unfortunatly, it appears that there are several Parcel shops with names exceeding 30 characters that the customer can choose. And those simply can't be checked.

Screenshots
If applicable, add screenshots to help explain your problem

image
image

it seems to also happen with phone numbers exceeding 15 characters.

** Please complete the following information**

  • Magento version: Magento 2.4.3
  • PHP version: 7.4.25
  • TIG GLS version: latstest (1.4.0 according to composer.json)

/etc/acl.xml has been removed

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'

Expected result
A clear and concise description of what you expected to happen.

Actual result
Describe the actual result

Workaround
Describe the temporarily workaround or if none exists write "None"

Screenshots
If applicable, add screenshots to help explain your problem.

** Please complete the following information**

  • Magento version: Magento 2.3.4
  • PHP version: 7.4
  • TIG GLS version: 1.3.1

/etc/acl.xml file, added in a previous pull request has been removed

Therefore if a user has a custom role, then they can not see the configuration section as it is not possible to allow it in the role configuration.

Workaround..
Have added /etc/acl.xml

[BUG] Can't get GLS labels when using re-order

To Reproduce
Steps to reproduce the behavior:

  1. Create an order that is using GLS as shipping method
  2. Click on 'Re-order' in the admin and set it to use GLS as shipping method
  3. Create a shipment for the new order
  4. Try to retrieve the label, the exception pasted below appears

Expected result
Retrieving a GLS label

Actual result

1 exception(s):
Exception #0 (Exception): Notice: Trying to get property 'deliveryAddress' of non-object in /Users/vandijkstef/Web/emaillegigant/web/vendor/tig/gls-magento2/Service/Label/Create.php on line 156

Exception #0 (Exception): Notice: Trying to get property 'deliveryAddress' of non-object in /Users/vandijkstef/Web/emaillegigant/web/vendor/tig/gls-magento2/Service/Label/Create.php on line 156
<pre>#1 TIG\GLS\Service\Label\Create->mapLabelData() called at [vendor/tig/gls-magento2/Service/Label/Create.php:142]
#2 TIG\GLS\Service\Label\Create->getRequestData() called at [vendor/tig/gls-magento2/Controller/Adminhtml/Label/Create.php:83]
#3 TIG\GLS\Controller\Adminhtml\Label\Create->execute() called at [vendor/magento/framework/App/Action/Action.php:108]
#4 Magento\Framework\App\Action\Action->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#5 TIG\GLS\Controller\Adminhtml\Label\Create\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#6 TIG\GLS\Controller\Adminhtml\Label\Create\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#7 TIG\GLS\Controller\Adminhtml\Label\Create\Interceptor->___callPlugins() called at [generated/code/TIG/GLS/Controller/Adminhtml/Label/Create/Interceptor.php:26]
#8 TIG\GLS\Controller\Adminhtml\Label\Create\Interceptor->dispatch() called at [vendor/magento/framework/App/FrontController.php:159]
#9 Magento\Framework\App\FrontController->processRequest() called at [vendor/magento/framework/App/FrontController.php:98]
#10 Magento\Framework\App\FrontController->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#11 Magento\Framework\App\FrontController\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#12 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#13 Magento\Framework\App\FrontController\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:26]
#14 Magento\Framework\App\FrontController\Interceptor->dispatch() called at [vendor/magento/framework/App/Http.php:116]
#15 Magento\Framework\App\Http->launch() called at [vendor/magento/framework/App/Bootstrap.php:261]
#16 Magento\Framework\App\Bootstrap->run() called at [pub/index.php:94]
</pre>

Workaround
None

Screenshots
None

** Please complete the following information**

  • Magento 2.3.4
  • PHP version: 7.3.23
  • TIG GLS version: 1.3.2

[FEATURE] add config fields sender address

Please rephrase the following line:

As a website owner I'd like to be able to change the sender address in order to be able to act as a dropshipping.

Suggestions and background

Magento admin > Store > Settings > Configuration > Sales > PostNL > Basic > Sender Address

This block is missing in the GLS module. Please add it to the GLS module too

Compatible for M2.3.4?

The module is not compatible for Magento version 2.3.4. When will you update the module?
image

[BUG] Condition value is always package weight and never subtotal (except if package has no weight)

To Reproduce
Steps to reproduce the behavior:

  1. Go to the admin, set condition = "Prices vs. Destination" and use table rates for handling fees calculation, with (for example) two prices: 3.95 euro for subtotal 0 and above, 0 euro for subtotal 32.2314 (ex VAT, which is 39 incl VAT) and above
  2. Add one or more products with weight (for example a weight of 1) to the cart, resulting in a subtotal of 32.2314+ (which should trigger the free shipping)

Expected result
The shipping costs is 0

Actual result
The shipping costs is 3.95

Workaround
Change \TIG\GLS\Model\ResourceModel\Carrier\bindings, line 152:
Old: $bindings[':condition_value'] = $request->getPackageWeight();
New: $bindings[':condition_value'] = $this->getConditionValue($request->getAllItems());

Note:
Because of the following line: if ($bindings[':condition_name'] == null && $bindings[':condition_value'] == 0.0)
It does seem to work when no weight is set for the product.

Screenshots
Shipping rates:
image

Settings:
image

  • Magento version: 2.3.7-p1
  • PHP version: 7.4.23
  • TIG GLS version: 1.4.0

[BUG] Tracking code in email?

Question
Is it correct that there is no tracking-code/url inserted in the email for the client?

The shipping-email is showing a 'Shipped by' and 'Tracking-number' label, but no information is added. The admin is showing the tracking url/code just fine, and I've found the tracking-code in the gls_shipment_label table, but it seems the sales_shipment_track table remains empty and I guess that's why it's not coming up in the email.

Please let me know if the tracking code should appear in the email (and I've been breaking something) or this isn't a feature of the module (in case I'd appreciate this issue escalated into a feature request)

[FEATURE] Disable specific weekdays for delivery

Please rephrase the following line:

As a webshop owner I'd like to disable certain weekdays for delivery in order to prevent showing delivery dates I cannot deliver.

For example: on Sundays I do not ship any orders, meaning when someone orders on Sunday I cannot deliver on Monday. Currently, Monday is available as delivery day.
Ideally I would like to be able to select which weekdays I can delivery in the admin panel.

Improvement: Add tablerate for weight

Improve tablerate condition. The GLS module uses prics vs. destionation for tablerates. We would like to use weight vs. destination as input for tablerates.

Maybe it could be the same as the Magento tablerate conditions:

image

Please let me know what your plans are on this topic, as for now we can't use it for our customer.

[QUESTION] Reduce DB size

Question
Ask your question in an arbitrary form without insulting someone. Please make sure it's worded well enough to be understood and remove this line.

sorting the DB tables by size both PostNL and GLS modules created by you take a huge amount of space.
Combined they are over 1GB.
The third largest table is from another developer and consumes 60MB. Yours take 662MB and 502MB, combined over 1GB

What can be done to reduce this growing table?
Schermafbeelding 2021-09-10 om 16 40 24

[FEATURE] disable GLS bezorgdag

As a webshop owner I'd like to disable expected delivery date so customers don't get a false expectation for backorder products

It would be great if there would be an option in the backend whether to show GLS bezorgdag or not. Ideally, you would only want to show GLS bezorgdag for 'in stock' products, and only disable GLS bezorgdag for backorder products.

Shipment costs not always processed in Mollie

Reqs:
Magento 2.3.3.
GLS 1.3.0
Mollie 1.8.0

Problem:
Example: When submitting an order with a total of 34,95, the customer only seems to need to pay 29.00 in the mollie ideal and CC. The shipping costs are 5.95.
I am trying to isolate if the problem is GLS, Mollie, Magento, or a combination of these.

It only seems to apply to dutch shipments only, close to the free shipment config (35), such 29-30-31 etc.
While the price in the checkout order total seems correct (shipping is calculated and added tot the total), that when the order is finally submitted GLS removes the shipping costs because it calculated the VAT twice?

Question
Is it possible that following the checkout flow that this is a GLS module bug?

[FEATURE] Disable shipping day options

Please rephrase the following line:

As a Magento 2 owner I'd like to offer my clients only to click GLS Bezorging without choosing the day of the delivery when there is only one item to choose from. I would no like to display the option at all.

Schermafbeelding 2020-12-11 om 15 00 50

The mail confirmation of the order makes it even more confuse. It can be read as the day that the order will be shipped instead of delivered.

Schermafbeelding 2020-12-11 om 15 03 14

Suggestions and background

  • add an option to remove the estimated delivery date from the mail order confirmation
  • When FlexDeliveryService is set to Disable I am not expecting to see the single option to select the date of delivery

[BUG] Free shipping and various currencies

The free shipping calculation is based on the order subtotal but this can lead to some unwanted free shipments. It doesn't matter too much if we're talking GBP/USD over a EUR base price, but it is massive on currencies like SEK (10:1!)

I've already patched it myself (see below). Basically Magento always keeps functioning with the base currency, and those fields should be used/checked.

---
 web/app/code/TIG/GLS/Model/ResourceModel/Carrier/GLS.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/web/app/code/TIG/GLS/Model/ResourceModel/Carrier/GLS.php b/web/app/code/TIG/GLS/Model/ResourceModel/Carrier/GLS.php
index 14fd9ae1c6..0606ccd634 100644
--- a/web/app/code/TIG/GLS/Model/ResourceModel/Carrier/GLS.php
+++ b/web/app/code/TIG/GLS/Model/ResourceModel/Carrier/GLS.php
@@ -223,7 +223,7 @@ class GLS extends Tablerate
     {
         $quote = $this->reloadQuote($items);
 
-        return (float) $quote->getSubtotal();
+        return (float) $quote->getBaseSubtotal();
     }
 
     /**
-- 

Access denied due to missing subscription key

Hello Team,

I'm getting an error message "Access denied due to missing subscription key. Make sure to include subscription key when making requests to an API".
I know subscription key is required but I don't know where I can find subscription key.
I contacted GLS support but they even don't know about "Subscription key": Ocp-Apim-Subscription-Key.
Can you please advise?

Thank you so much!

[BUG] Trying to get property 'deliveryAddress' of non-object

To Reproduce
Steps to reproduce the behavior:
got to order
try to create shipping label

Expected result
A clear and concise description of what you expected to happen.
creating a shipping label

Actual result
Describe the actual result
when trying to create a shipping label for a order i get this error:
{"0":"Notice: Trying to get property 'deliveryAddress' of non-object in /var/www/vhosts/shoes.nl/httpdocs/vendor/tig/gls-magento2/Service/Label/Create.php on line 156","1":"#1 TIG\GLS\Service\Label\Create->mapLabelData(&Magento\Sales\Model\Order\Shipment\Interceptor#000000003f3368ff0000000038859bdd#, 'TIG_GLS', 1.1)

Workaround
Describe the temporarily workaround or if none exists write "None"
no workarround

Screenshots
If applicable, add screenshots to help explain your problem.

** Please complete the following information**
Magento 2.3.5p1
PHP 7.2.34
1.3.5

[BUG] Mage 2.4.4 product/order grid filter/search

I've got an issue after upgrading to Mage2.4.4. Been able to track it down to this module. Issue is reported here: magento/magento2#35781

I will put work into this, just raising this issue to notify anyone this module doesn't seem compatible with Mage2.4.4 for this specific reason.

Tested on PHP 7.4 and 8.1 and with a clean version of 1.4.0 of TIG_GLS.

[BUG] False error when trying to order on invalid API credentials

To Reproduce
Try to order with invalid API credentials.
When the API credentials are invalid, the front-end/checkout page is not showing the sub-options (like ship or pick-up point).

Expected result
A different error stating either 'Something went wrong, try again later' or 'Could not reach GLS API' instead of putting blame to the front-end users data entry. Additionally, nothing was found in the various './var/log/*' log-files leaving the developer or site-owner completely guessing.

The error is blocking the order, which might even be harmful for our business should it happen again. Accepting the order as 'default shipment' and silently fail on the pick-ups points would be preferred. This is probably connected to #17 and #19

Actual result
The error message tells me to 'check my address input' while there was a correct and valid address in the fields.

Workaround
Simply put in the correct API credentials. I have not changed the credentials, and I am unsure why and how the system 'forgot' the actual credentials. It might have possibly been wrongly saved changing other configuration options, since I have been visiting the config page.

Please note that due to the false error statement, I spend about 2 hours reviewing changes in XML files, rebuilding DI, refreshing caches, drinking insane amounts of coffee and pulling my hairs out.

** Please complete the following information**

  • Magento version: 2.3.7
  • PHP version: 7.3.X
  • TIG GLS version: 1.3.2

[FEATURE] change parcel count

Please rephrase the following line:

As a shop owner I'd like to be able to change the parcel count in order to ship heavy orders with multiple parcels

Suggestions and background

We are using both TIG/PostNL as TIG/GLS
Using PostNL it is possible to change the parcel count while creating a shipment.
We would like to be able to do the same for GLS shipments

Schermafbeelding 2020-12-21 om 09 50 01

[BUG] ShopDeliveryService create label breaks with new setting GLS mass-actions for non GLS orders?

Customer updated to latest GLS and suddenly packages were returned. Turns out that the packages being returned were returned from Parcel shops. A little investigation showed that the labels were incorrect, they should contain "ShopDeliveryService" and a GLS code for the shop of choice. Quite some searching and adding of logging it turns out that in the TIG\GLS\Service\Label\Create class the mapLabelData function ends up in the fallback and then is set to "DefaultGLSOptions":
$deliveryOption = $this->getDefaultGLSOptions($shipment);

It took quite a bit of searching before we ended up with one setting that caused this: GLS mass-actions for non GLS orders -> Yes

I have no clue what that setting is supposed to do but I'm pretty sure it should not mess up ParcelShop deliveries. Now this is a multi store Magento so it could be that is has something to do with the bit of previous code (storeId) but I didn't investigate that any further.

Steps to reproduce the behavior:

  1. Go to 'Magento2.4.x multi store' -> Stores -> Configurations -> Sales -> GLS -> GLS mass-actions for non GLS orders -> Yes
  2. Go to frontend of multi store, throw stuff in cart go to checkout and choose GLS -> Parcel shop (Pakket shop), choose one and place order
  3. Go to backend, ship order and press create Label

Expected result
Label should contain "ShopDeliveryService" and a GLS code for the shop. As well as something saying "will be collected by..."
image

Actual result
Label looks suspiciously empty, seems that the Parcelshop address is being used as the actual person address instead of the Parcel shop being a place to collect it. As a consequence the packages are being returned to sender.
image

Workaround
Do not use the GLS setting "GLS mass-actions for non GLS orders" in (multi store?) magento shop if you want to use the Parcel shop delivery options

Screenshots
If applicable, add screenshots to help explain your problem.

** Please complete the following information**

  • Magento version: Magento 2.4.3
  • PHP version: 7.4.25
  • TIG GLS version: latest (1.4.0)

Table rates weight vs. destination

The table (weight vs. destination) is not working. How can we get this working?

Furthermore, for Dutch addresses, expected delivery date is mentioned. However, not all our products are ready to ship immediately. How can we remove expected delivery date?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.