Skip to content

Releases: shopgate/cart-integration-sdk

Shopgate Cart Integration SDK version 2.10.3

13 Mar 08:33
Compare
Choose a tag to compare

2.10.3 - 2024-02-23

Fixed

  • handle zero length files properly in ShopateMobileRedirect::loadKeywordsFromFile()

Shopgate Cart Integration SDK version 2.10.2

16 Oct 09:38
Compare
Choose a tag to compare

2.10.2 - 2023-10-16

Fixed

  • remove PHP notices from array access on a boolean in some cases when calling the ping action

Changed

  • all UID fields of models and fields referring to UID fields of other models are now type-hinted to strings in PHPDoc

Shopgate Cart Integration SDK version 2.10.1

22 May 16:21
Compare
Choose a tag to compare

2.10.1 - 2023-05-22

WARNING This release may have breaking changes if classes ShopgatePluginApi or any of the ShopgatePluginApiResponse
classes are used directly. The regular "SDK way" of writing a plugin, as shown in the examples, remains unaffected.

NOTE Enabling external_response_handling changes the way ShopgatePlugin::handleRequest() works:

  • handleRequest() will return a ShopgatePluginApiResponse object
  • no headers will be sent, no content flushed, except for export file paths that are PHP I/O streams (php://output)
  • use ShopgatePluginApiResponse::getHeaders() and ::getBody() to get response content
  • use ShopgatePluginApiResponse::send() to send headers and flush response data
  • previously, some response implementations stopped script execution after flushing; this has been removed

Added

  • configuration setting external_response_handling (bool)
  • ShopgatePluginApiResponse::getHeaders() and ::getBody()
  • ShopgatePluginApiResponseExport::isStream() - true when the file path is an I/O stream

Changed

  • when the new setting is active, ShopgatePlugin::handleRequest() will return the ShopgatePluginApiResponse object
  • moved classes ShopgatePluginApi, ShopgatePluginApiResponse* and interface ShopgatePluginApiInterface out of
    src/apis.php into separate files under src/plugin_api
  • integration tests are now also run on CI

Removed

  • the fifth argument (ShopgatePluginApiResponse $response = null) from ShopgatePluginApi::__construct()
  • stopping script execution on some response types after flushing

Fixed

  • PHP 8: deprecation warning on preg_replace() arguments
  • PHP 8: error when calling filesize() on an i/o stream

Shopgate Cart Integration SDK version 2.10.1-beta.2

19 Apr 10:14
Compare
Choose a tag to compare
v2.10.1-beta.2

Shopgate Cart Integration SDK version 2.9.91

04 Apr 09:17
547c30d
Compare
Choose a tag to compare

2.9.91 - 2023-04-04

Added

  • support for gender selection "d" (diverse) in get_customer, register_customer, check_cart, get_orders, add_order and update_order

Shopgate Cart Integration SDK version 2.9.90

29 Mar 13:43
Compare
Choose a tag to compare

2.9.90 - 2022-09-28

Added

  • class ShopgateExternalOrderExternalCoupon, representing external coupons in the get_orders documentation
  • configuration setting external_exception_handling with possible values catch (default), log or none 1

Fixed

  • detection of ISO-8859-1 compatible strings as UTF-16LE, leading to them becoming strings with Japanese characters after conversion to UTF-8

Changed

  • ShopgateExternalOrder::setExternalCoupons() now takes a list of ShopgateExternalOrderExternalCoupon objects; ShopgateExternalCoupon will still work but is deprecated
  • the force_source_encoding flag is now set to true by default, assuming the source encoding to be UTF-8 and effectively disabling auto-detection 2
  • removed UTF-16LE from the list of possible source encodings 2

Footnotes

  1. The new setting should not be user-configurable but be overridden hard-coded by plugins that use their own error handling.

    It applies only to non-SDK exceptions (i.e. non-ShopgateLibraryException, non-ShopgateMerchantApiException).

    Possible values explained:

    • catch (default) - catch uncaught exceptions and transform them to an API response
    • log - log uncaught exceptions and then throw them further up
    • none - no handling at all, exceptions just bubble through all the way
  2. These changes were made after a change in PHP 8.1's mb_string library made auto-detection work differently.

    The assumed source encoding can be set via the encoding setting of the SDK if you need something different from UTF-8.

    If you need auto-detection back, set force_source_encoding back to 0/false. 2

Shopgate Cart Integration SDK version 2.9.89

29 Mar 13:42
Compare
Choose a tag to compare

2.9.89 - 2022-04-12

Fixed

  • setting an invoice or delivery address of null on a ShopgateCartBase object results in a fatal PHP error

Shopgate Cart Integration SDK version 2.9.88

29 Mar 13:41
Compare
Choose a tag to compare

2.9.88 - 2022-03-21

Fixed

  • delivery address set to invoice address on ShopgateExternalOrder instances

Shopgate Cart Integration SDK version 2.9.87

29 Mar 13:40
Compare
Choose a tag to compare

2.9.87 - 2022-03-17

Fixed

  • setters of ShopgateContainer classes setting properties to null if they're single subtypes and an object of the required type was passed

Added

  • debug logging when error file cannot be created or is not writable in ShopgateBuilder::enableErrorHandler
  • ShopgateBuilder::enableErrorHandler now takes a second argument $enableLogToFile, defaults to true; if false,
    no error log file is trying to be created and no file path will be set to PHP's error_log setting

Shopgate Cart Integration SDK version 2.9.86

08 Mar 14:56
Compare
Choose a tag to compare

2.9.86 - 2022-03-08

Fixed

  • several warnings and notices and deprecation notices that popped up when using PHP 8.x