Version Notes
==== v1.6.0 ====
==== New Features ====
- PostNL delivery options are now compatible with GoMage LightCheckout.
- PostNL MijnPakket login and Postcode check are now compatible with GoMage LightCheckout.
- It is now possible to use Magento's Soap API to confirm PostNL shipments, print shipping labels, get Track&Trace information and more!
- Added the option to not print a PostNL shipping label when printing the PostNL packing slip.
- Added a new uninstall button to safely uninstall the PostNL extension.
==== Improvements ====
- Updated the Google Maps integration to v3.19.
- Optimized error handling for certain CIF errors.
- Reverted the PostNL extension's Zend_Soap implementation to native PHP SoapClient for improved compatibility with HHVM.
- Improved the out-of-stock check used in PostNL delivery options to better match merchant expectations.
- Improved performance when printing packing slips or shipping labels.
- Malta is now considered an EPS destination.
- Added compatibility with Magento's SUPEE-6285 patch.
- Improved the address-splitting regular expression to better split house numbers from street names.
==== Bug Fixes ====
- Fixed an incorrect variable name in the upgradeNotification block.
- Fixed an issue where the mobile phone number popup would not appear when selecting a parcel dispenser location in onestepcheckout after a coupon had been added.
- Fixed a conflict with OneStepCheckout, where selecting a delivery date in the popup and then closing the popup (not by saving, but by using the 'x' icon), PostNL would be selected as delivery option but not the date, leaving the shipment with no shipping information.
- Fixed an issue where products on the PostNL packing slip would sometimes show 0 tax amount.
- The shipping date is now also shown on the packing slip when the show shipping method option is disabled.
- Fixed a javascript issue with PostNL COD when Delivery Options are disabled .
- Fixed several problems relating to a server's time zone configuration.
- Fixed an issue in the date renderers in Magento's backend where an unnecessary timezone correction resulted in incorrect dates being displayed.
- Fixed an issue where the attribute update cron would not be removed automatically when all products were updated.
- Fixed a problem with the temporary update crons when config cache is active.
- Fixed a problem where re-activating a quote after the order had been placed could lead to missing PostNL data.
- Fixed an issue where orders could incorrectly have an expected delivery date when no delivery option was selected.
- Fixed compatibility with payment extensions (e.g. Sisow) to prevent crashing when printing packing slip.
==== v1.5.3 ====
==== Bug Fixes ====
- Fixed an issue where in certain situations the delivery date may be equal to the shipping date for orders where no delivery date was chosen during checkout.
- Fixed an issue where all orders would be considered to be placed past the cut off time when the shipping duration was configured to be more than 1 day.
==== v1.5.2 ====
==== New Features ====
- Added compatibility with the Bpost Shipping Manager extension.
- Added the option to hide often shown warnings for the current admin user.
==== Improvements ====
- Added a warning to the configuration page when using the Postcode.NL extension as this extension may conflict with the PostNL extension/
- The PostNL postcode check functionality is now automatically disabled when using the Postcode.NL extension.
- Improved error handling when changes were made directly to the Magento database.
- The expected shipping and delivery dates are now also saved when no delivery option was selected during checkout.
- Several additional characters are now allowed in the packing slip item columns.
- Modified the way delivery options determine whether products are in stock in order to better match merchant expectations.
- Modified interface element for stock options for delivery options to better match merchant expectations.
- Modified code to prevent errors when the default cut-off time is missing.
- Improved error handling when changing a package shipment to a letter box shipment and the default letter box product option is unavailable.
- Added caching to the store time zones in the PostNL data helper.
- Added additional checks to prevent no extra cover amount from being sent for extra cover shipments.
- Fixed an incorrect English name for parcel dispensers.
- Removed the parcel dispenser label from the delivery options interface.
- Added a new notification to the order email to make it more clear that the customer has chosen to have their order delivered at a pick up location.
- Added a new notification to the billing and shipping address templated in OPC to make it more clear that the customer can select a pick up location in the shipping method step.
- The shipping address is now hidden in the progress bar on OPC when a post office address is selected.
==== Bug Fixes ====
- Fixed the split address lines detection on the PostNL config page. This should prevent incorrect warnings about split address lines from being shown.
- Fixed a bug where the chosen product option was not saved when using the create shipments mass action.
- Fixed the order confirm date renderer for orders that were placed late at night.
- A PostNL order is now also created for orders that do not have an associated delivery option. This prevents unexpected behaviour in the order grid when filtering on the confirm date column.
- Shipping labels are now oriented horizontally to prevent errors when printing directly from Chrome.
- Fixed an issue where the extra cover amount option was shown on the create shipment page when the 'is_buspakje' checkbox was checked by default and an extra product option was selected as default.
- Fixed an issue where buspakje was available for avond shipments.
- Fixed issue with not selecting delivery option in OSC would cause order date to be show as delivery date.
- Fixed an issue where the delivery and confirm dates were calculated using the server's time zone, rather than the UTC time zone.
- Fixed a possible notice due to a missing default value in the 'hour-minute' field renderer.
- Fixed an issue where filtering on the order type column would cause errors due to an incorrect join alias.
- Removed regex-based validation for delivery location names to prevent valid names from being blocked. Instead all tags are stripped from the name and the name is additionally escaped before processing.
- Fixed an issue which caused the Magento table rates title to be displayed for PostNL.
- Fixed an issue which caused the default letter box parcel option configuration setting to not be visible.
- Fixed an issue which could cause JS errors when there was an error while loading delivery options.
- Dots are now allowed in street addresses..
- Fixed a small typo in certain error messages.
- Fixed a small layout problem in the delivery options on small desktop screens.
- Fixed a bug where delivery options are not available when purchasing the same configurable product twice with different options.
- Fixed a warning message in the update attributes cron due to an undefined index.
- Fixed an issue where only come delivery options are available when the product attribute cron is still running.
==== v1.5.1 ====
==== New Features ====
- Added a parcel dispenser filter to the delivery options location picker.
==== Improvements ====
- Improved the available filter options for the shipping date columns in the order and shipment grids.
- Improved the way parcel dispenser pick-up locations are shown in the delivery options interface.
- The chosen pick up location is now shown in Idev's OneStepCheckout's order preview pop-up.
- It is no longer possible to configure the extension to use split address lines when there is only 1 address line available.
- When using split address lines it is no longer possible to use the same address line for multiple fields.
==== Bug fixes ====
- Fixed a problem that prevented PostNL Checkout orders from being placed.
- Removed an unnecessary css link in the default Magento theme.
- Phone numbers are no longer mandatory for PostNL post office locations.
==== v1.5.0 ====
==== New features ====
- Added support for printing return labels and tracking return shipments.
- You may now change the number of parcels in a shipment as long as the shipment has not yet been confirmed with PostNL.
- Added the option to show the chosen delivery options and post office pick-up location in transactional e-mails.
- Added a new mass action to the shipment grid to update the shipping status of selected shipments.
==== Improvements ====
- The extension has been updated to CIF 1.10 specifications.
- Cut-off times now take the store's time zone into account.
- Improved performance in the webshop's backend.
- Reduced the risk of extension conflicts in the order and shipment grids.
- It is now possible to print GlobalPack shipping labels even when one of the products in the shipment is missing a country of origin value.
- Address lines on the PostNL packing slip now have a maximum size of 33 characters (up from 20).
- The selected post office location is now shown on the sales/guest/form pages in Magento.
- The confirm and delivery dates of a shipment are now stored in the UTC time zone in the database.
- The selected post office location is now shown on the OnePage Checkout progress bar during checkout.
- The schedules of several cronjobs related to background processes have been redistributed over the day to reduce the load on the sever's cron during peak hours.
- VAT and discounts are now taken into account when calculating a shipment's base grandtotal amount.
- The extension will now shown a proper error message when the sever's PHP version is below the minimum version required by the PostNL extension (PHP 5.3.0).
- Decimal values are now allowed in the alternative standard product option field.
- Shipping labels will now be deleted from the database 30 days after the shipment has been delivered in order to give the consumer enough time to return the shipments without allowing the database to become too bloated.
==== Bug fixes ====
- The Track & Trace URL for orders which are shipped to post office locations has been modified to correctly use the postcode of the intended recipient.
- PostNL mass actions in the order grid will no longer affect non-PostNL mass actions which may have been added by other extensions.
- Postcodes are no longer required in order to create a Track & Trace URL.
- It is no longer possible to modify the confirmation of letter box parcel shipments without Track & Trace.
- An issue in Magento CE 1.6 and EE 1.11 has been resolved by no longer relying on the 'DEFAULT_DEST_STREET' constant value.
- MijnPakket login and delivery options are now also compatible with Idev's OneStepCheckout when the shipping address form has been disabled.
- Letter box parcel configuration options are now also applied to grouped products.
- The chosen delivery day is no longer shown on the customer's account page when delivery days have been disabled in the extension's configuration.
- Product's alternative shipping duration values are now taken into account when calculating the probable delivery day for orders when no specific delivery day was chosen during checkout.
- Tuesday is no longer shown as a valid delivery day when monday is not a shipping day and it is already past saturday.
==== v1.4.1 ====
==== New features ====
- Completely redesigned the configuration page of the extension!
- The extension's configuration page has now been split into a wizard-style menu for the core settings and a separate advanced options menu.
==== Improvements ====
- Added forwards compatibility to Magento 1.6 for advanced configuration field dependencies and other features that were introduced in Magento 1.7.
- Only stated address fee will now be hidden if the fee is less than 1 cent.
- Delivery days will now show 'as soon as possible' as the delivery time when no delivery days are available.
- The status update cron will now run 3 times a day. Before it was only 2 times a day.
- Added additional transactional email parameters to the track & trace email.
==== Bug fixes ====
- Only stated address option is no longer available for letter box orders.
- Removed two legacy references to css files from the frontend's layout XML file.
- Fixed a problem where the delivery option fee would not be reset if delivery options became unavailable during checkout.
- Fixed the delivery options responsive design in OneStepCheckout on older versions of Magento.
- Fixed an issue that prevented the order grid from being filtered on the order ID column.
- International track & trace URL's now use PostNL's new track & trace URL syntax. The old syntax is no longer supported by PostNL.
- Fixed a PHP warning level error that could occur if no additional options were saved for a PostNL order.
==== v1.4.0 ====
==== New features ====
- Added a new responsive design for PostNL delivery options.
- Added the option to specify on which days of the week the merchant will ship orders.
- Added the option to print packing slips directly from the order detail page.
- Added the option for customers to choose whether their order can be delivered to their neighbours in case they are not home during the delivery.
- Added a new PostNL rate type that allows merchants to finely tune their shipping costs.
- Added the option to charge a separate shipping rate for letter box parcels.
==== Improvements ====
- Modified a lot of heavy loading functionality in order to improve performance.
- PostNL Checkout will now check if an order is a letter box parcel before deciding whether PostNL Checkout should be available.
- In order to decrease server load during the extension's installation or upgrade, modifying product attributes is now handled by a temporary cron job.
- A comment will now be added to the order and shipment page when the PostNL track & trace email is sent.
- Evening delivery will no longer be available for letter box parcel orders.
==== Bug fixes ====
- FIxed the filter functionality of the order grid's confirm date column.
- Fixed a problem where the extra cover amount was missing when extra cover was used as a default shipping option.
- Fixed a problem where adding coupon codes in OneStepCheckout would disable delivery options.
- PostNL Checkout's weight calculation will no longer assume all items are weightless when a free shipping cart rule is active.
- Fixed a problem in the CMS page source model causing errors.
- Fixed a problem where tax calculation would not work as expected when tax calculation was set to before discount.
- Fixed a problem where it would be impossible to use the create shipment mass action when certain product options were disabled.
- Fixed problem where shipping to EPS countries could cause errors.
- Fixed an issue where the COD payment method would be hidden for regular shipments.
- Fixed an issue where the print labels mass action would also confirm the shipment
- Adding a new address in multi-address checkout will no longer cause errors when postcode check has been enabled.
- Fixed a bug in the updatePostnlOrder observer that caused errors when ordering virtual orders.
==== v1.3.1 ====
==== Bug fixes ====
- Confirm dates will no longer be shown as always being in the future.
- Added additional checks to prevent deleted Magento orders and shipments from causing errors.
- Prevented VAT amounts from being shown twice on the checkout page.
- It is no longer impossible to create multi-parcel shipments when 'letter box calculation mode' is set to automatic.
- Prevented COD fees from causing errors on the invoice page in the backend.
==== v1.3.0 ====
==== New features ====
- Added the option to ship orders as letter box parcels. Letter box parcels are shipped using the regular mail service and can be shipped at a reduced rate. It's possible to let the PostNL extension determine when an order qualifies as a letter box parcel or to decide this manually when creating a shipment in Magento.
- Added a new PostNL COD payment method that is fully integrated in the other PostNL services offered by the extension. It's possible to charge an additional fee to customers for using PostNL COD. It's also possible to have the extension automatically invoice COD orders once they have been delivered to the customer.
- Added a new PostNL packing slip. This packing slip may contain the PostNL shipping label, allowing you to use the packing slip as the shipping label for the parcel.
- Added the option to enable or disable delivery options at the product level.
- Added the ability to convert existing shipments to a letter box parcel or to a regular parcel as long as they have not been received by PostNL.
- Added the ability to change the selected shipping option for a shipment as long as it has not yet been received by PostNL.
- Added the option to use additional shipping methods for PostNL.
- Added the option to create a shipment, confirm it and print it's shipping labels for an order straight from the order grid in a single click.
==== Improvements ====
- It's now possible to enable or disable time frames separately from delivery days.
- You can now specify the cut-off time in minutes as well as hours.
- You can now view an order's confirm date, confirm status and shipping phase in the order grid.
- Additional information regarding the chosen delivery option is now shown on the order detail page.
- Added a button to download all PostNL debug log files to the PostNL configuration page.
- The 'create shipments' massaction interface has been modified so that only valid options are displayed.
- Errors that occur whilst processing multiple shipments or orders will no longer stop the entire process. Instead the remaining orders and shipments will be processed and an error message specifying which orders or shipments caused an error will be displayed afterwards.
- The first and last name fields are no longer mandatory for the sender's address fields in the PostNL configuration.
- Spaces are now allowed in postcodes.
==== Bug fixes ====
- Deleting orders from Magento should no longer cause errors when processing PostNL shipments.
- The PostNL shipping method will no longer be selected by default.
- Greece will now be processed with EPS, instead of GlobalPack.
- Upgrade and install scripts will now check if certain columns and attributes exist before modifying them.
- The progress bar on the Onepage Checkout page will now correctly update the shipping costs when the customer has chosen a delivery option that charges an additional fee.
- Creating shipments for which no default shipping option is selected will no longer cause errors.
==== v1.2.2 ====
==== New features ====
- Added the option to send a copy of the track & trace email to a specified email address.
==== Improvements ====
- Performance of the entire extension has been improved. The extension will now attempt to cache several configuration values.
- Label printing will now always follow the 'label size' configuration setting.
==== Bug fixes ====
- Fixed several small html errors in the track & trace email template.
- Fixed an SQL error that could occur when filtering the 'store' column in the order and shipment grids.
==== v1.2.1 ====
==== Release highlights ====
- The extension now fully supports Magento 1.9 and 1.14!
==== Minor improvements ====
- Added additional checks to prevent errors when Magento's layout has been altered or PostNL's layout has not been uploaded properly.
- Added additional compatibility enhancements for MultiSafePay and other PSP extensions.
- Improved several minor texts and translations.
==== Bug fixes ====
- Fixed an issue that prevented MijnPakket login data from being cached.
- Fixed an issue where using PostNL-only features on non-PostNL shipments would cause an error.
- Fixed an issue where PostNL's feed messages would be loaded in the wrong order.
- Fixed an issue where several notifications would be added to Magento when installing an unsupported version of Magento with the PostNL extension.
- Fixed an issue with EPS comb-labels. EPS combi-labels were rotated by 90 degrees, causing overlapping issues with other labels being printed.
==== v1.2.0 =====
==== New features ====
- Added delivery options to the checkout flow. Customers can now choose where, when and how they want their order shipped when choosing their preferred shipping method.
- Added support for evening delivery, early pickup locations and parcel dispenser locations.
- Added Dutch postcode validation support.
- Added the option to create a parcelware export csv file directly from the Magento backend.
- Added a MijnPakket login feature. Customers who have a MijnPakket account can use this feature to automatically fill in their preferred billing and shipping address.
==== Minor improvements ====
- Refactored the label printing functionality. Shipping labels will now be opened in a separate window from where they may be printed or downloaded.
- Added the option to select where on an A4 page the shipping labels will start printing. This allows you to re-use partially used sticker-sheets.
- Added many new customization options for the shipment grid in the Magento backend.
- Added the ability to view and edit a chosen post office delivery address from the Magento backend.
- Added the option to only show the PostNL Checkout feature to customers who have a MijnPakket account.
- Refactored many sections of the source code to improve readability and extensibility.
- Moved several configuration settings.
- Merged the 'test/live mode' settings of PostNl Checkout and Label Printing & Confirming functionality. There is now a single option to set the entire extension to test or live mode.
- Added the option to upload separate csv files for the PostNL shipping method in 'table rate' configuration.
==== Bug fixes ====
- Fixed an issue where it was not possible to choose to only manually send track & trace information.
- Fixed several typos and translation errors.
==== v1.1.5 =====
==== Bug fixes ====
- Fixed a problem with account validation only using test mode account credentials
- Made a minor security improvement to the notification system.
- Fixed an issue where shipments could not be confirmed if the shipping address did not have an email address.
- Fixed an issue where PostNl Checkout would incorrectly identify a product as being out of stock.
- Fixed an issue where for some shops PostNl Checkout would not function due to incorrect usage of https in an http environment.
==== v1.1.4 =====
==== New features ====
- Added a default test account to the extension. New installation will automatically have a PostNL test account pre-configured.
- Added the option to undo a confirmation as long as the shipment has not been received by PostNL.
- Added the option to delete shipping labels. This allows you to correct an address after a shipping label has been printed. Before this change if you noticed an error in the address after you had already printed a shipping label, you had to place en entire new order to correct it. Now you can simply delete the shipping label, edit the address and print a new shipping label with the new address.
==== Minor change ====
- The validate settings button in the extension’s configuration page now also validates settings while the extension is set to test mode.
- Removed the 'EU Pack Standard (Belgium only, no signature)' product option. If you use this option, please contact the Total Internet Group servicedesk.
- The extension's test mode is now available by default. In earlier versions you had to allow test mode through a setting under advanced options.
- When a confirmation expires, the barcode's track & trace link will now also be removed.
- Improved various texts and translations.
==== Bug fixes ====
- Solved an issue where certain configurations of the PostNL shipping method would only appear if the Magento tablerates shipping method was also active.
- Solved an issue where filtering the order and shipment grids in the Magento backend on certain columns would cause an error.
- Solved an issue where the shipment status cron would stop as soon as it encountered an error, rather than continue processing the remaining shipments.
- Solved an issue where you could not confirm a shipment without a barcode due to process locking when developer mode is active.
- Solved issue in Safari where labels would be printed as .pdf.html, rather than just .pdf files.
==== v1.1.3 ====
- FIxed an issue with the extension's activation procedure.
==== v1.1.2 ====
- Updated manual.
==== v1.1.1 ====
- Fixed issue where filtering the first column of the shipment grid could cause errors.
- Removed PHP extension dependencies from the PostNL extension packages. Magento connect would sometimes falsely report a PHP extension as missing preventing the PostNL extension from being installed.
==== v1.1.0 ====
- First public release.
==== v1.0.8 ====
- Improved compatibility with Magento 1.6 and 1.11.
==== v1.0.7 ====
- Improved configuration fields.
- Improved translations.
==== v1.0.6 ====
- Improved shipment grid interface. It shoulod now be more clear which shipments have been confirmed and when they should be handed over to PostNL.
- Improved PostNL Checkout payment method handling. The Checkout summary page should now remember your chosen bank when you attempt to pay using iDEAL. 100% support for all payment methods is not guaranteed.
==== v1.0.5 ====
- Several bug fixes.
- Improved configuration interface.
==== v1.0.4 ====
- Several minor bug fixes.
- Improved Dutch translations.
- Added additional information to several fields in system/config.
==== v1.0.3 ====
- Several bug fixes. Including an issue preventing the extension from functioning properly with the compiler active.
- Several improvements to the Dutch translations.
- Improved the extension's system > config interface
- Added the Klarna payment method to PostNL Checkout
==== v1.0.2 ====
- A large number of bug fixes and general improvements
- Improved error handling. Almost all errors will now automatically provide you with a link where you can find more information and a possible solution.
==== v1.0.1 ====
- Added a filter to the possible product options you may select, based on the selected orders when mass-creating shipments from the order grid.
- Improved several translations.
- Fixed several minor bugs.
==== v1.0.0 ====
This is the initial beta release of the extension. If you have any questions, please contact the Total Internet Group Servicedesk
Release Info
Developer | TIG |
Extension | tig_postnl |
Version | 1.6.0 |
Comparing to | |
See all releases |
Code changes from version 1.5.1 to 1.6.0
- app/code/community/TIG/PostNL/Block/AddressValidation/GoMage/LightCheckout/Billing.php +141 -0
- app/code/community/TIG/PostNL/Block/AddressValidation/GoMage/LightCheckout/Shipping.php +136 -0
- app/code/community/TIG/PostNL/Block/Adminhtml/Carrier/Postnl/Matrixrate/Grid.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/Carrier/Postnl/Tablerate/Grid.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/CronNotification.php +4 -3
- app/code/community/TIG/PostNL/Block/Adminhtml/IntegrityNotification.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/LogNotification.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/Sales/Items/Column/Qty.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/Sales/Order/Create/Totals/CodFee.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/Sales/Order/Creditmemo/Create/CodFee.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/Sales/Order/Creditmemo/Totals/CodFee.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/Sales/Order/Invoice/Totals/CodFee.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/Sales/Order/ProductOptions.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/Sales/Order/Shipment/Create/ShipmentOptions.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/Sales/Order/Shipment/View/DeliveryOptions.php +4 -3
- app/code/community/TIG/PostNL/Block/Adminhtml/Sales/Order/Shipment/View/ShippingStatus.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/Sales/Order/Shipment/View/Tab/StatusHistory.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/Sales/Order/Shipment/View/Tabs.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/Sales/Order/Totals/CodFee.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/Sales/Order/View/DeliveryOptions.php +4 -3
- app/code/community/TIG/PostNL/Block/Adminhtml/Sales/Returns.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/Sales/Returns/Grid.php +4 -3
- app/code/community/TIG/PostNL/Block/Adminhtml/System/Config/Form.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/System/Config/Form/Field/ActivateButton.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/System/Config/Form/Field/ActivatedFieldHeader.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/System/Config/Form/Field/AddressLines.php +4 -124
- app/code/community/TIG/PostNL/Block/Adminhtml/System/Config/Form/Field/Anchor.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/System/Config/Form/Field/Checkbox.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/System/Config/Form/Field/ConfigCheck.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/System/Config/Form/Field/GoMageDeliveryDateConflicts.php +79 -0
- app/code/community/TIG/PostNL/Block/Adminhtml/System/Config/Form/Field/Hidden.php +183 -0
- app/code/community/TIG/PostNL/Block/Adminhtml/System/Config/Form/Field/HourMinute.php +11 -3
- app/code/community/TIG/PostNL/Block/Adminhtml/System/Config/Form/Field/InfoBox.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/System/Config/Form/Field/MatrixrateExport.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/System/Config/Form/Field/MatrixrateImport.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/System/Config/Form/Field/Obscure.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/System/Config/Form/Field/PackingSlipItemColumns.php +2 -2
- app/code/community/TIG/PostNL/Block/Adminhtml/System/Config/Form/Field/PostcodeNlExtensionActive.php +54 -0
- app/code/community/TIG/PostNL/Block/Adminhtml/System/Config/Form/Field/Radios.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/System/Config/Form/Field/SplitAddressCheck.php +26 -22
- app/code/community/TIG/PostNL/Block/Adminhtml/System/Config/Form/Field/SupportTab.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/System/Config/Form/Field/TablerateExport.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/System/Config/Form/Field/TablerateImport.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/System/Config/Form/Field/TextBox/Abstract.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/System/Config/Form/Field/Tooltip/HourMinute.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/System/Config/Form/Field/UninstallButton.php +101 -0
- app/code/community/TIG/PostNL/Block/Adminhtml/System/Config/Form/Field/ValidateButton.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/System/Config/Form/Field/WarningBox.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/System/Config/Form/Field/WizardSaveButton.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/System/Config/Form/Fieldset.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/System/Config/Js.php +13 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/Template.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/UpgradeNotification.php +3 -3
- app/code/community/TIG/PostNL/Block/Adminhtml/Widget/Form/Element/Dependence.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/Widget/Grid/Column/Filter/ConfirmDate.php +22 -11
- app/code/community/TIG/PostNL/Block/Adminhtml/Widget/Grid/Column/Renderer/Action.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/Widget/Grid/Column/Renderer/Barcode.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/Widget/Grid/Column/Renderer/ConfirmDate.php +89 -41
- app/code/community/TIG/PostNL/Block/Adminhtml/Widget/Grid/Column/Renderer/ConfirmStatus.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/Widget/Grid/Column/Renderer/CountryArray.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/Widget/Grid/Column/Renderer/DeliveryDate.php +3 -3
- app/code/community/TIG/PostNL/Block/Adminhtml/Widget/Grid/Column/Renderer/OrderConfirmDate.php +6 -127
- app/code/community/TIG/PostNL/Block/Adminhtml/Widget/Grid/Column/Renderer/OrderConfirmStatus.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/Widget/Grid/Column/Renderer/OrderType.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/Widget/Grid/Column/Renderer/ReturnView.php +77 -0
- app/code/community/TIG/PostNL/Block/Adminhtml/Widget/Grid/Column/Renderer/ShipmentType.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/Widget/Grid/Column/Renderer/ShippingDescription.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/Widget/Grid/Column/Renderer/ShippingPhase.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/Widget/Grid/Column/Renderer/Time.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/Widget/Grid/Column/Renderer/Translate.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/Widget/Grid/Column/Renderer/Type/Abstract.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/Widget/Grid/Column/Renderer/YesNo.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/Widget/Grid/Massaction/Item/Additional/LabelStartPos.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/Widget/Grid/Massaction/Item/Additional/ProductOptions.php +1 -1
- app/code/community/TIG/PostNL/Block/Adminhtml/WindowsTheme.php +1 -1
- app/code/community/TIG/PostNL/Block/Checkout/Cart/CheckoutLink.php +1 -1
- app/code/community/TIG/PostNL/Block/Checkout/Cart/Js.php +1 -1
- app/code/community/TIG/PostNL/Block/Checkout/Summary.php +1 -1
- app/code/community/TIG/PostNL/Block/Core/JsTranslate.php +1 -1
- app/code/community/TIG/PostNL/Block/Core/Order/Returns/Info.php +1 -1
- app/code/community/TIG/PostNL/Block/Core/Order/Returns/Shipment/Items.php +1 -1
- app/code/community/TIG/PostNL/Block/Core/ShippingStatus.php +1 -1
- app/code/community/TIG/PostNL/Block/Core/Template.php +1 -1
- app/code/community/TIG/PostNL/Block/DeliveryOptions/Checkout/AddPhoneNumber.php +1 -1
- app/code/community/TIG/PostNL/Block/DeliveryOptions/Checkout/DeliveryOptions.php +1 -1
- app/code/community/TIG/PostNL/Block/DeliveryOptions/Checkout/GoMage/LightCheckout/DeliveryOptions.php +66 -0
- app/code/community/TIG/PostNL/Block/DeliveryOptions/Checkout/Progress.php +2 -2
- app/code/community/TIG/PostNL/Block/DeliveryOptions/Js.php +1 -1
- app/code/community/TIG/PostNL/Block/DeliveryOptions/PickupNotification.php +62 -0
- app/code/community/TIG/PostNL/Block/DeliveryOptions/Template.php +1 -1
- app/code/community/TIG/PostNL/Block/DeliveryOptions/Theme.php +30 -1
- app/code/community/TIG/PostNL/Block/Mijnpakket/AccountNotification.php +1 -1
- app/code/community/TIG/PostNL/Block/Mijnpakket/Js.php +1 -1
- app/code/community/TIG/PostNL/Block/Mijnpakket/LoginButton.php +1 -1
- app/code/community/TIG/PostNL/Block/Mijnpakket/OrderSuccessJs.php +1 -1
- app/code/community/TIG/PostNL/Block/Payment/Checkout/Total/CodFee.php +1 -1
- app/code/community/TIG/PostNL/Block/Payment/Form/Cod.php +1 -1
- app/code/community/TIG/PostNL/Block/Payment/Info.php +1 -1
- app/code/community/TIG/PostNL/Block/Payment/Sales/Order/Creditmemo/Totals/CodFee.php +1 -1
- app/code/community/TIG/PostNL/Block/Payment/Sales/Order/Invoice/Totals/CodFee.php +1 -1
- app/code/community/TIG/PostNL/Block/Payment/Sales/Order/Totals/CodFee.php +1 -1
- app/code/community/TIG/PostNL/Controller/Adminhtml/Abstract.php +75 -0
- app/code/community/TIG/PostNL/Controller/Adminhtml/Config.php +37 -2
- app/code/community/TIG/PostNL/Controller/Adminhtml/Shipment.php +35 -864
- app/code/community/TIG/PostNL/Controller/Sales.php +1 -1
- app/code/community/TIG/PostNL/Exception.php +1 -1
- app/code/community/TIG/PostNL/Helper/AddressValidation.php +54 -9
- app/code/community/TIG/PostNL/Helper/Adminhtml.php +65 -0
- app/code/community/TIG/PostNL/Helper/Carrier.php +1 -1
- app/code/community/TIG/PostNL/Helper/Checkout.php +2 -2
- app/code/community/TIG/PostNL/Helper/Cif.php +38 -12
- app/code/community/TIG/PostNL/Helper/Data.php +34 -2
- app/code/community/TIG/PostNL/Helper/DeliveryOptions.php +388 -59
- app/code/community/TIG/PostNL/Helper/Mijnpakket.php +1 -1
- app/code/community/TIG/PostNL/Helper/Parcelware.php +1 -1
- app/code/community/TIG/PostNL/Helper/Payment.php +1 -1
- app/code/community/TIG/PostNL/Helper/Webservices.php +5 -5
- app/code/community/TIG/PostNL/Model/AddressValidation/Cendris.php +5 -1
- app/code/community/TIG/PostNL/Model/AddressValidation/Cendris/Abstract.php +4 -4
- app/code/community/TIG/PostNL/Model/AddressValidation/Observer/AddressBook.php +1 -1
- app/code/community/TIG/PostNL/Model/AddressValidation/Observer/OneStepCheckout.php +1 -1
- app/code/community/TIG/PostNL/Model/AddressValidation/Observer/Onepage.php +1 -1
- app/code/community/TIG/PostNL/Model/AddressValidation/System/Config/Backend/ValidateAccount.php +3 -3
- app/code/community/TIG/PostNL/Model/Admin/Inbox.php +1 -1
- app/code/community/TIG/PostNL/Model/Admin/Logging/Handler/Postnl.php +1 -1
- app/code/community/TIG/PostNL/Model/Admin/Logging/Observer.php +1 -1
- app/code/community/TIG/PostNL/Model/Adminhtml/Form/Element/Checkbox.php +2 -2
- app/code/community/TIG/PostNL/Model/Adminhtml/Observer/OrderGrid.php +11 -10
- app/code/community/TIG/PostNL/Model/Adminhtml/Observer/ShipmentGrid.php +6 -8
- app/code/community/TIG/PostNL/Model/Adminhtml/Observer/ShipmentView.php +6 -6
- app/code/community/TIG/PostNL/Model/Adminhtml/Observer/SystemConfig.php +1 -1
- app/code/community/TIG/PostNL/Model/Adminhtml/Support/Logs.php +1 -1
- app/code/community/TIG/PostNL/Model/Adminhtml/System/Config/Source/OrderGridColumns.php +1 -1
- app/code/community/TIG/PostNL/Model/Adminhtml/System/Config/Source/OrderGridMassaction.php +1 -1
- app/code/community/TIG/PostNL/Model/Adminhtml/System/Config/Source/ShipmentGridColumns.php +1 -1
- app/code/community/TIG/PostNL/Model/Adminhtml/System/Config/Source/ShipmentGridMassaction.php +1 -1
- app/code/community/TIG/PostNL/Model/Carrier/Matrixrate.php +1 -1
- app/code/community/TIG/PostNL/Model/Carrier/Postnl.php +11 -7
- app/code/community/TIG/PostNL/Model/Carrier/Quote/Address/Total/Shipping.php +1 -1
- app/code/community/TIG/PostNL/Model/Carrier/Resource/Matrixrate.php +1 -1
- app/code/community/TIG/PostNL/Model/Carrier/Resource/Matrixrate/Collection.php +1 -1
- app/code/community/TIG/PostNL/Model/Carrier/Resource/Tablerate.php +1 -1
- app/code/community/TIG/PostNL/Model/Carrier/Resource/Tablerate/Collection.php +1 -1
- app/code/community/TIG/PostNL/Model/Carrier/System/Config/Backend/Matrixrate.php +1 -1
- app/code/community/TIG/PostNL/Model/Carrier/System/Config/Backend/Tablerate.php +1 -1
- app/code/community/TIG/PostNL/Model/Carrier/System/Config/Source/RateType.php +1 -1
- app/code/community/TIG/PostNL/Model/Carrier/System/Config/Source/TablerateSource.php +2 -2
- app/code/community/TIG/PostNL/Model/Carrier/Tablerate.php +1 -1
- app/code/community/TIG/PostNL/Model/Checkout/Cif.php +1 -1
- app/code/community/TIG/PostNL/Model/Checkout/Observer/Order.php +1 -1
- app/code/community/TIG/PostNL/Model/Checkout/Observer/Shipment.php +1 -1
- app/code/community/TIG/PostNL/Model/Checkout/Order.php +1 -1
- app/code/community/TIG/PostNL/Model/Checkout/Service.php +1 -1
- app/code/community/TIG/PostNL/Model/Checkout/System/Config/Source/ActivePaymentMethods.php +1 -1
- app/code/community/TIG/PostNL/Model/Checkout/System/Config/Source/CmsPage.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/Api.php +42 -0
- app/code/community/TIG/PostNL/Model/Core/Api/V2.php +946 -0
- app/code/community/TIG/PostNL/Model/Core/Cache.php +4 -1
- app/code/community/TIG/PostNL/Model/Core/Cif.php +35 -31
- app/code/community/TIG/PostNL/Model/Core/Cif/Abstract.php +18 -17
- app/code/community/TIG/PostNL/Model/Core/Cif/Exception.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/Label.php +2 -2
- app/code/community/TIG/PostNL/Model/Core/Observer/Barcode.php +3 -3
- app/code/community/TIG/PostNL/Model/Core/Observer/Cache.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/Observer/Cron.php +57 -20
- app/code/community/TIG/PostNL/Model/Core/Observer/Returns.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/Observer/SaveShipment.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/Order.php +12 -1
- app/code/community/TIG/PostNL/Model/Core/PackingSlip.php +51 -43
- app/code/community/TIG/PostNL/Model/Core/Packingslip/Pdf/Items/Invoice/Default.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/Resource/Integrity.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/Resource/Integrity/Collection.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/Resource/Order.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/Resource/Order/Collection.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/Resource/Shipment.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/Resource/Shipment/Barcode.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/Resource/Shipment/Barcode/Collection.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/Resource/Shipment/Collection.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/Resource/Shipment/Label.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/Resource/Shipment/Label/Collection.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/Resource/Shipment/Status/History.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/Resource/Shipment/Status/History/Collection.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/Service.php +13 -2
- app/code/community/TIG/PostNL/Model/Core/Service/IntegrityCheck.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/Service/InvoiceDummy.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/Service/OrderDummy.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/Service/PaymentDummy.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/Service/PaymentMethodDummy.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/Service/Shipment.php +1061 -0
- app/code/community/TIG/PostNL/Model/Core/Shipment.php +19 -7
- app/code/community/TIG/PostNL/Model/Core/Shipment/Barcode.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/Shipment/Label.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/Shipment/Process.php +6 -1
- app/code/community/TIG/PostNL/Model/Core/Shipment/Status/History.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/System/Config/Backend/HourMinute.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/System/Config/Backend/Image/Pdf.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/System/Config/Backend/ValidateDefaultOption.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/System/Config/Source/AllProductOptions.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/System/Config/Source/Attributes.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/System/Config/Source/BuspakjeProductOptions.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/System/Config/Source/CheckoutExtensions.php +5 -1
- app/code/community/TIG/PostNL/Model/Core/System/Config/Source/CommentType.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/System/Config/Source/CutOffTime.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/System/Config/Source/DebugMode.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/System/Config/Source/Direction.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/System/Config/Source/EuProductOptions.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/System/Config/Source/GlobalProductOptions.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/System/Config/Source/GlobalpackShipmentType.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/System/Config/Source/HourMinute.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/System/Config/Source/LabelSize.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/System/Config/Source/ManualAutomatic.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/System/Config/Source/PackingSlipItemFields.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/System/Config/Source/PackingSlipLabel.php +67 -0
- app/code/community/TIG/PostNL/Model/Core/System/Config/Source/PakjeGemakProductOptions.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/System/Config/Source/PakketautomaatProductOptions.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/System/Config/Source/ProductOptions/Abstract.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/System/Config/Source/ReferenceType.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/System/Config/Source/ShippingDays.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/System/Config/Source/ShippingDuration.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/System/Config/Source/ShippingMethods.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/System/Config/Source/StandardProductOptions.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/System/Config/Source/StaticBlocks.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/System/Config/Source/StreetField.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/System/Config/Source/StreetFieldWithDefault.php +1 -1
- app/code/community/TIG/PostNL/Model/Core/System/Config/Source/WeightUnit.php +1 -1
- app/code/community/TIG/PostNL/Model/DeliveryOptions/Cif.php +3 -3
- app/code/community/TIG/PostNL/Model/DeliveryOptions/Observer/GoMage/LightCheckout/Ajax.php +66 -0
- app/code/community/TIG/PostNL/Model/DeliveryOptions/Observer/ShippingMethodAvailable.php +193 -12
- app/code/community/TIG/PostNL/Model/DeliveryOptions/Observer/UpdatePostnlOrder.php +175 -16
- app/code/community/TIG/PostNL/Model/DeliveryOptions/Product/Attribute/Source/ShippingDuration.php +1 -1
- app/code/community/TIG/PostNL/Model/DeliveryOptions/Service.php +4 -3
- app/code/community/TIG/PostNL/Model/DeliveryOptions/System/Config/Backend/ValidateFee.php +2 -1
- app/code/community/TIG/PostNL/Model/DeliveryOptions/System/Config/Source/DeliveryDaysNumber.php +1 -1
- app/code/community/TIG/PostNL/Model/DeliveryOptions/System/Config/Source/StockOptions.php +70 -0
- app/code/community/TIG/PostNL/Model/DeliveryOptions/System/Config/Source/Themes.php +1 -1
- app/code/community/TIG/PostNL/Model/ExtensionControl/Config.php +1 -1
- app/code/community/TIG/PostNL/Model/ExtensionControl/Feed.php +1 -1
- app/code/community/TIG/PostNL/Model/ExtensionControl/Observer/Cron.php +1 -1
- app/code/community/TIG/PostNL/Model/ExtensionControl/Webservices.php +1 -1
- app/code/community/TIG/PostNL/Model/ExtensionControl/Webservices/Abstract.php +4 -4
- app/code/community/TIG/PostNL/Model/Inbox.php +1 -1
- app/code/community/TIG/PostNL/Model/Mijnpakket/Cif.php +1 -1
- app/code/community/TIG/PostNL/Model/Mijnpakket/Service.php +1 -1
- app/code/community/TIG/PostNL/Model/Parcelware/Export.php +1 -1
- app/code/community/TIG/PostNL/Model/Payment/Cod.php +1 -1
- app/code/community/TIG/PostNL/Model/Payment/Observer/Cod.php +1 -1
- app/code/community/TIG/PostNL/Model/Payment/Order/Creditmemo/Total/CodFee.php +1 -1
- app/code/community/TIG/PostNL/Model/Payment/Order/Creditmemo/Total/CodFee/Abstract.php +1 -1
- app/code/community/TIG/PostNL/Model/Payment/Order/Creditmemo/Total/CodFeeTax.php +1 -1
- app/code/community/TIG/PostNL/Model/Payment/Order/Invoice/Total/CodFee.php +1 -1
- app/code/community/TIG/PostNL/Model/Payment/Order/Invoice/Total/CodFeeTax.php +1 -1
- app/code/community/TIG/PostNL/Model/Payment/Order/Invoice/Total/Subtotal.php +1 -1
- app/code/community/TIG/PostNL/Model/Payment/Order/Pdf/Total/CodFee.php +1 -1
- app/code/community/TIG/PostNL/Model/Payment/Order/Pdf/Total/Grandtotal.php +17 -1
- app/code/community/TIG/PostNL/Model/Payment/Order/Pdf/Total/Tax.php +1 -1
- app/code/community/TIG/PostNL/Model/Payment/Quote/Address/Total/CodFee.php +1 -1
- app/code/community/TIG/PostNL/Model/Payment/Quote/Address/Total/CodFee/Abstract.php +1 -1
- app/code/community/TIG/PostNL/Model/Payment/Quote/Address/Total/CodFeeTax.php +1 -1
- app/code/community/TIG/PostNL/Model/Payment/Service.php +1 -1
- app/code/community/TIG/PostNL/Model/Payment/System/Config/Source/CodFeeTaxClass.php +1 -1
- app/code/community/TIG/PostNL/Model/Resource/Catalog/Product.php +1 -1
- app/code/community/TIG/PostNL/Model/Resource/Db/Abstract.php +1 -1
- app/code/community/TIG/PostNL/Model/Resource/Db/Collection/Postnl.php +1 -1
- app/code/community/TIG/PostNL/Model/Resource/Order/Grid/Collection.php +1 -1
- app/code/community/TIG/PostNL/Model/Resource/Order/Shipment.php +1 -1
- app/code/community/TIG/PostNL/Model/Resource/Order/Shipment/Grid/Collection.php +1 -1
- app/code/community/TIG/PostNL/Model/Resource/Setup.php +233 -3
- app/code/community/TIG/PostNL/Model/System/Config/Backend/Checkbox.php +1 -1
- app/code/community/TIG/PostNL/Model/System/Config/Source/Testlive.php +1 -1
- app/code/community/TIG/PostNL/Model/System/Config/Source/Yesno.php +1 -1
- app/code/community/TIG/PostNL/controllers/AddressValidationController.php +2 -2
- app/code/community/TIG/PostNL/controllers/Adminhtml/ConfigController.php +68 -12
- app/code/community/TIG/PostNL/controllers/Adminhtml/ExtensionControlController.php +40 -2
- app/code/community/TIG/PostNL/controllers/Adminhtml/ReturnsController.php +1 -1
- app/code/community/TIG/PostNL/controllers/Adminhtml/ShipmentController.php +86 -66
- app/code/community/TIG/PostNL/controllers/CheckoutController.php +1 -1
- app/code/community/TIG/PostNL/controllers/DeliveryOptionsController.php +17 -25
- app/code/community/TIG/PostNL/controllers/GuestController.php +1 -1
- app/code/community/TIG/PostNL/controllers/MijnpakketController.php +1 -1
- app/code/community/TIG/PostNL/controllers/OrderController.php +1 -1
- app/code/community/TIG/PostNL/data/postnl_setup/data-install-1.0.0.php +1 -1
- app/code/community/TIG/PostNL/data/postnl_setup/data-install-1.0.3.php +1 -1
- app/code/community/TIG/PostNL/data/postnl_setup/data-install-1.1.4.php +1 -1
- app/code/community/TIG/PostNL/data/postnl_setup/data-install-1.3.0.php +1 -1
- app/code/community/TIG/PostNL/data/postnl_setup/data-install-1.4.0.php +1 -1
- app/code/community/TIG/PostNL/data/postnl_setup/data-install-1.4.1.php +1 -1
- app/code/community/TIG/PostNL/data/postnl_setup/data-install-1.5.0.php +159 -0
- app/code/community/TIG/PostNL/data/postnl_setup/data-uninstall-1.5.2.php +117 -0
- app/code/community/TIG/PostNL/data/postnl_setup/data-upgrade-1.1.5-1.2.0.php +1 -1
- app/code/community/TIG/PostNL/data/postnl_setup/data-upgrade-1.2.2-1.3.0.php +1 -1
- app/code/community/TIG/PostNL/data/postnl_setup/data-upgrade-1.2.2-1.4.0.php +1 -1
- app/code/community/TIG/PostNL/data/postnl_setup/data-upgrade-1.3.1-1.4.0.php +1 -1
- app/code/community/TIG/PostNL/data/postnl_setup/data-upgrade-1.4.0-1.4.1.php +1 -1
- app/code/community/TIG/PostNL/data/postnl_setup/data-upgrade-1.4.1-1.5.0.php +1 -1
- app/code/community/TIG/PostNL/data/postnl_setup/data-upgrade-1.5.1-1.5.2.php +46 -0
- app/code/community/TIG/PostNL/etc/adminhtml.xml +16 -16
- app/code/community/TIG/PostNL/etc/api.xml +157 -0
- app/code/community/TIG/PostNL/etc/config.xml +196 -104
- app/code/community/TIG/PostNL/etc/jstranslator.xml +2 -2
- app/code/community/TIG/PostNL/etc/logging.xml +1 -1
- app/code/community/TIG/PostNL/etc/system.xml +188 -103
- app/code/community/TIG/PostNL/etc/wsdl.xml +283 -0
- app/code/community/TIG/PostNL/etc/wsi.xml +379 -0
- app/code/community/TIG/PostNL/sql/postnl_setup/install-1.0.0.php +3 -1
- app/code/community/TIG/PostNL/sql/postnl_setup/upgrade-1.1.5-1.2.0.php +4 -2
- app/code/community/TIG/PostNL/sql/postnl_setup/upgrade-1.2.2-1.3.0.php +1 -1
- app/code/community/TIG/PostNL/sql/postnl_setup/upgrade-1.3.1-1.4.0.php +1 -1
- app/code/community/TIG/PostNL/sql/postnl_setup/upgrade-1.4.1-1.5.0.php +1 -1
- app/design/adminhtml/default/default/layout/TIG/postnl.xml +8 -1
- app/design/adminhtml/default/default/template/TIG/PostNL/cron_notification.phtml +2 -2
- app/design/adminhtml/default/default/template/TIG/PostNL/integrity_notification.phtml +2 -2
- app/design/adminhtml/default/default/template/TIG/PostNL/log_notification.phtml +2 -2
- app/design/adminhtml/default/default/template/TIG/PostNL/sales/items/column/qty.phtml +1 -1
- app/design/adminhtml/default/default/template/TIG/PostNL/sales/order/address/form/container.phtml +1 -1
- app/design/adminhtml/default/default/template/TIG/PostNL/sales/order/create/js.phtml +1 -1
- app/design/adminhtml/default/default/template/TIG/PostNL/sales/order/creditmemo/create/totals/cod_fee.phtml +1 -1
- app/design/adminhtml/default/default/template/TIG/PostNL/sales/order/filter_massaction.phtml +1 -1
- app/design/adminhtml/default/default/template/TIG/PostNL/sales/order/js.phtml +1 -2
- app/design/adminhtml/default/default/template/TIG/PostNL/sales/order/product_options.phtml +1 -1
- app/design/adminhtml/default/default/template/TIG/PostNL/sales/order/shipment/create/shipment_options.phtml +5 -4
- app/design/adminhtml/default/default/template/TIG/PostNL/sales/order/shipment/filter_massaction.phtml +1 -1
- app/design/adminhtml/default/default/template/TIG/PostNL/sales/order/shipment/view.phtml +1 -2
- app/design/adminhtml/default/default/template/TIG/PostNL/sales/order/shipment/view/delivery_options.phtml +1 -1
- app/design/adminhtml/default/default/template/TIG/PostNL/sales/order/shipment/view/pakje_gemak_address.phtml +1 -1
- app/design/adminhtml/default/default/template/TIG/PostNL/sales/order/shipment/view/shipping_status.phtml +1 -1
- app/design/adminhtml/default/default/template/TIG/PostNL/sales/order/shipment/view/tab/status_history.phtml +1 -1
- app/design/adminhtml/default/default/template/TIG/PostNL/sales/order/view/delivery_options.phtml +2 -2
- app/design/adminhtml/default/default/template/TIG/PostNL/sales/order/view/pakje_gemak_address.phtml +1 -1
- app/design/adminhtml/default/default/template/TIG/PostNL/sales/order/windows_theme.phtml +1 -1
- app/design/adminhtml/default/default/template/TIG/PostNL/sales/shipment/customize_link.phtml +1 -1
- app/design/adminhtml/default/default/template/TIG/PostNL/sales/shipment/js.phtml +22 -1
- app/design/adminhtml/default/default/template/TIG/PostNL/sales/shipment/testmode_warning.phtml +8 -6
- app/design/adminhtml/default/default/template/TIG/PostNL/system/config/form/field/config_check.phtml +18 -15
- app/design/adminhtml/default/default/template/TIG/PostNL/system/config/form/field/field_header.phtml +1 -1
- app/design/adminhtml/default/default/template/TIG/PostNL/system/config/form/field/info_box.phtml +1 -1
- app/design/adminhtml/default/default/template/TIG/PostNL/system/config/form/field/js.phtml +67 -2
- app/design/adminhtml/default/default/template/TIG/PostNL/system/config/form/field/split_address_check.phtml +3 -2
- app/design/adminhtml/default/default/template/TIG/PostNL/system/config/form/field/support_tab.phtml +3 -2
- app/design/adminhtml/default/default/template/TIG/PostNL/system/config/form/field/warning_box.phtml +8 -4
- app/design/adminhtml/default/default/template/TIG/PostNL/upgrade_notification.phtml +2 -2
- app/design/adminhtml/default/default/template/TIG/PostNL/widget/grid/massaction/label_start_pos.phtml +1 -1
- app/design/frontend/base/default/layout/TIG/postnl.xml +51 -8
- app/design/frontend/base/default/template/TIG/PostNL/address_validation/checkout/onepage/billing.phtml +1 -1
- app/design/frontend/base/default/template/TIG/PostNL/address_validation/checkout/onepage/postcode_check.phtml +1 -1
- app/design/frontend/base/default/template/TIG/PostNL/address_validation/checkout/onepage/shipping.phtml +1 -1
- app/design/frontend/base/default/template/TIG/PostNL/address_validation/customer/address/edit.phtml +1 -1
- app/design/frontend/base/default/template/TIG/PostNL/address_validation/customer/address/postcode_check.phtml +1 -1
- app/design/frontend/base/default/template/TIG/PostNL/address_validation/gomage_checkout/billing.phtml +181 -0
- app/design/frontend/base/default/template/TIG/PostNL/address_validation/gomage_checkout/postcode_check.phtml +295 -0
- app/design/frontend/base/default/template/TIG/PostNL/address_validation/gomage_checkout/shipping.phtml +95 -0
- app/design/frontend/base/default/template/TIG/PostNL/address_validation/onestepcheckout/billing_fields.phtml +1 -1
- app/design/frontend/base/default/template/TIG/PostNL/address_validation/onestepcheckout/postcode_check.phtml +1 -1
- app/design/frontend/base/default/template/TIG/PostNL/address_validation/onestepcheckout/shipping_fields.phtml +1 -1
- app/design/frontend/base/default/template/TIG/PostNL/address_validation/validate.phtml +1 -1
- app/design/frontend/base/default/template/TIG/PostNL/checkout/cart/js.phtml +1 -1
- app/design/frontend/base/default/template/TIG/PostNL/checkout/cart/link.phtml +1 -1
- app/design/frontend/base/default/template/TIG/PostNL/checkout/cart/spinner.phtml +1 -1
- app/design/frontend/base/default/template/TIG/PostNL/checkout/summary.phtml +1 -1
- app/design/frontend/base/default/template/TIG/PostNL/core/order/returns/info.phtml +1 -1
- app/design/frontend/base/default/template/TIG/PostNL/core/order/returns/shipment/items.phtml +1 -1
- app/design/frontend/base/default/template/TIG/PostNL/core/page/html/js_translate.phtml +1 -1
- app/design/frontend/base/default/template/TIG/PostNL/core/sales/order/email/delivery_options.phtml +3 -2
- app/design/frontend/base/default/template/TIG/PostNL/core/sales/order/email/pakjegemak_address.phtml +4 -3
- app/design/frontend/base/default/template/TIG/PostNL/core/sales/order/pakje_gemak_address.phtml +1 -1
- app/design/frontend/base/default/template/TIG/PostNL/core/sales/order/shipment/shipping_status.phtml +1 -1
- app/design/frontend/base/default/template/TIG/PostNL/delivery_options/addlocation.phtml +1 -1
- app/design/frontend/base/default/template/TIG/PostNL/delivery_options/addphonenumber.phtml +22 -7
- app/design/frontend/base/default/template/TIG/PostNL/delivery_options/gomage_checkout/available.phtml +159 -0
- app/design/frontend/base/default/template/TIG/PostNL/delivery_options/gomage_checkout/deliveryoptions.phtml +963 -0
- app/design/frontend/base/default/template/TIG/PostNL/delivery_options/js.phtml +2 -2
- app/design/frontend/base/default/template/TIG/PostNL/delivery_options/onepage/available.phtml +1 -1
- app/design/frontend/base/default/template/TIG/PostNL/delivery_options/onepage/deliveryoptions.phtml +54 -42
- app/design/frontend/base/default/template/TIG/PostNL/delivery_options/onepage/pickup_notification.phtml +76 -0
- app/design/frontend/base/default/template/TIG/PostNL/delivery_options/onepage/progress/pakje_gemak.phtml +1 -1
- app/design/frontend/base/default/template/TIG/PostNL/delivery_options/onepage/progress/shipping_method.phtml +1 -1
- app/design/frontend/base/default/template/TIG/PostNL/delivery_options/onestepcheckout/available.phtml +2 -2
- app/design/frontend/base/default/template/TIG/PostNL/delivery_options/onestepcheckout/bpost/available.phtml +260 -0
- app/design/frontend/base/default/template/TIG/PostNL/delivery_options/onestepcheckout/deliveryoptions.phtml +2 -1
- app/design/frontend/base/default/template/TIG/PostNL/delivery_options/progress.phtml +1 -1
- app/design/frontend/base/default/template/TIG/PostNL/delivery_options/sales/order/delivery_options_info.phtml +1 -1
- app/design/frontend/base/default/template/TIG/PostNL/delivery_options/theme.phtml +1 -1
- app/design/frontend/base/default/template/TIG/PostNL/mijnpakket/account_notification.phtml +1 -1
- app/design/frontend/base/default/template/TIG/PostNL/mijnpakket/gomage_checkout/js.phtml +44 -0
- app/design/frontend/base/default/template/TIG/PostNL/mijnpakket/gomage_checkout/login_button.phtml +181 -0
- app/design/frontend/base/default/template/TIG/PostNL/mijnpakket/js.phtml +1 -1
- app/design/frontend/base/default/template/TIG/PostNL/mijnpakket/onepage/login_button.phtml +1 -1
- app/design/frontend/base/default/template/TIG/PostNL/mijnpakket/onestepcheckout/login_button.phtml +1 -1
- app/design/frontend/base/default/template/TIG/PostNL/mijnpakket/order_success_js.phtml +1 -1
- app/design/frontend/base/default/template/TIG/PostNL/payment/checkout/form/cod.phtml +2 -2
- app/design/frontend/enterprise/default/template/TIG/PostNL/address_validation/checkout/onepage/billing.phtml +1 -1
- app/design/frontend/enterprise/default/template/TIG/PostNL/address_validation/checkout/onepage/postcode_check.phtml +1 -1
- app/design/frontend/enterprise/default/template/TIG/PostNL/address_validation/checkout/onepage/shipping.phtml +1 -1
- app/design/frontend/enterprise/default/template/TIG/PostNL/address_validation/customer/address/edit.phtml +1 -1
- app/design/frontend/enterprise/default/template/TIG/PostNL/address_validation/customer/address/postcode_check.phtml +1 -1
- app/design/frontend/enterprise/default/template/TIG/PostNL/core/sales/order/pakje_gemak_address.phtml +1 -1
- app/design/frontend/enterprise/default/template/TIG/PostNL/mijnpakket/onepage/login_button.phtml +1 -1
- app/design/frontend/rwd/default/layout/TIG/postnl.xml +50 -0
- app/design/frontend/rwd/default/template/TIG/PostNL/address_validation/checkout/onepage/postcode_check.phtml +1 -1
- app/design/frontend/rwd/default/template/TIG/PostNL/address_validation/customer/address/postcode_check.phtml +1 -1
- app/design/frontend/rwd/default/template/TIG/PostNL/checkout/cart/link.phtml +1 -1
- app/design/frontend/rwd/default/template/TIG/PostNL/mijnpakket/onepage/login_button.phtml +1 -1
- app/etc/modules/TIG_PostNL.xml +1 -1
- app/locale/en_US/TIG_PostNL.csv +65 -13
- app/locale/nl_NL/TIG_PostNL.csv +68 -17
- lib/TIG/PostNL/Fpdf.php +1 -1
- lib/TIG/PostNL/Fpdi.php +1 -5
- package.xml +90 -5
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ___________ __ __
|
4 |
+
* \__ ___/____ _/ |_ _____ | |
|
5 |
+
* | | / _ \\ __\\__ \ | |
|
6 |
+
* | | | |_| || | / __ \_| |__
|
7 |
+
* |____| \____/ |__| (____ /|____/
|
8 |
+
* \/
|
9 |
+
* ___ __ __
|
10 |
+
* | | ____ _/ |_ ____ _______ ____ ____ _/ |_
|
11 |
+
* | | / \\ __\_/ __ \\_ __ \ / \ _/ __ \\ __\
|
12 |
+
* | || | \| | \ ___/ | | \/| | \\ ___/ | |
|
13 |
+
* |___||___| /|__| \_____>|__| |___| / \_____>|__|
|
14 |
+
* \/ \/
|
15 |
+
* ________
|
16 |
+
* / _____/_______ ____ __ __ ______
|
17 |
+
* / \ ___\_ __ \ / _ \ | | \\____ \
|
18 |
+
* \ \_\ \| | \/| |_| || | /| |_| |
|
19 |
+
* \______ /|__| \____/ |____/ | __/
|
20 |
+
* \/ |__|
|
21 |
+
*
|
22 |
+
* NOTICE OF LICENSE
|
23 |
+
*
|
24 |
+
* This source file is subject to the Creative Commons License.
|
25 |
+
* It is available through the world-wide-web at this URL:
|
26 |
+
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
27 |
+
* If you are unable to obtain it through the world-wide-web, please send an email
|
28 |
+
* to servicedesk@tig.nl so we can send you a copy immediately.
|
29 |
+
*
|
30 |
+
* DISCLAIMER
|
31 |
+
*
|
32 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
33 |
+
* versions in the future. If you wish to customize this module for your
|
34 |
+
* needs please contact servicedesk@tig.nl for more information.
|
35 |
+
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
+
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
+
*/
|
39 |
+
class TIG_PostNL_Block_AddressValidation_GoMage_LightCheckout_Billing extends GoMage_Checkout_Block_Onepage_Billing
|
40 |
+
{
|
41 |
+
/**
|
42 |
+
* @param array $fields
|
43 |
+
*
|
44 |
+
* @return string
|
45 |
+
*/
|
46 |
+
protected function _renderFields($fields)
|
47 |
+
{
|
48 |
+
if (!Mage::helper('postnl/addressValidation')->isPostcodeCheckEnabled(null, 'checkout')) {
|
49 |
+
return parent::_renderFields($fields);
|
50 |
+
}
|
51 |
+
|
52 |
+
$html = '';
|
53 |
+
|
54 |
+
foreach ($fields as $_fields) {
|
55 |
+
if (is_array($_fields)) {
|
56 |
+
if (count($_fields) > 1) {
|
57 |
+
|
58 |
+
$_html = '';
|
59 |
+
$i = 0;
|
60 |
+
$row_class = array();
|
61 |
+
|
62 |
+
foreach ($_fields as $field_code) {
|
63 |
+
if ($field_code == 'postcode' || $field_code == 'city' || $field_code == 'country_id') {
|
64 |
+
continue;
|
65 |
+
} elseif ($field_code == 'street') {
|
66 |
+
$html .= $this->getChild('postnl_billing_postcodecheck')
|
67 |
+
->setAddressType('billing')
|
68 |
+
->setAddress($this->getAddress())
|
69 |
+
->setCountryHtmlSelect($this->getCountryHtmlSelect('billing'))
|
70 |
+
->toHtml();
|
71 |
+
continue;
|
72 |
+
}
|
73 |
+
|
74 |
+
$data = array(
|
75 |
+
'prefix' => $this->prefix,
|
76 |
+
'value' => $this->getAddress()->getData($field_code),
|
77 |
+
'label' => @$this->field_code_to_label[$field_code],
|
78 |
+
'input_name' => $this->prefix . '[' . $field_code . ']',
|
79 |
+
'input_id' => $this->prefix . '_' . $field_code,
|
80 |
+
);
|
81 |
+
|
82 |
+
if ($this->getConfigData('address_fields/' . $field_code) == 'req') {
|
83 |
+
$data['is_required'] = true;
|
84 |
+
}
|
85 |
+
|
86 |
+
if (!($template = $this->getData($field_code . '_template'))) {
|
87 |
+
$template = $this->default_address_template;
|
88 |
+
}
|
89 |
+
|
90 |
+
$_html .= '<div class="field field-' . $field_code . ' ' . ($i % 2 == 0 ? ' field-first ' : ' field-last ') . '">' . $this->getLayout()->createBlock('gomage_checkout/onepage_' . $this->prefix)->setTemplate($template)->addData($data)->toHtml() . '</div>';
|
91 |
+
|
92 |
+
$row_class[] = $field_code;
|
93 |
+
|
94 |
+
if (++$i == 2) {
|
95 |
+
break;
|
96 |
+
}
|
97 |
+
}
|
98 |
+
|
99 |
+
$html .= '<li class="fields ' . implode('-', $row_class) . '">' . $_html . '</li>';
|
100 |
+
|
101 |
+
} else {
|
102 |
+
|
103 |
+
$field_code = array_shift($_fields);
|
104 |
+
if ($field_code == 'postcode' || $field_code == 'city' || $field_code == 'country_id') {
|
105 |
+
continue;
|
106 |
+
} elseif ($field_code == 'street') {
|
107 |
+
$html .= $this->getChild('postnl_billing_postcodecheck')
|
108 |
+
->setAddressType('billing')
|
109 |
+
->setAddress($this->getAddress())
|
110 |
+
->setCountryHtmlSelect($this->getCountryHtmlSelect('billing'))
|
111 |
+
->toHtml();
|
112 |
+
continue;
|
113 |
+
}
|
114 |
+
|
115 |
+
$data = array(
|
116 |
+
'prefix' => $this->prefix,
|
117 |
+
'address_prefix' => $this->prefix,
|
118 |
+
'value' => $this->getAddress()->getData($field_code),
|
119 |
+
'label' => @$this->field_code_to_label[$field_code],
|
120 |
+
'input_name' => $this->prefix . '[' . $field_code . ']',
|
121 |
+
'input_id' => $this->prefix . '_' . $field_code,
|
122 |
+
);
|
123 |
+
|
124 |
+
|
125 |
+
if ($this->getConfigData('address_fields/' . $field_code) == 'req') {
|
126 |
+
$data['is_required'] = true;
|
127 |
+
}
|
128 |
+
|
129 |
+
if (!($template = $this->getData($field_code . '_template'))) {
|
130 |
+
$template = $this->default_address_template;
|
131 |
+
}
|
132 |
+
|
133 |
+
$html .= '<li>' . $this->getLayout()->createBlock('gomage_checkout/onepage_' . $this->prefix)->setTemplate($template)->addData($data)->toHtml() . '</li>';
|
134 |
+
}
|
135 |
+
|
136 |
+
}
|
137 |
+
}
|
138 |
+
|
139 |
+
return $html;
|
140 |
+
}
|
141 |
+
}
|
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ___________ __ __
|
4 |
+
* \__ ___/____ _/ |_ _____ | |
|
5 |
+
* | | / _ \\ __\\__ \ | |
|
6 |
+
* | | | |_| || | / __ \_| |__
|
7 |
+
* |____| \____/ |__| (____ /|____/
|
8 |
+
* \/
|
9 |
+
* ___ __ __
|
10 |
+
* | | ____ _/ |_ ____ _______ ____ ____ _/ |_
|
11 |
+
* | | / \\ __\_/ __ \\_ __ \ / \ _/ __ \\ __\
|
12 |
+
* | || | \| | \ ___/ | | \/| | \\ ___/ | |
|
13 |
+
* |___||___| /|__| \_____>|__| |___| / \_____>|__|
|
14 |
+
* \/ \/
|
15 |
+
* ________
|
16 |
+
* / _____/_______ ____ __ __ ______
|
17 |
+
* / \ ___\_ __ \ / _ \ | | \\____ \
|
18 |
+
* \ \_\ \| | \/| |_| || | /| |_| |
|
19 |
+
* \______ /|__| \____/ |____/ | __/
|
20 |
+
* \/ |__|
|
21 |
+
*
|
22 |
+
* NOTICE OF LICENSE
|
23 |
+
*
|
24 |
+
* This source file is subject to the Creative Commons License.
|
25 |
+
* It is available through the world-wide-web at this URL:
|
26 |
+
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
27 |
+
* If you are unable to obtain it through the world-wide-web, please send an email
|
28 |
+
* to servicedesk@tig.nl so we can send you a copy immediately.
|
29 |
+
*
|
30 |
+
* DISCLAIMER
|
31 |
+
*
|
32 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
33 |
+
* versions in the future. If you wish to customize this module for your
|
34 |
+
* needs please contact servicedesk@tig.nl for more information.
|
35 |
+
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
+
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
+
*/
|
39 |
+
class TIG_PostNL_Block_AddressValidation_GoMage_LightCheckout_Shipping extends GoMage_Checkout_Block_Onepage_Shipping
|
40 |
+
{
|
41 |
+
protected function _renderFields($fields)
|
42 |
+
{
|
43 |
+
if (!Mage::helper('postnl/addressValidation')->isPostcodeCheckEnabled(null, 'checkout')) {
|
44 |
+
return parent::_renderFields($fields);
|
45 |
+
}
|
46 |
+
|
47 |
+
$html = '';
|
48 |
+
|
49 |
+
foreach ($fields as $_fields) {
|
50 |
+
if (is_array($_fields)) {
|
51 |
+
if (count($_fields) > 1) {
|
52 |
+
|
53 |
+
$_html = '';
|
54 |
+
$i = 0;
|
55 |
+
$row_class = array();
|
56 |
+
|
57 |
+
foreach ($_fields as $field_code) {
|
58 |
+
if ($field_code == 'postcode' || $field_code == 'city' || $field_code == 'country_id') {
|
59 |
+
continue;
|
60 |
+
} elseif ($field_code == 'street') {
|
61 |
+
$html .= $this->getChild('postnl_shipping_postcodecheck')
|
62 |
+
->setAddressType('shipping')
|
63 |
+
->setAddress($this->getAddress())
|
64 |
+
->setCountryHtmlSelect($this->getCountryHtmlSelect('shipping'))
|
65 |
+
->toHtml();
|
66 |
+
continue;
|
67 |
+
}
|
68 |
+
|
69 |
+
$data = array(
|
70 |
+
'prefix' => $this->prefix,
|
71 |
+
'value' => $this->getAddress()->getData($field_code),
|
72 |
+
'label' => @$this->field_code_to_label[$field_code],
|
73 |
+
'input_name' => $this->prefix . '[' . $field_code . ']',
|
74 |
+
'input_id' => $this->prefix . '_' . $field_code,
|
75 |
+
);
|
76 |
+
|
77 |
+
if ($this->getConfigData('address_fields/' . $field_code) == 'req') {
|
78 |
+
$data['is_required'] = true;
|
79 |
+
}
|
80 |
+
|
81 |
+
if (!($template = $this->getData($field_code . '_template'))) {
|
82 |
+
$template = $this->default_address_template;
|
83 |
+
}
|
84 |
+
|
85 |
+
$_html .= '<div class="field field-' . $field_code . ' ' . ($i % 2 == 0 ? ' field-first ' : ' field-last ') . '">' . $this->getLayout()->createBlock('gomage_checkout/onepage_' . $this->prefix)->setTemplate($template)->addData($data)->toHtml() . '</div>';
|
86 |
+
|
87 |
+
$row_class[] = $field_code;
|
88 |
+
|
89 |
+
if (++$i == 2) {
|
90 |
+
break;
|
91 |
+
}
|
92 |
+
}
|
93 |
+
|
94 |
+
$html .= '<li class="fields ' . implode('-', $row_class) . '">' . $_html . '</li>';
|
95 |
+
|
96 |
+
} else {
|
97 |
+
|
98 |
+
$field_code = array_shift($_fields);
|
99 |
+
if ($field_code == 'postcode' || $field_code == 'city' || $field_code == 'country_id') {
|
100 |
+
continue;
|
101 |
+
} elseif ($field_code == 'street') {
|
102 |
+
$html .= $this->getChild('postnl_shipping_postcodecheck')
|
103 |
+
->setAddressType('shipping')
|
104 |
+
->setAddress($this->getAddress())
|
105 |
+
->setCountryHtmlSelect($this->getCountryHtmlSelect('shipping'))
|
106 |
+
->toHtml();
|
107 |
+
continue;
|
108 |
+
}
|
109 |
+
|
110 |
+
$data = array(
|
111 |
+
'prefix' => $this->prefix,
|
112 |
+
'address_prefix' => $this->prefix,
|
113 |
+
'value' => $this->getAddress()->getData($field_code),
|
114 |
+
'label' => @$this->field_code_to_label[$field_code],
|
115 |
+
'input_name' => $this->prefix . '[' . $field_code . ']',
|
116 |
+
'input_id' => $this->prefix . '_' . $field_code,
|
117 |
+
);
|
118 |
+
|
119 |
+
|
120 |
+
if ($this->getConfigData('address_fields/' . $field_code) == 'req') {
|
121 |
+
$data['is_required'] = true;
|
122 |
+
}
|
123 |
+
|
124 |
+
if (!($template = $this->getData($field_code . '_template'))) {
|
125 |
+
$template = $this->default_address_template;
|
126 |
+
}
|
127 |
+
|
128 |
+
$html .= '<li>' . $this->getLayout()->createBlock('gomage_checkout/onepage_' . $this->prefix)->setTemplate($template)->addData($data)->toHtml() . '</li>';
|
129 |
+
}
|
130 |
+
|
131 |
+
}
|
132 |
+
}
|
133 |
+
|
134 |
+
return $html;
|
135 |
+
}
|
136 |
+
}
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Carrier_Postnl_Matrixrate_Grid
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Carrier_Postnl_Matrixrate_Grid
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Carrier_Postnl_Tablerate_Grid
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Carrier_Postnl_Tablerate_Grid
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_CronNotification extends TIG_PostNL_Block_Adminhtml_Template
|
@@ -110,11 +110,12 @@ class TIG_PostNL_Block_Adminhtml_CronNotification extends TIG_PostNL_Block_Admin
|
|
110 |
* Check if the last execution time was more than an hour ago.
|
111 |
* If no crontask has been executed in an hour it's likely that something is wrong.
|
112 |
*/
|
113 |
-
$
|
|
|
114 |
$currentTime->setTimestamp(Mage::getModel('core/date')->gmtTimestamp());
|
115 |
|
116 |
$oneHourAgo = $currentTime->sub(new DateInterval('PT1H'));
|
117 |
-
$lastExecutionTime = new DateTime($lastExecutionTime);
|
118 |
|
119 |
if ($lastExecutionTime < $oneHourAgo) {
|
120 |
return false;
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_CronNotification extends TIG_PostNL_Block_Adminhtml_Template
|
110 |
* Check if the last execution time was more than an hour ago.
|
111 |
* If no crontask has been executed in an hour it's likely that something is wrong.
|
112 |
*/
|
113 |
+
$utcTimeZone = new DateTimeZone('UTC');
|
114 |
+
$currentTime = new DateTime('now', $utcTimeZone);
|
115 |
$currentTime->setTimestamp(Mage::getModel('core/date')->gmtTimestamp());
|
116 |
|
117 |
$oneHourAgo = $currentTime->sub(new DateInterval('PT1H'));
|
118 |
+
$lastExecutionTime = new DateTime($lastExecutionTime, $utcTimeZone);
|
119 |
|
120 |
if ($lastExecutionTime < $oneHourAgo) {
|
121 |
return false;
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_IntegrityNotification extends TIG_PostNL_Block_Adminhtml_Template
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_IntegrityNotification extends TIG_PostNL_Block_Adminhtml_Template
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasMaxLogSize()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasMaxLogSize()
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Sales_Items_Column_Qty extends Mage_Adminhtml_Block_Sales_Items_Column_Qty
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Sales_Items_Column_Qty extends Mage_Adminhtml_Block_Sales_Items_Column_Qty
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method Varien_Object getTotal()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method Varien_Object getTotal()
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Sales_Order_Creditmemo_Create_CodFee extends Mage_Adminhtml_Block_Template
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Sales_Order_Creditmemo_Create_CodFee extends Mage_Adminhtml_Block_Template
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Sales_Order_Creditmemo_Totals_CodFee
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Sales_Order_Creditmemo_Totals_CodFee
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Sales_Order_Invoice_Totals_CodFee
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Sales_Order_Invoice_Totals_CodFee
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasExtraCoverProductOptions()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasExtraCoverProductOptions()
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasShipment()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasShipment()
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasPostnlShipment()
|
@@ -397,8 +397,9 @@ class TIG_PostNL_Block_Adminhtml_Sales_Order_Shipment_View_DeliveryOptions
|
|
397 |
$postnlShipment->getStoreId()
|
398 |
);
|
399 |
$storeTimezone = new DateTimeZone($storeTimezone);
|
|
|
400 |
|
401 |
-
$storeStartTime = new DateTime($postnlShipment->getExpectedDeliveryTimeStart());
|
402 |
$storeStartTime->setTimezone($storeTimezone);
|
403 |
$info['delivery_time_start'] = $dateModel->date('H:i', $postnlShipment->getExpectedDeliveryTimeStart());
|
404 |
$info['store_delivery_time_start'] = $storeStartTime->format('H:i');
|
@@ -411,7 +412,7 @@ class TIG_PostNL_Block_Adminhtml_Sales_Order_Shipment_View_DeliveryOptions
|
|
411 |
return $info;
|
412 |
}
|
413 |
|
414 |
-
$storeEndTime = new DateTime($postnlShipment->getExpectedDeliveryTimeEnd());
|
415 |
$storeEndTime->setTimezone($storeTimezone);
|
416 |
$info['delivery_time_end'] = $dateModel->date('H:i', $postnlShipment->getExpectedDeliveryTimeEnd());
|
417 |
$info['store_delivery_time_end'] = $storeEndTime->format('H:i');
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasPostnlShipment()
|
397 |
$postnlShipment->getStoreId()
|
398 |
);
|
399 |
$storeTimezone = new DateTimeZone($storeTimezone);
|
400 |
+
$utcTimeZone = new DateTimeZone('UTC');
|
401 |
|
402 |
+
$storeStartTime = new DateTime($postnlShipment->getExpectedDeliveryTimeStart(), $utcTimeZone);
|
403 |
$storeStartTime->setTimezone($storeTimezone);
|
404 |
$info['delivery_time_start'] = $dateModel->date('H:i', $postnlShipment->getExpectedDeliveryTimeStart());
|
405 |
$info['store_delivery_time_start'] = $storeStartTime->format('H:i');
|
412 |
return $info;
|
413 |
}
|
414 |
|
415 |
+
$storeEndTime = new DateTime($postnlShipment->getExpectedDeliveryTimeEnd(), $utcTimeZone);
|
416 |
$storeEndTime->setTimezone($storeTimezone);
|
417 |
$info['delivery_time_end'] = $dateModel->date('H:i', $postnlShipment->getExpectedDeliveryTimeEnd());
|
418 |
$info['store_delivery_time_end'] = $storeEndTime->format('H:i');
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Sales_Order_Shipment_View_ShippingStatus extends TIG_PostNL_Block_Adminhtml_Template
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Sales_Order_Shipment_View_ShippingStatus extends TIG_PostNL_Block_Adminhtml_Template
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method TIG_PostNL_Model_Core_Shipment getPostnlShipment()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method TIG_PostNL_Model_Core_Shipment getPostnlShipment()
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Sales_Order_Shipment_View_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Sales_Order_Shipment_View_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Sales_Order_Totals_CodFee extends Mage_Adminhtml_Block_Sales_Order_Totals
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Sales_Order_Totals_CodFee extends Mage_Adminhtml_Block_Sales_Order_Totals
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasOrder()
|
@@ -244,8 +244,9 @@ class TIG_PostNL_Block_Adminhtml_Sales_Order_View_DeliveryOptions extends TIG_Po
|
|
244 |
$postnlOrder->getStoreId()
|
245 |
);
|
246 |
$storeTimezone = new DateTimeZone($storeTimezone);
|
|
|
247 |
|
248 |
-
$storeStartTime = new DateTime($postnlOrder->getExpectedDeliveryTimeStart());
|
249 |
$storeStartTime->setTimezone($storeTimezone);
|
250 |
$info['delivery_time_start'] = $dateModel->date('H:i', $postnlOrder->getExpectedDeliveryTimeStart());
|
251 |
$info['store_delivery_time_start'] = $storeStartTime->format('H:i');
|
@@ -258,7 +259,7 @@ class TIG_PostNL_Block_Adminhtml_Sales_Order_View_DeliveryOptions extends TIG_Po
|
|
258 |
return $info;
|
259 |
}
|
260 |
|
261 |
-
$storeEndTime = new DateTime($postnlOrder->getExpectedDeliveryTimeEnd());
|
262 |
$storeEndTime->setTimezone($storeTimezone);
|
263 |
$info['delivery_time_end'] = $dateModel->date('H:i', $postnlOrder->getExpectedDeliveryTimeEnd());
|
264 |
$info['store_delivery_time_end'] = $storeEndTime->format('H:i');
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasOrder()
|
244 |
$postnlOrder->getStoreId()
|
245 |
);
|
246 |
$storeTimezone = new DateTimeZone($storeTimezone);
|
247 |
+
$utcTimeZone = new DateTimeZone('UTC');
|
248 |
|
249 |
+
$storeStartTime = new DateTime($postnlOrder->getExpectedDeliveryTimeStart(), $utcTimeZone);
|
250 |
$storeStartTime->setTimezone($storeTimezone);
|
251 |
$info['delivery_time_start'] = $dateModel->date('H:i', $postnlOrder->getExpectedDeliveryTimeStart());
|
252 |
$info['store_delivery_time_start'] = $storeStartTime->format('H:i');
|
259 |
return $info;
|
260 |
}
|
261 |
|
262 |
+
$storeEndTime = new DateTime($postnlOrder->getExpectedDeliveryTimeEnd(), $utcTimeZone);
|
263 |
$storeEndTime->setTimezone($storeTimezone);
|
264 |
$info['delivery_time_end'] = $dateModel->date('H:i', $postnlOrder->getExpectedDeliveryTimeEnd());
|
265 |
$info['store_delivery_time_end'] = $storeEndTime->format('H:i');
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Sales_Returns extends Mage_Adminhtml_Block_Sales_Shipment
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Sales_Returns extends Mage_Adminhtml_Block_Sales_Shipment
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Sales_Returns_Grid extends Mage_Adminhtml_Block_Sales_Shipment_Grid
|
@@ -249,7 +249,8 @@ class TIG_PostNL_Block_Adminhtml_Sales_Returns_Grid extends Mage_Adminhtml_Block
|
|
249 |
),
|
250 |
'filter' => false,
|
251 |
'sortable' => false,
|
252 |
-
'is_system' => true
|
|
|
253 |
)
|
254 |
);
|
255 |
|
@@ -330,7 +331,7 @@ class TIG_PostNL_Block_Adminhtml_Sales_Returns_Grid extends Mage_Adminhtml_Block
|
|
330 |
return $this->getUrl('adminhtml/sales_shipment/view',
|
331 |
array(
|
332 |
'shipment_id' => $row->getId(),
|
333 |
-
'
|
334 |
)
|
335 |
);
|
336 |
}
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Sales_Returns_Grid extends Mage_Adminhtml_Block_Sales_Shipment_Grid
|
249 |
),
|
250 |
'filter' => false,
|
251 |
'sortable' => false,
|
252 |
+
'is_system' => true,
|
253 |
+
'renderer' => 'postnl_adminhtml/widget_grid_column_renderer_returnView',
|
254 |
)
|
255 |
);
|
256 |
|
331 |
return $this->getUrl('adminhtml/sales_shipment/view',
|
332 |
array(
|
333 |
'shipment_id' => $row->getId(),
|
334 |
+
'come_from_postnl' => Mage::helper('core')->urlEncode('postnl_admin/adminhtml_returns')
|
335 |
)
|
336 |
);
|
337 |
}
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasFieldsetParam()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasFieldsetParam()
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_ActivateButton setElement(Varien_Data_Form_Element_Abstract $value)
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_ActivateButton setElement(Varien_Data_Form_Element_Abstract $value)
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_ActivatedFieldHeader
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_ActivatedFieldHeader
|
@@ -37,135 +37,15 @@
|
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_AddressLines
|
40 |
-
extends
|
41 |
{
|
42 |
/**
|
43 |
-
*
|
44 |
-
*
|
45 |
-
* @param Varien_Data_Form_Element_Abstract $element
|
46 |
-
* @param string $html
|
47 |
-
* @return string
|
48 |
*/
|
49 |
-
protected function
|
50 |
-
{
|
51 |
-
return '<tr id="row_' . $element->getHtmlId() . '" style="display:none;">' . $html . '</tr>';
|
52 |
-
}
|
53 |
-
|
54 |
-
/**
|
55 |
-
* Overloaded for forwards compatibility for Magento 1.6.
|
56 |
-
*
|
57 |
-
* @param Varien_Data_Form_Element_Abstract $element
|
58 |
-
* @return string
|
59 |
-
*/
|
60 |
-
public function render(Varien_Data_Form_Element_Abstract $element)
|
61 |
-
{
|
62 |
-
$id = $element->getHtmlId();
|
63 |
-
|
64 |
-
$html = '<td class="label"><label for="'.$id.'">'.$element->getLabel().'</label></td>';
|
65 |
-
|
66 |
-
//$isDefault = !$this->getRequest()->getParam('website') && !$this->getRequest()->getParam('store');
|
67 |
-
$isMultiple = $element->getExtType()==='multiple';
|
68 |
-
|
69 |
-
// replace [value] with [inherit]
|
70 |
-
$namePrefix = preg_replace('#\[value\](\[\])?$#', '', $element->getName());
|
71 |
-
|
72 |
-
$options = $element->getValues();
|
73 |
-
|
74 |
-
$addInheritCheckbox = false;
|
75 |
-
if ($element->getCanUseWebsiteValue()) {
|
76 |
-
$addInheritCheckbox = true;
|
77 |
-
$checkboxLabel = $this->__('Use Website');
|
78 |
-
}
|
79 |
-
elseif ($element->getCanUseDefaultValue()) {
|
80 |
-
$addInheritCheckbox = true;
|
81 |
-
$checkboxLabel = $this->__('Use Default');
|
82 |
-
}
|
83 |
-
|
84 |
-
if ($addInheritCheckbox) {
|
85 |
-
$inherit = $element->getInherit()==1 ? 'checked="checked"' : '';
|
86 |
-
if ($inherit) {
|
87 |
-
$element->setDisabled(true);
|
88 |
-
}
|
89 |
-
}
|
90 |
-
|
91 |
-
if ($element->getTooltip()) {
|
92 |
-
$html .= '<td class="value with-tooltip">';
|
93 |
-
$html .= $this->_getElementHtml($element);
|
94 |
-
$html .= '<div class="field-tooltip"><div>' . $element->getTooltip() . '</div></div>';
|
95 |
-
} else {
|
96 |
-
$html .= '<td class="value">';
|
97 |
-
$html .= $this->_getElementHtml($element);
|
98 |
-
};
|
99 |
-
if ($element->getComment()) {
|
100 |
-
$html.= '<p class="note"><span>'.$element->getComment().'</span></p>';
|
101 |
-
}
|
102 |
-
$html.= '</td>';
|
103 |
-
|
104 |
-
if ($addInheritCheckbox) {
|
105 |
-
|
106 |
-
$defText = $element->getDefaultValue();
|
107 |
-
if ($options) {
|
108 |
-
$defTextArr = array();
|
109 |
-
foreach ($options as $k=>$v) {
|
110 |
-
if ($isMultiple) {
|
111 |
-
if (is_array($v['value']) && in_array($k, $v['value'])) {
|
112 |
-
$defTextArr[] = $v['label'];
|
113 |
-
}
|
114 |
-
} elseif (isset($v['value'])) {
|
115 |
-
if ($v['value'] == $defText) {
|
116 |
-
$defTextArr[] = $v['label'];
|
117 |
-
break;
|
118 |
-
}
|
119 |
-
} elseif (!is_array($v)) {
|
120 |
-
if ($k == $defText) {
|
121 |
-
$defTextArr[] = $v;
|
122 |
-
break;
|
123 |
-
}
|
124 |
-
}
|
125 |
-
}
|
126 |
-
$defText = join(', ', $defTextArr);
|
127 |
-
}
|
128 |
-
|
129 |
-
// default value
|
130 |
-
$html.= '<td class="use-default">';
|
131 |
-
$html.= '<input id="' . $id . '_inherit" name="'
|
132 |
-
. $namePrefix . '[inherit]" type="checkbox" value="1" class="checkbox config-inherit" '
|
133 |
-
. $inherit . ' onclick="toggleValueElements(this, Element.previous(this.parentNode))" /> ';
|
134 |
-
$html.= '<label for="' . $id . '_inherit" class="inherit" title="'
|
135 |
-
. htmlspecialchars($defText) . '">' . $checkboxLabel . '</label>';
|
136 |
-
$html.= '</td>';
|
137 |
-
}
|
138 |
-
|
139 |
-
$html.= '<td class="scope-label">';
|
140 |
-
if ($element->getScope()) {
|
141 |
-
$html .= $element->getScopeLabel();
|
142 |
-
}
|
143 |
-
$html.= '</td>';
|
144 |
-
|
145 |
-
$html.= '<td class="">';
|
146 |
-
if ($element->getHint()) {
|
147 |
-
$html.= '<div class="hint" >';
|
148 |
-
$html.= '<div style="display: none;">' . $element->getHint() . '</div>';
|
149 |
-
$html.= '</div>';
|
150 |
-
}
|
151 |
-
$html.= '</td>';
|
152 |
-
|
153 |
-
return $this->_decorateRowHtml($element, $html);
|
154 |
-
}
|
155 |
-
|
156 |
-
/**
|
157 |
-
* Get the element's HTML.
|
158 |
-
*
|
159 |
-
* @param Varien_Data_Form_Element_Abstract $element
|
160 |
-
* @return string
|
161 |
-
*/
|
162 |
-
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
163 |
{
|
164 |
$value = Mage::helper('postnl/addressValidation')->getAddressLineCount();
|
165 |
|
166 |
-
$
|
167 |
-
.'" value="' . $value . '" '.$this->serialize($element->getHtmlAttributes()).'/>'."\n";
|
168 |
-
$html.= $element->getAfterElementHtml();
|
169 |
-
return $html;
|
170 |
}
|
171 |
}
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_AddressLines
|
40 |
+
extends TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_Hidden
|
41 |
{
|
42 |
/**
|
43 |
+
* @return int|string
|
|
|
|
|
|
|
|
|
44 |
*/
|
45 |
+
protected function _getValue()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
{
|
47 |
$value = Mage::helper('postnl/addressValidation')->getAddressLineCount();
|
48 |
|
49 |
+
return $value;
|
|
|
|
|
|
|
50 |
}
|
51 |
}
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_Anchor
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_Anchor
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method mixed getValue()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method mixed getValue()
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasPostnlHelper()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasPostnlHelper()
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ___________ __ __
|
4 |
+
* \__ ___/____ _/ |_ _____ | |
|
5 |
+
* | | / _ \\ __\\__ \ | |
|
6 |
+
* | | | |_| || | / __ \_| |__
|
7 |
+
* |____| \____/ |__| (____ /|____/
|
8 |
+
* \/
|
9 |
+
* ___ __ __
|
10 |
+
* | | ____ _/ |_ ____ _______ ____ ____ _/ |_
|
11 |
+
* | | / \\ __\_/ __ \\_ __ \ / \ _/ __ \\ __\
|
12 |
+
* | || | \| | \ ___/ | | \/| | \\ ___/ | |
|
13 |
+
* |___||___| /|__| \_____>|__| |___| / \_____>|__|
|
14 |
+
* \/ \/
|
15 |
+
* ________
|
16 |
+
* / _____/_______ ____ __ __ ______
|
17 |
+
* / \ ___\_ __ \ / _ \ | | \\____ \
|
18 |
+
* \ \_\ \| | \/| |_| || | /| |_| |
|
19 |
+
* \______ /|__| \____/ |____/ | __/
|
20 |
+
* \/ |__|
|
21 |
+
*
|
22 |
+
* NOTICE OF LICENSE
|
23 |
+
*
|
24 |
+
* This source file is subject to the Creative Commons License.
|
25 |
+
* It is available through the world-wide-web at this URL:
|
26 |
+
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
27 |
+
* If you are unable to obtain it through the world-wide-web, please send an email
|
28 |
+
* to servicedesk@tig.nl so we can send you a copy immediately.
|
29 |
+
*
|
30 |
+
* DISCLAIMER
|
31 |
+
*
|
32 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
33 |
+
* versions in the future. If you wish to customize this module for your
|
34 |
+
* needs please contact servicedesk@tig.nl for more information.
|
35 |
+
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
+
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
+
*/
|
39 |
+
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_GoMageDeliveryDateConflicts
|
40 |
+
extends TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_Hidden
|
41 |
+
{
|
42 |
+
/**
|
43 |
+
* Get whether the GoMage LightCheckout delivery date functionality is conflicting with PostNL delivery options.
|
44 |
+
*
|
45 |
+
* @return int
|
46 |
+
*/
|
47 |
+
protected function _getValue()
|
48 |
+
{
|
49 |
+
$storeId = $this->_getStoreId();
|
50 |
+
|
51 |
+
$goMageDeliveryDateConflicts = Mage::helper('postnl/deliveryOptions')
|
52 |
+
->checkGoMageDeliveryDateConflicts($storeId);
|
53 |
+
|
54 |
+
return (int) $goMageDeliveryDateConflicts;
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Get the current store ID based on the request parameters.
|
59 |
+
*
|
60 |
+
* @return int
|
61 |
+
*/
|
62 |
+
protected function _getStoreId()
|
63 |
+
{
|
64 |
+
$request = Mage::app()->getRequest();
|
65 |
+
|
66 |
+
if ($request->getParam('store')) {
|
67 |
+
$store = $request->getparam('store');
|
68 |
+
$storeId = Mage::app()->getStore($store)->getId();
|
69 |
+
} elseif ($request->getParam('website')) {
|
70 |
+
$website = Mage::getModel('core/website')->load($request->getparam('website'), 'code');
|
71 |
+
$store = $website->getDefaultStore();
|
72 |
+
$storeId = $store->getId();
|
73 |
+
} else {
|
74 |
+
$storeId = Mage_Core_Model_App::ADMIN_STORE_ID;
|
75 |
+
}
|
76 |
+
|
77 |
+
return $storeId;
|
78 |
+
}
|
79 |
+
}
|
@@ -0,0 +1,183 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ___________ __ __
|
4 |
+
* \__ ___/____ _/ |_ _____ | |
|
5 |
+
* | | / _ \\ __\\__ \ | |
|
6 |
+
* | | | |_| || | / __ \_| |__
|
7 |
+
* |____| \____/ |__| (____ /|____/
|
8 |
+
* \/
|
9 |
+
* ___ __ __
|
10 |
+
* | | ____ _/ |_ ____ _______ ____ ____ _/ |_
|
11 |
+
* | | / \\ __\_/ __ \\_ __ \ / \ _/ __ \\ __\
|
12 |
+
* | || | \| | \ ___/ | | \/| | \\ ___/ | |
|
13 |
+
* |___||___| /|__| \_____>|__| |___| / \_____>|__|
|
14 |
+
* \/ \/
|
15 |
+
* ________
|
16 |
+
* / _____/_______ ____ __ __ ______
|
17 |
+
* / \ ___\_ __ \ / _ \ | | \\____ \
|
18 |
+
* \ \_\ \| | \/| |_| || | /| |_| |
|
19 |
+
* \______ /|__| \____/ |____/ | __/
|
20 |
+
* \/ |__|
|
21 |
+
*
|
22 |
+
* NOTICE OF LICENSE
|
23 |
+
*
|
24 |
+
* This source file is subject to the Creative Commons License.
|
25 |
+
* It is available through the world-wide-web at this URL:
|
26 |
+
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
27 |
+
* If you are unable to obtain it through the world-wide-web, please send an email
|
28 |
+
* to servicedesk@tig.nl so we can send you a copy immediately.
|
29 |
+
*
|
30 |
+
* DISCLAIMER
|
31 |
+
*
|
32 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
33 |
+
* versions in the future. If you wish to customize this module for your
|
34 |
+
* needs please contact servicedesk@tig.nl for more information.
|
35 |
+
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
+
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
+
*/
|
39 |
+
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_Hidden
|
40 |
+
extends Mage_Adminhtml_Block_System_Config_Form_Field
|
41 |
+
{
|
42 |
+
/**
|
43 |
+
* Decorate field row html
|
44 |
+
*
|
45 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
46 |
+
* @param string $html
|
47 |
+
* @return string
|
48 |
+
*/
|
49 |
+
protected function _decorateRowHtml($element, $html)
|
50 |
+
{
|
51 |
+
return '<tr id="row_' . $element->getHtmlId() . '" style="display:none;">' . $html . '</tr>';
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Overloaded for forwards compatibility for Magento 1.6.
|
56 |
+
*
|
57 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
58 |
+
* @return string
|
59 |
+
*/
|
60 |
+
public function render(Varien_Data_Form_Element_Abstract $element)
|
61 |
+
{
|
62 |
+
$id = $element->getHtmlId();
|
63 |
+
|
64 |
+
$html = '<td class="label"><label for="'.$id.'">'.$element->getLabel().'</label></td>';
|
65 |
+
|
66 |
+
//$isDefault = !$this->getRequest()->getParam('website') && !$this->getRequest()->getParam('store');
|
67 |
+
$isMultiple = $element->getExtType()==='multiple';
|
68 |
+
|
69 |
+
// replace [value] with [inherit]
|
70 |
+
$namePrefix = preg_replace('#\[value\](\[\])?$#', '', $element->getName());
|
71 |
+
|
72 |
+
$options = $element->getValues();
|
73 |
+
|
74 |
+
$addInheritCheckbox = false;
|
75 |
+
if ($element->getCanUseWebsiteValue()) {
|
76 |
+
$addInheritCheckbox = true;
|
77 |
+
$checkboxLabel = $this->__('Use Website');
|
78 |
+
}
|
79 |
+
elseif ($element->getCanUseDefaultValue()) {
|
80 |
+
$addInheritCheckbox = true;
|
81 |
+
$checkboxLabel = $this->__('Use Default');
|
82 |
+
}
|
83 |
+
|
84 |
+
if ($addInheritCheckbox) {
|
85 |
+
$inherit = $element->getInherit()==1 ? 'checked="checked"' : '';
|
86 |
+
if ($inherit) {
|
87 |
+
$element->setDisabled(true);
|
88 |
+
}
|
89 |
+
}
|
90 |
+
|
91 |
+
if ($element->getTooltip()) {
|
92 |
+
$html .= '<td class="value with-tooltip">';
|
93 |
+
$html .= $this->_getElementHtml($element);
|
94 |
+
$html .= '<div class="field-tooltip"><div>' . $element->getTooltip() . '</div></div>';
|
95 |
+
} else {
|
96 |
+
$html .= '<td class="value">';
|
97 |
+
$html .= $this->_getElementHtml($element);
|
98 |
+
};
|
99 |
+
if ($element->getComment()) {
|
100 |
+
$html.= '<p class="note"><span>'.$element->getComment().'</span></p>';
|
101 |
+
}
|
102 |
+
$html.= '</td>';
|
103 |
+
|
104 |
+
if ($addInheritCheckbox) {
|
105 |
+
|
106 |
+
$defText = $element->getDefaultValue();
|
107 |
+
if ($options) {
|
108 |
+
$defTextArr = array();
|
109 |
+
foreach ($options as $k=>$v) {
|
110 |
+
if ($isMultiple) {
|
111 |
+
if (is_array($v['value']) && in_array($k, $v['value'])) {
|
112 |
+
$defTextArr[] = $v['label'];
|
113 |
+
}
|
114 |
+
} elseif (isset($v['value'])) {
|
115 |
+
if ($v['value'] == $defText) {
|
116 |
+
$defTextArr[] = $v['label'];
|
117 |
+
break;
|
118 |
+
}
|
119 |
+
} elseif (!is_array($v)) {
|
120 |
+
if ($k == $defText) {
|
121 |
+
$defTextArr[] = $v;
|
122 |
+
break;
|
123 |
+
}
|
124 |
+
}
|
125 |
+
}
|
126 |
+
$defText = join(', ', $defTextArr);
|
127 |
+
}
|
128 |
+
|
129 |
+
// default value
|
130 |
+
$html.= '<td class="use-default">';
|
131 |
+
$html.= '<input id="' . $id . '_inherit" name="'
|
132 |
+
. $namePrefix . '[inherit]" type="checkbox" value="1" class="checkbox config-inherit" '
|
133 |
+
. $inherit . ' onclick="toggleValueElements(this, Element.previous(this.parentNode))" /> ';
|
134 |
+
$html.= '<label for="' . $id . '_inherit" class="inherit" title="'
|
135 |
+
. htmlspecialchars($defText) . '">' . $checkboxLabel . '</label>';
|
136 |
+
$html.= '</td>';
|
137 |
+
}
|
138 |
+
|
139 |
+
$html.= '<td class="scope-label">';
|
140 |
+
if ($element->getScope()) {
|
141 |
+
$html .= $element->getScopeLabel();
|
142 |
+
}
|
143 |
+
$html.= '</td>';
|
144 |
+
|
145 |
+
$html.= '<td class="">';
|
146 |
+
if ($element->getHint()) {
|
147 |
+
$html.= '<div class="hint" >';
|
148 |
+
$html.= '<div style="display: none;">' . $element->getHint() . '</div>';
|
149 |
+
$html.= '</div>';
|
150 |
+
}
|
151 |
+
$html.= '</td>';
|
152 |
+
|
153 |
+
return $this->_decorateRowHtml($element, $html);
|
154 |
+
}
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Get the element's HTML.
|
158 |
+
*
|
159 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
160 |
+
* @return string
|
161 |
+
*/
|
162 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
163 |
+
{
|
164 |
+
$value = $this->_getValue();
|
165 |
+
|
166 |
+
$html = '<input id="'.$element->getHtmlId().'" name="'.$element->getName()
|
167 |
+
.'" value="' . $value . '" '.$this->serialize($element->getHtmlAttributes()).'/>'."\n";
|
168 |
+
$html.= $element->getAfterElementHtml();
|
169 |
+
return $html;
|
170 |
+
}
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Value getter.
|
174 |
+
*
|
175 |
+
* This method should be overloaded in child methods.
|
176 |
+
*
|
177 |
+
* @return string
|
178 |
+
*/
|
179 |
+
protected function _getValue()
|
180 |
+
{
|
181 |
+
return '';
|
182 |
+
}
|
183 |
+
}
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_HourMinute
|
@@ -136,8 +136,16 @@ class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_HourMinute
|
|
136 |
$value = $element->getEscapedValue();
|
137 |
$value = explode(':', $value);
|
138 |
|
139 |
-
$hour =
|
140 |
-
$minute =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
|
142 |
$options = $element->getValues();
|
143 |
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_HourMinute
|
136 |
$value = $element->getEscapedValue();
|
137 |
$value = explode(':', $value);
|
138 |
|
139 |
+
$hour = '17';
|
140 |
+
$minute = '00';
|
141 |
+
|
142 |
+
if (!empty($value[0])) {
|
143 |
+
$hour = $value[0];
|
144 |
+
}
|
145 |
+
|
146 |
+
if (!empty($value[1])) {
|
147 |
+
$minute = $value[1];
|
148 |
+
}
|
149 |
|
150 |
$options = $element->getValues();
|
151 |
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_InfoBox
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_InfoBox
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_MatrixrateExport
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_MatrixrateExport
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_MatrixrateImport
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_MatrixrateImport
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_Obscure
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_Obscure
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_PackingSlipItemColumns
|
@@ -64,7 +64,7 @@ class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_PackingSlipItemColumns
|
|
64 |
array(
|
65 |
'label' => $this->__('Title'),
|
66 |
'style' => 'width:120px',
|
67 |
-
'class' => 'required-entry validate-
|
68 |
)
|
69 |
);
|
70 |
$this->addColumn(
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_PackingSlipItemColumns
|
64 |
array(
|
65 |
'label' => $this->__('Title'),
|
66 |
'style' => 'width:120px',
|
67 |
+
'class' => 'required-entry validate-packing-slip-column-header',
|
68 |
)
|
69 |
);
|
70 |
$this->addColumn(
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ___________ __ __
|
4 |
+
* \__ ___/____ _/ |_ _____ | |
|
5 |
+
* | | / _ \\ __\\__ \ | |
|
6 |
+
* | | | |_| || | / __ \_| |__
|
7 |
+
* |____| \____/ |__| (____ /|____/
|
8 |
+
* \/
|
9 |
+
* ___ __ __
|
10 |
+
* | | ____ _/ |_ ____ _______ ____ ____ _/ |_
|
11 |
+
* | | / \\ __\_/ __ \\_ __ \ / \ _/ __ \\ __\
|
12 |
+
* | || | \| | \ ___/ | | \/| | \\ ___/ | |
|
13 |
+
* |___||___| /|__| \_____>|__| |___| / \_____>|__|
|
14 |
+
* \/ \/
|
15 |
+
* ________
|
16 |
+
* / _____/_______ ____ __ __ ______
|
17 |
+
* / \ ___\_ __ \ / _ \ | | \\____ \
|
18 |
+
* \ \_\ \| | \/| |_| || | /| |_| |
|
19 |
+
* \______ /|__| \____/ |____/ | __/
|
20 |
+
* \/ |__|
|
21 |
+
*
|
22 |
+
* NOTICE OF LICENSE
|
23 |
+
*
|
24 |
+
* This source file is subject to the Creative Commons License.
|
25 |
+
* It is available through the world-wide-web at this URL:
|
26 |
+
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
27 |
+
* If you are unable to obtain it through the world-wide-web, please send an email
|
28 |
+
* to servicedesk@tig.nl so we can send you a copy immediately.
|
29 |
+
*
|
30 |
+
* DISCLAIMER
|
31 |
+
*
|
32 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
33 |
+
* versions in the future. If you wish to customize this module for your
|
34 |
+
* needs please contact servicedesk@tig.nl for more information.
|
35 |
+
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
+
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
+
*/
|
39 |
+
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_PostcodeNlExtensionActive
|
40 |
+
extends TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_Hidden
|
41 |
+
{
|
42 |
+
/**
|
43 |
+
* Get whether the PostcodeNL extension is installed and enabled.
|
44 |
+
*
|
45 |
+
* @return int
|
46 |
+
*/
|
47 |
+
protected function _getValue()
|
48 |
+
{
|
49 |
+
$extensionEnabled = Mage::helper('postnl/addressValidation')
|
50 |
+
->checkPostcodeNlExtensionActive(Mage_Core_Model_App::ADMIN_STORE_ID);
|
51 |
+
|
52 |
+
return (int) $extensionEnabled;
|
53 |
+
}
|
54 |
+
}
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method string getValue()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method string getValue()
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_SplitAddressCheck
|
@@ -44,7 +44,6 @@ class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_SplitAddressCheck
|
|
44 |
*/
|
45 |
const XPATH_SPLIT_STREET = 'postnl/cif_labels_and_confirming/split_street';
|
46 |
const XPATH_USE_POSTCODE_CHECK = 'postnl/cif_labels_and_confirming/use_postcode_check';
|
47 |
-
const XPATH_CHECKOUT_EXTENSION = 'postnl/cif_address/checkout_extension';
|
48 |
|
49 |
/**
|
50 |
* @var string
|
@@ -67,35 +66,40 @@ class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_SplitAddressCheck
|
|
67 |
{
|
68 |
$request = Mage::app()->getRequest();
|
69 |
|
70 |
-
/**
|
71 |
-
* Check if the split_street field is enabled based on the current scope
|
72 |
-
*/
|
73 |
if ($request->getParam('store')) {
|
74 |
$store = $request->getparam('store');
|
75 |
-
|
76 |
-
$checkoutExtension = Mage::getStoreConfig(self::XPATH_CHECKOUT_EXTENSION, $store);
|
77 |
-
$usePostcodeCheck = Mage::getStoreConfigFlag(self::XPATH_USE_POSTCODE_CHECK, $store);
|
78 |
-
$splitStreet = Mage::getStoreConfigFlag(self::XPATH_SPLIT_STREET, $store);
|
79 |
} elseif ($request->getParam('website')) {
|
80 |
$website = Mage::getModel('core/website')->load($request->getparam('website'), 'code');
|
81 |
-
|
82 |
-
$
|
83 |
-
$usePostcodeCheck = (bool) $website->getConfig(self::XPATH_USE_POSTCODE_CHECK, $website->getId());
|
84 |
-
$splitStreet = (bool) $website->getConfig(self::XPATH_SPLIT_STREET, $website->getId());
|
85 |
} else {
|
86 |
-
$
|
87 |
-
|
88 |
-
$checkoutExtension = Mage::getStoreConfig(self::XPATH_CHECKOUT_EXTENSION, $store);
|
89 |
-
$usePostcodeCheck = Mage::getStoreConfigFlag(self::XPATH_USE_POSTCODE_CHECK, $store);
|
90 |
-
$splitStreet = Mage::getStoreConfigFlag(self::XPATH_SPLIT_STREET, $store);
|
91 |
}
|
92 |
|
93 |
-
|
94 |
-
|
95 |
-
|
|
|
96 |
return true;
|
97 |
}
|
98 |
|
99 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
}
|
101 |
}
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_SplitAddressCheck
|
44 |
*/
|
45 |
const XPATH_SPLIT_STREET = 'postnl/cif_labels_and_confirming/split_street';
|
46 |
const XPATH_USE_POSTCODE_CHECK = 'postnl/cif_labels_and_confirming/use_postcode_check';
|
|
|
47 |
|
48 |
/**
|
49 |
* @var string
|
66 |
{
|
67 |
$request = Mage::app()->getRequest();
|
68 |
|
|
|
|
|
|
|
69 |
if ($request->getParam('store')) {
|
70 |
$store = $request->getparam('store');
|
71 |
+
$storeId = Mage::app()->getStore($store)->getId();
|
|
|
|
|
|
|
72 |
} elseif ($request->getParam('website')) {
|
73 |
$website = Mage::getModel('core/website')->load($request->getparam('website'), 'code');
|
74 |
+
$store = $website->getDefaultStore();
|
75 |
+
$storeId = $store->getId();
|
|
|
|
|
76 |
} else {
|
77 |
+
$storeId = Mage_Core_Model_App::ADMIN_STORE_ID;
|
|
|
|
|
|
|
|
|
78 |
}
|
79 |
|
80 |
+
$helper = Mage::helper('postnl/addressValidation');
|
81 |
+
if ($helper->isPostcodeCheckEnabled($storeId)) {
|
82 |
+
return true;
|
83 |
+
} elseif ($helper->useSplitStreet($storeId)) {
|
84 |
return true;
|
85 |
}
|
86 |
|
87 |
+
return false;
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Check if this notification should be suppressed.
|
92 |
+
*
|
93 |
+
* @return string
|
94 |
+
*/
|
95 |
+
protected function _toHtml()
|
96 |
+
{
|
97 |
+
$hiddenNotifications = Mage::helper('postnl/adminhtml')->getHiddenNotifications();
|
98 |
+
|
99 |
+
if (!empty($hiddenNotifications['split_address_warning'])) {
|
100 |
+
return '';
|
101 |
+
}
|
102 |
+
|
103 |
+
return parent::_toHtml();
|
104 |
}
|
105 |
}
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_SupportTab
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_SupportTab
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_TablerateExport
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_TablerateExport
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_TablerateImport
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_TablerateImport
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method Varien_Data_Form_Element_Abstract getElement()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method Varien_Data_Form_Element_Abstract getElement()
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method Mage_Core_Model_Config_Element getElement()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method Mage_Core_Model_Config_Element getElement()
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ___________ __ __
|
4 |
+
* \__ ___/____ _/ |_ _____ | |
|
5 |
+
* | | / _ \\ __\\__ \ | |
|
6 |
+
* | | | |_| || | / __ \_| |__
|
7 |
+
* |____| \____/ |__| (____ /|____/
|
8 |
+
* \/
|
9 |
+
* ___ __ __
|
10 |
+
* | | ____ _/ |_ ____ _______ ____ ____ _/ |_
|
11 |
+
* | | / \\ __\_/ __ \\_ __ \ / \ _/ __ \\ __\
|
12 |
+
* | || | \| | \ ___/ | | \/| | \\ ___/ | |
|
13 |
+
* |___||___| /|__| \_____>|__| |___| / \_____>|__|
|
14 |
+
* \/ \/
|
15 |
+
* ________
|
16 |
+
* / _____/_______ ____ __ __ ______
|
17 |
+
* / \ ___\_ __ \ / _ \ | | \\____ \
|
18 |
+
* \ \_\ \| | \/| |_| || | /| |_| |
|
19 |
+
* \______ /|__| \____/ |____/ | __/
|
20 |
+
* \/ |__|
|
21 |
+
*
|
22 |
+
* NOTICE OF LICENSE
|
23 |
+
*
|
24 |
+
* This source file is subject to the Creative Commons License.
|
25 |
+
* It is available through the world-wide-web at this URL:
|
26 |
+
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
27 |
+
* If you are unable to obtain it through the world-wide-web, please send an email
|
28 |
+
* to servicedesk@tig.nl so we can send you a copy immediately.
|
29 |
+
*
|
30 |
+
* DISCLAIMER
|
31 |
+
*
|
32 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
33 |
+
* versions in the future. If you wish to customize this module for your
|
34 |
+
* needs please contact servicedesk@tig.nl for more information.
|
35 |
+
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
+
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
+
*
|
39 |
+
* @method TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_ActivateButton setElement(Varien_Data_Form_Element_Abstract $value)
|
40 |
+
*/
|
41 |
+
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_UninstallButton
|
42 |
+
extends Mage_Adminhtml_Block_System_Config_Form_Field
|
43 |
+
implements Varien_Data_Form_Element_Renderer_Interface
|
44 |
+
{
|
45 |
+
/**
|
46 |
+
* Gets the element's html. In this case: a button redirecting the user to the extensionControl controller
|
47 |
+
*
|
48 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
49 |
+
*
|
50 |
+
* @return string
|
51 |
+
*/
|
52 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
53 |
+
{
|
54 |
+
$this->setElement($element);
|
55 |
+
|
56 |
+
$warningTitle = 'Uninstall PostNL Extension';
|
57 |
+
|
58 |
+
$warningMessage = array();
|
59 |
+
$warningMessage[] = "<br><div class=\'module-message warning\'><h4>" . $this->__('Warning: this action cannot be undone!') ."</h4></div>";
|
60 |
+
$warningMessage[] = $this->__('The following changes will be made:');
|
61 |
+
$warningMessage[] = "<br>- " . $this->__('The extension will be disabled in the app/etc/modules/TIG_PostNL.xml file');
|
62 |
+
$warningMessage[] = "<br>- " . $this->__('The PostNL product attributes will be removed from the webshop');
|
63 |
+
$warningMessage[] = "<br><br>" . $this->__('The following will be preserved:');
|
64 |
+
$warningMessage[] = "<br>- " . $this->__('All data pertaining to existing orders and shipments');
|
65 |
+
$warningMessage[] = "<br>- " . $this->__('All PostNL configuration settings');
|
66 |
+
$warningMessage[] = "<br>- " . $this->__('All PostNL code files.');
|
67 |
+
$warningMessage[] = "<br><br>" . $this->__('For questions regarding this process and how to re-install the PostNL extension, please contact the TIG servicedesk.');
|
68 |
+
$warningMessage[] = "<br><br><div class=\'module-message\'><h4>";
|
69 |
+
$warningMessage[] = $this->__('Type `uninstall` in the box to proceed') . " ";
|
70 |
+
$warningMessage[] = "<input type=\'text\' id=\'verify_uninstall\' />";
|
71 |
+
$warningMessage[] = "</h4></div>";
|
72 |
+
|
73 |
+
$confirmText = implode($warningMessage);
|
74 |
+
$confirmTitle = $this->__($warningTitle);
|
75 |
+
$uninstallUrl = $this->getUrl('postnl_admin/adminhtml_extensionControl/uninstall');
|
76 |
+
|
77 |
+
$html = $this->getLayout()->createBlock('adminhtml/widget_button')
|
78 |
+
->setId($element->getHtmlId())
|
79 |
+
->setType('button')
|
80 |
+
->setClass('scalable postnl-button')
|
81 |
+
->setLabel($this->__('Permanently disable the PostNL extension'))
|
82 |
+
->setOnClick("openModalConfirm('" . $confirmTitle . "', '" . $confirmText . "', handleConfirmUninstall, '" . $uninstallUrl . "');")
|
83 |
+
->toHtml();
|
84 |
+
|
85 |
+
return $html;
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Render the element without a scope label
|
90 |
+
*
|
91 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
92 |
+
* @return string
|
93 |
+
*
|
94 |
+
* @see parent::render()
|
95 |
+
*/
|
96 |
+
public function render(Varien_Data_Form_Element_Abstract $element)
|
97 |
+
{
|
98 |
+
$element->setScopeLabel('');
|
99 |
+
return parent::render($element);
|
100 |
+
}
|
101 |
+
}
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_ValidateButton
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_ValidateButton
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_WarningBox
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_WarningBox
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_ActivateButton setElement(Varien_Data_Form_Element_Abstract $value)
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_ActivateButton setElement(Varien_Data_Form_Element_Abstract $value)
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* This entire class is extended from Magento's core class for backwards compatibility on Magento 1.6.
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* This entire class is extended from Magento's core class for backwards compatibility on Magento 1.6.
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Js extends TIG_PostNL_Block_Adminhtml_Template
|
@@ -166,6 +166,18 @@ class TIG_PostNL_Block_Adminhtml_System_Config_Js extends TIG_PostNL_Block_Admin
|
|
166 |
return $url;
|
167 |
}
|
168 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
/**
|
170 |
* Render this block only for the PostNL section.
|
171 |
*
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_System_Config_Js extends TIG_PostNL_Block_Adminhtml_Template
|
166 |
return $url;
|
167 |
}
|
168 |
|
169 |
+
/**
|
170 |
+
* Get the hide notification URL.
|
171 |
+
*
|
172 |
+
* @return string
|
173 |
+
*/
|
174 |
+
public function getHideNotificationUrl()
|
175 |
+
{
|
176 |
+
$url = $this->getUrl('postnl_admin/adminhtml_config/hideNotification');
|
177 |
+
|
178 |
+
return $url;
|
179 |
+
}
|
180 |
+
|
181 |
/**
|
182 |
* Render this block only for the PostNL section.
|
183 |
*
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
abstract class TIG_PostNL_Block_Adminhtml_Template extends Mage_Adminhtml_Block_Abstract
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
abstract class TIG_PostNL_Block_Adminhtml_Template extends Mage_Adminhtml_Block_Abstract
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_UpgradeNotification extends TIG_PostNL_Block_Adminhtml_Template
|
@@ -58,7 +58,7 @@ class TIG_PostNL_Block_Adminhtml_UpgradeNotification extends TIG_PostNL_Block_Ad
|
|
58 |
$storeId = Mage_Core_Model_App::ADMIN_STORE_ID;
|
59 |
|
60 |
/**
|
61 |
-
* Check if the cron job has
|
62 |
* finished.
|
63 |
*/
|
64 |
$attributeCronjob = Mage::getStoreConfig(
|
@@ -70,7 +70,7 @@ class TIG_PostNL_Block_Adminhtml_UpgradeNotification extends TIG_PostNL_Block_Ad
|
|
70 |
$storeId
|
71 |
);
|
72 |
|
73 |
-
if (empty($
|
74 |
return false;
|
75 |
}
|
76 |
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_UpgradeNotification extends TIG_PostNL_Block_Adminhtml_Template
|
58 |
$storeId = Mage_Core_Model_App::ADMIN_STORE_ID;
|
59 |
|
60 |
/**
|
61 |
+
* Check if the cron job has a cron expression. This will indicate if it is still updating or if it has already
|
62 |
* finished.
|
63 |
*/
|
64 |
$attributeCronjob = Mage::getStoreConfig(
|
70 |
$storeId
|
71 |
);
|
72 |
|
73 |
+
if (empty($attributeCronjob) && empty($dateTimeZoneCronjob)) {
|
74 |
return false;
|
75 |
}
|
76 |
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* Form element dependencies mapper
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* Form element dependencies mapper
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Filter_ConfirmDate
|
@@ -166,18 +166,25 @@ class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Filter_ConfirmDate
|
|
166 |
public function getValue($index=null)
|
167 |
{
|
168 |
if ($index) {
|
169 |
-
$data = $this->getData('value', 'orig_'
|
170 |
-
|
171 |
-
return $data;//date('d-m-Y', strtotime($data));
|
172 |
}
|
173 |
return null;
|
174 |
}
|
175 |
-
|
176 |
$value = $this->getData('value');
|
177 |
if (is_array($value)) {
|
178 |
-
$value['
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
}
|
180 |
-
|
181 |
return $value;
|
182 |
}
|
183 |
|
@@ -190,18 +197,22 @@ class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Filter_ConfirmDate
|
|
190 |
*/
|
191 |
public function setValue($value)
|
192 |
{
|
|
|
|
|
193 |
/**
|
194 |
* Set the value for the 'today' and 'tomorrow' filter options.
|
195 |
*/
|
196 |
if (isset($value['select'])) {
|
197 |
if ($value['select'] == 'today') {
|
198 |
-
$today = new DateTime('today');
|
|
|
199 |
$value['from'] = $today->format('d-m-Y');
|
200 |
-
$value['to'] = $
|
201 |
} elseif ($value['select'] == 'tomorrow') {
|
202 |
-
$tomorrow = new DateTime('tomorrow');
|
|
|
203 |
$value['from'] = $tomorrow->format('d-m-Y');
|
204 |
-
$value['to'] = $
|
205 |
}
|
206 |
} else {
|
207 |
$value['from'] = null;
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Filter_ConfirmDate
|
166 |
public function getValue($index=null)
|
167 |
{
|
168 |
if ($index) {
|
169 |
+
if ($data = $this->getData('value', 'orig_'.$index)) {
|
170 |
+
return $data;
|
|
|
171 |
}
|
172 |
return null;
|
173 |
}
|
|
|
174 |
$value = $this->getData('value');
|
175 |
if (is_array($value)) {
|
176 |
+
$value['datetime'] = true;
|
177 |
+
}
|
178 |
+
if (!empty($value['to']) && !$this->getColumn()->getFilterTime()) {
|
179 |
+
$datetimeTo = $value['to'];
|
180 |
+
|
181 |
+
//calculate end date considering timezone specification
|
182 |
+
$datetimeTo->setTimezone(
|
183 |
+
Mage::app()->getStore()->getConfig(Mage_Core_Model_Locale::XML_PATH_DEFAULT_TIMEZONE)
|
184 |
+
);
|
185 |
+
$datetimeTo->addDay(1)->subSecond(1);
|
186 |
+
$datetimeTo->setTimezone(Mage_Core_Model_Locale::DEFAULT_TIMEZONE);
|
187 |
}
|
|
|
188 |
return $value;
|
189 |
}
|
190 |
|
197 |
*/
|
198 |
public function setValue($value)
|
199 |
{
|
200 |
+
$utcTimeZone = new DateTimeZone('UTC');
|
201 |
+
|
202 |
/**
|
203 |
* Set the value for the 'today' and 'tomorrow' filter options.
|
204 |
*/
|
205 |
if (isset($value['select'])) {
|
206 |
if ($value['select'] == 'today') {
|
207 |
+
$today = new DateTime('today', $utcTimeZone);
|
208 |
+
$tomorrow = new DateTime('tomorrow - 1 second', $utcTimeZone);
|
209 |
$value['from'] = $today->format('d-m-Y');
|
210 |
+
$value['to'] = $tomorrow->format('d-m-Y');
|
211 |
} elseif ($value['select'] == 'tomorrow') {
|
212 |
+
$tomorrow = new DateTime('tomorrow', $utcTimeZone);
|
213 |
+
$dayAfterTomorrow = new DateTime('tomorrow + 1day - 1 second', $utcTimeZone);
|
214 |
$value['from'] = $tomorrow->format('d-m-Y');
|
215 |
+
$value['to'] = $dayAfterTomorrow->format('d-m-Y');
|
216 |
}
|
217 |
} else {
|
218 |
$value['from'] = null;
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_Action
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_Action
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_Barcode
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_Barcode
|
@@ -33,14 +33,14 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_ConfirmDate
|
40 |
extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Date
|
41 |
{
|
42 |
/**
|
43 |
-
* Additional column
|
44 |
*/
|
45 |
const SHIPPING_METHOD_COLUMN = 'shipping_method';
|
46 |
|
@@ -53,26 +53,79 @@ class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_ConfirmDate
|
|
53 |
*/
|
54 |
public function render(Varien_Object $row)
|
55 |
{
|
|
|
56 |
$shippingMethod = $row->getData(self::SHIPPING_METHOD_COLUMN);
|
57 |
if (!Mage::helper('postnl/carrier')->isPostnlShippingMethod($shippingMethod)) {
|
58 |
return '';
|
59 |
}
|
60 |
|
61 |
-
$
|
62 |
-
$value
|
63 |
-
$now = new DateTime(Mage::getModel('core/date')->gmtDate('Y-m-d H:i:s'));
|
64 |
|
65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
|
67 |
/**
|
68 |
-
* Check if the
|
69 |
*/
|
70 |
-
if (
|
71 |
-
|
72 |
-
|| ($interval->days == 0 && $interval->h < 24) && $interval->invert
|
73 |
-
) {
|
74 |
-
$confirmDate = clone $value;
|
75 |
-
$diff = $now->diff($confirmDate);
|
76 |
|
77 |
/**
|
78 |
* Get the number of days until the shipment should be confirmed.
|
@@ -86,37 +139,32 @@ class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_ConfirmDate
|
|
86 |
$diffDays++;
|
87 |
}
|
88 |
|
89 |
-
|
90 |
-
* Check if the shipment should be confirmed today.
|
91 |
-
*/
|
92 |
-
if ($diffDays == 0) {
|
93 |
-
return Mage::helper('postnl')->__('Today');
|
94 |
-
}
|
95 |
-
|
96 |
-
/**
|
97 |
-
* Check if it should be confirmed tomorrow.
|
98 |
-
*/
|
99 |
-
if ($diffDays == 1) {
|
100 |
-
$renderedValue = Mage::helper('postnl')->__('Tomorrow');
|
101 |
-
|
102 |
-
return $renderedValue;
|
103 |
-
}
|
104 |
-
|
105 |
-
/**
|
106 |
-
* Render the number of days before the shipment should be confirmed.
|
107 |
-
*/
|
108 |
-
$renderedValue = Mage::helper('postnl')->__('%s days from now', $diffDays);
|
109 |
-
|
110 |
-
return $renderedValue;
|
111 |
}
|
112 |
|
113 |
-
$timeZone = Mage::helper('postnl')->getStoreTimeZone($row->getData('store_id'), true);
|
114 |
-
$value = $value->setTimezone($timeZone)->format('Y-m-d H:i:s');
|
115 |
-
$row->setData($this->getColumn()->getIndex(), $value);
|
116 |
-
|
117 |
/**
|
118 |
-
* Finally, simply render the date
|
119 |
*/
|
120 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
}
|
122 |
}
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_ConfirmDate
|
40 |
extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Date
|
41 |
{
|
42 |
/**
|
43 |
+
* Additional column name used.
|
44 |
*/
|
45 |
const SHIPPING_METHOD_COLUMN = 'shipping_method';
|
46 |
|
53 |
*/
|
54 |
public function render(Varien_Object $row)
|
55 |
{
|
56 |
+
/** @var Mage_Sales_Model_Order $row */
|
57 |
$shippingMethod = $row->getData(self::SHIPPING_METHOD_COLUMN);
|
58 |
if (!Mage::helper('postnl/carrier')->isPostnlShippingMethod($shippingMethod)) {
|
59 |
return '';
|
60 |
}
|
61 |
|
62 |
+
$helper = Mage::helper('postnl/deliveryOptions');
|
63 |
+
$value = $row->getData($this->getColumn()->getIndex());
|
|
|
64 |
|
65 |
+
/**
|
66 |
+
* If we have no value, then no delivery date was chosen by the customer. In this case we can calculate when the
|
67 |
+
* order could be shipped.
|
68 |
+
*/
|
69 |
+
if (!$value) {
|
70 |
+
$shippingDuration = $helper->getOrderShippingDuration($row);
|
71 |
+
$deliveryDate = $helper->getDeliveryDate(
|
72 |
+
$row->getCreatedAt(),
|
73 |
+
$row->getStoreId(),
|
74 |
+
false,
|
75 |
+
true,
|
76 |
+
true,
|
77 |
+
$shippingDuration
|
78 |
+
);
|
79 |
+
|
80 |
+
$value = $helper->getValidDeliveryDate($deliveryDate)
|
81 |
+
->sub(new DateInterval('P1D'));
|
82 |
+
} else {
|
83 |
+
$value = new DateTime($value, new DateTimeZone('UTC'));
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Check if the confirm date is valid.
|
88 |
+
*/
|
89 |
+
$value = $helper->getValidConfirmDate($value);
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Update the row's value for the decorator later.
|
93 |
+
*/
|
94 |
+
$row->setData($this->getColumn()->getIndex(), $value->format('Y-m-d H:i:s'));
|
95 |
+
|
96 |
+
$adminTimeZone = $helper->getStoreTimeZone(Mage_Core_Model_App::ADMIN_STORE_ID, true);
|
97 |
+
$now = new DateTime('now', new DateTimeZone('UTC'));
|
98 |
+
$now->setTimezone($adminTimeZone);
|
99 |
+
|
100 |
+
$valueCopy = clone $value;
|
101 |
+
$valueCopy->setTimezone($adminTimeZone);
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Check if today is the same date as the confirm date. N.B. only the date is checked, not the time.
|
105 |
+
*/
|
106 |
+
if ($now->format('Y-m-d') == $valueCopy->format('Y-m-d')) {
|
107 |
+
return $helper->__('Today');
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Check if the confirm date is tomorrow.
|
112 |
+
*/
|
113 |
+
$tomorrow = clone $now;
|
114 |
+
$tomorrow->add(new DateInterval('P1D'));
|
115 |
+
if ($tomorrow->format('Y-m-d') == $valueCopy->format('Y-m-d')) {
|
116 |
+
return $helper->__('Tomorrow');
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Set the time zone of the row to the same time zone as the admin for comparison.
|
121 |
+
*/
|
122 |
+
$value->setTimezone($adminTimeZone);
|
123 |
|
124 |
/**
|
125 |
+
* Check if the confirm date is somewhere in the future.
|
126 |
*/
|
127 |
+
if ($now < $value) {
|
128 |
+
$diff = $now->diff($valueCopy);
|
|
|
|
|
|
|
|
|
129 |
|
130 |
/**
|
131 |
* Get the number of days until the shipment should be confirmed.
|
139 |
$diffDays++;
|
140 |
}
|
141 |
|
142 |
+
return $helper->__('%s days from now', $diffDays);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
}
|
144 |
|
|
|
|
|
|
|
|
|
145 |
/**
|
146 |
+
* Finally, simply render the date
|
147 |
*/
|
148 |
+
$format = $this->_getFormat();
|
149 |
+
|
150 |
+
$timeZone = Mage::helper('postnl')->getStoreTimeZone($row->getData('store_id'), true);
|
151 |
+
$value = $value->setTimezone($timeZone)->format('Y-m-d H:i:s');
|
152 |
+
try {
|
153 |
+
if($this->getColumn()->getGmtoffset()) {
|
154 |
+
$data = Mage::app()->getLocale()
|
155 |
+
->date($value, Varien_Date::DATETIME_INTERNAL_FORMAT)->toString($format);
|
156 |
+
} else {
|
157 |
+
$data = Mage::getSingleton('core/locale')
|
158 |
+
->date($value, Zend_Date::ISO_8601, null, false)->toString($format);
|
159 |
+
}
|
160 |
+
} catch (Exception $e) {
|
161 |
+
if($this->getColumn()->getTimezone()) {
|
162 |
+
$data = Mage::app()->getLocale()
|
163 |
+
->date($value, Varien_Date::DATETIME_INTERNAL_FORMAT)->toString($format);
|
164 |
+
} else {
|
165 |
+
$data = Mage::getSingleton('core/locale')->date($value, null, null, false)->toString($format);
|
166 |
+
}
|
167 |
+
}
|
168 |
+
return $data;
|
169 |
}
|
170 |
}
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_ConfirmStatus
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_ConfirmStatus
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_CountryArray
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_CountryArray
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_DeliveryDate
|
@@ -66,12 +66,12 @@ class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_DeliveryDate
|
|
66 |
*/
|
67 |
if (!$value) {
|
68 |
$confirmDate = $row->getData(self::CONFIRM_DATE_COLUMN);
|
69 |
-
$confirmDate = new DateTime($confirmDate);
|
70 |
$confirmDate->add(new DateInterval('P1D'));
|
71 |
|
72 |
$deliveryDate = $confirmDate;
|
73 |
} else {
|
74 |
-
$deliveryDate = new DateTime($value);
|
75 |
}
|
76 |
|
77 |
$timeZone = Mage::helper('postnl')->getStoreTimeZone($row->getData('store_id'), true);
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_DeliveryDate
|
66 |
*/
|
67 |
if (!$value) {
|
68 |
$confirmDate = $row->getData(self::CONFIRM_DATE_COLUMN);
|
69 |
+
$confirmDate = new DateTime($confirmDate, new DateTimeZone('UTC'));
|
70 |
$confirmDate->add(new DateInterval('P1D'));
|
71 |
|
72 |
$deliveryDate = $confirmDate;
|
73 |
} else {
|
74 |
+
$deliveryDate = new DateTime($value, new DateTimeZone('UTC'));
|
75 |
}
|
76 |
|
77 |
$timeZone = Mage::helper('postnl')->getStoreTimeZone($row->getData('store_id'), true);
|
@@ -33,136 +33,15 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
|
|
|
|
|
|
|
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_OrderConfirmDate
|
40 |
-
extends
|
41 |
{
|
42 |
-
/**
|
43 |
-
* Additional column name used.
|
44 |
-
*/
|
45 |
-
const SHIPPING_METHOD_COLUMN = 'shipping_method';
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Renders column.
|
49 |
-
*
|
50 |
-
* @param Varien_Object $row
|
51 |
-
*
|
52 |
-
* @return string
|
53 |
-
*/
|
54 |
-
public function render(Varien_Object $row)
|
55 |
-
{
|
56 |
-
/** @var Mage_Sales_Model_Order $row */
|
57 |
-
$shippingMethod = $row->getData(self::SHIPPING_METHOD_COLUMN);
|
58 |
-
if (!Mage::helper('postnl/carrier')->isPostnlShippingMethod($shippingMethod)) {
|
59 |
-
return '';
|
60 |
-
}
|
61 |
-
|
62 |
-
$helper = Mage::helper('postnl/deliveryOptions');
|
63 |
-
$value = $row->getData($this->getColumn()->getIndex());
|
64 |
-
|
65 |
-
/**
|
66 |
-
* If we have no value, then no delivery date was chosen by the customer. In this case we can calculate when the
|
67 |
-
* order could be shipped.
|
68 |
-
*/
|
69 |
-
if (!$value) {
|
70 |
-
$shippingDuration = $helper->getOrderShippingDuration($row);
|
71 |
-
$deliveryDate = $helper->getDeliveryDate(
|
72 |
-
$row->getCreatedAt(),
|
73 |
-
$row->getStoreId(),
|
74 |
-
false,
|
75 |
-
true,
|
76 |
-
true,
|
77 |
-
$shippingDuration
|
78 |
-
);
|
79 |
-
|
80 |
-
$value = $helper->getValidDeliveryDate($deliveryDate)
|
81 |
-
->sub(new DateInterval('P1D'));
|
82 |
-
} else {
|
83 |
-
$value = new DateTime($value);
|
84 |
-
}
|
85 |
-
|
86 |
-
/**
|
87 |
-
* Check if the confirm date is valid.
|
88 |
-
*/
|
89 |
-
$value = $helper->getValidConfirmDate($value);
|
90 |
-
|
91 |
-
/**
|
92 |
-
* Update the row's value for the decorator later.
|
93 |
-
*/
|
94 |
-
$row->setData($this->getColumn()->getIndex(), $value->format('Y-m-d H:i:s'));
|
95 |
-
|
96 |
-
$now = new DateTime();
|
97 |
-
$now->setTimestamp(Mage::getModel('core/date')->gmtTimestamp());
|
98 |
-
|
99 |
-
/**
|
100 |
-
* Check if the shipment should be confirmed somewhere in the future.
|
101 |
-
*/
|
102 |
-
$diff = $now->diff($value);
|
103 |
-
if (
|
104 |
-
(($diff->days > 0 || $diff->h > 0) && !$diff->invert)
|
105 |
-
|| ($diff->days == 0 && $diff->h < 24) && $diff->invert
|
106 |
-
) {
|
107 |
-
/**
|
108 |
-
* Get the number of days until the shipment should be confirmed.
|
109 |
-
*/
|
110 |
-
$diffDays = $diff->format('%a');
|
111 |
-
|
112 |
-
/**
|
113 |
-
* If the difference is more than X days exactly, add a day.
|
114 |
-
*/
|
115 |
-
if (($diff->h > 0 || $diff->i > 0 || $diff->s > 0) && !$diff->invert) {
|
116 |
-
$diffDays++;
|
117 |
-
}
|
118 |
-
|
119 |
-
/**
|
120 |
-
* Check if the shipment should be confirmed today.
|
121 |
-
*/
|
122 |
-
if ($diffDays == 0) {
|
123 |
-
return $helper->__('Today');
|
124 |
-
}
|
125 |
-
|
126 |
-
/**
|
127 |
-
* Check if it should be confirmed tomorrow.
|
128 |
-
*/
|
129 |
-
if ($diffDays == 1) {
|
130 |
-
$renderedValue = $helper->__('Tomorrow');
|
131 |
-
|
132 |
-
return $renderedValue;
|
133 |
-
}
|
134 |
-
|
135 |
-
/**
|
136 |
-
* Render the number of days before the shipment should be confirmed.
|
137 |
-
*/
|
138 |
-
$renderedValue = $helper->__('%s days from now', $diffDays);
|
139 |
-
|
140 |
-
return $renderedValue;
|
141 |
-
}
|
142 |
-
|
143 |
-
/**
|
144 |
-
* Finally, simply render the date
|
145 |
-
*/
|
146 |
-
$format = $this->_getFormat();
|
147 |
|
148 |
-
$timeZone = Mage::helper('postnl')->getStoreTimeZone($row->getData('store_id'), true);
|
149 |
-
$value = $value->setTimezone($timeZone)->format('Y-m-d H:i:s');
|
150 |
-
try {
|
151 |
-
if($this->getColumn()->getGmtoffset()) {
|
152 |
-
$data = Mage::app()->getLocale()
|
153 |
-
->date($value, Varien_Date::DATETIME_INTERNAL_FORMAT)->toString($format);
|
154 |
-
} else {
|
155 |
-
$data = Mage::getSingleton('core/locale')
|
156 |
-
->date($value, Zend_Date::ISO_8601, null, false)->toString($format);
|
157 |
-
}
|
158 |
-
} catch (Exception $e) {
|
159 |
-
if($this->getColumn()->getTimezone()) {
|
160 |
-
$data = Mage::app()->getLocale()
|
161 |
-
->date($value, Varien_Date::DATETIME_INTERNAL_FORMAT)->toString($format);
|
162 |
-
} else {
|
163 |
-
$data = Mage::getSingleton('core/locale')->date($value, null, null, false)->toString($format);
|
164 |
-
}
|
165 |
-
}
|
166 |
-
return $data;
|
167 |
-
}
|
168 |
}
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
+
*
|
39 |
+
* @deprecated 1.6.0 This class has been moved to TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_ConfirmDate. A
|
40 |
+
* dummy class has been left behind to provide backwards compatibility. This class may be removed in
|
41 |
+
* the future without further notice.
|
42 |
*/
|
43 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_OrderConfirmDate
|
44 |
+
extends TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_ConfirmDate
|
45 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
}
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_OrderConfirmStatus
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_OrderConfirmStatus
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_OrderType
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_OrderType
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ___________ __ __
|
4 |
+
* \__ ___/____ _/ |_ _____ | |
|
5 |
+
* | | / _ \\ __\\__ \ | |
|
6 |
+
* | | | |_| || | / __ \_| |__
|
7 |
+
* |____| \____/ |__| (____ /|____/
|
8 |
+
* \/
|
9 |
+
* ___ __ __
|
10 |
+
* | | ____ _/ |_ ____ _______ ____ ____ _/ |_
|
11 |
+
* | | / \\ __\_/ __ \\_ __ \ / \ _/ __ \\ __\
|
12 |
+
* | || | \| | \ ___/ | | \/| | \\ ___/ | |
|
13 |
+
* |___||___| /|__| \_____>|__| |___| / \_____>|__|
|
14 |
+
* \/ \/
|
15 |
+
* ________
|
16 |
+
* / _____/_______ ____ __ __ ______
|
17 |
+
* / \ ___\_ __ \ / _ \ | | \\____ \
|
18 |
+
* \ \_\ \| | \/| |_| || | /| |_| |
|
19 |
+
* \______ /|__| \____/ |____/ | __/
|
20 |
+
* \/ |__|
|
21 |
+
*
|
22 |
+
* NOTICE OF LICENSE
|
23 |
+
*
|
24 |
+
* This source file is subject to the Creative Commons License.
|
25 |
+
* It is available through the world-wide-web at this URL:
|
26 |
+
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
27 |
+
* If you are unable to obtain it through the world-wide-web, please send an email
|
28 |
+
* to servicedesk@tig.nl so we can send you a copy immediately.
|
29 |
+
*
|
30 |
+
* DISCLAIMER
|
31 |
+
*
|
32 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
33 |
+
* versions in the future. If you wish to customize this module for your
|
34 |
+
* needs please contact servicedesk@tig.nl for more information.
|
35 |
+
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
+
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
+
*/
|
39 |
+
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_ReturnView
|
40 |
+
extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action
|
41 |
+
{
|
42 |
+
/**
|
43 |
+
* Renders the column value as a view link with appropriate parameters
|
44 |
+
*
|
45 |
+
* @param Varien_Object $row
|
46 |
+
*
|
47 |
+
* @return string
|
48 |
+
*/
|
49 |
+
public function render(Varien_Object $row)
|
50 |
+
{
|
51 |
+
$actions = $this->getColumn()->getActions();
|
52 |
+
|
53 |
+
if ( empty($actions) || !is_array($actions) ) {
|
54 |
+
return ' ';
|
55 |
+
}
|
56 |
+
|
57 |
+
if(sizeof($actions)==1 && !$this->getColumn()->getNoLink()) {
|
58 |
+
foreach ($actions as $action) {
|
59 |
+
if (is_array($action)) {
|
60 |
+
// All we need to do is intercept & change the url value
|
61 |
+
if (isset($action['url'])) {
|
62 |
+
// Set the url to the correct location with the correct parameters
|
63 |
+
$action['url'] = $this->getUrl('adminhtml/sales_shipment/view',
|
64 |
+
array(
|
65 |
+
'shipment_id' => $row->getId(),
|
66 |
+
'come_from_postnl' => Mage::helper('core')->urlEncode('postnl_admin/adminhtml_returns')
|
67 |
+
)
|
68 |
+
);
|
69 |
+
}
|
70 |
+
return $this->_toLinkHtml($action, $row);
|
71 |
+
}
|
72 |
+
}
|
73 |
+
}
|
74 |
+
|
75 |
+
return ' ';
|
76 |
+
}
|
77 |
+
}
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_ShipmentType
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_ShipmentType
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_ShippingDescription
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_ShippingDescription
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_ShippingPhase
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_ShippingPhase
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_Time
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_Time
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_Translate
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_Translate
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_Type_Abstract
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_Type_Abstract
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_YesNo
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Column_Renderer_YesNo
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* Observer to edit the sales > shipments grid
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* Observer to edit the sales > shipments grid
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Massaction_Item_Additional_ProductOptions
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Adminhtml_Widget_Grid_Massaction_Item_Additional_ProductOptions
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasIsOldMagento()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasIsOldMagento()
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasPublicWebshopId()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasPublicWebshopId()
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasWebshopId()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasWebshopId()
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Checkout_Summary extends Mage_Sales_Block_Items_Abstract
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Checkout_Summary extends Mage_Sales_Block_Items_Abstract
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Core_JsTranslate extends TIG_PostNL_Block_Core_Template
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Core_JsTranslate extends TIG_PostNL_Block_Core_Template
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Core_Order_Returns_Info extends Mage_Sales_Block_Order_Info
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Core_Order_Returns_Info extends Mage_Sales_Block_Order_Info
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasPostnlShipmentCollection()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasPostnlShipmentCollection()
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasPostnlShipment()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasPostnlShipment()
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
abstract class TIG_PostNL_Block_Core_Template extends Mage_Core_Block_Template
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
abstract class TIG_PostNL_Block_Core_Template extends Mage_Core_Block_Template
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasPhoneNumber()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasPhoneNumber()
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method TIG_PostNL_Block_DeliveryOptions_Checkout_DeliveryOptions setStreetnameField(int $value)
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method TIG_PostNL_Block_DeliveryOptions_Checkout_DeliveryOptions setStreetnameField(int $value)
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ___________ __ __
|
4 |
+
* \__ ___/____ _/ |_ _____ | |
|
5 |
+
* | | / _ \\ __\\__ \ | |
|
6 |
+
* | | | |_| || | / __ \_| |__
|
7 |
+
* |____| \____/ |__| (____ /|____/
|
8 |
+
* \/
|
9 |
+
* ___ __ __
|
10 |
+
* | | ____ _/ |_ ____ _______ ____ ____ _/ |_
|
11 |
+
* | | / \\ __\_/ __ \\_ __ \ / \ _/ __ \\ __\
|
12 |
+
* | || | \| | \ ___/ | | \/| | \\ ___/ | |
|
13 |
+
* |___||___| /|__| \_____>|__| |___| / \_____>|__|
|
14 |
+
* \/ \/
|
15 |
+
* ________
|
16 |
+
* / _____/_______ ____ __ __ ______
|
17 |
+
* / \ ___\_ __ \ / _ \ | | \\____ \
|
18 |
+
* \ \_\ \| | \/| |_| || | /| |_| |
|
19 |
+
* \______ /|__| \____/ |____/ | __/
|
20 |
+
* \/ |__|
|
21 |
+
*
|
22 |
+
* NOTICE OF LICENSE
|
23 |
+
*
|
24 |
+
* This source file is subject to the Creative Commons License.
|
25 |
+
* It is available through the world-wide-web at this URL:
|
26 |
+
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
27 |
+
* If you are unable to obtain it through the world-wide-web, please send an email
|
28 |
+
* to servicedesk@tig.nl so we can send you a copy immediately.
|
29 |
+
*
|
30 |
+
* DISCLAIMER
|
31 |
+
*
|
32 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
33 |
+
* versions in the future. If you wish to customize this module for your
|
34 |
+
* needs please contact servicedesk@tig.nl for more information.
|
35 |
+
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
+
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
+
*/
|
39 |
+
class TIG_PostNL_Block_DeliveryOptions_Checkout_GoMage_LightCheckout_DeliveryOptions
|
40 |
+
extends TIG_PostNL_Block_DeliveryOptions_Checkout_DeliveryOptions
|
41 |
+
{
|
42 |
+
/**
|
43 |
+
* Xpath to the postcode ajax enabled config setting for GoMage LightCheckout.
|
44 |
+
*/
|
45 |
+
const XPATH_POSTCODE_AJAX_ENABLED = 'gomage_checkout/ajax/postcode';
|
46 |
+
|
47 |
+
/**
|
48 |
+
* @var boolean
|
49 |
+
*/
|
50 |
+
protected $_isPostcodeAjaxEnabled;
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Check if ajax reload is enabled on the postcode field in GoMage LightCheckout.
|
54 |
+
*
|
55 |
+
* @return bool
|
56 |
+
*/
|
57 |
+
public function isPostcodeAjaxEnabled()
|
58 |
+
{
|
59 |
+
if (!is_null($this->_isPostcodeAjaxEnabled)) {
|
60 |
+
return $this->_isPostcodeAjaxEnabled;
|
61 |
+
}
|
62 |
+
|
63 |
+
$this->_isPostcodeAjaxEnabled = Mage::getStoreConfigFlag(self::XPATH_POSTCODE_AJAX_ENABLED);
|
64 |
+
return $this->_isPostcodeAjaxEnabled;
|
65 |
+
}
|
66 |
+
}
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_DeliveryOptions_Checkout_Progress extends TIG_PostNL_Block_DeliveryOptions_Template
|
@@ -66,7 +66,7 @@ class TIG_PostNL_Block_DeliveryOptions_Checkout_Progress extends TIG_PostNL_Bloc
|
|
66 |
*/
|
67 |
public function getPakjeGemakAddress()
|
68 |
{
|
69 |
-
$quote
|
70 |
|
71 |
$pakjeGemakAddress = false;
|
72 |
/** @var Mage_Sales_Model_Quote_Address $address */
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_DeliveryOptions_Checkout_Progress extends TIG_PostNL_Block_DeliveryOptions_Template
|
66 |
*/
|
67 |
public function getPakjeGemakAddress()
|
68 |
{
|
69 |
+
$quote = $this->getCheckout()->getQuote();
|
70 |
|
71 |
$pakjeGemakAddress = false;
|
72 |
/** @var Mage_Sales_Model_Quote_Address $address */
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasApiKey()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasApiKey()
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ___________ __ __
|
4 |
+
* \__ ___/____ _/ |_ _____ | |
|
5 |
+
* | | / _ \\ __\\__ \ | |
|
6 |
+
* | | | |_| || | / __ \_| |__
|
7 |
+
* |____| \____/ |__| (____ /|____/
|
8 |
+
* \/
|
9 |
+
* ___ __ __
|
10 |
+
* | | ____ _/ |_ ____ _______ ____ ____ _/ |_
|
11 |
+
* | | / \\ __\_/ __ \\_ __ \ / \ _/ __ \\ __\
|
12 |
+
* | || | \| | \ ___/ | | \/| | \\ ___/ | |
|
13 |
+
* |___||___| /|__| \_____>|__| |___| / \_____>|__|
|
14 |
+
* \/ \/
|
15 |
+
* ________
|
16 |
+
* / _____/_______ ____ __ __ ______
|
17 |
+
* / \ ___\_ __ \ / _ \ | | \\____ \
|
18 |
+
* \ \_\ \| | \/| |_| || | /| |_| |
|
19 |
+
* \______ /|__| \____/ |____/ | __/
|
20 |
+
* \/ |__|
|
21 |
+
*
|
22 |
+
* NOTICE OF LICENSE
|
23 |
+
*
|
24 |
+
* This source file is subject to the Creative Commons License.
|
25 |
+
* It is available through the world-wide-web at this URL:
|
26 |
+
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
27 |
+
* If you are unable to obtain it through the world-wide-web, please send an email
|
28 |
+
* to servicedesk@tig.nl so we can send you a copy immediately.
|
29 |
+
*
|
30 |
+
* DISCLAIMER
|
31 |
+
*
|
32 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
33 |
+
* versions in the future. If you wish to customize this module for your
|
34 |
+
* needs please contact servicedesk@tig.nl for more information.
|
35 |
+
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
+
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
+
*
|
39 |
+
* @method boolean hasApiKey()
|
40 |
+
* @method TIG_PostNL_Block_DeliveryOptions_Js setApiKey()
|
41 |
+
*/
|
42 |
+
class TIG_PostNL_Block_DeliveryOptions_PickupNotification extends TIG_PostNL_Block_DeliveryOptions_Template
|
43 |
+
{
|
44 |
+
/**
|
45 |
+
* @var string
|
46 |
+
*/
|
47 |
+
protected $_eventPrefix = 'postnl_deliveryoptions_pickupnotification';
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Render the template if allowed.
|
51 |
+
*
|
52 |
+
* @return string
|
53 |
+
*/
|
54 |
+
protected function _toHtml()
|
55 |
+
{
|
56 |
+
if (!Mage::helper('postnl/deliveryOptions')->isDeliveryOptionsEnabled()) {
|
57 |
+
return '';
|
58 |
+
}
|
59 |
+
|
60 |
+
return parent::_toHtml();
|
61 |
+
}
|
62 |
+
}
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
abstract class TIG_PostNL_Block_DeliveryOptions_Template extends TIG_PostNL_Block_Core_Template
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
abstract class TIG_PostNL_Block_DeliveryOptions_Template extends TIG_PostNL_Block_Core_Template
|
@@ -33,10 +33,11 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasIsOsc()
|
|
|
40 |
*/
|
41 |
class TIG_PostNL_Block_DeliveryOptions_Theme extends TIG_PostNL_Block_DeliveryOptions_Template
|
42 |
{
|
@@ -64,6 +65,20 @@ class TIG_PostNL_Block_DeliveryOptions_Theme extends TIG_PostNL_Block_DeliveryOp
|
|
64 |
return $this->_getData('is_osc');
|
65 |
}
|
66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
/**
|
68 |
* Gets a css file path for the current theme.
|
69 |
*
|
@@ -93,6 +108,11 @@ class TIG_PostNL_Block_DeliveryOptions_Theme extends TIG_PostNL_Block_DeliveryOp
|
|
93 |
&& isset($files->onestepcheckout->main)
|
94 |
) {
|
95 |
$file = (string) $files->onestepcheckout->main;
|
|
|
|
|
|
|
|
|
|
|
96 |
} elseif (isset($files->onepage)
|
97 |
&& isset($files->onepage->main)
|
98 |
) {
|
@@ -136,6 +156,15 @@ class TIG_PostNL_Block_DeliveryOptions_Theme extends TIG_PostNL_Block_DeliveryOp
|
|
136 |
*/
|
137 |
$cssFiles = $files->onestepcheckout->responsive;
|
138 |
$cssFiles = $cssFiles->asArray();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
} elseif (isset($files->onepage)
|
140 |
&& isset($files->onepage->responsive)
|
141 |
) {
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasIsOsc()
|
40 |
+
* @method boolean hasIsGoMage()
|
41 |
*/
|
42 |
class TIG_PostNL_Block_DeliveryOptions_Theme extends TIG_PostNL_Block_DeliveryOptions_Template
|
43 |
{
|
65 |
return $this->_getData('is_osc');
|
66 |
}
|
67 |
|
68 |
+
/**
|
69 |
+
* Gets whether the current checkout page is GoMage LightCheckout.
|
70 |
+
*
|
71 |
+
* @return boolean|mixed
|
72 |
+
*/
|
73 |
+
public function getIsGoMage()
|
74 |
+
{
|
75 |
+
if (!$this->hasIsGoMage()) {
|
76 |
+
return false;
|
77 |
+
}
|
78 |
+
|
79 |
+
return $this->_getData('is_go_mage');
|
80 |
+
}
|
81 |
+
|
82 |
/**
|
83 |
* Gets a css file path for the current theme.
|
84 |
*
|
108 |
&& isset($files->onestepcheckout->main)
|
109 |
) {
|
110 |
$file = (string) $files->onestepcheckout->main;
|
111 |
+
} elseif ($this->getIsGoMage()
|
112 |
+
&& isset($files->gomage_checkout)
|
113 |
+
&& isset($files->gomage_checkout->main)
|
114 |
+
) {
|
115 |
+
$file = (string) $files->gomage_checkout->main;
|
116 |
} elseif (isset($files->onepage)
|
117 |
&& isset($files->onepage->main)
|
118 |
) {
|
156 |
*/
|
157 |
$cssFiles = $files->onestepcheckout->responsive;
|
158 |
$cssFiles = $cssFiles->asArray();
|
159 |
+
} elseif ($this->getIsGoMage()
|
160 |
+
&& isset($files->gomage_checkout)
|
161 |
+
&& isset($files->gomage_checkout->responsive)
|
162 |
+
) {
|
163 |
+
/**
|
164 |
+
* @var Mage_Core_Model_Config_Element $cssFiles
|
165 |
+
*/
|
166 |
+
$cssFiles = $files->gomage_checkout->responsive;
|
167 |
+
$cssFiles = $cssFiles->asArray();
|
168 |
} elseif (isset($files->onepage)
|
169 |
&& isset($files->onepage->responsive)
|
170 |
) {
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasCanShowNotification()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasCanShowNotification()
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasIsTestMode()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasIsTestMode()
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasIsTestMode()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasIsTestMode()
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasIsTestMode()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasIsTestMode()
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method Varien_Object getTotal()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method Varien_Object getTotal()
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Payment_Form_Cod extends Mage_Payment_Block_Form
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Payment_Form_Cod extends Mage_Payment_Block_Form
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Payment_Info extends Mage_Payment_Block_Info
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Payment_Info extends Mage_Payment_Block_Info
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Payment_Sales_Order_Creditmemo_Totals_CodFee extends Mage_Sales_Block_Order_Creditmemo_Totals
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Payment_Sales_Order_Creditmemo_Totals_CodFee extends Mage_Sales_Block_Order_Creditmemo_Totals
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Payment_Sales_Order_Invoice_Totals_CodFee extends Mage_Sales_Block_Order_Invoice_Totals
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Payment_Sales_Order_Invoice_Totals_CodFee extends Mage_Sales_Block_Order_Invoice_Totals
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Payment_Sales_Order_Totals_CodFee extends Mage_Sales_Block_Order_Totals
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Block_Payment_Sales_Order_Totals_CodFee extends Mage_Sales_Block_Order_Totals
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ___________ __ __
|
4 |
+
* \__ ___/____ _/ |_ _____ | |
|
5 |
+
* | | / _ \\ __\\__ \ | |
|
6 |
+
* | | | |_| || | / __ \_| |__
|
7 |
+
* |____| \____/ |__| (____ /|____/
|
8 |
+
* \/
|
9 |
+
* ___ __ __
|
10 |
+
* | | ____ _/ |_ ____ _______ ____ ____ _/ |_
|
11 |
+
* | | / \\ __\_/ __ \\_ __ \ / \ _/ __ \\ __\
|
12 |
+
* | || | \| | \ ___/ | | \/| | \\ ___/ | |
|
13 |
+
* |___||___| /|__| \_____>|__| |___| / \_____>|__|
|
14 |
+
* \/ \/
|
15 |
+
* ________
|
16 |
+
* / _____/_______ ____ __ __ ______
|
17 |
+
* / \ ___\_ __ \ / _ \ | | \\____ \
|
18 |
+
* \ \_\ \| | \/| |_| || | /| |_| |
|
19 |
+
* \______ /|__| \____/ |____/ | __/
|
20 |
+
* \/ |__|
|
21 |
+
*
|
22 |
+
* NOTICE OF LICENSE
|
23 |
+
*
|
24 |
+
* This source file is subject to the Creative Commons License.
|
25 |
+
* It is available through the world-wide-web at this URL:
|
26 |
+
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
27 |
+
* If you are unable to obtain it through the world-wide-web, please send an email
|
28 |
+
* to servicedesk@tig.nl so we can send you a copy immediately.
|
29 |
+
*
|
30 |
+
* DISCLAIMER
|
31 |
+
*
|
32 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
33 |
+
* versions in the future. If you wish to customize this module for your
|
34 |
+
* needs please contact servicedesk@tig.nl for more information.
|
35 |
+
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
+
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
+
*/
|
39 |
+
abstract class TIG_PostNL_Controller_Adminhtml_Abstract extends Mage_Adminhtml_Controller_Action
|
40 |
+
{
|
41 |
+
/**
|
42 |
+
* Used module name in current adminhtml controller.
|
43 |
+
*/
|
44 |
+
protected $_usedModuleName = 'TIG_PostNL';
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Actions are always allowed as access validation is handled separately in each individual action.
|
48 |
+
*
|
49 |
+
* Checking access in each individual action allows us to tailor the displayed error message, instead of showing a
|
50 |
+
* generic 'access denied' message.
|
51 |
+
*
|
52 |
+
* @return bool
|
53 |
+
*/
|
54 |
+
protected function _isAllowed()
|
55 |
+
{
|
56 |
+
return true;
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Checks if the specified actions are allowed.
|
61 |
+
*
|
62 |
+
* @param array $actions
|
63 |
+
*
|
64 |
+
* @throws TIG_PostNL_Exception
|
65 |
+
*
|
66 |
+
* @return bool
|
67 |
+
*/
|
68 |
+
protected function _checkIsAllowed($actions = array())
|
69 |
+
{
|
70 |
+
$helper = Mage::helper('postnl');
|
71 |
+
$isAllowed = $helper->checkIsPostnlActionAllowed($actions, false);
|
72 |
+
|
73 |
+
return $isAllowed;
|
74 |
+
}
|
75 |
+
}
|
@@ -33,20 +33,29 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
-
class TIG_PostNL_Controller_Adminhtml_Config extends
|
40 |
{
|
|
|
|
|
|
|
|
|
|
|
41 |
/**
|
42 |
* Saves the current wizard step.
|
43 |
*
|
44 |
* @param string $step
|
45 |
*
|
46 |
* @return $this
|
|
|
|
|
47 |
*/
|
48 |
protected function _saveCurrentWizardStep($step)
|
49 |
{
|
|
|
|
|
50 |
/**
|
51 |
* @var Mage_Admin_Model_User $adminUser
|
52 |
*/
|
@@ -59,4 +68,30 @@ class TIG_PostNL_Controller_Adminhtml_Config extends Mage_Adminhtml_Controller_A
|
|
59 |
|
60 |
return $this;
|
61 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
}
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
+
class TIG_PostNL_Controller_Adminhtml_Config extends TIG_PostNL_Controller_Adminhtml_Abstract
|
40 |
{
|
41 |
+
/**
|
42 |
+
* Regex to validate the supplied wizard step hash.
|
43 |
+
*/
|
44 |
+
const VALIDATE_WIZARD_HASH_REGEX = '/^[a-zA-Z0-9-_#]+$/';
|
45 |
+
|
46 |
/**
|
47 |
* Saves the current wizard step.
|
48 |
*
|
49 |
* @param string $step
|
50 |
*
|
51 |
* @return $this
|
52 |
+
*
|
53 |
+
* @throws TIG_PostNL_Exception
|
54 |
*/
|
55 |
protected function _saveCurrentWizardStep($step)
|
56 |
{
|
57 |
+
$step = $this->_validateStep($step);
|
58 |
+
|
59 |
/**
|
60 |
* @var Mage_Admin_Model_User $adminUser
|
61 |
*/
|
68 |
|
69 |
return $this;
|
70 |
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Validate the step hash. If the step is not valid, return an empty string.
|
74 |
+
*
|
75 |
+
* @param string $step
|
76 |
+
*
|
77 |
+
* @return string
|
78 |
+
*
|
79 |
+
* @throws TIG_PostNL_Exception
|
80 |
+
*/
|
81 |
+
protected function _validateStep($step)
|
82 |
+
{
|
83 |
+
$validator = new Zend_Validate_Regex(array('pattern' => self::VALIDATE_WIZARD_HASH_REGEX));
|
84 |
+
|
85 |
+
if (!$validator->isValid($step)) {
|
86 |
+
throw new TIG_PostNL_Exception(
|
87 |
+
$this->__(
|
88 |
+
'An error occurred while saving this step of the configuration wizard. Please use the regular ' .
|
89 |
+
'"Save Config" button instead.'
|
90 |
+
),
|
91 |
+
'POSTNL-0224'
|
92 |
+
);
|
93 |
+
}
|
94 |
+
|
95 |
+
return $step;
|
96 |
+
}
|
97 |
}
|
@@ -33,72 +33,39 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
-
class TIG_PostNL_Controller_Adminhtml_Shipment extends
|
40 |
{
|
41 |
/**
|
42 |
-
*
|
43 |
*/
|
44 |
-
|
45 |
|
46 |
/**
|
47 |
-
*
|
48 |
*/
|
49 |
-
|
50 |
-
|
51 |
-
/**
|
52 |
-
* @var array
|
53 |
-
*/
|
54 |
-
protected $_warnings = array();
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Error counter used by certain actions.
|
58 |
-
*
|
59 |
-
* @var int
|
60 |
-
*/
|
61 |
-
protected $_errors = 0;
|
62 |
-
|
63 |
-
/**
|
64 |
-
* @return array
|
65 |
-
*/
|
66 |
-
public function getWarnings()
|
67 |
{
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
*
|
74 |
-
* @return $this
|
75 |
-
*/
|
76 |
-
public function setWarnings(array $warnings)
|
77 |
-
{
|
78 |
-
$this->_warnings = $warnings;
|
79 |
|
80 |
-
return $
|
81 |
}
|
82 |
|
83 |
/**
|
84 |
-
* @param
|
85 |
*
|
86 |
* @return $this
|
87 |
*/
|
88 |
-
public function
|
89 |
{
|
90 |
-
|
91 |
-
$warning = array(
|
92 |
-
'entity_id' => null,
|
93 |
-
'code' => null,
|
94 |
-
'description' => $warning,
|
95 |
-
);
|
96 |
-
}
|
97 |
-
|
98 |
-
$warnings = $this->getWarnings();
|
99 |
-
$warnings[] = $warning;
|
100 |
|
101 |
-
$this->setWarnings($warnings);
|
102 |
return $this;
|
103 |
}
|
104 |
|
@@ -150,215 +117,6 @@ class TIG_PostNL_Controller_Adminhtml_Shipment extends Mage_Adminhtml_Controller
|
|
150 |
return $orderIds;
|
151 |
}
|
152 |
|
153 |
-
/**
|
154 |
-
* Gets the postnl shipment associated with a shipment
|
155 |
-
*
|
156 |
-
* @param int $shipmentId
|
157 |
-
*
|
158 |
-
* @return TIG_PostNL_Model_Core_Shipment
|
159 |
-
*/
|
160 |
-
protected function _getPostnlShipment($shipmentId)
|
161 |
-
{
|
162 |
-
$postnlShipment = Mage::getModel('postnl_core/shipment')->load($shipmentId, 'shipment_id');
|
163 |
-
|
164 |
-
return $postnlShipment;
|
165 |
-
}
|
166 |
-
|
167 |
-
/**
|
168 |
-
* Initialize shipment items QTY
|
169 |
-
*
|
170 |
-
* @param Mage_Sales_Model_Order $order
|
171 |
-
*
|
172 |
-
* @return array
|
173 |
-
*/
|
174 |
-
protected function _getItemQtys($order)
|
175 |
-
{
|
176 |
-
$itemQtys = array();
|
177 |
-
|
178 |
-
/**
|
179 |
-
* @var Mage_Sales_Model_Order_Item $item
|
180 |
-
*/
|
181 |
-
$items = $order->getAllVisibleItems();
|
182 |
-
foreach ($items as $item) {
|
183 |
-
/**
|
184 |
-
* the qty to ship is the total remaining (not yet shipped) qty of every item
|
185 |
-
*/
|
186 |
-
$itemQty = $item->getQtyOrdered() - $item->getQtyShipped();
|
187 |
-
|
188 |
-
$itemQtys[$item->getId()] = $itemQty;
|
189 |
-
}
|
190 |
-
|
191 |
-
return $itemQtys;
|
192 |
-
}
|
193 |
-
|
194 |
-
/**
|
195 |
-
* Creates a shipment of an order containing all available items.
|
196 |
-
*
|
197 |
-
* @param Mage_Sales_Model_Order|int $order
|
198 |
-
*
|
199 |
-
* @return int
|
200 |
-
*
|
201 |
-
* @throws TIG_PostNL_Exception
|
202 |
-
*/
|
203 |
-
protected function _createShipment($order)
|
204 |
-
{
|
205 |
-
if (is_numeric($order)) {
|
206 |
-
$order = Mage::getModel('sales/order')->load($order);
|
207 |
-
}
|
208 |
-
|
209 |
-
if (!is_object($order) || !($order instanceof Mage_Sales_Model_Order)) {
|
210 |
-
throw new InvalidArgumentException(
|
211 |
-
'Order must be an instance of Mage_Sales_Model_Order or a valid entity ID.'
|
212 |
-
);
|
213 |
-
}
|
214 |
-
|
215 |
-
if (!$order->canShip()) {
|
216 |
-
throw new TIG_PostNL_Exception(
|
217 |
-
$this->__('Order #%s cannot be shipped at this time.', $order->getIncrementId()),
|
218 |
-
'POSTNL-0015'
|
219 |
-
);
|
220 |
-
}
|
221 |
-
|
222 |
-
$shipment = Mage::getModel('sales/service_order', $order)
|
223 |
-
->prepareShipment($this->_getItemQtys($order));
|
224 |
-
|
225 |
-
$shipment->register();
|
226 |
-
$this->_saveShipment($shipment);
|
227 |
-
|
228 |
-
return $shipment->getId();
|
229 |
-
}
|
230 |
-
|
231 |
-
/**
|
232 |
-
* Create shipments for an array of order IDs
|
233 |
-
*
|
234 |
-
* @param array $orderIds
|
235 |
-
* @param boolean $loadExisting Flag to determine if existing shipments should be loaded. If set to false, an error
|
236 |
-
* will be thrown for shipments that have already been shipped.
|
237 |
-
* @param boolean $registerExisting
|
238 |
-
*
|
239 |
-
* @return array
|
240 |
-
*/
|
241 |
-
protected function _createShipments(array $orderIds, $loadExisting = false, $registerExisting = true)
|
242 |
-
{
|
243 |
-
$helper = Mage::helper('postnl');
|
244 |
-
|
245 |
-
/**
|
246 |
-
* Load the requested orders. Any orders that weren't shipped using PostNL will be skipped.
|
247 |
-
*/
|
248 |
-
$orders = $this->_loadOrders($orderIds);
|
249 |
-
$processedOrderIds = $orders->getColumnValues('entity_id');
|
250 |
-
|
251 |
-
/**
|
252 |
-
* Add a warning for all orders which were skipped because they weren't shipped with PostNL.
|
253 |
-
*/
|
254 |
-
$missingIds = array_diff($orderIds, $processedOrderIds);
|
255 |
-
foreach ($missingIds as $missingId) {
|
256 |
-
$incrementId = Mage::getResourceModel('sales/order')->getIncrementId($missingId);
|
257 |
-
$this->addWarning(
|
258 |
-
array(
|
259 |
-
'entity_id' => $incrementId,
|
260 |
-
'code' => 'POSTNL-0009',
|
261 |
-
'description' => $this->__(
|
262 |
-
'This action is not available for order #%s, because it was not placed using PostNL.',
|
263 |
-
$incrementId
|
264 |
-
),
|
265 |
-
)
|
266 |
-
);
|
267 |
-
$this->_errors++;
|
268 |
-
}
|
269 |
-
|
270 |
-
/**
|
271 |
-
* Create the shipments.
|
272 |
-
*
|
273 |
-
* @var Mage_Sales_Model_Order $order
|
274 |
-
*/
|
275 |
-
$shipmentIds = array();
|
276 |
-
$existingShipmentsLoaded = array();
|
277 |
-
foreach ($orders as $order) {
|
278 |
-
try {
|
279 |
-
$shipmentIds[] = $this->_createShipment($order);
|
280 |
-
} catch (TIG_PostNL_Exception $e) {
|
281 |
-
if (!$loadExisting) {
|
282 |
-
$helper->logException($e);
|
283 |
-
$this->addWarning(
|
284 |
-
array(
|
285 |
-
'entity_id' => Mage::getResourceModel('sales/order')->getIncrementId($order->getId()),
|
286 |
-
'code' => $e->getCode(),
|
287 |
-
'description' => $e->getMessage(),
|
288 |
-
)
|
289 |
-
);
|
290 |
-
$this->_errors++;
|
291 |
-
|
292 |
-
continue;
|
293 |
-
}
|
294 |
-
/**
|
295 |
-
* If any shipments already exist, get their IDs so they can be processed.
|
296 |
-
*/
|
297 |
-
$shipmentCollection = Mage::getResourceModel('sales/order_shipment_collection');
|
298 |
-
$shipmentCollection->addFieldToSelect('entity_id')
|
299 |
-
->addFieldToFilter('order_id', $order->getId());
|
300 |
-
|
301 |
-
$orderShipmentIds = $shipmentCollection->getColumnValues('entity_id');
|
302 |
-
|
303 |
-
if ($shipmentCollection->getSize() > 0) {
|
304 |
-
$shipmentIds = array_merge($orderShipmentIds, $shipmentIds);
|
305 |
-
|
306 |
-
if ($registerExisting) {
|
307 |
-
$existingShipmentsLoaded = array_merge($orderShipmentIds, $existingShipmentsLoaded);
|
308 |
-
}
|
309 |
-
} else {
|
310 |
-
/**
|
311 |
-
* If no shipments exist, add a warning message indicating the process failed for this order.
|
312 |
-
*/
|
313 |
-
$helper->logException($e);
|
314 |
-
$this->addWarning(
|
315 |
-
array(
|
316 |
-
'entity_id' => Mage::getResourceModel('sales/order')->getIncrementId($order->getId()),
|
317 |
-
'code' => $e->getCode(),
|
318 |
-
'description' => $e->getMessage(),
|
319 |
-
)
|
320 |
-
);
|
321 |
-
$this->_errors++;
|
322 |
-
}
|
323 |
-
} catch (Exception $e) {
|
324 |
-
$helper->logException($e);
|
325 |
-
$this->addWarning(
|
326 |
-
array(
|
327 |
-
'entity_id' => Mage::getResourceModel('sales/order')->getIncrementId($order->getId()),
|
328 |
-
'code' => null,
|
329 |
-
'description' => $e->getMessage(),
|
330 |
-
)
|
331 |
-
);
|
332 |
-
$this->_errors++;
|
333 |
-
}
|
334 |
-
}
|
335 |
-
|
336 |
-
if ($registerExisting) {
|
337 |
-
Mage::unregister('postnl_existing_shipments_loaded');
|
338 |
-
Mage::register('postnl_existing_shipments_loaded', $existingShipmentsLoaded);
|
339 |
-
}
|
340 |
-
|
341 |
-
return $shipmentIds;
|
342 |
-
}
|
343 |
-
|
344 |
-
/**
|
345 |
-
* Save shipment and order in one transaction
|
346 |
-
*
|
347 |
-
* @param Mage_Sales_Model_Order_Shipment $shipment
|
348 |
-
*
|
349 |
-
* @return $this
|
350 |
-
*/
|
351 |
-
protected function _saveShipment($shipment)
|
352 |
-
{
|
353 |
-
$shipment->getOrder()->setIsInProcess(true);
|
354 |
-
Mage::getModel('core/resource_transaction')
|
355 |
-
->addObject($shipment)
|
356 |
-
->addObject($shipment->getOrder())
|
357 |
-
->save();
|
358 |
-
|
359 |
-
return $this;
|
360 |
-
}
|
361 |
-
|
362 |
/**
|
363 |
* Get the output of printing labels for an array of shipments.
|
364 |
*
|
@@ -370,63 +128,7 @@ class TIG_PostNL_Controller_Adminhtml_Shipment extends Mage_Adminhtml_Controller
|
|
370 |
*/
|
371 |
protected function _getMassLabelsOutput($shipments)
|
372 |
{
|
373 |
-
$
|
374 |
-
|
375 |
-
/**
|
376 |
-
* Get the labels from CIF.
|
377 |
-
*/
|
378 |
-
$labels = array();
|
379 |
-
foreach ($shipments as $shipment) {
|
380 |
-
try {
|
381 |
-
$printReturnLabels = Mage::helper('postnl')->canPrintReturnLabelsWithShippingLabels(
|
382 |
-
$shipment->getStoreId()
|
383 |
-
);
|
384 |
-
|
385 |
-
$shipmentLabels = $this->_getLabels($shipment, true, $printReturnLabels);
|
386 |
-
$labels = array_merge($labels, $shipmentLabels);
|
387 |
-
} catch (TIG_PostNL_Model_Core_Cif_Exception $e) {
|
388 |
-
Mage::helper('postnl/cif')->parseCifException($e);
|
389 |
-
|
390 |
-
$helper->logException($e);
|
391 |
-
$this->addWarning(
|
392 |
-
array(
|
393 |
-
'entity_id' => $shipment->getShipmentIncrementId(),
|
394 |
-
'code' => $e->getCode(),
|
395 |
-
'description' => $e->getMessage(),
|
396 |
-
)
|
397 |
-
);
|
398 |
-
} catch (TIG_PostNL_Exception $e) {
|
399 |
-
$helper->logException($e);
|
400 |
-
$this->addWarning(
|
401 |
-
array(
|
402 |
-
'entity_id' => $shipment->getShipmentIncrementId(),
|
403 |
-
'code' => $e->getCode(),
|
404 |
-
'description' => $e->getMessage(),
|
405 |
-
)
|
406 |
-
);
|
407 |
-
} catch (Exception $e) {
|
408 |
-
$helper->logException($e);
|
409 |
-
$this->addWarning(
|
410 |
-
array(
|
411 |
-
'entity_id' => $shipment->getShipmentIncrementId(),
|
412 |
-
'code' => null,
|
413 |
-
'description' => $e->getMessage(),
|
414 |
-
)
|
415 |
-
);
|
416 |
-
}
|
417 |
-
}
|
418 |
-
|
419 |
-
if (!$labels) {
|
420 |
-
return false;
|
421 |
-
}
|
422 |
-
|
423 |
-
/**
|
424 |
-
* The label wills be base64 encoded strings. Convert these to a single pdf.
|
425 |
-
*/
|
426 |
-
$label = Mage::getModel('postnl_core/label');
|
427 |
-
$output = $label->createPdf($labels);
|
428 |
-
|
429 |
-
return $output;
|
430 |
}
|
431 |
|
432 |
/**
|
@@ -440,91 +142,7 @@ class TIG_PostNL_Controller_Adminhtml_Shipment extends Mage_Adminhtml_Controller
|
|
440 |
*/
|
441 |
protected function _getMassPackingSlipsOutput($shipments)
|
442 |
{
|
443 |
-
$
|
444 |
-
|
445 |
-
/**
|
446 |
-
* Get the packing slip model.
|
447 |
-
*/
|
448 |
-
$packingSlipModel = Mage::getModel('postnl_core/packingSlip');
|
449 |
-
|
450 |
-
/**
|
451 |
-
* Get the current memory limit as an integer in bytes. Because printing packing slips can be very memory
|
452 |
-
* intensive, we need to monitor memory usage.
|
453 |
-
*/
|
454 |
-
$memoryLimit = $helper->getMemoryLimit();
|
455 |
-
|
456 |
-
/**
|
457 |
-
* Create the pdf's and add them to the main pdf object.
|
458 |
-
*
|
459 |
-
* @var TIG_PostNL_Model_Core_Shipment $shipment
|
460 |
-
*/
|
461 |
-
$pdf = new Zend_Pdf();
|
462 |
-
foreach ($shipments as $shipment) {
|
463 |
-
try {
|
464 |
-
/**
|
465 |
-
* If the current memory usage exceeds 75%, end the script. Otherwise we risk other processes being
|
466 |
-
* unable to finish and throwing fatal errors.
|
467 |
-
*/
|
468 |
-
$memoryUsage = memory_get_usage(true);
|
469 |
-
|
470 |
-
if ($memoryUsage / $memoryLimit > 0.75) {
|
471 |
-
throw new TIG_PostNL_Exception(
|
472 |
-
$this->__(
|
473 |
-
'Approaching memory limit for this operation. Please select fewer shipments and try ' .
|
474 |
-
'again.'
|
475 |
-
),
|
476 |
-
'POSTNL-0170'
|
477 |
-
);
|
478 |
-
}
|
479 |
-
|
480 |
-
$printReturnLabels = Mage::helper('postnl')->canPrintReturnLabelsWithShippingLabels(
|
481 |
-
$shipment->getStoreId()
|
482 |
-
);
|
483 |
-
|
484 |
-
$shipmentLabels = $this->_getLabels($shipment, true, $printReturnLabels);
|
485 |
-
$packingSlipModel->createPdf($shipmentLabels, $shipment, $pdf);
|
486 |
-
} catch (TIG_PostNL_Model_Core_Cif_Exception $e) {
|
487 |
-
Mage::helper('postnl/cif')->parseCifException($e);
|
488 |
-
|
489 |
-
$helper->logException($e);
|
490 |
-
$this->addWarning(
|
491 |
-
array(
|
492 |
-
'entity_id' => $shipment->getShipmentIncrementId(),
|
493 |
-
'code' => $e->getCode(),
|
494 |
-
'description' => $e->getMessage(),
|
495 |
-
)
|
496 |
-
);
|
497 |
-
} catch (TIG_PostNL_Exception $e) {
|
498 |
-
$helper->logException($e);
|
499 |
-
$this->addWarning(
|
500 |
-
array(
|
501 |
-
'entity_id' => $shipment->getShipmentIncrementId(),
|
502 |
-
'code' => $e->getCode(),
|
503 |
-
'description' => $e->getMessage(),
|
504 |
-
)
|
505 |
-
);
|
506 |
-
} catch (Exception $e) {
|
507 |
-
$helper->logException($e);
|
508 |
-
$this->addWarning(
|
509 |
-
array(
|
510 |
-
'entity_id' => $shipment->getShipmentIncrementId(),
|
511 |
-
'code' => null,
|
512 |
-
'description' => $e->getMessage(),
|
513 |
-
)
|
514 |
-
);
|
515 |
-
}
|
516 |
-
}
|
517 |
-
unset($shipment, $shipments, $shipmentLabels, $packingSlip, $packingSlipModel);
|
518 |
-
|
519 |
-
if (!$pdf->pages) {
|
520 |
-
return false;
|
521 |
-
}
|
522 |
-
|
523 |
-
/**
|
524 |
-
* Render the pdf as a string.
|
525 |
-
*/
|
526 |
-
$output = $pdf->render();
|
527 |
-
return $output;
|
528 |
}
|
529 |
|
530 |
/**
|
@@ -536,40 +154,7 @@ class TIG_PostNL_Controller_Adminhtml_Shipment extends Mage_Adminhtml_Controller
|
|
536 |
*/
|
537 |
protected function _getReturnLabels($shipment)
|
538 |
{
|
539 |
-
|
540 |
-
* Load the PostNL shipment.
|
541 |
-
*/
|
542 |
-
if ($shipment instanceof Mage_Sales_Model_Order_Shipment) {
|
543 |
-
$postnlShipment = $this->_getPostnlShipment($shipment->getId());
|
544 |
-
} else {
|
545 |
-
$postnlShipment = $shipment;
|
546 |
-
}
|
547 |
-
|
548 |
-
if (!$postnlShipment->hasReturnBarcode() && !$postnlShipment->canGenerateReturnBarcode()) {
|
549 |
-
return false;
|
550 |
-
}
|
551 |
-
|
552 |
-
if ($postnlShipment->hasReturnLabels()) {
|
553 |
-
return $postnlShipment->getReturnLabels();
|
554 |
-
}
|
555 |
-
|
556 |
-
$postnlShipment = $this->_generateLabels($shipment, $postnlShipment, false);
|
557 |
-
|
558 |
-
$labels = $postnlShipment->getReturnLabels();
|
559 |
-
|
560 |
-
if (!$postnlShipment->getLabelsPrinted()) {
|
561 |
-
$postnlShipment->setLabelsPrinted(true);
|
562 |
-
}
|
563 |
-
|
564 |
-
if (!$postnlShipment->getReturnLabelsPrinted()) {
|
565 |
-
$postnlShipment->setReturnLabelsPrinted(true);
|
566 |
-
}
|
567 |
-
|
568 |
-
if ($postnlShipment->hasDataChanges()) {
|
569 |
-
$postnlShipment->save();
|
570 |
-
}
|
571 |
-
|
572 |
-
return $labels;
|
573 |
}
|
574 |
|
575 |
/**
|
@@ -588,123 +173,7 @@ class TIG_PostNL_Controller_Adminhtml_Shipment extends Mage_Adminhtml_Controller
|
|
588 |
*/
|
589 |
protected function _getLabels($shipment, $confirm = false, $includeReturnLabels = null)
|
590 |
{
|
591 |
-
|
592 |
-
$includeReturnLabels = Mage::getStoreConfigFlag(
|
593 |
-
self::XPATH_PRINT_RETURN_AND_SHIPPING_LABEL,
|
594 |
-
$shipment->getStoreId()
|
595 |
-
);
|
596 |
-
|
597 |
-
/**
|
598 |
-
* Return labels may only be included if the current admin user is allowed to print them.
|
599 |
-
*/
|
600 |
-
if (!$this->_checkIsAllowed(array('print_return_labels'))) {
|
601 |
-
$includeReturnLabels = false;
|
602 |
-
}
|
603 |
-
}
|
604 |
-
|
605 |
-
/**
|
606 |
-
* Check if printing return labels is allowed.
|
607 |
-
*/
|
608 |
-
if (!Mage::helper('postnl')->isReturnsEnabled($shipment->getStoreId())) {
|
609 |
-
$includeReturnLabels = false;
|
610 |
-
}
|
611 |
-
|
612 |
-
/**
|
613 |
-
* Load the PostNL shipment.
|
614 |
-
*/
|
615 |
-
if ($shipment instanceof Mage_Sales_Model_Order_Shipment) {
|
616 |
-
$postnlShipment = $this->_getPostnlShipment($shipment->getId());
|
617 |
-
} else {
|
618 |
-
$postnlShipment = $shipment;
|
619 |
-
}
|
620 |
-
|
621 |
-
/**
|
622 |
-
* Check if the shipment already has any labels. If so, return those. If we also need to confirm the shipment,
|
623 |
-
* do that first.
|
624 |
-
*/
|
625 |
-
if ($postnlShipment->hasLabels()) {
|
626 |
-
if ($confirm === true && !$postnlShipment->isConfirmed() && $postnlShipment->canConfirm()) {
|
627 |
-
$this->_confirmShipment($postnlShipment);
|
628 |
-
}
|
629 |
-
} else {
|
630 |
-
/**
|
631 |
-
* Generate the required labels.
|
632 |
-
*/
|
633 |
-
$postnlShipment = $this->_generateLabels($shipment, $postnlShipment, $confirm);
|
634 |
-
}
|
635 |
-
|
636 |
-
$labels = $postnlShipment->getlabels($includeReturnLabels);
|
637 |
-
|
638 |
-
if (!$postnlShipment->getLabelsPrinted()) {
|
639 |
-
$postnlShipment->setLabelsPrinted(true);
|
640 |
-
}
|
641 |
-
|
642 |
-
if ($includeReturnLabels && !$postnlShipment->getReturnLabelsPrinted()) {
|
643 |
-
$postnlShipment->setReturnLabelsPrinted(true);
|
644 |
-
}
|
645 |
-
|
646 |
-
if ($postnlShipment->hasDataChanges()) {
|
647 |
-
$postnlShipment->save();
|
648 |
-
}
|
649 |
-
|
650 |
-
return $labels;
|
651 |
-
}
|
652 |
-
|
653 |
-
/**
|
654 |
-
* Generate shipping labels for this given shipment. This method includes the functionality required to prepare the
|
655 |
-
* shipment for generating labels if required.
|
656 |
-
*
|
657 |
-
* @param Mage_Sales_Model_Order_Shipment $shipment
|
658 |
-
* @param TIG_PostNL_Model_Core_Shipment $postnlShipment
|
659 |
-
* @param boolean $confirm
|
660 |
-
*
|
661 |
-
* @return TIG_PostNL_Model_Core_Shipment
|
662 |
-
*/
|
663 |
-
protected function _generateLabels($shipment, $postnlShipment, $confirm = false)
|
664 |
-
{
|
665 |
-
/**
|
666 |
-
* If the PostNL shipment is new, set the magento shipment ID.
|
667 |
-
*/
|
668 |
-
if (!$postnlShipment->getShipmentId()) {
|
669 |
-
$postnlShipment->setShipmentId($shipment->getId());
|
670 |
-
}
|
671 |
-
|
672 |
-
/**
|
673 |
-
* If the shipment does not have a barcode, generate one.
|
674 |
-
*/
|
675 |
-
if (!$postnlShipment->getMainBarcode() && $postnlShipment->canGenerateBarcode()) {
|
676 |
-
$postnlShipment->generateBarcodes();
|
677 |
-
}
|
678 |
-
|
679 |
-
$printReturnLabel = Mage::helper('postnl/cif')->isReturnsEnabled($postnlShipment->getStoreId());
|
680 |
-
if ($printReturnLabel && $postnlShipment->canGenerateReturnBarcode()) {
|
681 |
-
$postnlShipment->generateReturnBarcode();
|
682 |
-
}
|
683 |
-
|
684 |
-
if (true === $confirm
|
685 |
-
&& !$postnlShipment->hasLabels()
|
686 |
-
&& !$postnlShipment->isConfirmed()
|
687 |
-
&& $postnlShipment->canConfirm(true)
|
688 |
-
) {
|
689 |
-
/**
|
690 |
-
* Confirm the shipment and request a new label.
|
691 |
-
*/
|
692 |
-
$postnlShipment->confirmAndGenerateLabel();
|
693 |
-
|
694 |
-
if ($postnlShipment->canAddTrackingCode()) {
|
695 |
-
$postnlShipment->addTrackingCodeToShipment();
|
696 |
-
}
|
697 |
-
|
698 |
-
$postnlShipment->save();
|
699 |
-
} else {
|
700 |
-
/**
|
701 |
-
* Generate new shipping labels without confirming.
|
702 |
-
*/
|
703 |
-
$postnlShipment->generateLabel()
|
704 |
-
->save();
|
705 |
-
}
|
706 |
-
|
707 |
-
return $postnlShipment;
|
708 |
}
|
709 |
|
710 |
/**
|
@@ -718,83 +187,19 @@ class TIG_PostNL_Controller_Adminhtml_Shipment extends Mage_Adminhtml_Controller
|
|
718 |
*/
|
719 |
protected function _confirmShipment($shipment)
|
720 |
{
|
721 |
-
|
722 |
-
|
723 |
-
*/
|
724 |
-
if ($shipment instanceof Mage_Sales_Model_Order_Shipment) {
|
725 |
-
$postnlShipment = $this->_getPostnlShipment($shipment->getId());
|
726 |
-
} else {
|
727 |
-
$postnlShipment = $shipment;
|
728 |
-
}
|
729 |
-
|
730 |
-
/**
|
731 |
-
* Prevent EU shipments from being confirmed if their labels are not yet printed.
|
732 |
-
*/
|
733 |
-
if ($postnlShipment->isEuShipment() && !$postnlShipment->getLabelsPrinted()) {
|
734 |
-
throw new TIG_PostNL_Exception(
|
735 |
-
$this->__(
|
736 |
-
"Shipment #%s could not be confirmed, because for EU shipments you may only confirm a shipment " .
|
737 |
-
"after it's labels have been printed.",
|
738 |
-
$postnlShipment->getShipment()->getIncrementId()
|
739 |
-
),
|
740 |
-
'POSTNL-0016'
|
741 |
-
);
|
742 |
-
}
|
743 |
-
|
744 |
-
/**
|
745 |
-
* If the PostNL shipment is new, set the magento shipment ID.
|
746 |
-
*/
|
747 |
-
if (!$postnlShipment->getShipmentId()) {
|
748 |
-
$postnlShipment->setShipmentId($shipment->getId());
|
749 |
-
}
|
750 |
-
|
751 |
-
/**
|
752 |
-
* If the shipment does not have a main barcode, generate new barcodes.
|
753 |
-
*/
|
754 |
-
if (!$postnlShipment->getMainBarcode() && $postnlShipment->canGenerateBarcode()) {
|
755 |
-
$postnlShipment->generateBarcodes();
|
756 |
-
}
|
757 |
-
|
758 |
-
$printReturnLabel = Mage::helper('postnl/cif')->isReturnsEnabled($shipment->getStoreId());
|
759 |
-
if ($printReturnLabel && !$postnlShipment->hasReturnBarcode() && $postnlShipment->canGenerateReturnBarcode()) {
|
760 |
-
$postnlShipment->generateReturnBarcode();
|
761 |
-
}
|
762 |
-
|
763 |
-
if ($postnlShipment->getConfirmStatus() === $postnlShipment::CONFIRM_STATUS_CONFIRMED) {
|
764 |
-
/**
|
765 |
-
* The shipment is already confirmed.
|
766 |
-
*/
|
767 |
-
throw new TIG_PostNL_Exception(
|
768 |
-
$this->__('Shipment #%s has already been confirmed.', $postnlShipment->getShipment()->getIncrementId()),
|
769 |
-
'POSTNL-0017'
|
770 |
-
);
|
771 |
-
}
|
772 |
-
|
773 |
-
if (!$postnlShipment->canConfirm()) {
|
774 |
-
/**
|
775 |
-
* The shipment cannot be confirmed at this time.
|
776 |
-
*/
|
777 |
-
throw new TIG_PostNL_Exception(
|
778 |
-
$this->__(
|
779 |
-
'Shipment #%s cannot be confirmed at this time.',
|
780 |
-
$postnlShipment->getShipment()->getIncrementId()
|
781 |
-
),
|
782 |
-
'POSTNL-00018'
|
783 |
-
);
|
784 |
-
}
|
785 |
-
|
786 |
-
/**
|
787 |
-
* Confirm the shipment.
|
788 |
-
*/
|
789 |
-
$postnlShipment->confirm();
|
790 |
-
|
791 |
-
if ($postnlShipment->canAddTrackingCode()) {
|
792 |
-
$postnlShipment->addTrackingCodeToShipment();
|
793 |
-
}
|
794 |
-
|
795 |
-
$postnlShipment->save();
|
796 |
|
797 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
798 |
}
|
799 |
|
800 |
/**
|
@@ -807,45 +212,7 @@ class TIG_PostNL_Controller_Adminhtml_Shipment extends Mage_Adminhtml_Controller
|
|
807 |
*/
|
808 |
protected function _updateShippingStatus(TIG_PostNL_Model_Core_Shipment $postnlShipment)
|
809 |
{
|
810 |
-
|
811 |
-
* Only confirmed shipments cna be updated.
|
812 |
-
*/
|
813 |
-
if (!$postnlShipment->isConfirmed()) {
|
814 |
-
throw new TIG_PostNL_Exception(
|
815 |
-
$this->__(
|
816 |
-
'The shipping status of shipment #%s cannot be updated, because it has not yet been confirmed.',
|
817 |
-
$postnlShipment->getShipmentIncrementId()
|
818 |
-
),
|
819 |
-
'POSTNL-0206'
|
820 |
-
);
|
821 |
-
}
|
822 |
-
|
823 |
-
/**
|
824 |
-
* Check if the shipment's shipping status or return status may be updated.
|
825 |
-
*/
|
826 |
-
if (!$postnlShipment->canUpdateShippingStatus() && !$postnlShipment->canUpdateReturnStatus()) {
|
827 |
-
throw new TIG_PostNL_Exception(
|
828 |
-
$this->__(
|
829 |
-
'The shipping status of shipment #%s cannot be updated.',
|
830 |
-
$postnlShipment->getShipmentIncrementId()
|
831 |
-
),
|
832 |
-
'POSTNL-0220'
|
833 |
-
);
|
834 |
-
}
|
835 |
-
|
836 |
-
if ($postnlShipment->canUpdateShippingStatus()) {
|
837 |
-
$postnlShipment->updateShippingStatus(true);
|
838 |
-
}
|
839 |
-
|
840 |
-
if ($postnlShipment->canUpdateReturnStatus()) {
|
841 |
-
$postnlShipment->updateReturnStatus(true);
|
842 |
-
}
|
843 |
-
|
844 |
-
if ($postnlShipment->hasDataChanges()) {
|
845 |
-
$postnlShipment->save();
|
846 |
-
}
|
847 |
-
|
848 |
-
return $this;
|
849 |
}
|
850 |
|
851 |
/**
|
@@ -862,157 +229,7 @@ class TIG_PostNL_Controller_Adminhtml_Shipment extends Mage_Adminhtml_Controller
|
|
862 |
*/
|
863 |
protected function _loadAndCheckShipments($shipmentIds, $loadPostnlShipments = false, $throwException = true)
|
864 |
{
|
865 |
-
|
866 |
-
$shipmentIds = array($shipmentIds);
|
867 |
-
}
|
868 |
-
|
869 |
-
$resource = Mage::getSingleton('core/resource');
|
870 |
-
$postnlShippingMethods = Mage::helper('postnl/carrier')->getPostnlShippingMethods();
|
871 |
-
|
872 |
-
/**
|
873 |
-
* This regex will filter all non-postnl shipments.
|
874 |
-
*/
|
875 |
-
$postnlShippingMethodsRegex = '';
|
876 |
-
foreach ($postnlShippingMethods as $method) {
|
877 |
-
if ($postnlShippingMethodsRegex) {
|
878 |
-
$postnlShippingMethodsRegex .= '|';
|
879 |
-
} else {
|
880 |
-
$postnlShippingMethodsRegex .= '^';
|
881 |
-
}
|
882 |
-
|
883 |
-
$postnlShippingMethodsRegex .= "({$method})(_{0,1}[0-9]*)";
|
884 |
-
}
|
885 |
-
|
886 |
-
$postnlShippingMethodsRegex .= '$';
|
887 |
-
|
888 |
-
/**
|
889 |
-
* Get the requested shipments. Only shipments that have been shipped using PostNL will be returned.
|
890 |
-
*/
|
891 |
-
if ($loadPostnlShipments) {
|
892 |
-
$shipments = Mage::getResourceModel('postnl_core/shipment_collection')
|
893 |
-
->addFieldToFilter('shipment_id', array('in' => $shipmentIds))
|
894 |
-
->addFieldToFilter(
|
895 |
-
'`order`.`shipping_method`',
|
896 |
-
array(
|
897 |
-
'regexp' => $postnlShippingMethodsRegex
|
898 |
-
)
|
899 |
-
);
|
900 |
-
|
901 |
-
$shipments->getSelect()->joinInner(
|
902 |
-
array('order' => $resource->getTableName('sales/order')),
|
903 |
-
'`main_table`.`order_id`=`order`.`entity_id`',
|
904 |
-
array(
|
905 |
-
'shipping_method' => 'order.shipping_method',
|
906 |
-
)
|
907 |
-
);
|
908 |
-
|
909 |
-
$processedShipmentIds = $shipments->getColumnValues('shipment_id');
|
910 |
-
} else {
|
911 |
-
$shipments = Mage::getResourceModel('sales/order_shipment_collection')
|
912 |
-
->addFieldToFilter('main_table.entity_id', array('in' => $shipmentIds))
|
913 |
-
->addFieldToFilter(
|
914 |
-
'`order`.`shipping_method`',
|
915 |
-
array(
|
916 |
-
'regexp' => $postnlShippingMethodsRegex
|
917 |
-
)
|
918 |
-
);
|
919 |
-
|
920 |
-
$shipments->getSelect()->joinInner(
|
921 |
-
array('order' => $resource->getTableName('sales/order')),
|
922 |
-
'`main_table`.`order_id`=`order`.`entity_id`',
|
923 |
-
array(
|
924 |
-
'shipping_method' => 'order.shipping_method',
|
925 |
-
)
|
926 |
-
);
|
927 |
-
|
928 |
-
$processedShipmentIds = $shipments->getColumnValues('entity_id');
|
929 |
-
}
|
930 |
-
|
931 |
-
/**
|
932 |
-
* Check if all requested IDs were processed.
|
933 |
-
*/
|
934 |
-
$missingIds = array_diff($shipmentIds, $processedShipmentIds);
|
935 |
-
if (!$missingIds) {
|
936 |
-
return $shipments;
|
937 |
-
}
|
938 |
-
|
939 |
-
/**
|
940 |
-
* If any requested shipments were not found, it's because they were not shipped using PostNL.
|
941 |
-
*/
|
942 |
-
$adapter = Mage::getSingleton('core/resource')->getConnection('core_read');
|
943 |
-
foreach ($missingIds as $shipmentId) {
|
944 |
-
/**
|
945 |
-
* Get the shipment's increment ID. We need this, because many merchants do not know the difference between
|
946 |
-
* increment IDs and entity IDs.
|
947 |
-
*/
|
948 |
-
$bind = array(':entity_id' => $shipmentId);
|
949 |
-
$select = $adapter->select()
|
950 |
-
->from($resource->getTableName('sales/shipment'), array("increment_id"))
|
951 |
-
->where('entity_id = :entity_id');
|
952 |
-
|
953 |
-
$shipmentIncrementId = $adapter->fetchOne($select, $bind);
|
954 |
-
|
955 |
-
if ($throwException) {
|
956 |
-
throw new TIG_PostNL_Exception(
|
957 |
-
$this->__(
|
958 |
-
'This action is not available for shipment #%s, because it was not shipped using PostNL.',
|
959 |
-
$shipmentIncrementId
|
960 |
-
),
|
961 |
-
'POSTNL-0009'
|
962 |
-
);
|
963 |
-
}
|
964 |
-
|
965 |
-
$this->addWarning(
|
966 |
-
array(
|
967 |
-
'entity_id' => $shipmentIncrementId,
|
968 |
-
'code' => 'POSTNL-0009',
|
969 |
-
'description' => $this->__(
|
970 |
-
'This action is not available for shipment #%s, because it was not shipped using PostNL.',
|
971 |
-
$shipmentIncrementId
|
972 |
-
),
|
973 |
-
)
|
974 |
-
);
|
975 |
-
}
|
976 |
-
|
977 |
-
return $shipments;
|
978 |
-
}
|
979 |
-
|
980 |
-
/**
|
981 |
-
* Load an order collection based on an array of order IDs. Non-PostNL orders will be skipped.
|
982 |
-
*
|
983 |
-
* @param array|int $orderIds
|
984 |
-
*
|
985 |
-
* @return Mage_Sales_Model_Resource_Order_Collection
|
986 |
-
*/
|
987 |
-
protected function _loadOrders($orderIds)
|
988 |
-
{
|
989 |
-
if (!is_array($orderIds)) {
|
990 |
-
$orderIds = array($orderIds);
|
991 |
-
}
|
992 |
-
|
993 |
-
$postnlShippingMethods = Mage::helper('postnl/carrier')->getPostnlShippingMethods();
|
994 |
-
|
995 |
-
/**
|
996 |
-
* This regex will filter all non-postnl shipments.
|
997 |
-
*/
|
998 |
-
$postnlShippingMethodsRegex = '';
|
999 |
-
foreach ($postnlShippingMethods as $method) {
|
1000 |
-
if ($postnlShippingMethodsRegex) {
|
1001 |
-
$postnlShippingMethodsRegex .= '|';
|
1002 |
-
} else {
|
1003 |
-
$postnlShippingMethodsRegex .= '^';
|
1004 |
-
}
|
1005 |
-
|
1006 |
-
$postnlShippingMethodsRegex .= "({$method})(_{0,1}[0-9]*)";
|
1007 |
-
}
|
1008 |
-
|
1009 |
-
$postnlShippingMethodsRegex .= '$';
|
1010 |
-
|
1011 |
-
$orders = Mage::getResourceModel('sales/order_collection')
|
1012 |
-
->addFieldToFilter('entity_id', array('in' => $orderIds))
|
1013 |
-
->addFieldToFilter('shipping_method', array('regexp' => $postnlShippingMethodsRegex));
|
1014 |
-
|
1015 |
-
return $orders;
|
1016 |
}
|
1017 |
|
1018 |
/**
|
@@ -1025,36 +242,7 @@ class TIG_PostNL_Controller_Adminhtml_Shipment extends Mage_Adminhtml_Controller
|
|
1025 |
*/
|
1026 |
protected function _loadShipment($shipmentId, $loadPostnlShipments)
|
1027 |
{
|
1028 |
-
|
1029 |
-
/**
|
1030 |
-
* @var Mage_Sales_Model_Order_Shipment $shipment
|
1031 |
-
*/
|
1032 |
-
$shipment = Mage::getModel('sales/order_shipment')->load($shipmentId);
|
1033 |
-
if (!$shipment || !$shipment->getId()) {
|
1034 |
-
return false;
|
1035 |
-
}
|
1036 |
-
|
1037 |
-
$shippingMethod = $shipment->getOrder()->getShippingMethod();
|
1038 |
-
} else {
|
1039 |
-
/**
|
1040 |
-
* @var TIG_PostNL_Model_Core_Shipment $shipment
|
1041 |
-
*/
|
1042 |
-
$shipment = $this->_getPostnlShipment($shipmentId);
|
1043 |
-
if (!$shipment || !$shipment->getId()) {
|
1044 |
-
return false;
|
1045 |
-
}
|
1046 |
-
|
1047 |
-
$shippingMethod = $shipment->getShipment()->getOrder()->getShippingMethod();
|
1048 |
-
}
|
1049 |
-
|
1050 |
-
/**
|
1051 |
-
* Check if the shipping method used is allowed
|
1052 |
-
*/
|
1053 |
-
if (!Mage::helper('postnl/carrier')->isPostnlShippingMethod($shippingMethod)) {
|
1054 |
-
return false;
|
1055 |
-
}
|
1056 |
-
|
1057 |
-
return $shipment;
|
1058 |
}
|
1059 |
|
1060 |
/**
|
@@ -1097,7 +285,7 @@ class TIG_PostNL_Controller_Adminhtml_Shipment extends Mage_Adminhtml_Controller
|
|
1097 |
$this->_addWarningMessages($cifWarnings, $this->__('PostNL replied with the following warnings:'));
|
1098 |
}
|
1099 |
|
1100 |
-
$warnings = $this->getWarnings();
|
1101 |
|
1102 |
if (!empty($warnings)) {
|
1103 |
$this->_addWarningMessages(
|
@@ -1201,21 +389,4 @@ class TIG_PostNL_Controller_Adminhtml_Shipment extends Mage_Adminhtml_Controller
|
|
1201 |
|
1202 |
return $this;
|
1203 |
}
|
1204 |
-
|
1205 |
-
/**
|
1206 |
-
* Checks if the specified actions are allowed.
|
1207 |
-
*
|
1208 |
-
* @param array $actions
|
1209 |
-
*
|
1210 |
-
* @throws TIG_PostNL_Exception
|
1211 |
-
*
|
1212 |
-
* @return bool
|
1213 |
-
*/
|
1214 |
-
protected function _checkIsAllowed($actions = array())
|
1215 |
-
{
|
1216 |
-
$helper = Mage::helper('postnl');
|
1217 |
-
$isAllowed = $helper->checkIsPostnlActionAllowed($actions, false);
|
1218 |
-
|
1219 |
-
return $isAllowed;
|
1220 |
-
}
|
1221 |
}
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
+
class TIG_PostNL_Controller_Adminhtml_Shipment extends TIG_PostNL_Controller_Adminhtml_Abstract
|
40 |
{
|
41 |
/**
|
42 |
+
* @var TIG_PostNL_Model_Core_service_Shipment
|
43 |
*/
|
44 |
+
protected $_serviceModel;
|
45 |
|
46 |
/**
|
47 |
+
* @return TIG_PostNL_Model_Core_service_Shipment
|
48 |
*/
|
49 |
+
public function getServiceModel()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
{
|
51 |
+
$serviceModel = $this->_serviceModel;
|
52 |
+
if (!$serviceModel) {
|
53 |
+
$serviceModel = Mage::getModel('postnl_core/service_shipment');
|
54 |
+
$this->setServiceModel($serviceModel);
|
55 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
+
return $serviceModel;
|
58 |
}
|
59 |
|
60 |
/**
|
61 |
+
* @param TIG_PostNL_Model_Core_service_Shipment $serviceModel
|
62 |
*
|
63 |
* @return $this
|
64 |
*/
|
65 |
+
public function setServiceModel(TIG_PostNL_Model_Core_service_Shipment $serviceModel)
|
66 |
{
|
67 |
+
$this->_serviceModel = $serviceModel;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
|
|
|
69 |
return $this;
|
70 |
}
|
71 |
|
117 |
return $orderIds;
|
118 |
}
|
119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
/**
|
121 |
* Get the output of printing labels for an array of shipments.
|
122 |
*
|
128 |
*/
|
129 |
protected function _getMassLabelsOutput($shipments)
|
130 |
{
|
131 |
+
return $this->getServiceModel()->getMassLabelsOutput($shipments);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
}
|
133 |
|
134 |
/**
|
142 |
*/
|
143 |
protected function _getMassPackingSlipsOutput($shipments)
|
144 |
{
|
145 |
+
return $this->getServiceModel()->getMassPackingSlipsOutput($shipments);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
}
|
147 |
|
148 |
/**
|
154 |
*/
|
155 |
protected function _getReturnLabels($shipment)
|
156 |
{
|
157 |
+
return $this->getServiceModel()->getReturnLabels($shipment);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
}
|
159 |
|
160 |
/**
|
173 |
*/
|
174 |
protected function _getLabels($shipment, $confirm = false, $includeReturnLabels = null)
|
175 |
{
|
176 |
+
return $this->getServiceModel()->getLabels($shipment, $confirm, $includeReturnLabels);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
}
|
178 |
|
179 |
/**
|
187 |
*/
|
188 |
protected function _confirmShipment($shipment)
|
189 |
{
|
190 |
+
return $this->getServiceModel()->confirmShipment($shipment);
|
191 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
|
193 |
+
/**
|
194 |
+
* Gets the postnl shipment associated with a shipment
|
195 |
+
*
|
196 |
+
* @param int $shipmentId
|
197 |
+
*
|
198 |
+
* @return TIG_PostNL_Model_Core_Shipment
|
199 |
+
*/
|
200 |
+
protected function _getPostnlShipment($shipmentId)
|
201 |
+
{
|
202 |
+
return $this->getServiceModel()->getPostnlShipment($shipmentId);
|
203 |
}
|
204 |
|
205 |
/**
|
212 |
*/
|
213 |
protected function _updateShippingStatus(TIG_PostNL_Model_Core_Shipment $postnlShipment)
|
214 |
{
|
215 |
+
return $this->getServiceModel()->updateShippingStatus($postnlShipment);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
}
|
217 |
|
218 |
/**
|
229 |
*/
|
230 |
protected function _loadAndCheckShipments($shipmentIds, $loadPostnlShipments = false, $throwException = true)
|
231 |
{
|
232 |
+
return $this->getServiceModel()->loadAndCheckShipments($shipmentIds, $loadPostnlShipments, $throwException);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
}
|
234 |
|
235 |
/**
|
242 |
*/
|
243 |
protected function _loadShipment($shipmentId, $loadPostnlShipments)
|
244 |
{
|
245 |
+
return $this->getServiceModel()->loadShipment($shipmentId, $loadPostnlShipments);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
246 |
}
|
247 |
|
248 |
/**
|
285 |
$this->_addWarningMessages($cifWarnings, $this->__('PostNL replied with the following warnings:'));
|
286 |
}
|
287 |
|
288 |
+
$warnings = $this->getServiceModel()->getWarnings();
|
289 |
|
290 |
if (!empty($warnings)) {
|
291 |
$this->_addWarningMessages(
|
389 |
|
390 |
return $this;
|
391 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
392 |
}
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Controller_Sales extends Mage_Core_Controller_Front_Action
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Controller_Sales extends Mage_Core_Controller_Front_Action
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* General exception class for TIG_PostNL extension
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* General exception class for TIG_PostNL extension
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Helper_AddressValidation extends TIG_PostNL_Helper_Data
|
@@ -92,6 +92,16 @@ class TIG_PostNL_Helper_AddressValidation extends TIG_PostNL_Helper_Data
|
|
92 |
*/
|
93 |
const XPATH_COMMUNITY_STREET_LINES = 'customer/address/street_lines';
|
94 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
/**
|
96 |
* @var null|string|int
|
97 |
*/
|
@@ -296,6 +306,10 @@ class TIG_PostNL_Helper_AddressValidation extends TIG_PostNL_Helper_Data
|
|
296 |
}
|
297 |
|
298 |
$timeout = (int) Mage::getStoreConfig(self::XPATH_POSTCODE_CHECK_TIMEOUT, $storeId);
|
|
|
|
|
|
|
|
|
299 |
return $timeout;
|
300 |
}
|
301 |
|
@@ -375,6 +389,11 @@ class TIG_PostNL_Helper_AddressValidation extends TIG_PostNL_Helper_Data
|
|
375 |
$storeId = Mage::app()->getStore()->getId();
|
376 |
}
|
377 |
|
|
|
|
|
|
|
|
|
|
|
378 |
$isPostnlEnabled = $this->isEnabled($storeId);
|
379 |
if (!$isPostnlEnabled) {
|
380 |
return false;
|
@@ -404,6 +423,32 @@ class TIG_PostNL_Helper_AddressValidation extends TIG_PostNL_Helper_Data
|
|
404 |
|
405 |
return $environmentAllowed;
|
406 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
407 |
/**
|
408 |
* Get the configured line count for the current, or specified, config scope.
|
409 |
*
|
@@ -495,13 +540,13 @@ class TIG_PostNL_Helper_AddressValidation extends TIG_PostNL_Helper_Data
|
|
495 |
/**
|
496 |
* Logs a cendris request and response for debug purposes.
|
497 |
*
|
498 |
-
* @param
|
499 |
*
|
500 |
* @return TIG_PostNL_Helper_Webservices
|
501 |
*
|
502 |
* @see Mage::log()
|
503 |
*/
|
504 |
-
public function logCendrisCall(
|
505 |
{
|
506 |
if (!$this->isLoggingEnabled()) {
|
507 |
return $this;
|
@@ -509,8 +554,8 @@ class TIG_PostNL_Helper_AddressValidation extends TIG_PostNL_Helper_Data
|
|
509 |
|
510 |
$this->createLogDir();
|
511 |
|
512 |
-
$requestXml = $this->formatXml($client->
|
513 |
-
$responseXML = $this->formatXml($client->
|
514 |
|
515 |
$logMessage = 'Request sent:'
|
516 |
. PHP_EOL
|
@@ -530,7 +575,7 @@ class TIG_PostNL_Helper_AddressValidation extends TIG_PostNL_Helper_Data
|
|
530 |
* Logs a cendris exception in the database and/or a log file
|
531 |
*
|
532 |
* @param Mage_Core_Exception|TIG_PostNL_Exception|SoapFault $exception
|
533 |
-
* @param
|
534 |
*
|
535 |
* @return TIG_PostNL_Helper_Webservices
|
536 |
*
|
@@ -544,9 +589,9 @@ class TIG_PostNL_Helper_AddressValidation extends TIG_PostNL_Helper_Data
|
|
544 |
|
545 |
$logMessage = PHP_EOL . $exception->__toString();
|
546 |
|
547 |
-
if ($client && $client instanceof
|
548 |
-
$requestXml = $this->formatXml($client->
|
549 |
-
$responseXML = $this->formatXml($client->
|
550 |
|
551 |
$logMessage .= PHP_EOL
|
552 |
. 'Request sent:'
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Helper_AddressValidation extends TIG_PostNL_Helper_Data
|
92 |
*/
|
93 |
const XPATH_COMMUNITY_STREET_LINES = 'customer/address/street_lines';
|
94 |
|
95 |
+
/**
|
96 |
+
* Extension code of the PostcodeNL extension.
|
97 |
+
*/
|
98 |
+
const POSTCODE_NL_EXTENSION_CODE = 'PostcodeNl_Api';
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Xpath to the PostcodeNL extension's enabled field.
|
102 |
+
*/
|
103 |
+
const XPATH_POSTCODE_NL_EXTENSION_ACTIVE = 'postcodenl_api/config/enabled';
|
104 |
+
|
105 |
/**
|
106 |
* @var null|string|int
|
107 |
*/
|
306 |
}
|
307 |
|
308 |
$timeout = (int) Mage::getStoreConfig(self::XPATH_POSTCODE_CHECK_TIMEOUT, $storeId);
|
309 |
+
if ($timeout < 1) {
|
310 |
+
$timeout = 3600; // 1 hour
|
311 |
+
}
|
312 |
+
|
313 |
return $timeout;
|
314 |
}
|
315 |
|
389 |
$storeId = Mage::app()->getStore()->getId();
|
390 |
}
|
391 |
|
392 |
+
$postcodeNlExtensionActive = $this->checkPostcodeNlExtensionActive($storeId);
|
393 |
+
if (true === $postcodeNlExtensionActive) {
|
394 |
+
return false;
|
395 |
+
}
|
396 |
+
|
397 |
$isPostnlEnabled = $this->isEnabled($storeId);
|
398 |
if (!$isPostnlEnabled) {
|
399 |
return false;
|
423 |
|
424 |
return $environmentAllowed;
|
425 |
}
|
426 |
+
|
427 |
+
/**
|
428 |
+
* Check if the Postcode.NL extension is installed and active.
|
429 |
+
*
|
430 |
+
* @param int|null $storeId
|
431 |
+
*
|
432 |
+
* @return boolean
|
433 |
+
*/
|
434 |
+
public function checkPostcodeNlExtensionActive($storeId = null)
|
435 |
+
{
|
436 |
+
if (!Mage::helper('core')->isModuleEnabled(self::POSTCODE_NL_EXTENSION_CODE)) {
|
437 |
+
return false;
|
438 |
+
}
|
439 |
+
|
440 |
+
if ($storeId === null) {
|
441 |
+
$storeId = Mage::app()->getStore()->getId();
|
442 |
+
}
|
443 |
+
|
444 |
+
$extensionEnabled = Mage::getStoreConfigFlag(self::XPATH_POSTCODE_NL_EXTENSION_ACTIVE, $storeId);
|
445 |
+
if (true === $extensionEnabled) {
|
446 |
+
return true;
|
447 |
+
}
|
448 |
+
|
449 |
+
return false;
|
450 |
+
}
|
451 |
+
|
452 |
/**
|
453 |
* Get the configured line count for the current, or specified, config scope.
|
454 |
*
|
540 |
/**
|
541 |
* Logs a cendris request and response for debug purposes.
|
542 |
*
|
543 |
+
* @param Soap>__getLastRe $client
|
544 |
*
|
545 |
* @return TIG_PostNL_Helper_Webservices
|
546 |
*
|
547 |
* @see Mage::log()
|
548 |
*/
|
549 |
+
public function logCendrisCall(SoapClient $client)
|
550 |
{
|
551 |
if (!$this->isLoggingEnabled()) {
|
552 |
return $this;
|
554 |
|
555 |
$this->createLogDir();
|
556 |
|
557 |
+
$requestXml = $this->formatXml($client->__getLastRequest());
|
558 |
+
$responseXML = $this->formatXml($client->__getLastResponse());
|
559 |
|
560 |
$logMessage = 'Request sent:'
|
561 |
. PHP_EOL
|
575 |
* Logs a cendris exception in the database and/or a log file
|
576 |
*
|
577 |
* @param Mage_Core_Exception|TIG_PostNL_Exception|SoapFault $exception
|
578 |
+
* @param SoapClient|boolean $client
|
579 |
*
|
580 |
* @return TIG_PostNL_Helper_Webservices
|
581 |
*
|
589 |
|
590 |
$logMessage = PHP_EOL . $exception->__toString();
|
591 |
|
592 |
+
if ($client && $client instanceof SoapClient) {
|
593 |
+
$requestXml = $this->formatXml($client->__getLastRequest());
|
594 |
+
$responseXML = $this->formatXml($client->__getLastResponse());
|
595 |
|
596 |
$logMessage .= PHP_EOL
|
597 |
. 'Request sent:'
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ___________ __ __
|
4 |
+
* \__ ___/____ _/ |_ _____ | |
|
5 |
+
* | | / _ \\ __\\__ \ | |
|
6 |
+
* | | | |_| || | / __ \_| |__
|
7 |
+
* |____| \____/ |__| (____ /|____/
|
8 |
+
* \/
|
9 |
+
* ___ __ __
|
10 |
+
* | | ____ _/ |_ ____ _______ ____ ____ _/ |_
|
11 |
+
* | | / \\ __\_/ __ \\_ __ \ / \ _/ __ \\ __\
|
12 |
+
* | || | \| | \ ___/ | | \/| | \\ ___/ | |
|
13 |
+
* |___||___| /|__| \_____>|__| |___| / \_____>|__|
|
14 |
+
* \/ \/
|
15 |
+
* ________
|
16 |
+
* / _____/_______ ____ __ __ ______
|
17 |
+
* / \ ___\_ __ \ / _ \ | | \\____ \
|
18 |
+
* \ \_\ \| | \/| |_| || | /| |_| |
|
19 |
+
* \______ /|__| \____/ |____/ | __/
|
20 |
+
* \/ |__|
|
21 |
+
*
|
22 |
+
* NOTICE OF LICENSE
|
23 |
+
*
|
24 |
+
* This source file is subject to the Creative Commons License.
|
25 |
+
* It is available through the world-wide-web at this URL:
|
26 |
+
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
27 |
+
* If you are unable to obtain it through the world-wide-web, please send an email
|
28 |
+
* to servicedesk@tig.nl so we can send you a copy immediately.
|
29 |
+
*
|
30 |
+
* DISCLAIMER
|
31 |
+
*
|
32 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
33 |
+
* versions in the future. If you wish to customize this module for your
|
34 |
+
* needs please contact servicedesk@tig.nl for more information.
|
35 |
+
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
+
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
+
*/
|
39 |
+
class TIG_PostNL_Helper_Adminhtml extends TIG_PostNL_Helper_Data
|
40 |
+
{
|
41 |
+
/**
|
42 |
+
* Gets the hidden notifications for the current admin user.
|
43 |
+
*
|
44 |
+
* @return array
|
45 |
+
*/
|
46 |
+
public function getHiddenNotifications()
|
47 |
+
{
|
48 |
+
if (!$this->isAdmin()) {
|
49 |
+
return array();
|
50 |
+
}
|
51 |
+
|
52 |
+
/** @var Mage_Admin_Model_User $adminUser */
|
53 |
+
$adminUser = Mage::getSingleton('admin/session')->getUser();
|
54 |
+
if (!$adminUser) {
|
55 |
+
return array();
|
56 |
+
}
|
57 |
+
|
58 |
+
$extra = $adminUser->getExtra();
|
59 |
+
if (empty($extra['postnl']['hidden_notification'])) {
|
60 |
+
return array();
|
61 |
+
}
|
62 |
+
|
63 |
+
return $extra['postnl']['hidden_notification'];
|
64 |
+
}
|
65 |
+
}
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Helper_Carrier extends TIG_PostNL_Helper_Data
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Helper_Carrier extends TIG_PostNL_Helper_Data
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Helper_Checkout extends TIG_PostNL_Helper_Data
|
@@ -287,7 +287,7 @@ class TIG_PostNL_Helper_Checkout extends TIG_PostNL_Helper_Data
|
|
287 |
$errors = array(
|
288 |
array(
|
289 |
'code' => 'POSTNL-0102',
|
290 |
-
'message' => $this->__('One or more items in the cart are out of stock.'),
|
291 |
)
|
292 |
);
|
293 |
Mage::register('postnl_checkout_is_enabled_errors', $errors);
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Helper_Checkout extends TIG_PostNL_Helper_Data
|
287 |
$errors = array(
|
288 |
array(
|
289 |
'code' => 'POSTNL-0102',
|
290 |
+
'message' => $this->__('One or more items in the cart are backordered or out of stock.'),
|
291 |
)
|
292 |
);
|
293 |
Mage::register('postnl_checkout_is_enabled_errors', $errors);
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
@@ -118,6 +118,7 @@ class TIG_PostNL_Helper_Cif extends TIG_PostNL_Helper_Data
|
|
118 |
'CZ',
|
119 |
'SE',
|
120 |
'GR',
|
|
|
121 |
);
|
122 |
|
123 |
/**
|
@@ -547,7 +548,7 @@ class TIG_PostNL_Helper_Cif extends TIG_PostNL_Helper_Data
|
|
547 |
*
|
548 |
* @return boolean
|
549 |
*
|
550 |
-
* @see TIG_PostNL_Model_Core_Shipment
|
551 |
*/
|
552 |
public function isPakjeGemakShipment($shipment)
|
553 |
{
|
@@ -572,7 +573,7 @@ class TIG_PostNL_Helper_Cif extends TIG_PostNL_Helper_Data
|
|
572 |
*
|
573 |
* @return boolean
|
574 |
*
|
575 |
-
* @see TIG_PostNL_Model_Core_Shipment
|
576 |
*/
|
577 |
public function isPakketautomaatShipment($shipment)
|
578 |
{
|
@@ -591,13 +592,38 @@ class TIG_PostNL_Helper_Cif extends TIG_PostNL_Helper_Data
|
|
591 |
}
|
592 |
|
593 |
/**
|
594 |
-
* Check if a given shipment is
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
595 |
*
|
596 |
* @param TIG_PostNL_Model_Core_Shipment | Mage_Sales_Model_Order_Shipment $shipment
|
597 |
*
|
598 |
* @return boolean
|
599 |
*
|
600 |
-
* @see TIG_PostNL_Model_Core_Shipment
|
601 |
*/
|
602 |
public function isDutchShipment($shipment)
|
603 |
{
|
@@ -622,7 +648,7 @@ class TIG_PostNL_Helper_Cif extends TIG_PostNL_Helper_Data
|
|
622 |
*
|
623 |
* @return boolean
|
624 |
*
|
625 |
-
* @see TIG_PostNL_Model_Core_Shipment
|
626 |
*/
|
627 |
public function isEuShipment($shipment)
|
628 |
{
|
@@ -647,7 +673,7 @@ class TIG_PostNL_Helper_Cif extends TIG_PostNL_Helper_Data
|
|
647 |
*
|
648 |
* @return boolean
|
649 |
*
|
650 |
-
* @see TIG_PostNL_Model_Core_Shipment
|
651 |
*/
|
652 |
public function isGlobalShipment($shipment)
|
653 |
{
|
@@ -672,7 +698,7 @@ class TIG_PostNL_Helper_Cif extends TIG_PostNL_Helper_Data
|
|
672 |
*
|
673 |
* @return boolean
|
674 |
*
|
675 |
-
* @see TIG_PostNL_Model_Core_Shipment
|
676 |
*/
|
677 |
public function isCodShipment($shipment)
|
678 |
{
|
@@ -1197,21 +1223,21 @@ class TIG_PostNL_Helper_Cif extends TIG_PostNL_Helper_Data
|
|
1197 |
*
|
1198 |
* N.B.: if file logging is enabled, the log will be forced
|
1199 |
*
|
1200 |
-
* @param
|
1201 |
*
|
1202 |
* @return $this
|
1203 |
*
|
1204 |
* @see Mage::log()
|
1205 |
*
|
1206 |
*/
|
1207 |
-
public function logCifCall($client)
|
1208 |
{
|
1209 |
if (!$this->isLoggingEnabled()) {
|
1210 |
return $this;
|
1211 |
}
|
1212 |
|
1213 |
-
$requestXml = $this->formatXml($client->
|
1214 |
-
$responseXML = $this->formatXml($client->
|
1215 |
|
1216 |
$logMessage = "<<< REQUEST SENT >>>"
|
1217 |
. PHP_EOL
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
118 |
'CZ',
|
119 |
'SE',
|
120 |
'GR',
|
121 |
+
'MT',
|
122 |
);
|
123 |
|
124 |
/**
|
548 |
*
|
549 |
* @return boolean
|
550 |
*
|
551 |
+
* @see TIG_PostNL_Model_Core_Shipment::isPakjeGemakShipment();
|
552 |
*/
|
553 |
public function isPakjeGemakShipment($shipment)
|
554 |
{
|
573 |
*
|
574 |
* @return boolean
|
575 |
*
|
576 |
+
* @see TIG_PostNL_Model_Core_Shipment::isPakketautomaatShipment();
|
577 |
*/
|
578 |
public function isPakketautomaatShipment($shipment)
|
579 |
{
|
592 |
}
|
593 |
|
594 |
/**
|
595 |
+
* Check if a given shipment is an evening delivery (avond) shipment.
|
596 |
+
*
|
597 |
+
* @param TIG_PostNL_Model_Core_Shipment|Mage_Sales_Model_Order_Shipment $shipment
|
598 |
+
*
|
599 |
+
* @return boolean
|
600 |
+
*
|
601 |
+
* @see TIG_PostNL_Model_Core_Shipment::isAvondShipment();
|
602 |
+
*/
|
603 |
+
public function isAvondShipment($shipment)
|
604 |
+
{
|
605 |
+
$postnlShipmentClass = Mage::getConfig()->getModelClassName('postnl_core/shipment');
|
606 |
+
if ($shipment instanceof $postnlShipmentClass) {
|
607 |
+
/**
|
608 |
+
* @var TIG_PostNL_Model_Core_Shipment $shipment
|
609 |
+
*/
|
610 |
+
return $shipment->isAvondShipment();
|
611 |
+
}
|
612 |
+
|
613 |
+
$tempPostnlShipment = Mage::getModel('postnl_core/shipment');
|
614 |
+
$tempPostnlShipment->setShipment($shipment);
|
615 |
+
|
616 |
+
return $tempPostnlShipment->isAvondShipment();
|
617 |
+
}
|
618 |
+
|
619 |
+
/**
|
620 |
+
* Check if a given shipment is dutch.
|
621 |
*
|
622 |
* @param TIG_PostNL_Model_Core_Shipment | Mage_Sales_Model_Order_Shipment $shipment
|
623 |
*
|
624 |
* @return boolean
|
625 |
*
|
626 |
+
* @see TIG_PostNL_Model_Core_Shipment::isDutchShipment();
|
627 |
*/
|
628 |
public function isDutchShipment($shipment)
|
629 |
{
|
648 |
*
|
649 |
* @return boolean
|
650 |
*
|
651 |
+
* @see TIG_PostNL_Model_Core_Shipment::isEuShipment();
|
652 |
*/
|
653 |
public function isEuShipment($shipment)
|
654 |
{
|
673 |
*
|
674 |
* @return boolean
|
675 |
*
|
676 |
+
* @see TIG_PostNL_Model_Core_Shipment::isGlobalShipment();
|
677 |
*/
|
678 |
public function isGlobalShipment($shipment)
|
679 |
{
|
698 |
*
|
699 |
* @return boolean
|
700 |
*
|
701 |
+
* @see TIG_PostNL_Model_Core_Shipment::isCod();
|
702 |
*/
|
703 |
public function isCodShipment($shipment)
|
704 |
{
|
1223 |
*
|
1224 |
* N.B.: if file logging is enabled, the log will be forced
|
1225 |
*
|
1226 |
+
* @param SoapClient $client
|
1227 |
*
|
1228 |
* @return $this
|
1229 |
*
|
1230 |
* @see Mage::log()
|
1231 |
*
|
1232 |
*/
|
1233 |
+
public function logCifCall(SoapClient $client)
|
1234 |
{
|
1235 |
if (!$this->isLoggingEnabled()) {
|
1236 |
return $this;
|
1237 |
}
|
1238 |
|
1239 |
+
$requestXml = $this->formatXml($client->__getLastRequest());
|
1240 |
+
$responseXML = $this->formatXml($client->__getLastResponse());
|
1241 |
|
1242 |
$logMessage = "<<< REQUEST SENT >>>"
|
1243 |
. PHP_EOL
|
@@ -259,7 +259,7 @@ class TIG_PostNL_Helper_Data extends Mage_Core_Helper_Abstract
|
|
259 |
/**
|
260 |
* @var string[]
|
261 |
*/
|
262 |
-
protected $_storeTimeZones
|
263 |
|
264 |
/**
|
265 |
* Get required fields array.
|
@@ -432,6 +432,26 @@ class TIG_PostNL_Helper_Data extends Mage_Core_Helper_Abstract
|
|
432 |
*/
|
433 |
public function getStoreTimeZones()
|
434 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
435 |
return $this->_storeTimeZones;
|
436 |
}
|
437 |
|
@@ -2503,7 +2523,7 @@ class TIG_PostNL_Helper_Data extends Mage_Core_Helper_Abstract
|
|
2503 |
$errorMessage .= ' <a href="'
|
2504 |
. $link
|
2505 |
. '" target="_blank" class="postnl-message">'
|
2506 |
-
. $this->__('Click here for more information from the
|
2507 |
. '</a>';
|
2508 |
}
|
2509 |
|
@@ -2535,4 +2555,16 @@ class TIG_PostNL_Helper_Data extends Mage_Core_Helper_Abstract
|
|
2535 |
|
2536 |
return false;
|
2537 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2538 |
}
|
259 |
/**
|
260 |
* @var string[]
|
261 |
*/
|
262 |
+
protected $_storeTimeZones;
|
263 |
|
264 |
/**
|
265 |
* Get required fields array.
|
432 |
*/
|
433 |
public function getStoreTimeZones()
|
434 |
{
|
435 |
+
/**
|
436 |
+
* Get the stored store time zones.
|
437 |
+
*/
|
438 |
+
$storeTimeZones = $this->_storeTimeZones;
|
439 |
+
|
440 |
+
/**
|
441 |
+
* If no store time zones are stored, try to get them from the PostNL cache.
|
442 |
+
*/
|
443 |
+
if (is_null($storeTimeZones) && $this->getCache()) {
|
444 |
+
$storeTimeZones = $this->getCache()->getStoreTimeZones();
|
445 |
+
|
446 |
+
if (is_array($storeTimeZones)) {
|
447 |
+
$this->_storeTimeZones = $storeTimeZones;
|
448 |
+
} else {
|
449 |
+
$this->_storeTimeZones = array();
|
450 |
+
}
|
451 |
+
} elseif (is_null($storeTimeZones)) {
|
452 |
+
$this->_storeTimeZones = array();
|
453 |
+
}
|
454 |
+
|
455 |
return $this->_storeTimeZones;
|
456 |
}
|
457 |
|
2523 |
$errorMessage .= ' <a href="'
|
2524 |
. $link
|
2525 |
. '" target="_blank" class="postnl-message">'
|
2526 |
+
. $this->__('Click here for more information from the TIG knowledgebase.')
|
2527 |
. '</a>';
|
2528 |
}
|
2529 |
|
2555 |
|
2556 |
return false;
|
2557 |
}
|
2558 |
+
|
2559 |
+
/**
|
2560 |
+
* Save the stored time zones to the PostNl cache.
|
2561 |
+
*/
|
2562 |
+
public function __destruct()
|
2563 |
+
{
|
2564 |
+
if ($this->getStoreTimeZones() && $this->getCache()) {
|
2565 |
+
$this->getCache()
|
2566 |
+
->setStoreTimeZones($this->getStoreTimeZones())
|
2567 |
+
->saveCache();
|
2568 |
+
}
|
2569 |
+
}
|
2570 |
}
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @todo Cache the available delivery options in the checkout session. That way we only recalculate them if the quote
|
@@ -59,7 +59,7 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
59 |
/**
|
60 |
* Xpaths to various business rule settings.
|
61 |
*/
|
62 |
-
const
|
63 |
const XPATH_ALLOW_SUNDAY_SORTING = 'postnl/cif_labels_and_confirming/allow_sunday_sorting';
|
64 |
const XPATH_SHOW_OPTIONS_FOR_BUSPAKJE = 'postnl/delivery_options/show_options_for_buspakje';
|
65 |
const XPATH_SHOW_ALL_OPTIONS_FOR_BUSPAKJE = 'postnl/delivery_options/show_all_options_for_buspakje';
|
@@ -119,6 +119,105 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
119 |
'PA',
|
120 |
);
|
121 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
/**
|
123 |
* @return array
|
124 |
*/
|
@@ -257,6 +356,7 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
257 |
}
|
258 |
|
259 |
$pakjeGemakShippingRate = $pakjeGemakShippingRates->getCheapestRate();
|
|
|
260 |
$pakjeGemakShippingRate = $pakjeGemakShippingRate->getPrice();
|
261 |
|
262 |
$difference = $pakjeGemakShippingRate - $currentRate;
|
@@ -390,6 +490,8 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
390 |
* @param boolean $asVarienObject
|
391 |
*
|
392 |
* @return array|Varien_Object|false
|
|
|
|
|
393 |
*/
|
394 |
public function getDeliveryOptionsInfo(Mage_Core_Model_Abstract $entity, $asVarienObject = true)
|
395 |
{
|
@@ -483,14 +585,15 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
483 |
* Get the time zone used by the store in which the order was placed.
|
484 |
*/
|
485 |
$storeTimezone = $this->getStoreTimeZone($postnlOrder->getStoreId(), true);
|
|
|
486 |
|
487 |
/**
|
488 |
* If the customer chose a specific delivery time, add that to the array.
|
489 |
*/
|
490 |
if ($postnlOrder->hasExpectedDeliveryTimeStart()) {
|
491 |
-
$startTime = new DateTime($postnlOrder->getExpectedDeliveryTimeStart());
|
492 |
|
493 |
-
$storeStartTime = new DateTime($postnlOrder->getExpectedDeliveryTimeStart());
|
494 |
$storeStartTime->setTimezone($storeTimezone);
|
495 |
|
496 |
$deliveryOptionsInfo['delivery_time_start'] = $startTime->format('H:i');
|
@@ -501,9 +604,9 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
501 |
* In the case of PakjeGemak shipments there is only a start time and no end time.
|
502 |
*/
|
503 |
if ($postnlOrder->hasExpectedDeliveryTimeEnd()) {
|
504 |
-
$endTime = new DateTime($postnlOrder->getExpectedDeliveryTimeEnd());
|
505 |
|
506 |
-
$storeEndTime = new DateTime($postnlOrder->getExpectedDeliveryTimeEnd());
|
507 |
$storeEndTime->setTimezone($storeTimezone);
|
508 |
|
509 |
$deliveryOptionsInfo['delivery_time_end'] = $endTime->format('H:i');
|
@@ -560,7 +663,7 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
560 |
* Add the delivery date.
|
561 |
*/
|
562 |
if ($deliveryDate) {
|
563 |
-
$deliveryDate = new DateTime($deliveryDate);
|
564 |
|
565 |
$deliveryOptionsInfo['delivery_date'] = $deliveryDate->format('Y-m-d H:i:s');
|
566 |
$deliveryOptionsInfo['store_delivery_date'] = $deliveryDate->setTimezone($storeTimezone)
|
@@ -571,7 +674,7 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
571 |
* Add the confirm date.
|
572 |
*/
|
573 |
if ($confirmDate) {
|
574 |
-
$confirmDate = new DateTime($confirmDate);
|
575 |
|
576 |
$deliveryOptionsInfo['confirm_date'] = $confirmDate->format('Y-m-d H:i:s');
|
577 |
$deliveryOptionsInfo['store_confirm_date'] = $confirmDate->setTimezone($storeTimezone)
|
@@ -660,12 +763,14 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
660 |
*/
|
661 |
public function isPastCutOffTime($orderDate = null, $storeId = null)
|
662 |
{
|
|
|
|
|
663 |
if (!$orderDate) {
|
664 |
-
$orderDate = new DateTime(Mage::
|
665 |
}
|
666 |
|
667 |
if (is_string($orderDate)) {
|
668 |
-
$orderDate = new DateTime($orderDate);
|
669 |
}
|
670 |
|
671 |
if ($storeId === null) {
|
@@ -680,10 +785,14 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
680 |
/**
|
681 |
* Create a DateTime object for the order date with the cut off time for comparison.
|
682 |
*/
|
683 |
-
$
|
684 |
|
685 |
-
|
686 |
-
|
|
|
|
|
|
|
|
|
687 |
->setTimezone($utcTimeZone);
|
688 |
|
689 |
/**
|
@@ -716,7 +825,7 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
716 |
public function getCutOffTime($storeId = null, $checkForSunday = true, $orderDate = null)
|
717 |
{
|
718 |
if ($checkForSunday && !$orderDate) {
|
719 |
-
$orderDate = new DateTime(Mage::
|
720 |
}
|
721 |
|
722 |
if ($storeId === null) {
|
@@ -724,7 +833,7 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
724 |
}
|
725 |
|
726 |
if (is_string($orderDate)) {
|
727 |
-
$orderDate = new DateTime($orderDate);
|
728 |
}
|
729 |
|
730 |
/**
|
@@ -754,11 +863,12 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
754 |
* @param boolean $asDateTime
|
755 |
* @param boolean $withTime
|
756 |
* @param int|boolean $shippingDuration
|
|
|
757 |
*
|
758 |
* @return string|int|DateTime
|
759 |
*/
|
760 |
public function getDeliveryDate($orderDate = null, $storeId = null, $asDays = false, $asDateTime = false,
|
761 |
-
$withTime = true, $shippingDuration = false
|
762 |
) {
|
763 |
if (!$orderDate) {
|
764 |
$orderDate = new DateTime(
|
@@ -772,7 +882,12 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
772 |
}
|
773 |
|
774 |
if (is_string($orderDate)) {
|
775 |
-
|
|
|
|
|
|
|
|
|
|
|
776 |
}
|
777 |
|
778 |
if (false === $shippingDuration) {
|
@@ -785,6 +900,15 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
785 |
$deliveryTime = clone $orderDate;
|
786 |
$deliveryTime->add(new DateInterval("P{$shippingDuration}D"));
|
787 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
788 |
/**
|
789 |
* Get the delivery day (1-7).
|
790 |
*/
|
@@ -808,17 +932,6 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
808 |
$shippingDuration++;
|
809 |
}
|
810 |
|
811 |
-
/**
|
812 |
-
* Check if the order time is greater than the cut-off time. We need to take yesterday as the requested date as
|
813 |
-
* the cut-off time is based on the confirm date and not the delivery date.
|
814 |
-
*/
|
815 |
-
$confirmDate = clone $deliveryTime;
|
816 |
-
$confirmDate->sub(new DateInterval('P1D'));
|
817 |
-
if ($this->isPastCutOffTime($confirmDate, $storeId)) {
|
818 |
-
$deliveryTime->add(new DateInterval('P1D'));
|
819 |
-
$shippingDuration++;
|
820 |
-
}
|
821 |
-
|
822 |
if ($asDays) {
|
823 |
return $shippingDuration;
|
824 |
}
|
@@ -844,7 +957,7 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
844 |
public function getValidDeliveryDate($deliveryDate)
|
845 |
{
|
846 |
if (is_string($deliveryDate)) {
|
847 |
-
$deliveryDate = new DateTime($deliveryDate);
|
848 |
}
|
849 |
|
850 |
if (!($deliveryDate instanceof DateTime)) {
|
@@ -853,6 +966,14 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
853 |
|
854 |
$deliveryDay = $deliveryDate->format('N');
|
855 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
856 |
/**
|
857 |
* Get the configured shipping days.
|
858 |
*/
|
@@ -927,11 +1048,12 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
927 |
$availableDeliveryDay = $availableShippingDay + 1;
|
928 |
|
929 |
/**
|
930 |
-
* Sunday is not available as a delivery day. If sunday sorting is not allowed,
|
|
|
931 |
*/
|
932 |
if ($this->canUseSundaySorting()
|
933 |
&& ($availableDeliveryDay < 1
|
934 |
-
|| $availableDeliveryDay >
|
935 |
)
|
936 |
) {
|
937 |
$availableDeliveryDay = 1;
|
@@ -942,7 +1064,9 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
942 |
/**
|
943 |
* Convert the delivery day of the week to the actual date.
|
944 |
*/
|
945 |
-
$availableDeliveryDate = $deliveryDate->modify(
|
|
|
|
|
946 |
return $availableDeliveryDate;
|
947 |
}
|
948 |
|
@@ -954,11 +1078,11 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
954 |
$availableDeliveryDay = $shippingDays[0] + 1;
|
955 |
|
956 |
/**
|
957 |
-
* Sunday is not available as a delivery day. If sunday sorting is not allowed,
|
958 |
*/
|
959 |
if ($this->canUseSundaySorting()
|
960 |
&& ($availableDeliveryDay < 1
|
961 |
-
|| $availableDeliveryDay >
|
962 |
)
|
963 |
) {
|
964 |
$availableDeliveryDay = 1;
|
@@ -969,7 +1093,9 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
969 |
/**
|
970 |
* Convert the delivery day of the week to the actual date.
|
971 |
*/
|
972 |
-
$availableDeliveryDate = $deliveryDate->modify(
|
|
|
|
|
973 |
return $availableDeliveryDate;
|
974 |
}
|
975 |
|
@@ -1017,14 +1143,14 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
1017 |
$shippingDay = (int) $shippingDate->format('N');
|
1018 |
|
1019 |
/**
|
1020 |
-
* Check
|
1021 |
* saturday if saturdays are allowed.
|
1022 |
*/
|
1023 |
if (!in_array($shippingDay, $shippingDays)
|
1024 |
&& $shippingDay == 1
|
1025 |
&& in_array(6, $shippingDays)
|
1026 |
) {
|
1027 |
-
$date->modify('last saturday');
|
1028 |
}
|
1029 |
|
1030 |
$date->setTimezone($timeZone);
|
@@ -1353,7 +1479,7 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
1353 |
*
|
1354 |
* date('l') returns the full textual representation of the day of the week (Sunday through Saturday).
|
1355 |
*/
|
1356 |
-
$deliveryDate = new DateTime($deliveryDate);
|
1357 |
$weekDay = $deliveryDate->format('l');
|
1358 |
|
1359 |
foreach ($locations as &$location) {
|
@@ -1800,7 +1926,7 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
1800 |
$item->getStoreId()
|
1801 |
);
|
1802 |
|
1803 |
-
if ($pakketautomaatAllowed
|
1804 |
Mage::register($registryKey, false);
|
1805 |
return false;
|
1806 |
}
|
@@ -1952,7 +2078,7 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
1952 |
$item->getStoreId()
|
1953 |
);
|
1954 |
|
1955 |
-
if ($deliveryDaysAllowed
|
1956 |
Mage::register($registryKey, false);
|
1957 |
return false;
|
1958 |
}
|
@@ -2083,7 +2209,7 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
2083 |
$item->getStoreId()
|
2084 |
);
|
2085 |
|
2086 |
-
if ($timeframesAllowed
|
2087 |
Mage::register($registryKey, false);
|
2088 |
return false;
|
2089 |
}
|
@@ -2227,6 +2353,7 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
2227 |
return Mage::registry($registryKey);
|
2228 |
}
|
2229 |
|
|
|
2230 |
Mage::unregister('postnl_delivery_options_can_use_delivery_options_errors');
|
2231 |
|
2232 |
$deliveryOptionsEnabled = $this->isDeliveryOptionsEnabled();
|
@@ -2322,25 +2449,21 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
2322 |
return false;
|
2323 |
}
|
2324 |
|
2325 |
-
$storeId = $quote->getStoreId();
|
2326 |
-
|
2327 |
/**
|
2328 |
-
* Check if
|
2329 |
-
* such products.
|
2330 |
*/
|
2331 |
-
|
2332 |
-
|
2333 |
-
|
2334 |
-
|
2335 |
-
|
2336 |
-
|
2337 |
-
|
2338 |
-
|
2339 |
-
|
2340 |
-
|
2341 |
-
|
2342 |
-
|
2343 |
-
}
|
2344 |
}
|
2345 |
|
2346 |
/**
|
@@ -2356,7 +2479,7 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
2356 |
$item->getStoreId()
|
2357 |
);
|
2358 |
|
2359 |
-
if ($allowDeliveryOptions
|
2360 |
$errors = array(
|
2361 |
array(
|
2362 |
'code' => 'POSTNL-0161',
|
@@ -2371,6 +2494,151 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
2371 |
return true;
|
2372 |
}
|
2373 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2374 |
/**
|
2375 |
* Checks if the delivery options may be used for the currently chosen shipping destination.
|
2376 |
*
|
@@ -2928,4 +3196,65 @@ class TIG_PostNL_Helper_DeliveryOptions extends TIG_PostNL_Helper_Checkout
|
|
2928 |
|
2929 |
return $isActive;
|
2930 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2931 |
}
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @todo Cache the available delivery options in the checkout session. That way we only recalculate them if the quote
|
59 |
/**
|
60 |
* Xpaths to various business rule settings.
|
61 |
*/
|
62 |
+
const XPATH_STOCK_OPTIONS = 'postnl/delivery_options/stock_options';
|
63 |
const XPATH_ALLOW_SUNDAY_SORTING = 'postnl/cif_labels_and_confirming/allow_sunday_sorting';
|
64 |
const XPATH_SHOW_OPTIONS_FOR_BUSPAKJE = 'postnl/delivery_options/show_options_for_buspakje';
|
65 |
const XPATH_SHOW_ALL_OPTIONS_FOR_BUSPAKJE = 'postnl/delivery_options/show_all_options_for_buspakje';
|
119 |
'PA',
|
120 |
);
|
121 |
|
122 |
+
/**
|
123 |
+
* @var null
|
124 |
+
*/
|
125 |
+
protected $_configManageStock = null;
|
126 |
+
|
127 |
+
/**
|
128 |
+
* @var null
|
129 |
+
*/
|
130 |
+
protected $_configBackorders = null;
|
131 |
+
|
132 |
+
/**
|
133 |
+
* @var null
|
134 |
+
*/
|
135 |
+
protected $_configMinQty = null;
|
136 |
+
|
137 |
+
/**
|
138 |
+
* @return int
|
139 |
+
*/
|
140 |
+
public function getConfigBackorders()
|
141 |
+
{
|
142 |
+
$configBackorders = $this->_configBackorders;
|
143 |
+
|
144 |
+
if (is_null($configBackorders)) {
|
145 |
+
$configBackorders = Mage::getStoreConfig(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_BACKORDERS);
|
146 |
+
|
147 |
+
$this->setConfigBackorders($configBackorders);
|
148 |
+
}
|
149 |
+
|
150 |
+
return $configBackorders;
|
151 |
+
}
|
152 |
+
|
153 |
+
/**
|
154 |
+
* @param int $configBackorders
|
155 |
+
*
|
156 |
+
* @return $this
|
157 |
+
*/
|
158 |
+
public function setConfigBackorders($configBackorders)
|
159 |
+
{
|
160 |
+
$this->_configBackorders = $configBackorders;
|
161 |
+
|
162 |
+
return $this;
|
163 |
+
}
|
164 |
+
|
165 |
+
/**
|
166 |
+
* @return bool
|
167 |
+
*/
|
168 |
+
public function getConfigManageStock()
|
169 |
+
{
|
170 |
+
$configManageStock = $this->_configManageStock;
|
171 |
+
|
172 |
+
if (is_null($configManageStock)) {
|
173 |
+
$configManageStock = Mage::getStoreConfig(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_MANAGE_STOCK);
|
174 |
+
|
175 |
+
$this->setConfigManageStock($configManageStock);
|
176 |
+
}
|
177 |
+
|
178 |
+
return $configManageStock;
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* @param bool $configManageStock
|
183 |
+
*
|
184 |
+
* @return $this
|
185 |
+
*/
|
186 |
+
public function setConfigManageStock($configManageStock)
|
187 |
+
{
|
188 |
+
$this->_configManageStock = $configManageStock;
|
189 |
+
|
190 |
+
return $this;
|
191 |
+
}
|
192 |
+
|
193 |
+
/**
|
194 |
+
* @return int
|
195 |
+
*/
|
196 |
+
public function getConfigMinQty()
|
197 |
+
{
|
198 |
+
$configMinQty = $this->_configManageStock;
|
199 |
+
|
200 |
+
if (is_null($configMinQty)) {
|
201 |
+
$configMinQty = Mage::getStoreConfig(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_MIN_QTY);
|
202 |
+
|
203 |
+
$this->setConfigMinQty($configMinQty);
|
204 |
+
}
|
205 |
+
|
206 |
+
return $configMinQty;
|
207 |
+
}
|
208 |
+
|
209 |
+
/**
|
210 |
+
* @param int $configMinQty
|
211 |
+
*
|
212 |
+
* @return $this
|
213 |
+
*/
|
214 |
+
public function setConfigMinQty($configMinQty)
|
215 |
+
{
|
216 |
+
$this->_configMinQty = $configMinQty;
|
217 |
+
|
218 |
+
return $this;
|
219 |
+
}
|
220 |
+
|
221 |
/**
|
222 |
* @return array
|
223 |
*/
|
356 |
}
|
357 |
|
358 |
$pakjeGemakShippingRate = $pakjeGemakShippingRates->getCheapestRate();
|
359 |
+
/** @noinspection PhpUndefinedMethodInspection */
|
360 |
$pakjeGemakShippingRate = $pakjeGemakShippingRate->getPrice();
|
361 |
|
362 |
$difference = $pakjeGemakShippingRate - $currentRate;
|
490 |
* @param boolean $asVarienObject
|
491 |
*
|
492 |
* @return array|Varien_Object|false
|
493 |
+
*
|
494 |
+
* @todo refactor to reduce cyclomatic complexity
|
495 |
*/
|
496 |
public function getDeliveryOptionsInfo(Mage_Core_Model_Abstract $entity, $asVarienObject = true)
|
497 |
{
|
585 |
* Get the time zone used by the store in which the order was placed.
|
586 |
*/
|
587 |
$storeTimezone = $this->getStoreTimeZone($postnlOrder->getStoreId(), true);
|
588 |
+
$utcTimeZone = new DateTimeZone('UTC');
|
589 |
|
590 |
/**
|
591 |
* If the customer chose a specific delivery time, add that to the array.
|
592 |
*/
|
593 |
if ($postnlOrder->hasExpectedDeliveryTimeStart()) {
|
594 |
+
$startTime = new DateTime($postnlOrder->getExpectedDeliveryTimeStart(), $utcTimeZone);
|
595 |
|
596 |
+
$storeStartTime = new DateTime($postnlOrder->getExpectedDeliveryTimeStart(), $utcTimeZone);
|
597 |
$storeStartTime->setTimezone($storeTimezone);
|
598 |
|
599 |
$deliveryOptionsInfo['delivery_time_start'] = $startTime->format('H:i');
|
604 |
* In the case of PakjeGemak shipments there is only a start time and no end time.
|
605 |
*/
|
606 |
if ($postnlOrder->hasExpectedDeliveryTimeEnd()) {
|
607 |
+
$endTime = new DateTime($postnlOrder->getExpectedDeliveryTimeEnd(), $utcTimeZone);
|
608 |
|
609 |
+
$storeEndTime = new DateTime($postnlOrder->getExpectedDeliveryTimeEnd(), $utcTimeZone);
|
610 |
$storeEndTime->setTimezone($storeTimezone);
|
611 |
|
612 |
$deliveryOptionsInfo['delivery_time_end'] = $endTime->format('H:i');
|
663 |
* Add the delivery date.
|
664 |
*/
|
665 |
if ($deliveryDate) {
|
666 |
+
$deliveryDate = new DateTime($deliveryDate, $utcTimeZone);
|
667 |
|
668 |
$deliveryOptionsInfo['delivery_date'] = $deliveryDate->format('Y-m-d H:i:s');
|
669 |
$deliveryOptionsInfo['store_delivery_date'] = $deliveryDate->setTimezone($storeTimezone)
|
674 |
* Add the confirm date.
|
675 |
*/
|
676 |
if ($confirmDate) {
|
677 |
+
$confirmDate = new DateTime($confirmDate, $utcTimeZone);
|
678 |
|
679 |
$deliveryOptionsInfo['confirm_date'] = $confirmDate->format('Y-m-d H:i:s');
|
680 |
$deliveryOptionsInfo['store_confirm_date'] = $confirmDate->setTimezone($storeTimezone)
|
763 |
*/
|
764 |
public function isPastCutOffTime($orderDate = null, $storeId = null)
|
765 |
{
|
766 |
+
$utcTimeZone = new DateTimeZone('UTC');
|
767 |
+
|
768 |
if (!$orderDate) {
|
769 |
+
$orderDate = new DateTime(Mage::getSingleton('core/date')->gmtDate('Y-m-d H:i:s'), $utcTimeZone);
|
770 |
}
|
771 |
|
772 |
if (is_string($orderDate)) {
|
773 |
+
$orderDate = new DateTime($orderDate, $utcTimeZone);
|
774 |
}
|
775 |
|
776 |
if ($storeId === null) {
|
785 |
/**
|
786 |
* Create a DateTime object for the order date with the cut off time for comparison.
|
787 |
*/
|
788 |
+
$europeBerlinTimeZone = new DateTimeZone('Europe/Berlin');
|
789 |
|
790 |
+
/**
|
791 |
+
* @todo refactor so we don't have to use 'format()' to modify a date.
|
792 |
+
*/
|
793 |
+
$cutOffDate = new DateTime('now', $europeBerlinTimeZone);
|
794 |
+
$cutOffDate->setDate($orderDate->format('Y'), $orderDate->format('m'), $orderDate->format('d'))
|
795 |
+
->setTime((int) $cutOffTime[0], (int) $cutOffTime[1], (int) $cutOffTime[2])
|
796 |
->setTimezone($utcTimeZone);
|
797 |
|
798 |
/**
|
825 |
public function getCutOffTime($storeId = null, $checkForSunday = true, $orderDate = null)
|
826 |
{
|
827 |
if ($checkForSunday && !$orderDate) {
|
828 |
+
$orderDate = new DateTime(Mage::getSingleton('core/date')->gmtDate('Y-m-d H:i:s'), new DateTimeZone('UTC'));
|
829 |
}
|
830 |
|
831 |
if ($storeId === null) {
|
833 |
}
|
834 |
|
835 |
if (is_string($orderDate)) {
|
836 |
+
$orderDate = new DateTime($orderDate, new DateTimeZone('UTC'));
|
837 |
}
|
838 |
|
839 |
/**
|
863 |
* @param boolean $asDateTime
|
864 |
* @param boolean $withTime
|
865 |
* @param int|boolean $shippingDuration
|
866 |
+
* @param boolean $orderDateInUtc
|
867 |
*
|
868 |
* @return string|int|DateTime
|
869 |
*/
|
870 |
public function getDeliveryDate($orderDate = null, $storeId = null, $asDays = false, $asDateTime = false,
|
871 |
+
$withTime = true, $shippingDuration = false, $orderDateInUtc = false
|
872 |
) {
|
873 |
if (!$orderDate) {
|
874 |
$orderDate = new DateTime(
|
882 |
}
|
883 |
|
884 |
if (is_string($orderDate)) {
|
885 |
+
if (false === $orderDateInUtc) {
|
886 |
+
$orderDate = new DateTime($orderDate, $this->getStoreTimeZone($storeId, true));
|
887 |
+
} else {
|
888 |
+
$utcTimezone = new DateTimeZone('UTC');
|
889 |
+
$orderDate = new DateTime($orderDate, $utcTimezone);
|
890 |
+
}
|
891 |
}
|
892 |
|
893 |
if (false === $shippingDuration) {
|
900 |
$deliveryTime = clone $orderDate;
|
901 |
$deliveryTime->add(new DateInterval("P{$shippingDuration}D"));
|
902 |
|
903 |
+
/**
|
904 |
+
* Check if the order time is greater than the cut-off time. We need to take yesterday as the requested date as
|
905 |
+
* the cut-off time is based on the confirm date and not the delivery date.
|
906 |
+
*/
|
907 |
+
if ($this->isPastCutOffTime($orderDate, $storeId)) {
|
908 |
+
$deliveryTime->add(new DateInterval('P1D'));
|
909 |
+
$shippingDuration++;
|
910 |
+
}
|
911 |
+
|
912 |
/**
|
913 |
* Get the delivery day (1-7).
|
914 |
*/
|
932 |
$shippingDuration++;
|
933 |
}
|
934 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
935 |
if ($asDays) {
|
936 |
return $shippingDuration;
|
937 |
}
|
957 |
public function getValidDeliveryDate($deliveryDate)
|
958 |
{
|
959 |
if (is_string($deliveryDate)) {
|
960 |
+
$deliveryDate = new DateTime($deliveryDate, new DateTimeZone('Europe/Berlin'));
|
961 |
}
|
962 |
|
963 |
if (!($deliveryDate instanceof DateTime)) {
|
966 |
|
967 |
$deliveryDay = $deliveryDate->format('N');
|
968 |
|
969 |
+
/**
|
970 |
+
* Sunday is never allowed as a delivery day.
|
971 |
+
*/
|
972 |
+
if ($deliveryDay == 7) {
|
973 |
+
$deliveryDate->add(new DateInterval('P1D'));
|
974 |
+
$deliveryDay = 1;
|
975 |
+
}
|
976 |
+
|
977 |
/**
|
978 |
* Get the configured shipping days.
|
979 |
*/
|
1048 |
$availableDeliveryDay = $availableShippingDay + 1;
|
1049 |
|
1050 |
/**
|
1051 |
+
* Sunday is not available as a delivery day. If sunday sorting is not allowed, monday is not allowed
|
1052 |
+
* either.
|
1053 |
*/
|
1054 |
if ($this->canUseSundaySorting()
|
1055 |
&& ($availableDeliveryDay < 1
|
1056 |
+
|| $availableDeliveryDay > 6
|
1057 |
)
|
1058 |
) {
|
1059 |
$availableDeliveryDay = 1;
|
1064 |
/**
|
1065 |
* Convert the delivery day of the week to the actual date.
|
1066 |
*/
|
1067 |
+
$availableDeliveryDate = $deliveryDate->modify(
|
1068 |
+
"next {$dayArr[$availableDeliveryDay]} {$deliveryDate->format('H:i:s')}"
|
1069 |
+
);
|
1070 |
return $availableDeliveryDate;
|
1071 |
}
|
1072 |
|
1078 |
$availableDeliveryDay = $shippingDays[0] + 1;
|
1079 |
|
1080 |
/**
|
1081 |
+
* Sunday is not available as a delivery day. If sunday sorting is not allowed, monday is not allowed either.
|
1082 |
*/
|
1083 |
if ($this->canUseSundaySorting()
|
1084 |
&& ($availableDeliveryDay < 1
|
1085 |
+
|| $availableDeliveryDay > 6
|
1086 |
)
|
1087 |
) {
|
1088 |
$availableDeliveryDay = 1;
|
1093 |
/**
|
1094 |
* Convert the delivery day of the week to the actual date.
|
1095 |
*/
|
1096 |
+
$availableDeliveryDate = $deliveryDate->modify(
|
1097 |
+
"next {$dayArr[$availableDeliveryDay]} {$deliveryDate->format('H:i:s')}"
|
1098 |
+
);
|
1099 |
return $availableDeliveryDate;
|
1100 |
}
|
1101 |
|
1143 |
$shippingDay = (int) $shippingDate->format('N');
|
1144 |
|
1145 |
/**
|
1146 |
+
* Check if the shipping day is a monday. If so, check if monday is allowed. If not, modify it to the previous
|
1147 |
* saturday if saturdays are allowed.
|
1148 |
*/
|
1149 |
if (!in_array($shippingDay, $shippingDays)
|
1150 |
&& $shippingDay == 1
|
1151 |
&& in_array(6, $shippingDays)
|
1152 |
) {
|
1153 |
+
$date->modify('last saturday ' . $date->format('H:i:s'));
|
1154 |
}
|
1155 |
|
1156 |
$date->setTimezone($timeZone);
|
1479 |
*
|
1480 |
* date('l') returns the full textual representation of the day of the week (Sunday through Saturday).
|
1481 |
*/
|
1482 |
+
$deliveryDate = new DateTime($deliveryDate, new DateTimeZone('UTC'));
|
1483 |
$weekDay = $deliveryDate->format('l');
|
1484 |
|
1485 |
foreach ($locations as &$location) {
|
1926 |
$item->getStoreId()
|
1927 |
);
|
1928 |
|
1929 |
+
if (!is_null($pakketautomaatAllowed) && !$pakketautomaatAllowed) {
|
1930 |
Mage::register($registryKey, false);
|
1931 |
return false;
|
1932 |
}
|
2078 |
$item->getStoreId()
|
2079 |
);
|
2080 |
|
2081 |
+
if (!is_null($deliveryDaysAllowed) && !$deliveryDaysAllowed) {
|
2082 |
Mage::register($registryKey, false);
|
2083 |
return false;
|
2084 |
}
|
2209 |
$item->getStoreId()
|
2210 |
);
|
2211 |
|
2212 |
+
if (!is_null($timeframesAllowed) && !$timeframesAllowed) {
|
2213 |
Mage::register($registryKey, false);
|
2214 |
return false;
|
2215 |
}
|
2353 |
return Mage::registry($registryKey);
|
2354 |
}
|
2355 |
|
2356 |
+
Mage::unregister($registryKey);
|
2357 |
Mage::unregister('postnl_delivery_options_can_use_delivery_options_errors');
|
2358 |
|
2359 |
$deliveryOptionsEnabled = $this->isDeliveryOptionsEnabled();
|
2449 |
return false;
|
2450 |
}
|
2451 |
|
|
|
|
|
2452 |
/**
|
2453 |
+
* Check if delivery options may be shown for the stock level of the current products.
|
|
|
2454 |
*/
|
2455 |
+
if (!$this->canShowDeliveryOptionsForStock($quote)) {
|
2456 |
+
$errors = array(
|
2457 |
+
array(
|
2458 |
+
'code' => 'POSTNL-0121',
|
2459 |
+
'message' => $this->__(
|
2460 |
+
'Delivery options are not allowed for one or more itme sin the cart based on the' .
|
2461 |
+
' configured stock options.'
|
2462 |
+
),
|
2463 |
+
)
|
2464 |
+
);
|
2465 |
+
Mage::register('postnl_delivery_options_can_use_delivery_options_errors', $errors);
|
2466 |
+
return false;
|
|
|
2467 |
}
|
2468 |
|
2469 |
/**
|
2479 |
$item->getStoreId()
|
2480 |
);
|
2481 |
|
2482 |
+
if (!is_null($allowDeliveryOptions) && !$allowDeliveryOptions) {
|
2483 |
$errors = array(
|
2484 |
array(
|
2485 |
'code' => 'POSTNL-0161',
|
2494 |
return true;
|
2495 |
}
|
2496 |
|
2497 |
+
/**
|
2498 |
+
* Wrapper method for _canShowDeliveryOptionsForStock() to allow observers to influence the result.
|
2499 |
+
*
|
2500 |
+
* @param Mage_Sales_Model_Quote $quote
|
2501 |
+
*
|
2502 |
+
* @return bool
|
2503 |
+
*/
|
2504 |
+
public function canShowDeliveryOptionsForStock(Mage_Sales_Model_Quote $quote)
|
2505 |
+
{
|
2506 |
+
/**
|
2507 |
+
* Get the configured stock option.
|
2508 |
+
*/
|
2509 |
+
$stockOption = Mage::getStoreConfig(self::XPATH_STOCK_OPTIONS, $quote->getStoreId());
|
2510 |
+
|
2511 |
+
Mage::dispatchEvent(
|
2512 |
+
'postnl_deliveryoptions_can_show_delivery_options_for_quote_before',
|
2513 |
+
array(
|
2514 |
+
'quote' => $quote,
|
2515 |
+
'stock_option' => $stockOption,
|
2516 |
+
'helper' => $this,
|
2517 |
+
)
|
2518 |
+
);
|
2519 |
+
|
2520 |
+
$result = $this->_canShowDeliveryOptionsForStock($quote, $stockOption);
|
2521 |
+
|
2522 |
+
$transport = new Varien_Object(array('result' => $result));
|
2523 |
+
|
2524 |
+
Mage::dispatchEvent(
|
2525 |
+
'postnl_deliveryoptions_can_show_delivery_options_for_quote_after',
|
2526 |
+
array(
|
2527 |
+
'quote' => $quote,
|
2528 |
+
'stock_option' => $stockOption,
|
2529 |
+
'helper' => $this,
|
2530 |
+
'transport' => $transport,
|
2531 |
+
)
|
2532 |
+
);
|
2533 |
+
|
2534 |
+
return (bool) $transport->getData('result');
|
2535 |
+
}
|
2536 |
+
|
2537 |
+
/**
|
2538 |
+
* Check if delivery options may be shown for the products in the quote based on their stock level and the
|
2539 |
+
* configured stock option.
|
2540 |
+
*
|
2541 |
+
* @param Mage_Sales_Model_Quote $quote
|
2542 |
+
* @param string $stockOption
|
2543 |
+
*
|
2544 |
+
* @return bool
|
2545 |
+
*/
|
2546 |
+
protected function _canShowDeliveryOptionsForStock(Mage_Sales_Model_Quote $quote, $stockOption)
|
2547 |
+
{
|
2548 |
+
/**
|
2549 |
+
* If out of stock products is allowed, there is nothing to check.
|
2550 |
+
*/
|
2551 |
+
if ($stockOption == 'out_of_stock') {
|
2552 |
+
return true;
|
2553 |
+
}
|
2554 |
+
|
2555 |
+
/** @var Mage_Sales_Model_Quote_Item[] $quoteItems */
|
2556 |
+
$quoteItems = $quote->getItemsCollection();
|
2557 |
+
foreach ($quoteItems as $item) {
|
2558 |
+
$product = $item->getProduct();
|
2559 |
+
|
2560 |
+
/** @var Mage_CatalogInventory_Model_Stock_item $stockItem */
|
2561 |
+
/** @noinspection PhpUndefinedMethodInspection */
|
2562 |
+
$stockItem = $product->getStockItem();
|
2563 |
+
|
2564 |
+
if (!$stockItem) {
|
2565 |
+
$stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product);
|
2566 |
+
}
|
2567 |
+
|
2568 |
+
$available = false;
|
2569 |
+
switch ($stockOption) {
|
2570 |
+
case 'in_stock':
|
2571 |
+
$available = $this->_isStockItemInStock($stockItem, false, $item->getQty());
|
2572 |
+
break;
|
2573 |
+
case 'backordered':
|
2574 |
+
$available = $this->_isStockItemInStock($stockItem, true, $item->getQty());
|
2575 |
+
break;
|
2576 |
+
}
|
2577 |
+
|
2578 |
+
if (true !== $available) {
|
2579 |
+
return false;
|
2580 |
+
}
|
2581 |
+
}
|
2582 |
+
|
2583 |
+
return true;
|
2584 |
+
}
|
2585 |
+
|
2586 |
+
/**
|
2587 |
+
* Check if the stock item is in stock.
|
2588 |
+
*
|
2589 |
+
* @param Mage_CatalogInventory_Model_Stock_Item $stockItem
|
2590 |
+
* @param bool $allowBackorders
|
2591 |
+
* @param int $requiredQty
|
2592 |
+
*
|
2593 |
+
* @return bool
|
2594 |
+
*/
|
2595 |
+
protected function _isStockItemInStock(Mage_CatalogInventory_Model_Stock_Item $stockItem, $allowBackorders = false,
|
2596 |
+
$requiredQty = 1)
|
2597 |
+
{
|
2598 |
+
/**
|
2599 |
+
* Get several config values determining stock status.
|
2600 |
+
*/
|
2601 |
+
$configMinQty = $this->getConfigMinQty();
|
2602 |
+
$configBackorders = $this->getConfigBackorders();
|
2603 |
+
$configManageStock = $this->getConfigManageStock();
|
2604 |
+
|
2605 |
+
/**
|
2606 |
+
* If stock is not managed for this product, it is always in stock.
|
2607 |
+
*/
|
2608 |
+
if ($stockItem->getUseConfigManageStock() && !$configManageStock) {
|
2609 |
+
return true;
|
2610 |
+
} elseif (!$stockItem->getManageStock()) {
|
2611 |
+
return true;
|
2612 |
+
}
|
2613 |
+
|
2614 |
+
/**
|
2615 |
+
* If backorders are allowed for this product, it is always in stock.
|
2616 |
+
*/
|
2617 |
+
if ($allowBackorders && $stockItem->getUseConfigBackorders() && $configBackorders > 0) {
|
2618 |
+
return true;
|
2619 |
+
} elseif ($allowBackorders && $stockItem->getBackorders() > 0) {
|
2620 |
+
return true;
|
2621 |
+
}
|
2622 |
+
|
2623 |
+
/**
|
2624 |
+
* Get the minimum quantity for this product.
|
2625 |
+
*/
|
2626 |
+
if (!$stockItem->getUseConfigMinQty()) {
|
2627 |
+
$minQty = $stockItem->getMinQty();
|
2628 |
+
} else {
|
2629 |
+
$minQty = $configMinQty;
|
2630 |
+
}
|
2631 |
+
|
2632 |
+
/**
|
2633 |
+
* Check if the product has the required qty available.
|
2634 |
+
*/
|
2635 |
+
if (($stockItem->getQty() - $minQty) < $requiredQty) {
|
2636 |
+
return false;
|
2637 |
+
}
|
2638 |
+
|
2639 |
+
return true;
|
2640 |
+
}
|
2641 |
+
|
2642 |
/**
|
2643 |
* Checks if the delivery options may be used for the currently chosen shipping destination.
|
2644 |
*
|
3196 |
|
3197 |
return $isActive;
|
3198 |
}
|
3199 |
+
|
3200 |
+
/**
|
3201 |
+
* Check if the GoMage LightCheckout delivery date functionality conflicts with PostNl delivery options.
|
3202 |
+
*
|
3203 |
+
* @param null|int $storeId
|
3204 |
+
*
|
3205 |
+
* @return bool
|
3206 |
+
*/
|
3207 |
+
public function checkGoMageDeliveryDateConflicts($storeId = null)
|
3208 |
+
{
|
3209 |
+
/**
|
3210 |
+
* Check if the GoMage LightCheckout extension is installed and is active.
|
3211 |
+
*/
|
3212 |
+
$goMageLightCheckoutIsInstalled = $this->isModuleEnabled('GoMage_Checkout');
|
3213 |
+
if (!$goMageLightCheckoutIsInstalled) {
|
3214 |
+
return false;
|
3215 |
+
}
|
3216 |
+
|
3217 |
+
if (is_null($storeId)) {
|
3218 |
+
$storeId = Mage::app()->getStore()->getId();
|
3219 |
+
}
|
3220 |
+
|
3221 |
+
/**
|
3222 |
+
* Check if the GoMage LightCheckout extension is enabled.
|
3223 |
+
*/
|
3224 |
+
$goMageLightCheckoutIsEnabled = Mage::getStoreConfigFlag('gomage_checkout/general/enabled', $storeId);
|
3225 |
+
if (!$goMageLightCheckoutIsEnabled) {
|
3226 |
+
return false;
|
3227 |
+
}
|
3228 |
+
|
3229 |
+
/**
|
3230 |
+
* Check if the GoMage LightCheckout extension's delivery date functionality is enabled.
|
3231 |
+
*/
|
3232 |
+
$goMageDeliveryDateIsEnabled = Mage::getStoreConfigFlag('gomage_checkout/deliverydate/deliverydate', $storeId);
|
3233 |
+
if (!$goMageDeliveryDateIsEnabled) {
|
3234 |
+
return false;
|
3235 |
+
}
|
3236 |
+
|
3237 |
+
/**
|
3238 |
+
* Check for which shipping methods the GoMage LightCheckout extension's delivery date functionality is enabled.
|
3239 |
+
*/
|
3240 |
+
$goMageDeliveryDateShippingMethods = Mage::getStoreConfig(
|
3241 |
+
'gomage_checkout/deliverydate/shipping_methods',
|
3242 |
+
$storeId
|
3243 |
+
);
|
3244 |
+
$goMageDeliveryDateShippingMethods = explode(',', $goMageDeliveryDateShippingMethods);
|
3245 |
+
|
3246 |
+
/**
|
3247 |
+
* Check if this intersects with the PostNL shipping methods.
|
3248 |
+
*
|
3249 |
+
* N.B. The PostNL shipping methods are not dependant on the selected store view.
|
3250 |
+
*/
|
3251 |
+
$postnlShippingMethods = Mage::helper('postnl/carrier')->getPostnlShippingMethods();
|
3252 |
+
|
3253 |
+
$conflictingShippingMethods = array_intersect($goMageDeliveryDateShippingMethods, $postnlShippingMethods);
|
3254 |
+
if (empty($conflictingShippingMethods)) {
|
3255 |
+
return false;
|
3256 |
+
}
|
3257 |
+
|
3258 |
+
return true;
|
3259 |
+
}
|
3260 |
}
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Helper_Mijnpakket extends TIG_PostNL_Helper_Data
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Helper_Mijnpakket extends TIG_PostNL_Helper_Data
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Helper_Parcelware extends TIG_PostNL_Helper_Data
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Helper_Parcelware extends TIG_PostNL_Helper_Data
|
@@ -35,7 +35,7 @@
|
|
35 |
*
|
36 |
* @category TIG
|
37 |
* @package TIG_PostNL
|
38 |
-
* @copyright Copyright (c)
|
39 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
40 |
* @link http://store.tig.nl/tig/postnl.html
|
41 |
*/
|
35 |
*
|
36 |
* @category TIG
|
37 |
* @package TIG_PostNL
|
38 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
39 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
40 |
* @link http://store.tig.nl/tig/postnl.html
|
41 |
*/
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
@@ -148,13 +148,13 @@ class TIG_PostNL_Helper_Webservices extends TIG_PostNL_Helper_Data
|
|
148 |
/**
|
149 |
* Logs a webservice request and response for debug purposes.
|
150 |
*
|
151 |
-
* @param
|
152 |
*
|
153 |
* @return $this
|
154 |
*
|
155 |
* @see Mage::log()
|
156 |
*/
|
157 |
-
public function logWebserviceCall($client)
|
158 |
{
|
159 |
if (!$this->isLoggingEnabled()) {
|
160 |
return $this;
|
@@ -162,8 +162,8 @@ class TIG_PostNL_Helper_Webservices extends TIG_PostNL_Helper_Data
|
|
162 |
|
163 |
$this->createLogDir();
|
164 |
|
165 |
-
$requestXml = $this->formatXml($client->
|
166 |
-
$responseXML = $this->formatXml($client->
|
167 |
|
168 |
$logMessage = "Request sent:\n"
|
169 |
. $requestXml
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
148 |
/**
|
149 |
* Logs a webservice request and response for debug purposes.
|
150 |
*
|
151 |
+
* @param SoapClient $client
|
152 |
*
|
153 |
* @return $this
|
154 |
*
|
155 |
* @see Mage::log()
|
156 |
*/
|
157 |
+
public function logWebserviceCall(SoapClient $client)
|
158 |
{
|
159 |
if (!$this->isLoggingEnabled()) {
|
160 |
return $this;
|
162 |
|
163 |
$this->createLogDir();
|
164 |
|
165 |
+
$requestXml = $this->formatXml($client->__getLastRequest());
|
166 |
+
$responseXML = $this->formatXml($client->__getLastResponse());
|
167 |
|
168 |
$logMessage = "Request sent:\n"
|
169 |
. $requestXml
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_AddressValidation_Cendris extends TIG_PostNL_Model_AddressValidation_Cendris_Abstract
|
@@ -89,6 +89,10 @@ class TIG_PostNL_Model_AddressValidation_Cendris extends TIG_PostNL_Model_Addres
|
|
89 |
/**
|
90 |
* Get the Cendris password.
|
91 |
*
|
|
|
|
|
|
|
|
|
92 |
* @return string
|
93 |
*/
|
94 |
protected function _getPassword()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_AddressValidation_Cendris extends TIG_PostNL_Model_AddressValidation_Cendris_Abstract
|
89 |
/**
|
90 |
* Get the Cendris password.
|
91 |
*
|
92 |
+
* TIG exception notice: The unencrypted form is used in line with the available communication options with the
|
93 |
+
* Cendris API at the moment of writing this. PostNL is aware of this and may change this at any time in the
|
94 |
+
* upcoming versions of their API.
|
95 |
+
*
|
96 |
* @return string
|
97 |
*/
|
98 |
protected function _getPassword()
|
@@ -33,7 +33,7 @@ advanced * Do not edit or add to this file if you wish to upgrade this module to
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_AddressValidation_Cendris_Abstract extends Varien_Object
|
@@ -68,11 +68,11 @@ class TIG_PostNL_Model_AddressValidation_Cendris_Abstract extends Varien_Object
|
|
68 |
);
|
69 |
|
70 |
/**
|
71 |
-
* try to create a new
|
72 |
* wsdl cache.
|
73 |
*/
|
74 |
try {
|
75 |
-
$client = new
|
76 |
$wsdl,
|
77 |
$soapOptions
|
78 |
);
|
@@ -82,7 +82,7 @@ class TIG_PostNL_Model_AddressValidation_Cendris_Abstract extends Varien_Object
|
|
82 |
*/
|
83 |
$soapOptions['cache_wsdl'] = WSDL_CACHE_NONE;
|
84 |
|
85 |
-
$client = new
|
86 |
$wsdl,
|
87 |
$soapOptions
|
88 |
);
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_AddressValidation_Cendris_Abstract extends Varien_Object
|
68 |
);
|
69 |
|
70 |
/**
|
71 |
+
* try to create a new SoapClient instance based on the supplied wsdl. if it fails, try again without using the
|
72 |
* wsdl cache.
|
73 |
*/
|
74 |
try {
|
75 |
+
$client = new SoapClient(
|
76 |
$wsdl,
|
77 |
$soapOptions
|
78 |
);
|
82 |
*/
|
83 |
$soapOptions['cache_wsdl'] = WSDL_CACHE_NONE;
|
84 |
|
85 |
+
$client = new SoapClient(
|
86 |
$wsdl,
|
87 |
$soapOptions
|
88 |
);
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasAddressBlockClass()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasAddressBlockClass()
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasAddressBlockClass()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasAddressBlockClass()
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasBillingAddressBlockClass()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasBillingAddressBlockClass()
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasStoreId()
|
@@ -286,13 +286,13 @@ class TIG_PostNL_Model_AddressValidation_System_Config_Backend_ValidateAccount e
|
|
286 |
);
|
287 |
|
288 |
/**
|
289 |
-
* Append a link to the
|
290 |
*/
|
291 |
if ($link) {
|
292 |
$errorMessage .= ' <a href="'
|
293 |
. $link
|
294 |
. '" target="_blank" class="postnl-message">'
|
295 |
-
. $helper->__('Click here for more information from the
|
296 |
. '</a>';
|
297 |
}
|
298 |
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasStoreId()
|
286 |
);
|
287 |
|
288 |
/**
|
289 |
+
* Append a link to the TIG knowledgebase if available.
|
290 |
*/
|
291 |
if ($link) {
|
292 |
$errorMessage .= ' <a href="'
|
293 |
. $link
|
294 |
. '" target="_blank" class="postnl-message">'
|
295 |
+
. $helper->__('Click here for more information from the TIG knowledgebase.')
|
296 |
. '</a>';
|
297 |
}
|
298 |
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* The only reason this class exists is because the add() method and it's derivatives are only present since EE 1.12 and
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* The only reason this class exists is because the add() method and it's derivatives are only present since EE 1.12 and
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Admin_Logging_Handler_Postnl extends Enterprise_Logging_Model_Handler_Controllers
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Admin_Logging_Handler_Postnl extends Enterprise_Logging_Model_Handler_Controllers
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Admin_Logging_Observer
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Admin_Logging_Observer
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Adminhtml_Form_Element_Checkbox extends Varien_Data_Form_Element_Checkbox
|
@@ -61,7 +61,7 @@ class TIG_PostNL_Model_Adminhtml_Form_Element_Checkbox extends Varien_Data_Form_
|
|
61 |
$html .= '<script type="text/javascript">' . PHP_EOL
|
62 |
. '//<![CDATA[' . PHP_EOL
|
63 |
. '$("'.$this->getHtmlId().'_checkbox").observe("click", '
|
64 |
-
. 'function(){$('.$this->getHtmlId().').setValue(this.getValue());});' . PHP_EOL
|
65 |
. '//]]>' . PHP_EOL
|
66 |
. '</script>';
|
67 |
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Adminhtml_Form_Element_Checkbox extends Varien_Data_Form_Element_Checkbox
|
61 |
$html .= '<script type="text/javascript">' . PHP_EOL
|
62 |
. '//<![CDATA[' . PHP_EOL
|
63 |
. '$("'.$this->getHtmlId().'_checkbox").observe("click", '
|
64 |
+
. 'function(){$("'.$this->getHtmlId().'").setValue(this.getValue());});' . PHP_EOL
|
65 |
. '//]]>' . PHP_EOL
|
66 |
. '</script>';
|
67 |
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* Observer to edit the sales > order grid
|
@@ -517,12 +517,8 @@ class TIG_PostNL_Model_Adminhtml_Observer_OrderGrid extends Varien_Object
|
|
517 |
$class = $this->_getConfirmDateClass($value, $row, $column);
|
518 |
|
519 |
$origValue = $row->getData($column->getIndex());
|
520 |
-
$date = new DateTime($origValue);
|
521 |
-
$date->setTimezone(
|
522 |
-
Mage::helper('postnl')->getStoreTimeZone($row->getStoreId(), true)
|
523 |
-
);
|
524 |
|
525 |
-
$formattedDate = Mage::helper('core')->formatDate($
|
526 |
|
527 |
$html = "<span class='{$class}' title='{$formattedDate}'><span>{$value}</span></span>";
|
528 |
return $html;
|
@@ -545,7 +541,7 @@ class TIG_PostNL_Model_Adminhtml_Observer_OrderGrid extends Varien_Object
|
|
545 |
|
546 |
$origValue = $row->getData($column->getIndex());
|
547 |
$dateModel = Mage::getModel('core/date');
|
548 |
-
$now = new DateTime($dateModel->gmtDate());
|
549 |
|
550 |
if (!$origValue) {
|
551 |
$helper = Mage::helper('postnl/deliveryOptions');
|
@@ -558,10 +554,10 @@ class TIG_PostNL_Model_Adminhtml_Observer_OrderGrid extends Varien_Object
|
|
558 |
true,
|
559 |
$shippingDuration
|
560 |
);
|
561 |
-
$origDate = new DateTime($deliveryDate);
|
562 |
$origDate = $origDate->sub(new DateInterval('P1D'));
|
563 |
} else {
|
564 |
-
$origDate = new DateTime($origValue);
|
565 |
}
|
566 |
|
567 |
/**
|
@@ -1306,7 +1302,12 @@ class TIG_PostNL_Model_Adminhtml_Observer_OrderGrid extends Varien_Object
|
|
1306 |
}
|
1307 |
|
1308 |
$postnlShippingMethodsRegex .= '$';
|
1309 |
-
$collection->addFieldToFilter(
|
|
|
|
|
|
|
|
|
|
|
1310 |
|
1311 |
/**
|
1312 |
* If the filter condition is PakjeGemak Express, filter out all non-PakjeGemak Express orders
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* Observer to edit the sales > order grid
|
517 |
$class = $this->_getConfirmDateClass($value, $row, $column);
|
518 |
|
519 |
$origValue = $row->getData($column->getIndex());
|
|
|
|
|
|
|
|
|
520 |
|
521 |
+
$formattedDate = Mage::helper('core')->formatDate($origValue, 'full', false);
|
522 |
|
523 |
$html = "<span class='{$class}' title='{$formattedDate}'><span>{$value}</span></span>";
|
524 |
return $html;
|
541 |
|
542 |
$origValue = $row->getData($column->getIndex());
|
543 |
$dateModel = Mage::getModel('core/date');
|
544 |
+
$now = new DateTime($dateModel->gmtDate(), new DateTimeZone('UTC'));
|
545 |
|
546 |
if (!$origValue) {
|
547 |
$helper = Mage::helper('postnl/deliveryOptions');
|
554 |
true,
|
555 |
$shippingDuration
|
556 |
);
|
557 |
+
$origDate = new DateTime($deliveryDate, new DateTimeZone('UTC'));
|
558 |
$origDate = $origDate->sub(new DateInterval('P1D'));
|
559 |
} else {
|
560 |
+
$origDate = new DateTime($origValue, new DateTimeZone('UTC'));
|
561 |
}
|
562 |
|
563 |
/**
|
1302 |
}
|
1303 |
|
1304 |
$postnlShippingMethodsRegex .= '$';
|
1305 |
+
$collection->addFieldToFilter(
|
1306 |
+
'postnl_join_order.shipping_method',
|
1307 |
+
array(
|
1308 |
+
'regexp' => $postnlShippingMethodsRegex
|
1309 |
+
)
|
1310 |
+
);
|
1311 |
|
1312 |
/**
|
1313 |
* If the filter condition is PakjeGemak Express, filter out all non-PakjeGemak Express orders
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* Observer to edit the sales > shipments grid
|
@@ -680,12 +680,8 @@ class TIG_PostNL_Model_Adminhtml_Observer_ShipmentGrid extends Varien_Object
|
|
680 |
}
|
681 |
|
682 |
$origValue = $row->getData($column->getIndex());
|
683 |
-
$date = new DateTime($origValue);
|
684 |
-
$date->setTimezone(
|
685 |
-
Mage::helper('postnl')->getStoreTimeZone(Mage_Core_Model_App::ADMIN_STORE_ID, true)
|
686 |
-
);
|
687 |
|
688 |
-
$formattedDate = Mage::helper('core')->formatDate($
|
689 |
|
690 |
$html = "<span class='{$class}' title='{$formattedDate}'><span>{$value}</span></span>";
|
691 |
return $html;
|
@@ -713,8 +709,8 @@ class TIG_PostNL_Model_Adminhtml_Observer_ShipmentGrid extends Varien_Object
|
|
713 |
/**
|
714 |
* @var TIG_PostNL_Model_Core_Shipment $postnlShipmentClass
|
715 |
*/
|
716 |
-
$origDate = new DateTime($origValue);
|
717 |
-
$now = new DateTime($dateModel->gmtDate());
|
718 |
$interval = $now->diff($origDate);
|
719 |
$postnlShipmentClass = Mage::getConfig()->getModelClassName('postnl_core/shipment');
|
720 |
|
@@ -880,6 +876,8 @@ class TIG_PostNL_Model_Adminhtml_Observer_ShipmentGrid extends Varien_Object
|
|
880 |
* @param Mage_Adminhtml_Block_Sales_Shipment_Grid $block
|
881 |
*
|
882 |
* @return $this
|
|
|
|
|
883 |
*/
|
884 |
protected function _addMassaction($block)
|
885 |
{
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* Observer to edit the sales > shipments grid
|
680 |
}
|
681 |
|
682 |
$origValue = $row->getData($column->getIndex());
|
|
|
|
|
|
|
|
|
683 |
|
684 |
+
$formattedDate = Mage::helper('core')->formatDate($origValue, 'full', false);
|
685 |
|
686 |
$html = "<span class='{$class}' title='{$formattedDate}'><span>{$value}</span></span>";
|
687 |
return $html;
|
709 |
/**
|
710 |
* @var TIG_PostNL_Model_Core_Shipment $postnlShipmentClass
|
711 |
*/
|
712 |
+
$origDate = new DateTime($origValue, new DateTimeZone('UTC'));
|
713 |
+
$now = new DateTime($dateModel->gmtDate(), new DateTimeZone('UTC'));
|
714 |
$interval = $now->diff($origDate);
|
715 |
$postnlShipmentClass = Mage::getConfig()->getModelClassName('postnl_core/shipment');
|
716 |
|
876 |
* @param Mage_Adminhtml_Block_Sales_Shipment_Grid $block
|
877 |
*
|
878 |
* @return $this
|
879 |
+
*
|
880 |
+
* @todo optimize by placing acl checks before mass action generation
|
881 |
*/
|
882 |
protected function _addMassaction($block)
|
883 |
{
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* Observer to edit the shipment view
|
@@ -95,13 +95,13 @@ class TIG_PostNL_Model_Adminhtml_Observer_ShipmentView
|
|
95 |
$this->addPostnlButtons($block, $shipment);
|
96 |
|
97 |
/**
|
98 |
-
* Update the back button if the '
|
99 |
*/
|
100 |
-
if (Mage::app()->getRequest()->getParam('
|
101 |
-
$comeFrom = Mage::helper('core')->urlDecode(Mage::app()->getRequest()->getParam('
|
102 |
-
$
|
103 |
|
104 |
-
$block->updateButton('back', 'onclick', 'setLocation(\'' . $
|
105 |
}
|
106 |
|
107 |
return $this;
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* Observer to edit the shipment view
|
95 |
$this->addPostnlButtons($block, $shipment);
|
96 |
|
97 |
/**
|
98 |
+
* Update the back button if the 'come_from_postnl' parameter is set.
|
99 |
*/
|
100 |
+
if (Mage::app()->getRequest()->getParam('come_from_postnl')) {
|
101 |
+
$comeFrom = Mage::helper('core')->urlDecode(Mage::app()->getRequest()->getParam('come_from_postnl'));
|
102 |
+
$comeFromUrl = $block->getUrl($comeFrom);
|
103 |
|
104 |
+
$block->updateButton('back', 'onclick', 'setLocation(\'' . $comeFromUrl . '\')');
|
105 |
}
|
106 |
|
107 |
return $this;
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Adminhtml_Observer_SystemConfig
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Adminhtml_Observer_SystemConfig
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Adminhtml_Support_Logs
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Adminhtml_Support_Logs
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Adminhtml_System_Config_Source_OrderGridColumns
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Adminhtml_System_Config_Source_OrderGridColumns
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Adminhtml_System_Config_Source_OrderGridMassaction
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Adminhtml_System_Config_Source_OrderGridMassaction
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Adminhtml_System_Config_Source_ShipmentGridColumns
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Adminhtml_System_Config_Source_ShipmentGridColumns
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Adminhtml_System_Config_Source_ShipmentGridMassAction
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Adminhtml_System_Config_Source_ShipmentGridMassAction
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* This is a dummy class for the matrixrate export/import functionality.
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* This is a dummy class for the matrixrate export/import functionality.
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* PostNL shipping method model
|
@@ -349,7 +349,7 @@ class TIG_PostNL_Model_Carrier_Postnl extends Mage_Shipping_Model_Carrier_Abstra
|
|
349 |
$cost = 0;
|
350 |
} else {
|
351 |
$error = Mage::getModel('shipping/rate_result_error');
|
352 |
-
$error->setCarrier('
|
353 |
$error->setCarrierTitle($this->getConfigData('title'));
|
354 |
$error->setErrorMessage($this->getConfigData('specificerrmsg'));
|
355 |
$result->append($error);
|
@@ -378,8 +378,6 @@ class TIG_PostNL_Model_Carrier_Postnl extends Mage_Shipping_Model_Carrier_Abstra
|
|
378 |
*/
|
379 |
protected function _getMatrixRate(Mage_Shipping_Model_Rate_Request $request)
|
380 |
{
|
381 |
-
//Zend_Debug::dump($request->debug());exit;
|
382 |
-
|
383 |
// exclude Virtual products price from Package value if pre-configured
|
384 |
if (!$this->getConfigFlag('include_virtual_price') && $request->getAllItems()) {
|
385 |
/**
|
@@ -500,7 +498,7 @@ class TIG_PostNL_Model_Carrier_Postnl extends Mage_Shipping_Model_Carrier_Abstra
|
|
500 |
$cost = 0;
|
501 |
} else {
|
502 |
$error = Mage::getModel('shipping/rate_result_error');
|
503 |
-
$error->setCarrier('
|
504 |
$error->setCarrierTitle($this->getConfigData('title'));
|
505 |
$error->setErrorMessage($this->getConfigData('specificerrmsg'));
|
506 |
$result->append($error);
|
@@ -580,7 +578,10 @@ class TIG_PostNL_Model_Carrier_Postnl extends Mage_Shipping_Model_Carrier_Abstra
|
|
580 |
);
|
581 |
|
582 |
if (!isset($codes[$type])) {
|
583 |
-
throw Mage::exception(
|
|
|
|
|
|
|
584 |
}
|
585 |
|
586 |
if (''===$code) {
|
@@ -588,7 +589,10 @@ class TIG_PostNL_Model_Carrier_Postnl extends Mage_Shipping_Model_Carrier_Abstra
|
|
588 |
}
|
589 |
|
590 |
if (!isset($codes[$type][$code])) {
|
591 |
-
throw Mage::exception(
|
|
|
|
|
|
|
592 |
}
|
593 |
|
594 |
return $codes[$type][$code];
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* PostNL shipping method model
|
349 |
$cost = 0;
|
350 |
} else {
|
351 |
$error = Mage::getModel('shipping/rate_result_error');
|
352 |
+
$error->setCarrier('postnl');
|
353 |
$error->setCarrierTitle($this->getConfigData('title'));
|
354 |
$error->setErrorMessage($this->getConfigData('specificerrmsg'));
|
355 |
$result->append($error);
|
378 |
*/
|
379 |
protected function _getMatrixRate(Mage_Shipping_Model_Rate_Request $request)
|
380 |
{
|
|
|
|
|
381 |
// exclude Virtual products price from Package value if pre-configured
|
382 |
if (!$this->getConfigFlag('include_virtual_price') && $request->getAllItems()) {
|
383 |
/**
|
498 |
$cost = 0;
|
499 |
} else {
|
500 |
$error = Mage::getModel('shipping/rate_result_error');
|
501 |
+
$error->setCarrier('postnl');
|
502 |
$error->setCarrierTitle($this->getConfigData('title'));
|
503 |
$error->setErrorMessage($this->getConfigData('specificerrmsg'));
|
504 |
$result->append($error);
|
578 |
);
|
579 |
|
580 |
if (!isset($codes[$type])) {
|
581 |
+
throw Mage::exception(
|
582 |
+
'Mage_Shipping',
|
583 |
+
Mage::helper('shipping')->__('Invalid Table Rate code type: %s', $type)
|
584 |
+
);
|
585 |
}
|
586 |
|
587 |
if (''===$code) {
|
589 |
}
|
590 |
|
591 |
if (!isset($codes[$type][$code])) {
|
592 |
+
throw Mage::exception(
|
593 |
+
'Mage_Shipping',
|
594 |
+
Mage::helper('shipping')->__('Invalid Table Rate code for type %s: %s', $type, $code)
|
595 |
+
);
|
596 |
}
|
597 |
|
598 |
return $codes[$type][$code];
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Carrier_Quote_Address_Total_Shipping
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Carrier_Quote_Address_Total_Shipping
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Carrier_Resource_Matrixrate extends Mage_Shipping_Model_Resource_Carrier_Tablerate
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Carrier_Resource_Matrixrate extends Mage_Shipping_Model_Resource_Carrier_Tablerate
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Carrier_Resource_Matrixrate_Collection
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Carrier_Resource_Matrixrate_Collection
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Carrier_Resource_Tablerate extends Mage_Shipping_Model_Resource_Carrier_Tablerate
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Carrier_Resource_Tablerate extends Mage_Shipping_Model_Resource_Carrier_Tablerate
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Carrier_Resource_Tablerate_Collection
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Carrier_Resource_Tablerate_Collection
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Carrier_System_Config_Backend_Matrixrate extends Mage_Core_Model_Config_Data
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Carrier_System_Config_Backend_Matrixrate extends Mage_Core_Model_Config_Data
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Carrier_System_Config_Backend_Tablerate extends Mage_Core_Model_Config_Data
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Carrier_System_Config_Backend_Tablerate extends Mage_Core_Model_Config_Data
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Carrier_System_Config_Source_RateType
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Carrier_System_Config_Source_RateType
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Carrier_System_Config_Source_TablerateSource
|
@@ -53,7 +53,7 @@ class TIG_PostNL_Model_Carrier_System_Config_Source_TablerateSource
|
|
53 |
),
|
54 |
array(
|
55 |
'value' => 'postnl_tablerate',
|
56 |
-
'label' => $helper->__('Use
|
57 |
),
|
58 |
);
|
59 |
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Carrier_System_Config_Source_TablerateSource
|
53 |
),
|
54 |
array(
|
55 |
'value' => 'postnl_tablerate',
|
56 |
+
'label' => $helper->__('Use separate table rates for PostNL'),
|
57 |
),
|
58 |
);
|
59 |
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* This is a dummy class for the tablerate export/import functionality.
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* This is a dummy class for the tablerate export/import functionality.
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method TIG_PostNL_Model_Checkout_Cif setStoreId(int $value)
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method TIG_PostNL_Model_Checkout_Cif setStoreId(int $value)
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Checkout_Observer_Order
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Checkout_Observer_Order
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Checkout_Observer_Shipment
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Checkout_Observer_Shipment
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @deprecated 1.2.0 This class has been moved to TIG_PostNL_Model_Core_Order. A dummy class has been left behind to
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @deprecated 1.2.0 This class has been moved to TIG_PostNL_Model_Core_Order. A dummy class has been left behind to
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method TIG_PostNL_Model_Checkout_Service setQuote(Mage_Sales_Model_Quote $value)
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method TIG_PostNL_Model_Checkout_Service setQuote(Mage_Sales_Model_Quote $value)
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Checkout_System_Config_Source_ActivePaymentMethods
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Checkout_System_Config_Source_ActivePaymentMethods
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Checkout_System_Config_Source_CmsPage
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Checkout_System_Config_Source_CmsPage
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ___________ __ __
|
4 |
+
* \__ ___/____ _/ |_ _____ | |
|
5 |
+
* | | / _ \\ __\\__ \ | |
|
6 |
+
* | | | |_| || | / __ \_| |__
|
7 |
+
* |____| \____/ |__| (____ /|____/
|
8 |
+
* \/
|
9 |
+
* ___ __ __
|
10 |
+
* | | ____ _/ |_ ____ _______ ____ ____ _/ |_
|
11 |
+
* | | / \\ __\_/ __ \\_ __ \ / \ _/ __ \\ __\
|
12 |
+
* | || | \| | \ ___/ | | \/| | \\ ___/ | |
|
13 |
+
* |___||___| /|__| \_____>|__| |___| / \_____>|__|
|
14 |
+
* \/ \/
|
15 |
+
* ________
|
16 |
+
* / _____/_______ ____ __ __ ______
|
17 |
+
* / \ ___\_ __ \ / _ \ | | \\____ \
|
18 |
+
* \ \_\ \| | \/| |_| || | /| |_| |
|
19 |
+
* \______ /|__| \____/ |____/ | __/
|
20 |
+
* \/ |__|
|
21 |
+
*
|
22 |
+
* NOTICE OF LICENSE
|
23 |
+
*
|
24 |
+
* This source file is subject to the Creative Commons License.
|
25 |
+
* It is available through the world-wide-web at this URL:
|
26 |
+
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
27 |
+
* If you are unable to obtain it through the world-wide-web, please send an email
|
28 |
+
* to servicedesk@tig.nl so we can send you a copy immediately.
|
29 |
+
*
|
30 |
+
* DISCLAIMER
|
31 |
+
*
|
32 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
33 |
+
* versions in the future. If you wish to customize this module for your
|
34 |
+
* needs please contact servicedesk@tig.nl for more information.
|
35 |
+
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
+
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
+
*/
|
39 |
+
class TIG_PostNL_Model_Core_Api extends Mage_Api_Model_Resource_Abstract
|
40 |
+
{
|
41 |
+
|
42 |
+
}
|
@@ -0,0 +1,946 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ___________ __ __
|
4 |
+
* \__ ___/____ _/ |_ _____ | |
|
5 |
+
* | | / _ \\ __\\__ \ | |
|
6 |
+
* | | | |_| || | / __ \_| |__
|
7 |
+
* |____| \____/ |__| (____ /|____/
|
8 |
+
* \/
|
9 |
+
* ___ __ __
|
10 |
+
* | | ____ _/ |_ ____ _______ ____ ____ _/ |_
|
11 |
+
* | | / \\ __\_/ __ \\_ __ \ / \ _/ __ \\ __\
|
12 |
+
* | || | \| | \ ___/ | | \/| | \\ ___/ | |
|
13 |
+
* |___||___| /|__| \_____>|__| |___| / \_____>|__|
|
14 |
+
* \/ \/
|
15 |
+
* ________
|
16 |
+
* / _____/_______ ____ __ __ ______
|
17 |
+
* / \ ___\_ __ \ / _ \ | | \\____ \
|
18 |
+
* \ \_\ \| | \/| |_| || | /| |_| |
|
19 |
+
* \______ /|__| \____/ |____/ | __/
|
20 |
+
* \/ |__|
|
21 |
+
*
|
22 |
+
* NOTICE OF LICENSE
|
23 |
+
*
|
24 |
+
* This source file is subject to the Creative Commons License.
|
25 |
+
* It is available through the world-wide-web at this URL:
|
26 |
+
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
27 |
+
* If you are unable to obtain it through the world-wide-web, please send an email
|
28 |
+
* to servicedesk@tig.nl so we can send you a copy immediately.
|
29 |
+
*
|
30 |
+
* DISCLAIMER
|
31 |
+
*
|
32 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
33 |
+
* versions in the future. If you wish to customize this module for your
|
34 |
+
* needs please contact servicedesk@tig.nl for more information.
|
35 |
+
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
+
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
+
*/
|
39 |
+
class TIG_PostNL_Model_Core_Api_V2 extends TIG_PostNL_Model_Core_Api
|
40 |
+
{
|
41 |
+
/**
|
42 |
+
* Create shipments via API.
|
43 |
+
*
|
44 |
+
* @param array $orderIds
|
45 |
+
*
|
46 |
+
* @return array
|
47 |
+
*/
|
48 |
+
public function createShipments($orderIds = array())
|
49 |
+
{
|
50 |
+
$this->_validateRequiredOrderIds($orderIds);
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Get service model used for processing this request.
|
54 |
+
*/
|
55 |
+
$serviceModel = Mage::getModel('postnl_core/service_shipment');
|
56 |
+
|
57 |
+
$resultArray = array();
|
58 |
+
foreach ($orderIds as $orderId) {
|
59 |
+
/**
|
60 |
+
* Reset the warnings so we don't add the warnings generated by the previous shipment.
|
61 |
+
*/
|
62 |
+
$serviceModel->resetWarnings();
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Create a shipment and add the resulting data to the response.
|
66 |
+
*/
|
67 |
+
$result = $this->_createShipment($serviceModel, $orderId);
|
68 |
+
|
69 |
+
$resultArray[] = $result;
|
70 |
+
}
|
71 |
+
|
72 |
+
return $resultArray;
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Process the full PostNL flow for the supplied orders.
|
77 |
+
*
|
78 |
+
* @param array $orderIds
|
79 |
+
* @param string|bool $labelSize
|
80 |
+
* @param int|null $labelStartPosition
|
81 |
+
*
|
82 |
+
* @return array
|
83 |
+
* @throws Mage_Api_Exception
|
84 |
+
*/
|
85 |
+
public function fullPostnlFlow($orderIds = array(), $labelSize = false, $labelStartPosition = null)
|
86 |
+
{
|
87 |
+
$this->_validateRequiredOrderIds($orderIds);
|
88 |
+
|
89 |
+
$helper = Mage::helper('postnl');
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Validate if the labelSize parameter has a valid value.
|
93 |
+
*/
|
94 |
+
if (!empty($labelSize) && $labelSize != 'A4' && $labelSize != 'A6') {
|
95 |
+
$this->_fault(
|
96 |
+
'POSTNL-0226',
|
97 |
+
$helper->__("Only A4 or A6 are valid values for the 'labelSize' parameter.")
|
98 |
+
);
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Validate if the labelStartPosition parameter has a valid value.
|
103 |
+
*/
|
104 |
+
if (!is_null($labelStartPosition)
|
105 |
+
&& (!is_int($labelStartPosition)
|
106 |
+
|| $labelStartPosition < 1
|
107 |
+
|| $labelStartPosition > 4
|
108 |
+
)
|
109 |
+
) {
|
110 |
+
$this->_fault(
|
111 |
+
'POSTNL-0227',
|
112 |
+
$helper->__("The 'labelStartPosition' parameter must contain an integer value between 1 and 4.")
|
113 |
+
);
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Get service model used for processing this request.
|
118 |
+
*/
|
119 |
+
$serviceModel = Mage::getModel('postnl_core/service_shipment');
|
120 |
+
|
121 |
+
$response = array();
|
122 |
+
foreach ($orderIds as $orderId) {
|
123 |
+
$warnings = null;
|
124 |
+
/**
|
125 |
+
* Reset the warnings so we don't add the warnings generated by the previous shipment.
|
126 |
+
*/
|
127 |
+
$serviceModel->resetWarnings();
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Create shipments if needed and return all shipment IDs for the order.
|
131 |
+
*/
|
132 |
+
$shipmentIds = $serviceModel->createShipments(array($orderId), true);
|
133 |
+
|
134 |
+
if ($serviceModel->hasWarnings()) {
|
135 |
+
$warnings = $serviceModel->getWarnings();
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* If no shipments could be found for this order, add an error to the response.
|
140 |
+
*/
|
141 |
+
if (empty($shipmentIds)) {
|
142 |
+
$response[] = array(
|
143 |
+
'order_id' => $orderId,
|
144 |
+
'shipment_id' => null,
|
145 |
+
'label' => null,
|
146 |
+
'warning' => $warnings,
|
147 |
+
'error' => array(
|
148 |
+
array(
|
149 |
+
'entity_id' => $orderId,
|
150 |
+
'code' => 'POSTNL-0230',
|
151 |
+
'description' => $helper->__('Could not create or find a shipment for order #%s.', $orderId)
|
152 |
+
),
|
153 |
+
),
|
154 |
+
);
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Continue with next order.
|
158 |
+
*/
|
159 |
+
continue;
|
160 |
+
}
|
161 |
+
|
162 |
+
foreach ($shipmentIds as $shipmentId) {
|
163 |
+
/**
|
164 |
+
* Reset the warnings so we don't add the warnings generated by the previous shipment.
|
165 |
+
*/
|
166 |
+
$serviceModel->resetWarnings();
|
167 |
+
|
168 |
+
/**
|
169 |
+
* Get label for shipment and add the resulting data to the response.
|
170 |
+
*/
|
171 |
+
$response[] = $this->_getLabels($serviceModel, $shipmentId, true, $labelSize, $labelStartPosition);
|
172 |
+
}
|
173 |
+
}
|
174 |
+
|
175 |
+
return $response;
|
176 |
+
}
|
177 |
+
|
178 |
+
/**
|
179 |
+
* Confirm the requested shipments.
|
180 |
+
*
|
181 |
+
* @param array $shipmentIds
|
182 |
+
*
|
183 |
+
* @return array
|
184 |
+
* @throws Mage_Api_Exception
|
185 |
+
*/
|
186 |
+
public function confirmShipments($shipmentIds = array())
|
187 |
+
{
|
188 |
+
$this->_validateRequiredShipmentIds($shipmentIds);
|
189 |
+
|
190 |
+
/**
|
191 |
+
* Get service model used for processing this request.
|
192 |
+
*/
|
193 |
+
$serviceModel = Mage::getModel('postnl_core/service_shipment');
|
194 |
+
|
195 |
+
/**
|
196 |
+
* Update the shipping status for each requested shipment.
|
197 |
+
*/
|
198 |
+
$response = array();
|
199 |
+
foreach ($shipmentIds as $shipmentId) {
|
200 |
+
/**
|
201 |
+
* Reset the warnings so we don't add the warnings generated by the previous shipment.
|
202 |
+
*/
|
203 |
+
$serviceModel->resetWarnings();
|
204 |
+
|
205 |
+
/**
|
206 |
+
* Add the resulting data to the response.
|
207 |
+
*/
|
208 |
+
$response[] = $this->_confirmShipment($serviceModel, $shipmentId);
|
209 |
+
}
|
210 |
+
|
211 |
+
return $response;
|
212 |
+
}
|
213 |
+
|
214 |
+
|
215 |
+
/**
|
216 |
+
* Print shipping labels for the requested shipments.
|
217 |
+
*
|
218 |
+
* @param array $shipmentIds
|
219 |
+
* @param string|bool $labelSize
|
220 |
+
* @param int|null $labelStartPosition
|
221 |
+
*
|
222 |
+
* @return array
|
223 |
+
* @throws Mage_Api_Exception
|
224 |
+
*/
|
225 |
+
public function printShippingLabels($shipmentIds = array(), $labelSize = false, $labelStartPosition = null)
|
226 |
+
{
|
227 |
+
$this->_validateRequiredShipmentIds($shipmentIds);
|
228 |
+
|
229 |
+
/**
|
230 |
+
* Validate if the labelSize parameter has a valid value.
|
231 |
+
*/
|
232 |
+
if (!empty($labelSize) && $labelSize != 'A4' && $labelSize != 'A6') {
|
233 |
+
$this->_fault(
|
234 |
+
'POSTNL-0226',
|
235 |
+
Mage::helper('postnl')->__("Only A4 or A6 are valid values for the 'labelSize' parameter.")
|
236 |
+
);
|
237 |
+
}
|
238 |
+
|
239 |
+
/**
|
240 |
+
* Validate if the labelStartPosition parameter has a valid value.
|
241 |
+
*/
|
242 |
+
if (!is_null($labelStartPosition)
|
243 |
+
&& (!is_int($labelStartPosition)
|
244 |
+
|| $labelStartPosition < 1
|
245 |
+
|| $labelStartPosition > 4
|
246 |
+
)
|
247 |
+
) {
|
248 |
+
$this->_fault(
|
249 |
+
'POSTNL-0227',
|
250 |
+
Mage::helper('postnl')->__(
|
251 |
+
"The 'labelStartPosition' parameter must contain an integer value between 1 and 4."
|
252 |
+
)
|
253 |
+
);
|
254 |
+
}
|
255 |
+
|
256 |
+
/**
|
257 |
+
* Get service model used for processing this request.
|
258 |
+
*/
|
259 |
+
$serviceModel = Mage::getModel('postnl_core/service_shipment');
|
260 |
+
|
261 |
+
/**
|
262 |
+
* Get the shipping labels for each shipment.
|
263 |
+
*/
|
264 |
+
$response = array();
|
265 |
+
foreach ($shipmentIds as $shipmentId) {
|
266 |
+
/**
|
267 |
+
* Reset the warnings so we don't add the warnings generated by the previous shipment.
|
268 |
+
*/
|
269 |
+
$serviceModel->resetWarnings();
|
270 |
+
|
271 |
+
/**
|
272 |
+
* Add the resulting data to the response.
|
273 |
+
*/
|
274 |
+
$response[] = $this->_getLabels($serviceModel, $shipmentId, false, $labelSize, $labelStartPosition);
|
275 |
+
}
|
276 |
+
|
277 |
+
return $response;
|
278 |
+
}
|
279 |
+
|
280 |
+
/**
|
281 |
+
* Confirm and print shipping labels for the requested shipments.
|
282 |
+
*
|
283 |
+
* @param array $shipmentIds
|
284 |
+
* @param string|bool $labelSize
|
285 |
+
* @param int|null $labelStartPosition
|
286 |
+
*
|
287 |
+
* @return array
|
288 |
+
* @throws Mage_Api_Exception
|
289 |
+
*/
|
290 |
+
public function confirmAndPrintShippingLabels($shipmentIds = array(), $labelSize = false,
|
291 |
+
$labelStartPosition = null)
|
292 |
+
{
|
293 |
+
$this->_validateRequiredShipmentIds($shipmentIds);
|
294 |
+
|
295 |
+
/**
|
296 |
+
* Validate if the labelSize parameter has a valid value.
|
297 |
+
*/
|
298 |
+
if (!empty($labelSize) && $labelSize != 'A4' && $labelSize != 'A6') {
|
299 |
+
$this->_fault(
|
300 |
+
'POSTNL-0226',
|
301 |
+
Mage::helper('postnl')->__("Only A4 or A6 are valid values for the 'labelSize' parameter.")
|
302 |
+
);
|
303 |
+
}
|
304 |
+
|
305 |
+
/**
|
306 |
+
* Validate if the labelStartPosition parameter has a valid value.
|
307 |
+
*/
|
308 |
+
if (!is_null($labelStartPosition)
|
309 |
+
&& (!is_int($labelStartPosition)
|
310 |
+
|| $labelStartPosition < 1
|
311 |
+
|| $labelStartPosition > 4
|
312 |
+
)
|
313 |
+
) {
|
314 |
+
$this->_fault(
|
315 |
+
'POSTNL-0227',
|
316 |
+
Mage::helper('postnl')->__(
|
317 |
+
"The 'labelStartPosition' parameter must contain an integer value between 1 and 4."
|
318 |
+
)
|
319 |
+
);
|
320 |
+
}
|
321 |
+
|
322 |
+
/**
|
323 |
+
* Get service model used for processing this request.
|
324 |
+
*/
|
325 |
+
$serviceModel = Mage::getModel('postnl_core/service_shipment');
|
326 |
+
|
327 |
+
/**
|
328 |
+
* Get the shipping labels for each shipment.
|
329 |
+
*/
|
330 |
+
$response = array();
|
331 |
+
foreach ($shipmentIds as $shipmentId) {
|
332 |
+
/**
|
333 |
+
* Reset the warnings so we don't add the warnings generated by the previous shipment.
|
334 |
+
*/
|
335 |
+
$serviceModel->resetWarnings();
|
336 |
+
|
337 |
+
/**
|
338 |
+
* Add the resulting data to the response.
|
339 |
+
*/
|
340 |
+
$response[] = $this->_getLabels($serviceModel, $shipmentId, true, $labelSize, $labelStartPosition);
|
341 |
+
}
|
342 |
+
|
343 |
+
return $response;
|
344 |
+
}
|
345 |
+
|
346 |
+
/**
|
347 |
+
* Get the current Track & Trace URL for the requested shipments as well as their barcode.
|
348 |
+
*
|
349 |
+
* @param array $shipmentIds
|
350 |
+
*
|
351 |
+
* @return array
|
352 |
+
* @throws Mage_Api_Exception
|
353 |
+
*/
|
354 |
+
public function getTrackAndTraceUrls($shipmentIds = array())
|
355 |
+
{
|
356 |
+
$this->_validateRequiredShipmentIds($shipmentIds);
|
357 |
+
|
358 |
+
/**
|
359 |
+
* Get service model used for processing this request.
|
360 |
+
*/
|
361 |
+
$serviceModel = Mage::getModel('postnl_core/service_shipment');
|
362 |
+
|
363 |
+
/**
|
364 |
+
* Update the shipping status for each requested shipment.
|
365 |
+
*/
|
366 |
+
$response = array();
|
367 |
+
foreach ($shipmentIds as $shipmentId) {
|
368 |
+
/**
|
369 |
+
* Reset the warnings so we don't add the warnings generated by the previous shipment.
|
370 |
+
*/
|
371 |
+
$serviceModel->resetWarnings();
|
372 |
+
|
373 |
+
/**
|
374 |
+
* Retrieve the Track & Trace data.
|
375 |
+
*/
|
376 |
+
$response[] = $this->_getTrackAndTraceInfo($serviceModel, $shipmentId);
|
377 |
+
}
|
378 |
+
|
379 |
+
return $response;
|
380 |
+
}
|
381 |
+
|
382 |
+
/**
|
383 |
+
* @param array $shipmentIds
|
384 |
+
*
|
385 |
+
* @return array
|
386 |
+
*
|
387 |
+
* @throws Exception
|
388 |
+
* @throws TIG_PostNL_Exception
|
389 |
+
* @throws TIG_PostNL_Model_Core_Cif_Exception
|
390 |
+
* @throws Mage_Api_Exception
|
391 |
+
*/
|
392 |
+
public function getStatusInfo($shipmentIds = array())
|
393 |
+
{
|
394 |
+
$this->_validateRequiredShipmentIds($shipmentIds);
|
395 |
+
|
396 |
+
/**
|
397 |
+
* Get service model used for processing this request.
|
398 |
+
*/
|
399 |
+
$serviceModel = Mage::getModel('postnl_core/service_shipment');
|
400 |
+
|
401 |
+
/**
|
402 |
+
* Update the shipping status for each requested shipment.
|
403 |
+
*/
|
404 |
+
$response = array();
|
405 |
+
foreach ($shipmentIds as $shipmentId) {
|
406 |
+
/**
|
407 |
+
* Reset the warnings so we don't add the warnings generated by the previous shipment.
|
408 |
+
*/
|
409 |
+
$serviceModel->resetWarnings();
|
410 |
+
|
411 |
+
/**
|
412 |
+
* Add the resulting data to the response.
|
413 |
+
*/
|
414 |
+
$response[] = $this->_getStatusInfo($serviceModel, $shipmentId);
|
415 |
+
}
|
416 |
+
|
417 |
+
return $response;
|
418 |
+
}
|
419 |
+
|
420 |
+
/**
|
421 |
+
* Validate that the orderIds parameter contains a non-empty array.
|
422 |
+
*
|
423 |
+
* @param $orderIds
|
424 |
+
*
|
425 |
+
* @return $this
|
426 |
+
* @throws Mage_Api_Exception
|
427 |
+
*/
|
428 |
+
protected function _validateRequiredOrderIds($orderIds)
|
429 |
+
{
|
430 |
+
if (!is_array($orderIds) || empty($orderIds)) {
|
431 |
+
$this->_fault(
|
432 |
+
'POSTNL-0228',
|
433 |
+
Mage::helper('postnl')->__("The 'orderIds' parameter must contain a non-empty array of order IDs.")
|
434 |
+
);
|
435 |
+
}
|
436 |
+
|
437 |
+
return $this;
|
438 |
+
}
|
439 |
+
|
440 |
+
/**
|
441 |
+
* Validate that the shipmentIds parameter contains a non-empty array.
|
442 |
+
*
|
443 |
+
* @param $shipmentIds
|
444 |
+
*
|
445 |
+
* @return $this
|
446 |
+
* @throws Mage_Api_Exception
|
447 |
+
*/
|
448 |
+
protected function _validateRequiredShipmentIds($shipmentIds)
|
449 |
+
{
|
450 |
+
if (!is_array($shipmentIds) || empty($shipmentIds)) {
|
451 |
+
$this->_fault(
|
452 |
+
'POSTNL-0229',
|
453 |
+
Mage::helper('postnl')->__(
|
454 |
+
"The 'shipmentIds' parameter must contain a non-empty array of shipment IDs."
|
455 |
+
)
|
456 |
+
);
|
457 |
+
}
|
458 |
+
|
459 |
+
return $this;
|
460 |
+
}
|
461 |
+
|
462 |
+
/**
|
463 |
+
* Confirm the requested shipments.
|
464 |
+
*
|
465 |
+
* @param TIG_PostNL_Model_Core_Service_Shipment $serviceModel
|
466 |
+
* @param int $shipmentId
|
467 |
+
*
|
468 |
+
* @return array
|
469 |
+
*/
|
470 |
+
protected function _confirmShipment(TIG_PostNL_Model_Core_Service_Shipment $serviceModel, $shipmentId)
|
471 |
+
{
|
472 |
+
$helper = Mage::helper('postnl');
|
473 |
+
|
474 |
+
/**
|
475 |
+
* Get the PostNL Shipment for the current Shipment ID.
|
476 |
+
*/
|
477 |
+
$postnlShipment = $serviceModel->getPostnlShipment($shipmentId);
|
478 |
+
|
479 |
+
/**
|
480 |
+
* If the PostNL shipment does not exist, return an error.
|
481 |
+
*/
|
482 |
+
if (!$postnlShipment || !is_object($postnlShipment) || !$postnlShipment->getId()) {
|
483 |
+
$response = array(
|
484 |
+
'order_id' => null,
|
485 |
+
'shipment_id' => $shipmentId,
|
486 |
+
'track_and_trace_url' => null,
|
487 |
+
'main_barcode' => null,
|
488 |
+
'warning' => null,
|
489 |
+
'error' => array(
|
490 |
+
array(
|
491 |
+
'entity_id' => $shipmentId,
|
492 |
+
'code' => null,
|
493 |
+
'description' => $helper->__('No PostNL Shipment found for shipment ID #%s', $shipmentId)
|
494 |
+
),
|
495 |
+
),
|
496 |
+
);
|
497 |
+
|
498 |
+
return $response;
|
499 |
+
}
|
500 |
+
|
501 |
+
$errors = array();
|
502 |
+
try {
|
503 |
+
/**
|
504 |
+
* Confirm the PostNL shipment.
|
505 |
+
*/
|
506 |
+
$serviceModel->confirmShipment($postnlShipment);
|
507 |
+
} catch (TIG_PostNL_Exception $e) {
|
508 |
+
$helper->logException($e);
|
509 |
+
|
510 |
+
$code = $e->getCode();
|
511 |
+
if (empty($code)) {
|
512 |
+
$code = null;
|
513 |
+
}
|
514 |
+
|
515 |
+
$errors[] = array(
|
516 |
+
'entity_id' => $shipmentId,
|
517 |
+
'code' => $code,
|
518 |
+
'description' => $e->getMessage(),
|
519 |
+
);
|
520 |
+
} catch (Exception $e) {
|
521 |
+
$helper->logException($e);
|
522 |
+
$errors[] = array(
|
523 |
+
'entity_id' => $shipmentId,
|
524 |
+
'code' => null,
|
525 |
+
'description' => $e->getMessage(),
|
526 |
+
);
|
527 |
+
}
|
528 |
+
|
529 |
+
/**
|
530 |
+
* Add the resulting data to the response.
|
531 |
+
*/
|
532 |
+
$response = array(
|
533 |
+
'order_id' => $postnlShipment->getOrderId(),
|
534 |
+
'shipment_id' => $postnlShipment->getShipmentId(),
|
535 |
+
);
|
536 |
+
|
537 |
+
/**
|
538 |
+
* Add any warnings that may have occurred.
|
539 |
+
*/
|
540 |
+
if ($serviceModel->hasWarnings()) {
|
541 |
+
$response['warning'] = $serviceModel->getWarnings();
|
542 |
+
}
|
543 |
+
|
544 |
+
/**
|
545 |
+
* Add any errors that may have occurred.
|
546 |
+
*/
|
547 |
+
if (!empty($errors)) {
|
548 |
+
$response['error'] = $errors;
|
549 |
+
}
|
550 |
+
|
551 |
+
return $response;
|
552 |
+
}
|
553 |
+
|
554 |
+
/**
|
555 |
+
* Get the shipping labels for the requested shipments.
|
556 |
+
*
|
557 |
+
* @param TIG_PostNL_Model_Core_Service_Shipment $serviceModel
|
558 |
+
* @param int $shipmentId
|
559 |
+
* @param bool $confirm
|
560 |
+
* @param bool|string $labelSize
|
561 |
+
* @param int $labelStartPosition
|
562 |
+
*
|
563 |
+
* @return array
|
564 |
+
*/
|
565 |
+
protected function _getLabels(TIG_PostNL_Model_Core_Service_Shipment $serviceModel, $shipmentId, $confirm = false,
|
566 |
+
$labelSize = false, $labelStartPosition = 0)
|
567 |
+
{
|
568 |
+
$helper = Mage::helper('postnl');
|
569 |
+
|
570 |
+
/**
|
571 |
+
* Get the PostNL shipment for this shipment ID.
|
572 |
+
*/
|
573 |
+
$postnlShipment = $serviceModel->getPostnlShipment($shipmentId);
|
574 |
+
|
575 |
+
/**
|
576 |
+
* If the PostNL shipment does not exist, return an error.
|
577 |
+
*/
|
578 |
+
if (!$postnlShipment || !is_object($postnlShipment) || !$postnlShipment->getId()) {
|
579 |
+
$response = array(
|
580 |
+
'order_id' => null,
|
581 |
+
'shipment_id' => $shipmentId,
|
582 |
+
'label' => null,
|
583 |
+
'warning' => null,
|
584 |
+
'error' => array(
|
585 |
+
array(
|
586 |
+
'entity_id' => $shipmentId,
|
587 |
+
'code' => 'POSTNL-0225',
|
588 |
+
'description' => $helper->__('No PostNL Shipment found for shipment ID #%s.', $shipmentId)
|
589 |
+
),
|
590 |
+
),
|
591 |
+
);
|
592 |
+
|
593 |
+
return $response;
|
594 |
+
}
|
595 |
+
|
596 |
+
/**
|
597 |
+
* Form the base response array.
|
598 |
+
*/
|
599 |
+
$response = array(
|
600 |
+
'order_id' => $postnlShipment->getOrderId(),
|
601 |
+
'shipment_id' => $postnlShipment->getShipmentId(),
|
602 |
+
'label' => null,
|
603 |
+
);
|
604 |
+
|
605 |
+
$errors = array();
|
606 |
+
try {
|
607 |
+
/**
|
608 |
+
* Check whether we should also get the return labels based on the shop's configuration.
|
609 |
+
*/
|
610 |
+
$printReturnLabels = Mage::helper('postnl')->canPrintReturnLabelsWithShippingLabels(
|
611 |
+
$postnlShipment->getStoreId()
|
612 |
+
);
|
613 |
+
|
614 |
+
/**
|
615 |
+
* Get the actual labels.
|
616 |
+
*/
|
617 |
+
$labels = $serviceModel->getLabels($postnlShipment, $confirm, $printReturnLabels);
|
618 |
+
|
619 |
+
/**
|
620 |
+
* Get the label model which will convert the base64_encoded pdf strings to a single, merged pdf.
|
621 |
+
*/
|
622 |
+
$labelModel = Mage::getModel('postnl_core/label')
|
623 |
+
->setLabelSize($labelSize)
|
624 |
+
->setLabelCounter($labelStartPosition);
|
625 |
+
|
626 |
+
/**
|
627 |
+
* Create the merged pdf.
|
628 |
+
*/
|
629 |
+
$label = $labelModel->createPdf($labels);
|
630 |
+
|
631 |
+
/**
|
632 |
+
* Base64_encode the merged pdf and add it to the response array.
|
633 |
+
*/
|
634 |
+
$response['label'] = base64_encode($label);
|
635 |
+
} catch (TIG_PostNL_Exception $e) {
|
636 |
+
$helper->logException($e);
|
637 |
+
|
638 |
+
$code = $e->getCode();
|
639 |
+
if (empty($code)) {
|
640 |
+
$code = null;
|
641 |
+
}
|
642 |
+
|
643 |
+
$errors[] = array(
|
644 |
+
'entity_id' => $shipmentId,
|
645 |
+
'code' => $code,
|
646 |
+
'description' => $e->getMessage(),
|
647 |
+
);
|
648 |
+
} catch (Exception $e) {
|
649 |
+
$helper->logException($e);
|
650 |
+
$errors[] = array(
|
651 |
+
'entity_id' => $shipmentId,
|
652 |
+
'code' => null,
|
653 |
+
'description' => $e->getMessage(),
|
654 |
+
);
|
655 |
+
}
|
656 |
+
|
657 |
+
/**
|
658 |
+
* Add any warnings that may have occurred.
|
659 |
+
*/
|
660 |
+
if ($serviceModel->hasWarnings()) {
|
661 |
+
$response['warning'] = $serviceModel->getWarnings();
|
662 |
+
}
|
663 |
+
|
664 |
+
/**
|
665 |
+
* Add any errors that may have occurred.
|
666 |
+
*/
|
667 |
+
if (!empty($errors)) {
|
668 |
+
$response['error'] = $errors;
|
669 |
+
}
|
670 |
+
|
671 |
+
return $response;
|
672 |
+
}
|
673 |
+
|
674 |
+
/**
|
675 |
+
* Create Magento shipment for an order and format response
|
676 |
+
*
|
677 |
+
* @param TIG_PostNL_Model_Core_Service_Shipment $serviceModel
|
678 |
+
* @param $orderId
|
679 |
+
*
|
680 |
+
* @return array
|
681 |
+
*/
|
682 |
+
protected function _createShipment(TIG_PostNL_Model_Core_Service_Shipment $serviceModel, $orderId)
|
683 |
+
{
|
684 |
+
$helper = Mage::helper('postnl');
|
685 |
+
/**
|
686 |
+
* Set return values to default to null.
|
687 |
+
*/
|
688 |
+
$error = null;
|
689 |
+
$shipmentId = null;
|
690 |
+
|
691 |
+
try{
|
692 |
+
/**
|
693 |
+
* Try to create a shipment for the supplied order ID
|
694 |
+
*/
|
695 |
+
$shipmentId = $serviceModel->createShipment($orderId);
|
696 |
+
} catch(TIG_PostNL_Exception $e) {
|
697 |
+
$helper->logException($e);
|
698 |
+
|
699 |
+
$code = $e->getCode();
|
700 |
+
if (empty($code)) {
|
701 |
+
$code = null;
|
702 |
+
}
|
703 |
+
|
704 |
+
/**
|
705 |
+
* Set error data for response
|
706 |
+
*/
|
707 |
+
$error = array(
|
708 |
+
'entity_id' => $orderId,
|
709 |
+
'code' => $code,
|
710 |
+
'description' => $e->getMessage(),
|
711 |
+
);
|
712 |
+
} catch (Exception $e) {
|
713 |
+
$helper->logException($e);
|
714 |
+
/**
|
715 |
+
* Set error data for response
|
716 |
+
*/
|
717 |
+
$error = array(
|
718 |
+
'entity_id' => $orderId,
|
719 |
+
'code' => null,
|
720 |
+
'description' => $e->getMessage(),
|
721 |
+
);
|
722 |
+
}
|
723 |
+
|
724 |
+
|
725 |
+
/**
|
726 |
+
* Format response
|
727 |
+
*/
|
728 |
+
$result = array(
|
729 |
+
'order_id' => $orderId,
|
730 |
+
'shipment_id' => $shipmentId,
|
731 |
+
);
|
732 |
+
|
733 |
+
/**
|
734 |
+
* Add error data to response
|
735 |
+
*/
|
736 |
+
if (!is_null($error)) {
|
737 |
+
$result['error'] = array($error);
|
738 |
+
}
|
739 |
+
|
740 |
+
/**
|
741 |
+
* Set warning data for response
|
742 |
+
*/
|
743 |
+
if ($serviceModel->hasWarnings()) {
|
744 |
+
$result['warning'] = $serviceModel->getWarnings();
|
745 |
+
}
|
746 |
+
|
747 |
+
return $result;
|
748 |
+
}
|
749 |
+
|
750 |
+
/**
|
751 |
+
* Get Track & Trace info for the supplied shipment ID.
|
752 |
+
*
|
753 |
+
* @param TIG_PostNL_Model_Core_Service_Shipment $serviceModel
|
754 |
+
* @param int $shipmentId
|
755 |
+
*
|
756 |
+
* @return array
|
757 |
+
*/
|
758 |
+
protected function _getTrackAndTraceInfo(TIG_PostNL_Model_Core_Service_Shipment $serviceModel, $shipmentId)
|
759 |
+
{
|
760 |
+
$helper = Mage::helper('postnl');
|
761 |
+
|
762 |
+
/**
|
763 |
+
* Get the PostNL Shipment for the current Shipment ID.
|
764 |
+
*/
|
765 |
+
$postnlShipment = $serviceModel->getPostnlShipment($shipmentId);
|
766 |
+
|
767 |
+
/**
|
768 |
+
* If the PostNL shipment does not exist, return an error.
|
769 |
+
*/
|
770 |
+
if (!$postnlShipment || !is_object($postnlShipment) || !$postnlShipment->getId()) {
|
771 |
+
$response = array(
|
772 |
+
'order_id' => null,
|
773 |
+
'shipment_id' => $shipmentId,
|
774 |
+
'track_and_trace_url' => null,
|
775 |
+
'main_barcode' => null,
|
776 |
+
'return_barcode' => null,
|
777 |
+
'other_barcodes' => null,
|
778 |
+
'warning' => null,
|
779 |
+
'error' => array(
|
780 |
+
array(
|
781 |
+
'entity_id' => $shipmentId,
|
782 |
+
'code' => null,
|
783 |
+
'description' => $helper->__('No PostNL Shipment found for shipment ID #%s', $shipmentId)
|
784 |
+
),
|
785 |
+
),
|
786 |
+
);
|
787 |
+
|
788 |
+
return $response;
|
789 |
+
}
|
790 |
+
|
791 |
+
/**
|
792 |
+
* Add the resulting data to the response.
|
793 |
+
*/
|
794 |
+
$response = array(
|
795 |
+
'order_id' => $postnlShipment->getOrderId(),
|
796 |
+
'shipment_id' => $postnlShipment->getShipmentId(),
|
797 |
+
'track_and_trace_url' => $postnlShipment->getBarcodeUrl(),
|
798 |
+
'main_barcode' => $postnlShipment->getMainBarcode(),
|
799 |
+
);
|
800 |
+
|
801 |
+
/**
|
802 |
+
* Get all shipments barcodes.
|
803 |
+
*/
|
804 |
+
$allBarcodes = array(
|
805 |
+
'shipment' => $postnlShipment->getBarcodes(
|
806 |
+
false,
|
807 |
+
TIG_PostNL_Model_Core_Shipment_Barcode::BARCODE_TYPE_SHIPMENT
|
808 |
+
),
|
809 |
+
);
|
810 |
+
|
811 |
+
/**
|
812 |
+
* If the shipment also has return barcodes, add those.
|
813 |
+
*/
|
814 |
+
if ($postnlShipment->hasReturnBarcode()) {
|
815 |
+
$allBarcodes['return'] = $postnlShipment->getBarcodes(
|
816 |
+
false,
|
817 |
+
TIG_PostNL_Model_Core_Shipment_Barcode::BARCODE_TYPE_RETURN
|
818 |
+
);
|
819 |
+
|
820 |
+
$response['return_barcode'] = $postnlShipment->getReturnBarcode();
|
821 |
+
}
|
822 |
+
|
823 |
+
/**
|
824 |
+
* Add all barcodes to the response array.
|
825 |
+
*/
|
826 |
+
$response['all_barcodes'] = $allBarcodes;
|
827 |
+
|
828 |
+
/**
|
829 |
+
* Add any warnings that may have occurred.
|
830 |
+
*/
|
831 |
+
if ($serviceModel->hasWarnings()) {
|
832 |
+
$response['warning'] = $serviceModel->getWarnings();
|
833 |
+
}
|
834 |
+
|
835 |
+
return $response;
|
836 |
+
}
|
837 |
+
|
838 |
+
/**
|
839 |
+
* Get shipping status info for the requested shipment.
|
840 |
+
*
|
841 |
+
* @param TIG_PostNL_Model_Core_Service_Shipment $serviceModel
|
842 |
+
* @param int $shipmentId
|
843 |
+
*
|
844 |
+
* @return array
|
845 |
+
*/
|
846 |
+
protected function _getStatusInfo(TIG_PostNL_Model_Core_Service_Shipment $serviceModel, $shipmentId)
|
847 |
+
{
|
848 |
+
$helper = Mage::helper('postnl');
|
849 |
+
|
850 |
+
/**
|
851 |
+
* Get the PostNL shipment for this shipment ID.
|
852 |
+
*/
|
853 |
+
$postnlShipment = $serviceModel->getPostnlShipment($shipmentId);
|
854 |
+
|
855 |
+
/**
|
856 |
+
* If the PostNL shipment does not exist, return an error.
|
857 |
+
*/
|
858 |
+
if (!$postnlShipment || !is_object($postnlShipment) || !$postnlShipment->getId()) {
|
859 |
+
$response = array(
|
860 |
+
'order_id' => null,
|
861 |
+
'shipment_id' => $shipmentId,
|
862 |
+
'shipping_phase' => null,
|
863 |
+
'return_phase' => null,
|
864 |
+
'warning' => null,
|
865 |
+
'error' => array(
|
866 |
+
array(
|
867 |
+
'entity_id' => $shipmentId,
|
868 |
+
'code' => 'POSTNL-0225',
|
869 |
+
'description' => $helper->__('No PostNL Shipment found for shipment ID #%s.', $shipmentId)
|
870 |
+
),
|
871 |
+
),
|
872 |
+
);
|
873 |
+
|
874 |
+
return $response;
|
875 |
+
}
|
876 |
+
|
877 |
+
$errors = array();
|
878 |
+
try {
|
879 |
+
/**
|
880 |
+
* Request a shipping status update.
|
881 |
+
*/
|
882 |
+
$postnlShipment->updateShippingStatus();
|
883 |
+
} catch (TIG_PostNL_Exception $e) {
|
884 |
+
$helper->logException($e);
|
885 |
+
|
886 |
+
$code = $e->getCode();
|
887 |
+
if (empty($code)) {
|
888 |
+
$code = null;
|
889 |
+
}
|
890 |
+
|
891 |
+
/**
|
892 |
+
* If the error is a 'collo not found'-error add it as a warning (a recurring error that does not
|
893 |
+
* necessarily indicate that anything is wrong). Add it as a true error otherwise.
|
894 |
+
*/
|
895 |
+
if ($code != TIG_PostNL_Model_Core_Cif_Abstract::SHIPMENT_NOT_FOUND_ERROR_NUMBER) {
|
896 |
+
$serviceModel->addWarning(
|
897 |
+
array(
|
898 |
+
'entity_id' => $shipmentId,
|
899 |
+
'code' => $code,
|
900 |
+
'description' => $e->getMessage(),
|
901 |
+
)
|
902 |
+
);
|
903 |
+
} else {
|
904 |
+
$errors[] = array(
|
905 |
+
'entity_id' => $shipmentId,
|
906 |
+
'code' => $code,
|
907 |
+
'description' => $e->getMessage(),
|
908 |
+
);
|
909 |
+
}
|
910 |
+
} catch (Exception $e) {
|
911 |
+
$helper->logException($e);
|
912 |
+
$errors[] = array(
|
913 |
+
'entity_id' => $shipmentId,
|
914 |
+
'code' => null,
|
915 |
+
'description' => $e->getMessage(),
|
916 |
+
);
|
917 |
+
}
|
918 |
+
|
919 |
+
/**
|
920 |
+
* Return the shipment's data.
|
921 |
+
*/
|
922 |
+
$response = array(
|
923 |
+
'order_id' => $postnlShipment->getOrderId(),
|
924 |
+
'shipment_id' => $postnlShipment->getShipmentId(),
|
925 |
+
'shipping_phase' => $postnlShipment->getShippingPhase(),
|
926 |
+
'return_phase' => $postnlShipment->getReturnPhase(),
|
927 |
+
'warning' => $serviceModel->getWarnings(),
|
928 |
+
);
|
929 |
+
|
930 |
+
/**
|
931 |
+
* Add any warnings that may have occurred.
|
932 |
+
*/
|
933 |
+
if ($serviceModel->hasWarnings()) {
|
934 |
+
$response['warning'] = $serviceModel->getWarnings();
|
935 |
+
}
|
936 |
+
|
937 |
+
/**
|
938 |
+
* Add any errors that may have occurred.
|
939 |
+
*/
|
940 |
+
if (!empty($errors)) {
|
941 |
+
$response['error'] = $errors;
|
942 |
+
}
|
943 |
+
|
944 |
+
return $response;
|
945 |
+
}
|
946 |
+
}
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasPostnlCoreIsEnabled()
|
@@ -61,6 +61,7 @@
|
|
61 |
* @method boolean hasPostnlShippingMethods()
|
62 |
* @method boolean hasMatchedPostnlShippingMethods()
|
63 |
* @method boolean hasCanUseResponsiveDeliveryOptions()
|
|
|
64 |
*
|
65 |
* @method boolean getPostnlCoreIsEnabled()
|
66 |
* @method boolean getPostnlCoreIsConfigured()
|
@@ -87,6 +88,7 @@
|
|
87 |
* @method array getPostnlShippingMethods()
|
88 |
* @method array getMatchedPostnlShippingMethods()
|
89 |
* @method boolean getCanUseResponsiveDeliveryOptions()
|
|
|
90 |
*
|
91 |
* @method TIG_PostNL_Model_Core_Cache setPostnlCoreIsEnabled(boolean $value)
|
92 |
* @method TIG_PostNL_Model_Core_Cache setPostnlCoreIsConfigured(boolean $value)
|
@@ -113,6 +115,7 @@
|
|
113 |
* @method TIG_PostNL_Model_Core_Cache setPostnlShippingMethods(array $value)
|
114 |
* @method TIG_PostNL_Model_Core_Cache setMatchedPostnlShippingMethods(array $value)
|
115 |
* @method TIG_PostNL_Model_Core_Cache setCanUseResponsiveDeliveryOptions(boolean $value)
|
|
|
116 |
*/
|
117 |
class TIG_PostNL_Model_Core_Cache extends Varien_Object
|
118 |
{
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasPostnlCoreIsEnabled()
|
61 |
* @method boolean hasPostnlShippingMethods()
|
62 |
* @method boolean hasMatchedPostnlShippingMethods()
|
63 |
* @method boolean hasCanUseResponsiveDeliveryOptions()
|
64 |
+
* @method boolean hasStoreTimeZones()
|
65 |
*
|
66 |
* @method boolean getPostnlCoreIsEnabled()
|
67 |
* @method boolean getPostnlCoreIsConfigured()
|
88 |
* @method array getPostnlShippingMethods()
|
89 |
* @method array getMatchedPostnlShippingMethods()
|
90 |
* @method boolean getCanUseResponsiveDeliveryOptions()
|
91 |
+
* @method array getStoreTimeZones()
|
92 |
*
|
93 |
* @method TIG_PostNL_Model_Core_Cache setPostnlCoreIsEnabled(boolean $value)
|
94 |
* @method TIG_PostNL_Model_Core_Cache setPostnlCoreIsConfigured(boolean $value)
|
115 |
* @method TIG_PostNL_Model_Core_Cache setPostnlShippingMethods(array $value)
|
116 |
* @method TIG_PostNL_Model_Core_Cache setMatchedPostnlShippingMethods(array $value)
|
117 |
* @method TIG_PostNL_Model_Core_Cache setCanUseResponsiveDeliveryOptions(boolean $value)
|
118 |
+
* @method TIG_PostNL_Model_Core_Cache setStoreTimeZones(array $value)
|
119 |
*/
|
120 |
class TIG_PostNL_Model_Core_Cache extends Varien_Object
|
121 |
{
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* Class containing all default methods used for CIF communication by this extension.
|
@@ -41,19 +41,21 @@
|
|
41 |
* If you wish to add new methods you can extend this class or create a new class that extends
|
42 |
* TIG_PostNL_Model_Core_Cif_Abstract.
|
43 |
*
|
44 |
-
* @method TIG_PostNL_Model_Core_Cif setStoreId(int $value)
|
45 |
-
* @method boolean hasHSTariffAttribute()
|
46 |
* @method string getHSTariffAttribute()
|
47 |
-
* @method TIG_PostNL_Model_Core_Cif setHSTariffAttribute(string $value)
|
48 |
-
* @method boolean hasCountryOfOriginAttribute()
|
49 |
* @method string getCountryOfOriginAttribute()
|
50 |
-
* @method TIG_PostNL_Model_Core_Cif setCountryOfOriginAttribute(string $value)
|
51 |
-
* @method boolean hasCustomsValueAttribute()
|
52 |
* @method string getCustomsValueAttribute()
|
53 |
-
* @method TIG_PostNL_Model_Core_Cif setCustomsValueAttribute(string $value)
|
54 |
-
* @method boolean hasCustomsDescriptionAttribute()
|
55 |
* @method string getCustomsDescriptionAttribute()
|
|
|
|
|
|
|
|
|
|
|
56 |
* @method TIG_PostNL_Model_Core_Cif setCustomsDescriptionAttribute(string $value)
|
|
|
|
|
|
|
|
|
|
|
57 |
*/
|
58 |
class TIG_PostNL_Model_Core_Cif extends TIG_PostNL_Model_Core_Cif_Abstract
|
59 |
{
|
@@ -403,9 +405,7 @@ class TIG_PostNL_Model_Core_Cif extends TIG_PostNL_Model_Core_Cif_Abstract
|
|
403 |
$soapParams
|
404 |
);
|
405 |
|
406 |
-
if (!
|
407 |
-
|| !isset($response->Barcode)
|
408 |
-
) {
|
409 |
throw new TIG_PostNL_Exception(
|
410 |
Mage::helper('postnl')->__('Invalid barcode response: %s', "\n" . var_export($response, true)),
|
411 |
'POSTNL-0054'
|
@@ -443,8 +443,7 @@ class TIG_PostNL_Model_Core_Cif extends TIG_PostNL_Model_Core_Cif_Abstract
|
|
443 |
$soapParams
|
444 |
);
|
445 |
|
446 |
-
if (!
|
447 |
-
|| !isset($response->Shipments)
|
448 |
|| (!is_array($response->Shipments) && !is_object($response->Shipments))
|
449 |
) {
|
450 |
throw new TIG_PostNL_Exception(
|
@@ -509,8 +508,7 @@ class TIG_PostNL_Model_Core_Cif extends TIG_PostNL_Model_Core_Cif_Abstract
|
|
509 |
$soapParams
|
510 |
);
|
511 |
|
512 |
-
if (!
|
513 |
-
|| !isset($response->Shipments)
|
514 |
|| (!is_array($response->Shipments) && !is_object($response->Shipments))
|
515 |
) {
|
516 |
throw new TIG_PostNL_Exception(
|
@@ -678,8 +676,7 @@ class TIG_PostNL_Model_Core_Cif extends TIG_PostNL_Model_Core_Cif_Abstract
|
|
678 |
$soapParams
|
679 |
);
|
680 |
|
681 |
-
if (!
|
682 |
-
|| !isset($response->Labels)
|
683 |
|| !is_object($response->Labels)
|
684 |
) {
|
685 |
throw new TIG_PostNL_Exception(
|
@@ -770,8 +767,7 @@ class TIG_PostNL_Model_Core_Cif extends TIG_PostNL_Model_Core_Cif_Abstract
|
|
770 |
$soapParams
|
771 |
);
|
772 |
|
773 |
-
if (!
|
774 |
-
|| !isset($response->Labels)
|
775 |
|| !is_object($response->Labels)
|
776 |
) {
|
777 |
throw new TIG_PostNL_Exception(
|
@@ -895,12 +891,15 @@ class TIG_PostNL_Model_Core_Cif extends TIG_PostNL_Model_Core_Cif_Abstract
|
|
895 |
/**
|
896 |
* Get and format this shipment's delivery date if available.
|
897 |
*/
|
898 |
-
$deliveryDate =
|
899 |
-
if (
|
900 |
-
$
|
901 |
-
|
902 |
-
|
903 |
-
|
|
|
|
|
|
|
904 |
}
|
905 |
|
906 |
$reference = $this->_getReference($shipment);
|
@@ -953,7 +952,7 @@ class TIG_PostNL_Model_Core_Cif extends TIG_PostNL_Model_Core_Cif_Abstract
|
|
953 |
* In the case of a multi-colli shipment this is only added to the first parcel.
|
954 |
*/
|
955 |
if (($shipmentNumber === false || $shipmentNumber == 1)
|
956 |
-
&& ($postnlShipment->
|
957 |
) {
|
958 |
$shipmentData['Amounts'] = $this->_getAmount($postnlShipment, $shipment);
|
959 |
}
|
@@ -1268,12 +1267,17 @@ class TIG_PostNL_Model_Core_Cif extends TIG_PostNL_Model_Core_Cif_Abstract
|
|
1268 |
protected function _getAmount(TIG_PostnL_Model_Core_Shipment $postnlShipment, $shipment = false)
|
1269 |
{
|
1270 |
$amount = array();
|
1271 |
-
if (!$postnlShipment->
|
1272 |
return $amount;
|
1273 |
}
|
1274 |
|
1275 |
-
if ($postnlShipment->
|
1276 |
-
$
|
|
|
|
|
|
|
|
|
|
|
1277 |
$amount[] = array(
|
1278 |
'AccountName' => '',
|
1279 |
'BIC' => '',
|
@@ -1479,7 +1483,7 @@ class TIG_PostNL_Model_Core_Cif extends TIG_PostNL_Model_Core_Cif_Abstract
|
|
1479 |
*/
|
1480 |
$items = $shipment->getItemsCollection();
|
1481 |
foreach ($items as $key => $item) {
|
1482 |
-
if ($item->isDeleted()) {
|
1483 |
$items->removeItemByKey($key);
|
1484 |
}
|
1485 |
}
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* Class containing all default methods used for CIF communication by this extension.
|
41 |
* If you wish to add new methods you can extend this class or create a new class that extends
|
42 |
* TIG_PostNL_Model_Core_Cif_Abstract.
|
43 |
*
|
|
|
|
|
44 |
* @method string getHSTariffAttribute()
|
|
|
|
|
45 |
* @method string getCountryOfOriginAttribute()
|
|
|
|
|
46 |
* @method string getCustomsValueAttribute()
|
|
|
|
|
47 |
* @method string getCustomsDescriptionAttribute()
|
48 |
+
*
|
49 |
+
* @method TIG_PostNL_Model_Core_Cif setStoreId(int $value)
|
50 |
+
* @method TIG_PostNL_Model_Core_Cif setHSTariffAttribute(string $value)
|
51 |
+
* @method TIG_PostNL_Model_Core_Cif setCountryOfOriginAttribute(string $value)
|
52 |
+
* @method TIG_PostNL_Model_Core_Cif setCustomsValueAttribute(string $value)
|
53 |
* @method TIG_PostNL_Model_Core_Cif setCustomsDescriptionAttribute(string $value)
|
54 |
+
*
|
55 |
+
* @method boolean hasHSTariffAttribute()
|
56 |
+
* @method boolean hasCountryOfOriginAttribute()
|
57 |
+
* @method boolean hasCustomsValueAttribute()
|
58 |
+
* @method boolean hasCustomsDescriptionAttribute()
|
59 |
*/
|
60 |
class TIG_PostNL_Model_Core_Cif extends TIG_PostNL_Model_Core_Cif_Abstract
|
61 |
{
|
405 |
$soapParams
|
406 |
);
|
407 |
|
408 |
+
if (!isset($response->Barcode)) {
|
|
|
|
|
409 |
throw new TIG_PostNL_Exception(
|
410 |
Mage::helper('postnl')->__('Invalid barcode response: %s', "\n" . var_export($response, true)),
|
411 |
'POSTNL-0054'
|
443 |
$soapParams
|
444 |
);
|
445 |
|
446 |
+
if (!isset($response->Shipments)
|
|
|
447 |
|| (!is_array($response->Shipments) && !is_object($response->Shipments))
|
448 |
) {
|
449 |
throw new TIG_PostNL_Exception(
|
508 |
$soapParams
|
509 |
);
|
510 |
|
511 |
+
if (!isset($response->Shipments)
|
|
|
512 |
|| (!is_array($response->Shipments) && !is_object($response->Shipments))
|
513 |
) {
|
514 |
throw new TIG_PostNL_Exception(
|
676 |
$soapParams
|
677 |
);
|
678 |
|
679 |
+
if (!isset($response->Labels)
|
|
|
680 |
|| !is_object($response->Labels)
|
681 |
) {
|
682 |
throw new TIG_PostNL_Exception(
|
767 |
$soapParams
|
768 |
);
|
769 |
|
770 |
+
if (!isset($response->Labels)
|
|
|
771 |
|| !is_object($response->Labels)
|
772 |
) {
|
773 |
throw new TIG_PostNL_Exception(
|
891 |
/**
|
892 |
* Get and format this shipment's delivery date if available.
|
893 |
*/
|
894 |
+
$deliveryDate = null;
|
895 |
+
if (Mage::helper('postnl/deliveryOptions')->canUseDeliveryDays(false)) {
|
896 |
+
$deliveryDate = $postnlShipment->getDeliveryDate();
|
897 |
+
if ($deliveryDate) {
|
898 |
+
$deliveryTime = new DateTime($deliveryDate, new DateTimeZone('UTC'));
|
899 |
+
$deliveryTime->setTimezone(new DateTimeZone('Europe/Berlin'));
|
900 |
+
|
901 |
+
$deliveryDate = $deliveryTime->format('d-m-Y H:i:s');
|
902 |
+
}
|
903 |
}
|
904 |
|
905 |
$reference = $this->_getReference($shipment);
|
952 |
* In the case of a multi-colli shipment this is only added to the first parcel.
|
953 |
*/
|
954 |
if (($shipmentNumber === false || $shipmentNumber == 1)
|
955 |
+
&& ($postnlShipment->isExtraCover() || $postnlShipment->isCod())
|
956 |
) {
|
957 |
$shipmentData['Amounts'] = $this->_getAmount($postnlShipment, $shipment);
|
958 |
}
|
1267 |
protected function _getAmount(TIG_PostnL_Model_Core_Shipment $postnlShipment, $shipment = false)
|
1268 |
{
|
1269 |
$amount = array();
|
1270 |
+
if (!$postnlShipment->isExtraCover() && !$postnlShipment->isCod()) {
|
1271 |
return $amount;
|
1272 |
}
|
1273 |
|
1274 |
+
if ($postnlShipment->isExtraCover()) {
|
1275 |
+
$extraCoverAmount = $postnlShipment->getExtraCoverAmount();
|
1276 |
+
if ($extraCoverAmount < 500) {
|
1277 |
+
$extraCoverAmount = 500;
|
1278 |
+
}
|
1279 |
+
|
1280 |
+
$extraCover = number_format($extraCoverAmount, 2, '.', '');
|
1281 |
$amount[] = array(
|
1282 |
'AccountName' => '',
|
1283 |
'BIC' => '',
|
1483 |
*/
|
1484 |
$items = $shipment->getItemsCollection();
|
1485 |
foreach ($items as $key => $item) {
|
1486 |
+
if ($item->isDeleted() || $item->getOrderItem()->getProductType() == 'bundle') {
|
1487 |
$items->removeItemByKey($key);
|
1488 |
}
|
1489 |
}
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* Base CIF model. Contains general code for communicating with the CIF API
|
@@ -41,7 +41,7 @@
|
|
41 |
* @method boolean getTestMode()
|
42 |
*
|
43 |
* @method TIG_PostNL_Model_Core_Cif_Abstract setHelper(Mage_Core_Helper_Abstract $value)
|
44 |
-
* @method TIG_PostNL_Model_Core_Cif_Abstract setSoapClient(
|
45 |
* @method TIG_PostNL_Model_Core_Cif_Abstract setTestMode(boolean $value)
|
46 |
* @method TIG_PostNL_Model_Core_Cif_Abstract setPassword(string $value)
|
47 |
* @method TIG_PostNL_Model_Core_Cif_Abstract setUsername(string $value)
|
@@ -300,11 +300,11 @@ abstract class TIG_PostNL_Model_Core_Cif_Abstract extends Varien_Object
|
|
300 |
}
|
301 |
|
302 |
/**
|
303 |
-
* Gets a
|
304 |
*
|
305 |
* @param string|null $wsdlType
|
306 |
*
|
307 |
-
* @return
|
308 |
*/
|
309 |
public function getSoapClient($wsdlType = null)
|
310 |
{
|
@@ -320,14 +320,15 @@ abstract class TIG_PostNL_Model_Core_Cif_Abstract extends Varien_Object
|
|
320 |
$soapOptions = array(
|
321 |
'soap_version' => SOAP_1_1,
|
322 |
'features' => SOAP_SINGLE_ELEMENT_ARRAYS,
|
|
|
323 |
);
|
324 |
|
325 |
/**
|
326 |
-
* try to create a new
|
327 |
* using the wsdl cache.
|
328 |
*/
|
329 |
try {
|
330 |
-
$client = new
|
331 |
$wsdlFile,
|
332 |
$soapOptions
|
333 |
);
|
@@ -337,7 +338,7 @@ abstract class TIG_PostNL_Model_Core_Cif_Abstract extends Varien_Object
|
|
337 |
*/
|
338 |
$soapOptions['cache_wsdl'] = WSDL_CACHE_NONE;
|
339 |
|
340 |
-
$client = new
|
341 |
$wsdlFile,
|
342 |
$soapOptions
|
343 |
);
|
@@ -369,7 +370,7 @@ abstract class TIG_PostNL_Model_Core_Cif_Abstract extends Varien_Object
|
|
369 |
array_walk_recursive($soapParams, array($cifHelper, 'stripNonPrintableCharacters'));
|
370 |
|
371 |
/**
|
372 |
-
* @var
|
373 |
*/
|
374 |
$client = $this->getSoapClient($wsdlType);
|
375 |
|
@@ -387,7 +388,7 @@ abstract class TIG_PostNL_Model_Core_Cif_Abstract extends Varien_Object
|
|
387 |
* Add SOAP header.
|
388 |
*/
|
389 |
$header = $this->_getSoapHeader();
|
390 |
-
$client->
|
391 |
|
392 |
/**
|
393 |
* Call the SOAP method.
|
@@ -526,13 +527,13 @@ abstract class TIG_PostNL_Model_Core_Cif_Abstract extends Varien_Object
|
|
526 |
/**
|
527 |
* Check if warnings occurred while processing the CIF request. If so, parse and register them
|
528 |
*
|
529 |
-
* @param
|
530 |
*
|
531 |
* @return $this
|
532 |
*/
|
533 |
-
protected function _processWarnings($client)
|
534 |
{
|
535 |
-
$responseXML = $client->
|
536 |
$responseDOMDoc = new DOMDocument();
|
537 |
$responseDOMDoc->loadXML($responseXML);
|
538 |
|
@@ -586,9 +587,9 @@ abstract class TIG_PostNL_Model_Core_Cif_Abstract extends Varien_Object
|
|
586 |
/**
|
587 |
* Handle a SoapFault thrown by CIF.
|
588 |
*
|
589 |
-
* @param SoapFault
|
590 |
-
* @param
|
591 |
-
* @param boolean
|
592 |
*
|
593 |
* @return $this
|
594 |
*
|
@@ -608,8 +609,8 @@ abstract class TIG_PostNL_Model_Core_Cif_Abstract extends Varien_Object
|
|
608 |
* Get the request and response XML data
|
609 |
*/
|
610 |
if ($client) {
|
611 |
-
$requestXML = $cifHelper->formatXml($client->
|
612 |
-
$responseXML = $cifHelper->formatXml($client->
|
613 |
}
|
614 |
|
615 |
/**
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* Base CIF model. Contains general code for communicating with the CIF API
|
41 |
* @method boolean getTestMode()
|
42 |
*
|
43 |
* @method TIG_PostNL_Model_Core_Cif_Abstract setHelper(Mage_Core_Helper_Abstract $value)
|
44 |
+
* @method TIG_PostNL_Model_Core_Cif_Abstract setSoapClient(SoapClient $value)
|
45 |
* @method TIG_PostNL_Model_Core_Cif_Abstract setTestMode(boolean $value)
|
46 |
* @method TIG_PostNL_Model_Core_Cif_Abstract setPassword(string $value)
|
47 |
* @method TIG_PostNL_Model_Core_Cif_Abstract setUsername(string $value)
|
300 |
}
|
301 |
|
302 |
/**
|
303 |
+
* Gets a SoapClient instance for the specified wsdl type.
|
304 |
*
|
305 |
* @param string|null $wsdlType
|
306 |
*
|
307 |
+
* @return SoapClient
|
308 |
*/
|
309 |
public function getSoapClient($wsdlType = null)
|
310 |
{
|
320 |
$soapOptions = array(
|
321 |
'soap_version' => SOAP_1_1,
|
322 |
'features' => SOAP_SINGLE_ELEMENT_ARRAYS,
|
323 |
+
'trace' => true
|
324 |
);
|
325 |
|
326 |
/**
|
327 |
+
* try to create a new SoapClient instance based on the supplied wsdl. if it fails, try again without
|
328 |
* using the wsdl cache.
|
329 |
*/
|
330 |
try {
|
331 |
+
$client = new SoapClient(
|
332 |
$wsdlFile,
|
333 |
$soapOptions
|
334 |
);
|
338 |
*/
|
339 |
$soapOptions['cache_wsdl'] = WSDL_CACHE_NONE;
|
340 |
|
341 |
+
$client = new SoapClient(
|
342 |
$wsdlFile,
|
343 |
$soapOptions
|
344 |
);
|
370 |
array_walk_recursive($soapParams, array($cifHelper, 'stripNonPrintableCharacters'));
|
371 |
|
372 |
/**
|
373 |
+
* @var SoapClient $client
|
374 |
*/
|
375 |
$client = $this->getSoapClient($wsdlType);
|
376 |
|
388 |
* Add SOAP header.
|
389 |
*/
|
390 |
$header = $this->_getSoapHeader();
|
391 |
+
$client->__setSoapHeaders($header);
|
392 |
|
393 |
/**
|
394 |
* Call the SOAP method.
|
527 |
/**
|
528 |
* Check if warnings occurred while processing the CIF request. If so, parse and register them
|
529 |
*
|
530 |
+
* @param SoapClient $client
|
531 |
*
|
532 |
* @return $this
|
533 |
*/
|
534 |
+
protected function _processWarnings(SoapClient $client)
|
535 |
{
|
536 |
+
$responseXML = $client->__getLastResponse();
|
537 |
$responseDOMDoc = new DOMDocument();
|
538 |
$responseDOMDoc->loadXML($responseXML);
|
539 |
|
587 |
/**
|
588 |
* Handle a SoapFault thrown by CIF.
|
589 |
*
|
590 |
+
* @param SoapFault $e
|
591 |
+
* @param SoapClient $client
|
592 |
+
* @param boolean $throwException
|
593 |
*
|
594 |
* @return $this
|
595 |
*
|
609 |
* Get the request and response XML data
|
610 |
*/
|
611 |
if ($client) {
|
612 |
+
$requestXML = $cifHelper->formatXml($client->__getLastRequest());
|
613 |
+
$responseXML = $cifHelper->formatXml($client->__getLastResponse());
|
614 |
}
|
615 |
|
616 |
/**
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method TIG_PostNL_Model_Core_Label setLabelSize(string $value)
|
@@ -466,7 +466,7 @@ class TIG_PostNL_Model_Core_Label extends Varien_Object
|
|
466 |
* @param array|TIG_PostNL_Model_Core_Shipment_Label $labels May be an array of labels or a single
|
467 |
* TIG_PostNL_Model_Core_Shipment_Label label.
|
468 |
*
|
469 |
-
* @return
|
470 |
*
|
471 |
* @see TIG_PostNL_Fpdf
|
472 |
* @see TIG_PostNL_Fpdi
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method TIG_PostNL_Model_Core_Label setLabelSize(string $value)
|
466 |
* @param array|TIG_PostNL_Model_Core_Shipment_Label $labels May be an array of labels or a single
|
467 |
* TIG_PostNL_Model_Core_Shipment_Label label.
|
468 |
*
|
469 |
+
* @return string
|
470 |
*
|
471 |
* @see TIG_PostNL_Fpdf
|
472 |
* @see TIG_PostNL_Fpdi
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Observer_Barcode
|
@@ -100,12 +100,12 @@ class TIG_PostNL_Model_Core_Observer_Barcode
|
|
100 |
|
101 |
if ($postnlOrder->getId()) {
|
102 |
if ($postnlOrder->hasConfirmDate()) {
|
103 |
-
$confirmDate = new DateTime($postnlOrder->getConfirmDate());
|
104 |
$postnlShipment->setConfirmDate($confirmDate->format('Y-m-d H:i:s'));
|
105 |
}
|
106 |
|
107 |
if ($postnlOrder->hasDeliveryDate()) {
|
108 |
-
$deliveryDate = new DateTime($postnlOrder->getDeliveryDate());
|
109 |
$postnlShipment->setDeliveryDate($deliveryDate->format('Y-m-d H:i:s'));
|
110 |
}
|
111 |
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Observer_Barcode
|
100 |
|
101 |
if ($postnlOrder->getId()) {
|
102 |
if ($postnlOrder->hasConfirmDate()) {
|
103 |
+
$confirmDate = new DateTime($postnlOrder->getConfirmDate(), new DateTimeZone('UTC'));
|
104 |
$postnlShipment->setConfirmDate($confirmDate->format('Y-m-d H:i:s'));
|
105 |
}
|
106 |
|
107 |
if ($postnlOrder->hasDeliveryDate()) {
|
108 |
+
$deliveryDate = new DateTime($postnlOrder->getDeliveryDate(), new DateTimeZone('UTC'));
|
109 |
$postnlShipment->setDeliveryDate($deliveryDate->format('Y-m-d H:i:s'));
|
110 |
}
|
111 |
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Observer_Cache
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Observer_Cache
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Observer_Cron
|
@@ -524,7 +524,7 @@ class TIG_PostNL_Model_Core_Observer_Cron
|
|
524 |
* Get the date on which we can no longer requests return status updates for shipments.
|
525 |
*/
|
526 |
$maxReturnDuration = Mage::getStoreConfig(self::XPATH_RETURN_EXPIRE_DAYS, Mage_Core_Model_App::ADMIN_STORE_ID);
|
527 |
-
$returnExpireDate = new DateTime();
|
528 |
$returnExpireDate->sub(new DateInterval("P{$maxReturnDuration}D"));
|
529 |
|
530 |
/**
|
@@ -677,7 +677,7 @@ class TIG_PostNL_Model_Core_Observer_Cron
|
|
677 |
* Check if the shipment was confirmed more than a day ago
|
678 |
*/
|
679 |
$confirmedAt = strtotime($postnlShipment->getConfirmedAt());
|
680 |
-
$yesterday = new DateTime();
|
681 |
$yesterday->setTimestamp(Mage::getModel('core/date')->gmtTimestamp())
|
682 |
->sub(new DateInterval('P1D'));
|
683 |
|
@@ -739,7 +739,7 @@ class TIG_PostNL_Model_Core_Observer_Cron
|
|
739 |
Mage_Core_Model_App::ADMIN_STORE_ID
|
740 |
);
|
741 |
|
742 |
-
$expireTimestamp = new DateTime();
|
743 |
$expireTimestamp->setTimestamp(Mage::getModel('core/date')->gmtTimestamp())
|
744 |
->sub(new DateInterval("P{$confirmationExpireDays}D"));
|
745 |
|
@@ -864,13 +864,13 @@ class TIG_PostNL_Model_Core_Observer_Cron
|
|
864 |
$postnlShipmentModelClass = Mage::getConfig()->getModelClassName('postnl_core/shipment');
|
865 |
$confirmedStatus = $postnlShipmentModelClass::CONFIRM_STATUS_CONFIRMED;
|
866 |
|
867 |
-
$twentyMinutesAgo = new DateTime();
|
868 |
$twentyMinutesAgo->setTimestamp(Mage::getModel('core/date')->gmtTimestamp())
|
869 |
->sub(new DateInterval('PT20M'));
|
870 |
|
871 |
$twentyMinutesAgo = $twentyMinutesAgo->format('Y-m-d H:i:s');
|
872 |
|
873 |
-
$oneDayAgo = new DateTime();
|
874 |
$oneDayAgo->setTimestamp(Mage::getModel('core/date')->gmtTimestamp())
|
875 |
->sub(new DateInterval('P1DT20M'));
|
876 |
|
@@ -1041,7 +1041,7 @@ class TIG_PostNL_Model_Core_Observer_Cron
|
|
1041 |
* Get the date on which we can no longer requests return status updates for shipments.
|
1042 |
*/
|
1043 |
$maxReturnDuration = Mage::getStoreConfig(self::XPATH_RETURN_EXPIRE_DAYS, Mage_Core_Model_App::ADMIN_STORE_ID);
|
1044 |
-
$returnExpireDate = new DateTime();
|
1045 |
$returnExpireDate->sub(new DateInterval("P{$maxReturnDuration}D"));
|
1046 |
|
1047 |
/**
|
@@ -1127,14 +1127,30 @@ class TIG_PostNL_Model_Core_Observer_Cron
|
|
1127 |
|
1128 |
$helper->cronLog($helper->__('UpdateProductAttribute cron starting...'));
|
1129 |
|
|
|
|
|
1130 |
$data = Mage::getStoreConfig(self::XPATH_PRODUCT_ATTRIBUTE_UPDATE_DATA, Mage_Core_Model_App::ADMIN_STORE_ID);
|
1131 |
if (!$data) {
|
1132 |
-
|
|
|
|
|
|
|
|
|
|
|
1133 |
return $this;
|
1134 |
}
|
1135 |
|
1136 |
$data = unserialize($data);
|
1137 |
$currentAttributeData = current($data);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1138 |
|
1139 |
$helper->cronLog(
|
1140 |
$helper->__('Updating product attribute data: %s', var_export($currentAttributeData, true))
|
@@ -1209,24 +1225,15 @@ class TIG_PostNL_Model_Core_Observer_Cron
|
|
1209 |
'default',
|
1210 |
Mage_Core_Model_App::ADMIN_STORE_ID
|
1211 |
);
|
|
|
|
|
1212 |
} else {
|
1213 |
/**
|
1214 |
* If all attributes have been processed, remove the cron from the schedule.
|
1215 |
*/
|
1216 |
$helper->cronLog($helper->__('All attributes have been processed. Removing cron.'));
|
1217 |
|
1218 |
-
|
1219 |
-
self::XPATH_PRODUCT_ATTRIBUTE_UPDATE_DATA,
|
1220 |
-
null,
|
1221 |
-
'default',
|
1222 |
-
Mage_Core_Model_App::ADMIN_STORE_ID
|
1223 |
-
);
|
1224 |
-
|
1225 |
-
Mage::getModel('core/config_data')
|
1226 |
-
->load(self::UPDATE_PRODUCT_ATTRIBUTE_STRING_PATH, 'path')
|
1227 |
-
->setValue(null)
|
1228 |
-
->setPath(self::UPDATE_PRODUCT_ATTRIBUTE_STRING_PATH)
|
1229 |
-
->save();
|
1230 |
}
|
1231 |
}
|
1232 |
|
@@ -1235,6 +1242,32 @@ class TIG_PostNL_Model_Core_Observer_Cron
|
|
1235 |
return $this;
|
1236 |
}
|
1237 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1238 |
/**
|
1239 |
* Modify the confirm- and delivery dates for all PostNL orders and shipments. These dates are currently entered in
|
1240 |
* the storeview's timezone. These should be entered in the UTC timezone.
|
@@ -1247,6 +1280,8 @@ class TIG_PostNL_Model_Core_Observer_Cron
|
|
1247 |
|
1248 |
$helper->cronLog($helper->__('UpdateDateTimeZone cron starting...'));
|
1249 |
|
|
|
|
|
1250 |
$data = Mage::getStoreConfig(
|
1251 |
TIG_PostNL_Model_Resource_Setup::XPATH_UPDATE_DATE_TIME_ZONE_DATA,
|
1252 |
Mage_Core_Model_App::ADMIN_STORE_ID
|
@@ -1299,6 +1334,8 @@ class TIG_PostNL_Model_Core_Observer_Cron
|
|
1299 |
Mage_Core_Model_App::ADMIN_STORE_ID
|
1300 |
);
|
1301 |
|
|
|
|
|
1302 |
$helper->cronLog($helper->__('UpdateDateTimeZone cron has finished.'));
|
1303 |
|
1304 |
return $this;
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Observer_Cron
|
524 |
* Get the date on which we can no longer requests return status updates for shipments.
|
525 |
*/
|
526 |
$maxReturnDuration = Mage::getStoreConfig(self::XPATH_RETURN_EXPIRE_DAYS, Mage_Core_Model_App::ADMIN_STORE_ID);
|
527 |
+
$returnExpireDate = new DateTime('now', new DateTimeZone('UTC'));
|
528 |
$returnExpireDate->sub(new DateInterval("P{$maxReturnDuration}D"));
|
529 |
|
530 |
/**
|
677 |
* Check if the shipment was confirmed more than a day ago
|
678 |
*/
|
679 |
$confirmedAt = strtotime($postnlShipment->getConfirmedAt());
|
680 |
+
$yesterday = new DateTime('now', new DateTimeZone('UTC'));
|
681 |
$yesterday->setTimestamp(Mage::getModel('core/date')->gmtTimestamp())
|
682 |
->sub(new DateInterval('P1D'));
|
683 |
|
739 |
Mage_Core_Model_App::ADMIN_STORE_ID
|
740 |
);
|
741 |
|
742 |
+
$expireTimestamp = new DateTime('now', new DateTimeZone('UTC'));
|
743 |
$expireTimestamp->setTimestamp(Mage::getModel('core/date')->gmtTimestamp())
|
744 |
->sub(new DateInterval("P{$confirmationExpireDays}D"));
|
745 |
|
864 |
$postnlShipmentModelClass = Mage::getConfig()->getModelClassName('postnl_core/shipment');
|
865 |
$confirmedStatus = $postnlShipmentModelClass::CONFIRM_STATUS_CONFIRMED;
|
866 |
|
867 |
+
$twentyMinutesAgo = new DateTime('now', new DateTimeZone('UTC'));
|
868 |
$twentyMinutesAgo->setTimestamp(Mage::getModel('core/date')->gmtTimestamp())
|
869 |
->sub(new DateInterval('PT20M'));
|
870 |
|
871 |
$twentyMinutesAgo = $twentyMinutesAgo->format('Y-m-d H:i:s');
|
872 |
|
873 |
+
$oneDayAgo = new DateTime('now', new DateTimeZone('UTC'));
|
874 |
$oneDayAgo->setTimestamp(Mage::getModel('core/date')->gmtTimestamp())
|
875 |
->sub(new DateInterval('P1DT20M'));
|
876 |
|
1041 |
* Get the date on which we can no longer requests return status updates for shipments.
|
1042 |
*/
|
1043 |
$maxReturnDuration = Mage::getStoreConfig(self::XPATH_RETURN_EXPIRE_DAYS, Mage_Core_Model_App::ADMIN_STORE_ID);
|
1044 |
+
$returnExpireDate = new DateTime('now', new DateTimeZone('UTC'));
|
1045 |
$returnExpireDate->sub(new DateInterval("P{$maxReturnDuration}D"));
|
1046 |
|
1047 |
/**
|
1127 |
|
1128 |
$helper->cronLog($helper->__('UpdateProductAttribute cron starting...'));
|
1129 |
|
1130 |
+
Mage::app()->getCacheInstance()->cleanType('config');
|
1131 |
+
|
1132 |
$data = Mage::getStoreConfig(self::XPATH_PRODUCT_ATTRIBUTE_UPDATE_DATA, Mage_Core_Model_App::ADMIN_STORE_ID);
|
1133 |
if (!$data) {
|
1134 |
+
/**
|
1135 |
+
* If all attributes have been processed, remove the cron from the schedule.
|
1136 |
+
*/
|
1137 |
+
$helper->cronLog($helper->__('All attributes have been processed. Removing cron.'));
|
1138 |
+
|
1139 |
+
$this->_removeAttributeUpdateCron();
|
1140 |
return $this;
|
1141 |
}
|
1142 |
|
1143 |
$data = unserialize($data);
|
1144 |
$currentAttributeData = current($data);
|
1145 |
+
if (empty($currentAttributeData[0]) || empty($currentAttributeData[1])) {
|
1146 |
+
/**
|
1147 |
+
* If all attributes have been processed, remove the cron from the schedule.
|
1148 |
+
*/
|
1149 |
+
$helper->cronLog($helper->__('All attributes have been processed. Removing cron.'));
|
1150 |
+
|
1151 |
+
$this->_removeAttributeUpdateCron();
|
1152 |
+
return $this;
|
1153 |
+
}
|
1154 |
|
1155 |
$helper->cronLog(
|
1156 |
$helper->__('Updating product attribute data: %s', var_export($currentAttributeData, true))
|
1225 |
'default',
|
1226 |
Mage_Core_Model_App::ADMIN_STORE_ID
|
1227 |
);
|
1228 |
+
|
1229 |
+
Mage::app()->getCacheInstance()->cleanType('config');
|
1230 |
} else {
|
1231 |
/**
|
1232 |
* If all attributes have been processed, remove the cron from the schedule.
|
1233 |
*/
|
1234 |
$helper->cronLog($helper->__('All attributes have been processed. Removing cron.'));
|
1235 |
|
1236 |
+
$this->_removeAttributeUpdateCron();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1237 |
}
|
1238 |
}
|
1239 |
|
1242 |
return $this;
|
1243 |
}
|
1244 |
|
1245 |
+
/**
|
1246 |
+
* Remove the updateProductAttribute cron.
|
1247 |
+
*
|
1248 |
+
* @return $this
|
1249 |
+
* @throws Exception
|
1250 |
+
*/
|
1251 |
+
protected function _removeAttributeUpdateCron()
|
1252 |
+
{
|
1253 |
+
Mage::getConfig()->saveConfig(
|
1254 |
+
self::XPATH_PRODUCT_ATTRIBUTE_UPDATE_DATA,
|
1255 |
+
null,
|
1256 |
+
'default',
|
1257 |
+
Mage_Core_Model_App::ADMIN_STORE_ID
|
1258 |
+
);
|
1259 |
+
|
1260 |
+
Mage::getModel('core/config_data')
|
1261 |
+
->load(self::UPDATE_PRODUCT_ATTRIBUTE_STRING_PATH, 'path')
|
1262 |
+
->setValue(null)
|
1263 |
+
->setPath(self::UPDATE_PRODUCT_ATTRIBUTE_STRING_PATH)
|
1264 |
+
->save();
|
1265 |
+
|
1266 |
+
Mage::app()->getCacheInstance()->cleanType('config');
|
1267 |
+
|
1268 |
+
return $this;
|
1269 |
+
}
|
1270 |
+
|
1271 |
/**
|
1272 |
* Modify the confirm- and delivery dates for all PostNL orders and shipments. These dates are currently entered in
|
1273 |
* the storeview's timezone. These should be entered in the UTC timezone.
|
1280 |
|
1281 |
$helper->cronLog($helper->__('UpdateDateTimeZone cron starting...'));
|
1282 |
|
1283 |
+
Mage::app()->getCacheInstance()->cleanType('config');
|
1284 |
+
|
1285 |
$data = Mage::getStoreConfig(
|
1286 |
TIG_PostNL_Model_Resource_Setup::XPATH_UPDATE_DATE_TIME_ZONE_DATA,
|
1287 |
Mage_Core_Model_App::ADMIN_STORE_ID
|
1334 |
Mage_Core_Model_App::ADMIN_STORE_ID
|
1335 |
);
|
1336 |
|
1337 |
+
Mage::app()->getCacheInstance()->cleanType('config');
|
1338 |
+
|
1339 |
$helper->cronLog($helper->__('UpdateDateTimeZone cron has finished.'));
|
1340 |
|
1341 |
return $this;
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Observer_Returns
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Observer_Returns
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Observer_SaveShipment
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Observer_SaveShipment
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* Class TIG_PostNL_Model_Core_Order
|
@@ -55,6 +55,8 @@
|
|
55 |
* @method array|boolean getUnserializedOptions()
|
56 |
* @method string getExpectedDeliveryTimeStart()
|
57 |
* @method string getExpectedDeliveryTimeEnd()
|
|
|
|
|
58 |
*
|
59 |
* @method TIG_PostNL_Model_Core_Order setIsPakketautomaat(int $value)
|
60 |
* @method TIG_PostNL_Model_Core_Order setEntityId(int $value)
|
@@ -98,6 +100,15 @@ class TIG_PostNL_Model_Core_Order extends Mage_Core_Model_Abstract
|
|
98 |
const MOBILE_PHONE_NUMBER_PREFIX_REPLACEMENT = '+316$2';
|
99 |
const MOBILE_PHONE_NUMBER_CONTENT_REGEX = '/[^0-9+]/';
|
100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
/**
|
102 |
* Prefix of model events names.
|
103 |
*
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* Class TIG_PostNL_Model_Core_Order
|
55 |
* @method array|boolean getUnserializedOptions()
|
56 |
* @method string getExpectedDeliveryTimeStart()
|
57 |
* @method string getExpectedDeliveryTimeEnd()
|
58 |
+
* @method string getUpdatedAt()
|
59 |
+
* @method string getCreatedAt()
|
60 |
*
|
61 |
* @method TIG_PostNL_Model_Core_Order setIsPakketautomaat(int $value)
|
62 |
* @method TIG_PostNL_Model_Core_Order setEntityId(int $value)
|
100 |
const MOBILE_PHONE_NUMBER_PREFIX_REPLACEMENT = '+316$2';
|
101 |
const MOBILE_PHONE_NUMBER_CONTENT_REGEX = '/[^0-9+]/';
|
102 |
|
103 |
+
/**
|
104 |
+
* Available types.
|
105 |
+
*/
|
106 |
+
const TYPE_OVERDAG = 'Overdag';
|
107 |
+
const TYPE_AVOND = 'Avond';
|
108 |
+
const TYPE_PG = 'PG';
|
109 |
+
const TYPE_PGE = 'PGE';
|
110 |
+
const TYPE_PA = 'PA';
|
111 |
+
|
112 |
/**
|
113 |
* Prefix of model events names.
|
114 |
*
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method TIG_PostNL_Model_Core_PackingSlip setStoreId(int $value)
|
@@ -256,10 +256,14 @@ class TIG_PostNL_Model_Core_PackingSlip extends Mage_Sales_Model_Order_Pdf_Abstr
|
|
256 |
$labels = $labelModel->sortLabels($labels);
|
257 |
$firstLabel = current($labels);
|
258 |
|
259 |
-
if (!$firstLabel) {
|
260 |
-
|
|
|
|
|
|
|
|
|
261 |
} elseif (
|
262 |
-
|
263 |
|| $this->y < 421
|
264 |
|| ($firstLabel->getLabelType() != 'Label'
|
265 |
&& $firstLabel->getLabelType() != 'Label-combi'
|
@@ -699,6 +703,7 @@ class TIG_PostNL_Model_Core_PackingSlip extends Mage_Sales_Model_Order_Pdf_Abstr
|
|
699 |
/**
|
700 |
* Payment info.
|
701 |
*/
|
|
|
702 |
$paymentInfo = Mage::helper('payment')
|
703 |
->getInfoBlock($order->getPayment())
|
704 |
->setIsSecureMode(true)
|
@@ -741,58 +746,58 @@ class TIG_PostNL_Model_Core_PackingSlip extends Mage_Sales_Model_Order_Pdf_Abstr
|
|
741 |
*/
|
742 |
protected function _insertShipmentInfo(&$page, $order, $postnlShipment)
|
743 |
{
|
744 |
-
if (!$this->getConfig('show_shipping_method')) {
|
745 |
-
return $this;
|
746 |
-
}
|
747 |
|
748 |
$this->rightColumnY -= 14;
|
749 |
$top = $this->rightColumnY;
|
750 |
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
$top -= 10;
|
762 |
-
|
763 |
-
$shippingMethod = $order->getShippingDescription();
|
764 |
|
765 |
-
|
766 |
-
$text = strip_tags(trim($shippingMethod))
|
767 |
-
. ' - '
|
768 |
-
. $order->formatPriceTxt($order->getShippingAmount() + $order->getShippingTaxAmount());
|
769 |
-
$x = 584 - $this->widthForStringUsingFontSize($text, $font, 8);
|
770 |
-
$page->drawText($text, $x, $top, 'UTF-8');
|
771 |
|
772 |
-
|
773 |
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
|
|
|
|
778 |
|
779 |
-
|
780 |
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
$x,
|
787 |
-
$top,
|
788 |
-
'UTF-8'
|
789 |
-
);
|
790 |
|
791 |
-
|
|
|
792 |
|
793 |
if ($this->getConfig('show_shipping_date')) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
794 |
$font = $this->_setFontRegular($page, 8);
|
795 |
$confirmDate = $postnlShipment->getConfirmDate();
|
|
|
796 |
$text = $this->getCoreHelper()->formatDate($confirmDate, 'full', false);
|
797 |
$x = 580 - $this->widthForStringUsingFontSize($text, $font, 8);
|
798 |
$page->drawText(
|
@@ -971,7 +976,6 @@ class TIG_PostNL_Model_Core_PackingSlip extends Mage_Sales_Model_Order_Pdf_Abstr
|
|
971 |
$this->y = $addressesStartY;
|
972 |
foreach ($pakjeGemakAddress as $value){
|
973 |
if ($value!=='') {
|
974 |
-
$text = array();
|
975 |
foreach ($this->getStringHelper()->str_split($value, 45, true, true) as $part) {
|
976 |
$page->drawText(strip_tags(ltrim($part)), $addressX, $this->y, 'UTF-8');
|
977 |
$this->y -= 10;
|
@@ -1100,6 +1104,7 @@ class TIG_PostNL_Model_Core_PackingSlip extends Mage_Sales_Model_Order_Pdf_Abstr
|
|
1100 |
*/
|
1101 |
public function renderItem(Varien_Object $item, Zend_Pdf_Page $page, Mage_Sales_Model_Order $order, $renderer)
|
1102 |
{
|
|
|
1103 |
$renderer->setOrder($order)
|
1104 |
->setItem($item)
|
1105 |
->setPdf($this)
|
@@ -1200,10 +1205,12 @@ class TIG_PostNL_Model_Core_PackingSlip extends Mage_Sales_Model_Order_Pdf_Abstr
|
|
1200 |
* @var Mage_Sales_Model_Order_Pdf_Total_Default $total
|
1201 |
*/
|
1202 |
foreach ($totals as $total) {
|
|
|
1203 |
$total->setOrder($order)
|
1204 |
->setSource($invoice);
|
1205 |
|
1206 |
if ($total->canDisplay()) {
|
|
|
1207 |
$total->setFontSize(10);
|
1208 |
foreach ($total->getTotalsForDisplay() as $totalData) {
|
1209 |
$label = array(
|
@@ -1222,6 +1229,7 @@ class TIG_PostNL_Model_Core_PackingSlip extends Mage_Sales_Model_Order_Pdf_Abstr
|
|
1222 |
'height' => 15,
|
1223 |
);
|
1224 |
|
|
|
1225 |
if ($total->getSourceField() == 'grand_total') {
|
1226 |
$label['font'] = 'bold';
|
1227 |
$value['font'] = 'bold';
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method TIG_PostNL_Model_Core_PackingSlip setStoreId(int $value)
|
256 |
$labels = $labelModel->sortLabels($labels);
|
257 |
$firstLabel = current($labels);
|
258 |
|
259 |
+
if (!$firstLabel || $this->getConfig('show_label') == 'none') {
|
260 |
+
foreach($pdf->pages as $page) {
|
261 |
+
$mainPdf->pages[] = clone $page;
|
262 |
+
}
|
263 |
+
|
264 |
+
return $mainPdf;
|
265 |
} elseif (
|
266 |
+
$this->getConfig('show_label') == 'separate'
|
267 |
|| $this->y < 421
|
268 |
|| ($firstLabel->getLabelType() != 'Label'
|
269 |
&& $firstLabel->getLabelType() != 'Label-combi'
|
703 |
/**
|
704 |
* Payment info.
|
705 |
*/
|
706 |
+
/** @noinspection PhpUndefinedMethodInspection */
|
707 |
$paymentInfo = Mage::helper('payment')
|
708 |
->getInfoBlock($order->getPayment())
|
709 |
->setIsSecureMode(true)
|
746 |
*/
|
747 |
protected function _insertShipmentInfo(&$page, $order, $postnlShipment)
|
748 |
{
|
|
|
|
|
|
|
749 |
|
750 |
$this->rightColumnY -= 14;
|
751 |
$top = $this->rightColumnY;
|
752 |
|
753 |
+
if ($this->getConfig('show_shipping_method')) {
|
754 |
+
$font = $this->_setFontBold($page, 8);
|
755 |
+
$text = $this->getHelper()->__('Shipping method');
|
756 |
+
$x = 580 - $this->widthForStringUsingFontSize($text, $font, 8);
|
757 |
+
$page->drawText(
|
758 |
+
$text,
|
759 |
+
$x,
|
760 |
+
$top,
|
761 |
+
'UTF-8'
|
762 |
+
);
|
|
|
|
|
|
|
763 |
|
764 |
+
$top -= 10;
|
|
|
|
|
|
|
|
|
|
|
765 |
|
766 |
+
$shippingMethod = $order->getShippingDescription();
|
767 |
|
768 |
+
$font = $this->_setFontRegular($page, 8);
|
769 |
+
$text = strip_tags(trim($shippingMethod))
|
770 |
+
. ' - '
|
771 |
+
. $order->formatPriceTxt($order->getShippingAmount() + $order->getShippingTaxAmount());
|
772 |
+
$x = 584 - $this->widthForStringUsingFontSize($text, $font, 8);
|
773 |
+
$page->drawText($text, $x, $top, 'UTF-8');
|
774 |
|
775 |
+
$top -= 10;
|
776 |
|
777 |
+
$deliveryDate = $postnlShipment->getDeliveryDate();
|
778 |
+
/** @noinspection PhpParamsInspection */
|
779 |
+
$text = $this->getCoreHelper()->formatDate($deliveryDate, 'full', false);
|
780 |
+
$x = 580 - $this->widthForStringUsingFontSize($text, $font, 8);
|
781 |
+
$page->drawText($text, $x, $top, 'UTF-8');
|
|
|
|
|
|
|
|
|
782 |
|
783 |
+
$top -= 24;
|
784 |
+
}
|
785 |
|
786 |
if ($this->getConfig('show_shipping_date')) {
|
787 |
+
$font = $this->_setFontBold($page, 8);
|
788 |
+
$text = $this->getHelper()->__('Ship order on');
|
789 |
+
$x = 580 - $this->widthForStringUsingFontSize($text, $font, 8);
|
790 |
+
$page->drawText(
|
791 |
+
$text,
|
792 |
+
$x,
|
793 |
+
$top,
|
794 |
+
'UTF-8'
|
795 |
+
);
|
796 |
+
|
797 |
+
$top -= 10;
|
798 |
$font = $this->_setFontRegular($page, 8);
|
799 |
$confirmDate = $postnlShipment->getConfirmDate();
|
800 |
+
/** @noinspection PhpParamsInspection */
|
801 |
$text = $this->getCoreHelper()->formatDate($confirmDate, 'full', false);
|
802 |
$x = 580 - $this->widthForStringUsingFontSize($text, $font, 8);
|
803 |
$page->drawText(
|
976 |
$this->y = $addressesStartY;
|
977 |
foreach ($pakjeGemakAddress as $value){
|
978 |
if ($value!=='') {
|
|
|
979 |
foreach ($this->getStringHelper()->str_split($value, 45, true, true) as $part) {
|
980 |
$page->drawText(strip_tags(ltrim($part)), $addressX, $this->y, 'UTF-8');
|
981 |
$this->y -= 10;
|
1104 |
*/
|
1105 |
public function renderItem(Varien_Object $item, Zend_Pdf_Page $page, Mage_Sales_Model_Order $order, $renderer)
|
1106 |
{
|
1107 |
+
/** @noinspection PhpUndefinedMethodInspection */
|
1108 |
$renderer->setOrder($order)
|
1109 |
->setItem($item)
|
1110 |
->setPdf($this)
|
1205 |
* @var Mage_Sales_Model_Order_Pdf_Total_Default $total
|
1206 |
*/
|
1207 |
foreach ($totals as $total) {
|
1208 |
+
/** @noinspection PhpUndefinedMethodInspection */
|
1209 |
$total->setOrder($order)
|
1210 |
->setSource($invoice);
|
1211 |
|
1212 |
if ($total->canDisplay()) {
|
1213 |
+
/** @noinspection PhpUndefinedMethodInspection */
|
1214 |
$total->setFontSize(10);
|
1215 |
foreach ($total->getTotalsForDisplay() as $totalData) {
|
1216 |
$label = array(
|
1229 |
'height' => 15,
|
1230 |
);
|
1231 |
|
1232 |
+
/** @noinspection PhpUndefinedMethodInspection */
|
1233 |
if ($total->getSourceField() == 'grand_total') {
|
1234 |
$label['font'] = 'bold';
|
1235 |
$value['font'] = 'bold';
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method array getItemColumns()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method array getItemColumns()
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Resource_Integrity extends TIG_PostNL_Model_Resource_Db_Abstract
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Resource_Integrity extends TIG_PostNL_Model_Resource_Db_Abstract
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Resource_Integrity_Collection extends TIG_PostNL_Model_Resource_Db_Collection_Postnl
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Resource_Integrity_Collection extends TIG_PostNL_Model_Resource_Db_Collection_Postnl
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Resource_Order extends TIG_PostNL_Model_Resource_Db_Abstract
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Resource_Order extends TIG_PostNL_Model_Resource_Db_Abstract
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Resource_Order_Collection extends TIG_PostNL_Model_Resource_Db_Collection_Postnl
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Resource_Order_Collection extends TIG_PostNL_Model_Resource_Db_Collection_Postnl
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Resource_Shipment extends TIG_PostNL_Model_Resource_Db_Abstract
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Resource_Shipment extends TIG_PostNL_Model_Resource_Db_Abstract
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Resource_Shipment_Barcode extends Mage_Core_Model_Resource_Db_Abstract
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Resource_Shipment_Barcode extends Mage_Core_Model_Resource_Db_Abstract
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Resource_Shipment_Barcode_Collection extends TIG_PostNL_Model_Resource_Db_Collection_Postnl
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Resource_Shipment_Barcode_Collection extends TIG_PostNL_Model_Resource_Db_Collection_Postnl
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Resource_Shipment_Collection extends TIG_PostNL_Model_Resource_Db_Collection_Postnl
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Resource_Shipment_Collection extends TIG_PostNL_Model_Resource_Db_Collection_Postnl
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Resource_Shipment_Label extends Mage_Core_Model_Resource_Db_Abstract
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Resource_Shipment_Label extends Mage_Core_Model_Resource_Db_Abstract
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Resource_Shipment_Label_Collection extends TIG_PostNL_Model_Resource_Db_Collection_Postnl
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Resource_Shipment_Label_Collection extends TIG_PostNL_Model_Resource_Db_Collection_Postnl
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Resource_Shipment_Status_History extends Mage_Core_Model_Resource_Db_Abstract
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Resource_Shipment_Status_History extends Mage_Core_Model_Resource_Db_Abstract
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Resource_Shipment_Status_History_Collection
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Resource_Shipment_Status_History_Collection
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Service
|
@@ -66,6 +66,7 @@ class TIG_PostNL_Model_Core_Service
|
|
66 |
|
67 |
$order = $invoice->getOrder();
|
68 |
|
|
|
69 |
$order->setIsInProcess(true);
|
70 |
|
71 |
/**
|
@@ -161,12 +162,15 @@ class TIG_PostNL_Model_Core_Service
|
|
161 |
$convertor = Mage::getModel('sales/convert_order');
|
162 |
|
163 |
$dummyPaymentMethod = Mage::getModel('postnl_core/service_paymentMethodDummy');
|
|
|
164 |
|
165 |
$dummyPayment = Mage::getModel('postnl_core/service_paymentDummy');
|
|
|
166 |
$dummyPayment->setMethod('postnl_dummy')
|
167 |
->setMethodInstance($dummyPaymentMethod);
|
168 |
|
169 |
$dummyOrder = Mage::getModel('postnl_core/service_orderDummy');
|
|
|
170 |
$dummyOrder->setData($order->getData())
|
171 |
->setSubtotalInvoiced(0)
|
172 |
->setBaseSubtotalInvoiced(0)
|
@@ -177,6 +181,7 @@ class TIG_PostNL_Model_Core_Service
|
|
177 |
->setPayment($dummyPayment);
|
178 |
|
179 |
$invoice = Mage::getModel('postnl_core/service_invoiceDummy');
|
|
|
180 |
$invoice->setOrder($dummyOrder)
|
181 |
->setStoreId($dummyOrder->getStoreId())
|
182 |
->setCustomerId($dummyOrder->getCustomerId())
|
@@ -205,7 +210,13 @@ class TIG_PostNL_Model_Core_Service
|
|
205 |
|
206 |
$orderItem->setQtyInvoiced(0)
|
207 |
->setRowInvoiced(0)
|
208 |
-
->setBaseRowInvoiced(0)
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
|
210 |
$totalQty += $qty;
|
211 |
$item->setData('qty', $qty);
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Service
|
66 |
|
67 |
$order = $invoice->getOrder();
|
68 |
|
69 |
+
/** @noinspection PhpUndefinedMethodInspection */
|
70 |
$order->setIsInProcess(true);
|
71 |
|
72 |
/**
|
162 |
$convertor = Mage::getModel('sales/convert_order');
|
163 |
|
164 |
$dummyPaymentMethod = Mage::getModel('postnl_core/service_paymentMethodDummy');
|
165 |
+
$dummyPaymentMethod->setInfoInstance(Mage::getModel('payment/info'));
|
166 |
|
167 |
$dummyPayment = Mage::getModel('postnl_core/service_paymentDummy');
|
168 |
+
/** @noinspection PhpUndefinedMethodInspection */
|
169 |
$dummyPayment->setMethod('postnl_dummy')
|
170 |
->setMethodInstance($dummyPaymentMethod);
|
171 |
|
172 |
$dummyOrder = Mage::getModel('postnl_core/service_orderDummy');
|
173 |
+
/** @noinspection PhpUndefinedMethodInspection */
|
174 |
$dummyOrder->setData($order->getData())
|
175 |
->setSubtotalInvoiced(0)
|
176 |
->setBaseSubtotalInvoiced(0)
|
181 |
->setPayment($dummyPayment);
|
182 |
|
183 |
$invoice = Mage::getModel('postnl_core/service_invoiceDummy');
|
184 |
+
/** @noinspection PhpUndefinedMethodInspection */
|
185 |
$invoice->setOrder($dummyOrder)
|
186 |
->setStoreId($dummyOrder->getStoreId())
|
187 |
->setCustomerId($dummyOrder->getCustomerId())
|
210 |
|
211 |
$orderItem->setQtyInvoiced(0)
|
212 |
->setRowInvoiced(0)
|
213 |
+
->setBaseRowInvoiced(0)
|
214 |
+
->setTaxInvoiced(0)
|
215 |
+
->setBaseTaxInvoiced(0)
|
216 |
+
->setDiscountInvoiced(0)
|
217 |
+
->setBaseDiscountInvoiced(0)
|
218 |
+
->setHiddenTaxInvoiced(0)
|
219 |
+
->setBaseHiddenTaxInvoiced(0);
|
220 |
|
221 |
$totalQty += $qty;
|
222 |
$item->setData('qty', $qty);
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Service_IntegrityCheck
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Service_IntegrityCheck
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Service_InvoiceDummy extends Mage_Sales_Model_Order_Invoice
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Service_InvoiceDummy extends Mage_Sales_Model_Order_Invoice
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Service_OrderDummy extends Mage_Sales_Model_Order
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Service_OrderDummy extends Mage_Sales_Model_Order
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Service_PaymentDummy extends Mage_Sales_Model_Order_Payment
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Service_PaymentDummy extends Mage_Sales_Model_Order_Payment
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Service_PaymentMethodDummy extends Mage_Payment_Model_Method_Abstract
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Service_PaymentMethodDummy extends Mage_Payment_Model_Method_Abstract
|
@@ -0,0 +1,1061 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ___________ __ __
|
4 |
+
* \__ ___/____ _/ |_ _____ | |
|
5 |
+
* | | / _ \\ __\\__ \ | |
|
6 |
+
* | | | |_| || | / __ \_| |__
|
7 |
+
* |____| \____/ |__| (____ /|____/
|
8 |
+
* \/
|
9 |
+
* ___ __ __
|
10 |
+
* | | ____ _/ |_ ____ _______ ____ ____ _/ |_
|
11 |
+
* | | / \\ __\_/ __ \\_ __ \ / \ _/ __ \\ __\
|
12 |
+
* | || | \| | \ ___/ | | \/| | \\ ___/ | |
|
13 |
+
* |___||___| /|__| \_____>|__| |___| / \_____>|__|
|
14 |
+
* \/ \/
|
15 |
+
* ________
|
16 |
+
* / _____/_______ ____ __ __ ______
|
17 |
+
* / \ ___\_ __ \ / _ \ | | \\____ \
|
18 |
+
* \ \_\ \| | \/| |_| || | /| |_| |
|
19 |
+
* \______ /|__| \____/ |____/ | __/
|
20 |
+
* \/ |__|
|
21 |
+
*
|
22 |
+
* NOTICE OF LICENSE
|
23 |
+
*
|
24 |
+
* This source file is subject to the Creative Commons License.
|
25 |
+
* It is available through the world-wide-web at this URL:
|
26 |
+
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
27 |
+
* If you are unable to obtain it through the world-wide-web, please send an email
|
28 |
+
* to servicedesk@tig.nl so we can send you a copy immediately.
|
29 |
+
*
|
30 |
+
* DISCLAIMER
|
31 |
+
*
|
32 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
33 |
+
* versions in the future. If you wish to customize this module for your
|
34 |
+
* needs please contact servicedesk@tig.nl for more information.
|
35 |
+
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
+
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
+
*/
|
39 |
+
class TIG_PostNL_Model_Core_Service_Shipment
|
40 |
+
{
|
41 |
+
/**
|
42 |
+
* Xpath to the 'print_return_and_shipping_label' setting.
|
43 |
+
*/
|
44 |
+
const XPATH_PRINT_RETURN_AND_SHIPPING_LABEL = 'postnl/returns/print_return_and_shipping_label';
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Xpath to 'show_label' setting.
|
48 |
+
*/
|
49 |
+
const XPATH_SHOW_LABEL = 'postnl/packing_slip/show_label';
|
50 |
+
|
51 |
+
/**
|
52 |
+
* @var array
|
53 |
+
*/
|
54 |
+
protected $_warnings = array();
|
55 |
+
|
56 |
+
/**
|
57 |
+
* @return array
|
58 |
+
*/
|
59 |
+
public function getWarnings()
|
60 |
+
{
|
61 |
+
return $this->_warnings;
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* @param array $warnings
|
66 |
+
*
|
67 |
+
* @return $this
|
68 |
+
*/
|
69 |
+
public function setWarnings(array $warnings)
|
70 |
+
{
|
71 |
+
$this->_warnings = $warnings;
|
72 |
+
|
73 |
+
return $this;
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* @return bool
|
78 |
+
*/
|
79 |
+
public function hasWarnings()
|
80 |
+
{
|
81 |
+
$warnings = $this->getWarnings();
|
82 |
+
if (count($warnings) > 0) {
|
83 |
+
return true;
|
84 |
+
}
|
85 |
+
|
86 |
+
return false;
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* @return $this
|
91 |
+
*/
|
92 |
+
public function resetWarnings()
|
93 |
+
{
|
94 |
+
$this->setWarnings(array());
|
95 |
+
|
96 |
+
return $this;
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* @param array|string $warning
|
101 |
+
*
|
102 |
+
* @return $this
|
103 |
+
*/
|
104 |
+
public function addWarning($warning)
|
105 |
+
{
|
106 |
+
if (!is_array($warning)) {
|
107 |
+
$warning = array(
|
108 |
+
'entity_id' => null,
|
109 |
+
'code' => null,
|
110 |
+
'description' => $warning,
|
111 |
+
);
|
112 |
+
}
|
113 |
+
|
114 |
+
$warnings = $this->getWarnings();
|
115 |
+
$warnings[] = $warning;
|
116 |
+
|
117 |
+
$this->setWarnings($warnings);
|
118 |
+
return $this;
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Gets the postnl shipment associated with a shipment
|
123 |
+
*
|
124 |
+
* @param int $shipmentId
|
125 |
+
*
|
126 |
+
* @return TIG_PostNL_Model_Core_Shipment
|
127 |
+
*/
|
128 |
+
public function getPostnlShipment($shipmentId)
|
129 |
+
{
|
130 |
+
$postnlShipment = Mage::getModel('postnl_core/shipment')->load($shipmentId, 'shipment_id');
|
131 |
+
|
132 |
+
return $postnlShipment;
|
133 |
+
}
|
134 |
+
|
135 |
+
/**
|
136 |
+
* Load a shipment based on a shipment ID.
|
137 |
+
*
|
138 |
+
* @param int $shipmentId
|
139 |
+
* @param boolean $loadPostnlShipments
|
140 |
+
*
|
141 |
+
* @return boolean|Mage_Sales_Model_Order_Shipment|TIG_PostNL_Model_Core_Shipment
|
142 |
+
*/
|
143 |
+
public function loadShipment($shipmentId, $loadPostnlShipments)
|
144 |
+
{
|
145 |
+
if ($loadPostnlShipments === false) {
|
146 |
+
/**
|
147 |
+
* @var Mage_Sales_Model_Order_Shipment $shipment
|
148 |
+
*/
|
149 |
+
$shipment = Mage::getModel('sales/order_shipment')->load($shipmentId);
|
150 |
+
if (!$shipment || !$shipment->getId()) {
|
151 |
+
return false;
|
152 |
+
}
|
153 |
+
|
154 |
+
$shippingMethod = $shipment->getOrder()->getShippingMethod();
|
155 |
+
} else {
|
156 |
+
/**
|
157 |
+
* @var TIG_PostNL_Model_Core_Shipment $shipment
|
158 |
+
*/
|
159 |
+
$shipment = $this->getPostnlShipment($shipmentId);
|
160 |
+
if (!$shipment || !$shipment->getId()) {
|
161 |
+
return false;
|
162 |
+
}
|
163 |
+
|
164 |
+
$shippingMethod = $shipment->getShipment()->getOrder()->getShippingMethod();
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Check if the shipping method used is allowed
|
169 |
+
*/
|
170 |
+
if (!Mage::helper('postnl/carrier')->isPostnlShippingMethod($shippingMethod)) {
|
171 |
+
return false;
|
172 |
+
}
|
173 |
+
|
174 |
+
return $shipment;
|
175 |
+
}
|
176 |
+
|
177 |
+
/**
|
178 |
+
* Load an array of shipments based on an array of shipmentIds and check if they're shipped using PostNL
|
179 |
+
*
|
180 |
+
* @param array|int $shipmentIds
|
181 |
+
* @param boolean $loadPostnlShipments Flag that determines whether the shipments will be loaded as
|
182 |
+
* Mage_Sales_Model_Shipment or TIG_PostNL_Model_Core_Shipment objects.
|
183 |
+
* @param boolean $throwException Flag whether an exception should be thrown when loading the shipment fails.
|
184 |
+
*
|
185 |
+
* @return array
|
186 |
+
*
|
187 |
+
* @throws TIG_PostNL_Exception
|
188 |
+
*/
|
189 |
+
public function loadAndCheckShipments($shipmentIds, $loadPostnlShipments = false, $throwException = true)
|
190 |
+
{
|
191 |
+
if (!is_array($shipmentIds)) {
|
192 |
+
$shipmentIds = array($shipmentIds);
|
193 |
+
}
|
194 |
+
|
195 |
+
$helper = Mage::helper('postnl/carrier');
|
196 |
+
$resource = Mage::getSingleton('core/resource');
|
197 |
+
$postnlShippingMethods = $helper->getPostnlShippingMethods();
|
198 |
+
|
199 |
+
/**
|
200 |
+
* This regex will filter all non-postnl shipments.
|
201 |
+
*/
|
202 |
+
$postnlShippingMethodsRegex = '';
|
203 |
+
foreach ($postnlShippingMethods as $method) {
|
204 |
+
if ($postnlShippingMethodsRegex) {
|
205 |
+
$postnlShippingMethodsRegex .= '|';
|
206 |
+
} else {
|
207 |
+
$postnlShippingMethodsRegex .= '^';
|
208 |
+
}
|
209 |
+
|
210 |
+
$postnlShippingMethodsRegex .= "({$method})(_{0,1}[0-9]*)";
|
211 |
+
}
|
212 |
+
|
213 |
+
$postnlShippingMethodsRegex .= '$';
|
214 |
+
|
215 |
+
/**
|
216 |
+
* Get the requested shipments. Only shipments that have been shipped using PostNL will be returned.
|
217 |
+
*/
|
218 |
+
if ($loadPostnlShipments) {
|
219 |
+
$shipments = Mage::getResourceModel('postnl_core/shipment_collection')
|
220 |
+
->addFieldToFilter('shipment_id', array('in' => $shipmentIds))
|
221 |
+
->addFieldToFilter(
|
222 |
+
'`order`.`shipping_method`',
|
223 |
+
array(
|
224 |
+
'regexp' => $postnlShippingMethodsRegex
|
225 |
+
)
|
226 |
+
);
|
227 |
+
|
228 |
+
$shipments->getSelect()->joinInner(
|
229 |
+
array('order' => $resource->getTableName('sales/order')),
|
230 |
+
'`main_table`.`order_id`=`order`.`entity_id`',
|
231 |
+
array(
|
232 |
+
'shipping_method' => 'order.shipping_method',
|
233 |
+
)
|
234 |
+
);
|
235 |
+
|
236 |
+
$processedShipmentIds = $shipments->getColumnValues('shipment_id');
|
237 |
+
} else {
|
238 |
+
$shipments = Mage::getResourceModel('sales/order_shipment_collection')
|
239 |
+
->addFieldToFilter('main_table.entity_id', array('in' => $shipmentIds))
|
240 |
+
->addFieldToFilter(
|
241 |
+
'`order`.`shipping_method`',
|
242 |
+
array(
|
243 |
+
'regexp' => $postnlShippingMethodsRegex
|
244 |
+
)
|
245 |
+
);
|
246 |
+
|
247 |
+
$shipments->getSelect()->joinInner(
|
248 |
+
array('order' => $resource->getTableName('sales/order')),
|
249 |
+
'`main_table`.`order_id`=`order`.`entity_id`',
|
250 |
+
array(
|
251 |
+
'shipping_method' => 'order.shipping_method',
|
252 |
+
)
|
253 |
+
);
|
254 |
+
|
255 |
+
$processedShipmentIds = $shipments->getColumnValues('entity_id');
|
256 |
+
}
|
257 |
+
|
258 |
+
/**
|
259 |
+
* Check if all requested IDs were processed.
|
260 |
+
*/
|
261 |
+
$missingIds = array_diff($shipmentIds, $processedShipmentIds);
|
262 |
+
if (!$missingIds) {
|
263 |
+
return $shipments;
|
264 |
+
}
|
265 |
+
|
266 |
+
/**
|
267 |
+
* If any requested shipments were not found, it's because they were not shipped using PostNL.
|
268 |
+
*/
|
269 |
+
$adapter = Mage::getSingleton('core/resource')->getConnection('core_read');
|
270 |
+
foreach ($missingIds as $shipmentId) {
|
271 |
+
/**
|
272 |
+
* Get the shipment's increment ID. We need this, because many merchants do not know the difference between
|
273 |
+
* increment IDs and entity IDs.
|
274 |
+
*/
|
275 |
+
$bind = array(':entity_id' => $shipmentId);
|
276 |
+
$select = $adapter->select()
|
277 |
+
->from($resource->getTableName('sales/shipment'), array("increment_id"))
|
278 |
+
->where('entity_id = :entity_id');
|
279 |
+
|
280 |
+
$shipmentIncrementId = $adapter->fetchOne($select, $bind);
|
281 |
+
|
282 |
+
if ($throwException) {
|
283 |
+
throw new TIG_PostNL_Exception(
|
284 |
+
$helper->__(
|
285 |
+
'This action is not available for shipment #%s, because it was not shipped using PostNL.',
|
286 |
+
$shipmentIncrementId
|
287 |
+
),
|
288 |
+
'POSTNL-0009'
|
289 |
+
);
|
290 |
+
}
|
291 |
+
|
292 |
+
$this->addWarning(
|
293 |
+
array(
|
294 |
+
'entity_id' => $shipmentIncrementId,
|
295 |
+
'code' => 'POSTNL-0009',
|
296 |
+
'description' => $helper->__(
|
297 |
+
'This action is not available for shipment #%s, because it was not shipped using PostNL.',
|
298 |
+
$shipmentIncrementId
|
299 |
+
),
|
300 |
+
)
|
301 |
+
);
|
302 |
+
}
|
303 |
+
|
304 |
+
return $shipments;
|
305 |
+
}
|
306 |
+
|
307 |
+
/**
|
308 |
+
* Creates a shipment of an order containing all available items.
|
309 |
+
*
|
310 |
+
* @param Mage_Sales_Model_Order|int $order
|
311 |
+
*
|
312 |
+
* @return int
|
313 |
+
*
|
314 |
+
* @throws TIG_PostNL_Exception
|
315 |
+
*/
|
316 |
+
public function createShipment($order)
|
317 |
+
{
|
318 |
+
$helper = Mage::helper('postnl');
|
319 |
+
|
320 |
+
if (is_numeric($order)) {
|
321 |
+
$order = Mage::getModel('sales/order')->load($order);
|
322 |
+
}
|
323 |
+
|
324 |
+
if (!is_object($order) || !($order instanceof Mage_Sales_Model_Order) || !$order->getId()) {
|
325 |
+
throw new InvalidArgumentException(
|
326 |
+
'Order must be an instance of Mage_Sales_Model_Order or a valid entity ID.'
|
327 |
+
);
|
328 |
+
}
|
329 |
+
|
330 |
+
if (!$order->canShip()) {
|
331 |
+
throw new TIG_PostNL_Exception(
|
332 |
+
$helper->__('Order #%s cannot be shipped at this time.', $order->getIncrementId()),
|
333 |
+
'POSTNL-0015'
|
334 |
+
);
|
335 |
+
}
|
336 |
+
|
337 |
+
$shipment = Mage::getModel('sales/service_order', $order)
|
338 |
+
->prepareShipment($this->_getItemQtys($order));
|
339 |
+
|
340 |
+
$shipment->register();
|
341 |
+
$this->_saveShipment($shipment);
|
342 |
+
|
343 |
+
return $shipment->getId();
|
344 |
+
}
|
345 |
+
|
346 |
+
/**
|
347 |
+
* Create shipments for an array of order IDs
|
348 |
+
*
|
349 |
+
* @param array $orderIds
|
350 |
+
* @param boolean $loadExisting Flag to determine if existing shipments should be loaded. If set to false, an
|
351 |
+
* error will be thrown for shipments that have already been shipped.
|
352 |
+
* @param boolean $registerExisting
|
353 |
+
*
|
354 |
+
* @return array
|
355 |
+
*/
|
356 |
+
public function createShipments(array $orderIds, $loadExisting = false, $registerExisting = true)
|
357 |
+
{
|
358 |
+
$helper = Mage::helper('postnl');
|
359 |
+
|
360 |
+
/**
|
361 |
+
* Load the requested orders. Any orders that weren't shipped using PostNL will be skipped.
|
362 |
+
*/
|
363 |
+
$orders = $this->_loadOrders($orderIds);
|
364 |
+
$processedOrderIds = $orders->getColumnValues('entity_id');
|
365 |
+
|
366 |
+
/**
|
367 |
+
* Add a warning for all orders which were skipped because they weren't shipped with PostNL.
|
368 |
+
*/
|
369 |
+
$missingIds = array_diff($orderIds, $processedOrderIds);
|
370 |
+
foreach ($missingIds as $missingId) {
|
371 |
+
$incrementId = Mage::getResourceModel('sales/order')->getIncrementId($missingId);
|
372 |
+
$this->addWarning(
|
373 |
+
array(
|
374 |
+
'entity_id' => $incrementId,
|
375 |
+
'code' => 'POSTNL-0009',
|
376 |
+
'description' => $helper->__(
|
377 |
+
'This action is not available for order #%s, because it was not placed using PostNL.',
|
378 |
+
$incrementId
|
379 |
+
),
|
380 |
+
)
|
381 |
+
);
|
382 |
+
}
|
383 |
+
|
384 |
+
/**
|
385 |
+
* Create the shipments.
|
386 |
+
*
|
387 |
+
* @var Mage_Sales_Model_Order $order
|
388 |
+
*/
|
389 |
+
$shipmentIds = array();
|
390 |
+
$existingShipmentsLoaded = array();
|
391 |
+
foreach ($orders as $order) {
|
392 |
+
try {
|
393 |
+
$shipmentIds[] = $this->createShipment($order);
|
394 |
+
} catch (TIG_PostNL_Exception $e) {
|
395 |
+
if (!$loadExisting) {
|
396 |
+
$helper->logException($e);
|
397 |
+
$this->addWarning(
|
398 |
+
array(
|
399 |
+
'entity_id' => Mage::getResourceModel('sales/order')->getIncrementId($order->getId()),
|
400 |
+
'code' => $e->getCode(),
|
401 |
+
'description' => $e->getMessage(),
|
402 |
+
)
|
403 |
+
);
|
404 |
+
|
405 |
+
continue;
|
406 |
+
}
|
407 |
+
/**
|
408 |
+
* If any shipments already exist, get their IDs so they can be processed.
|
409 |
+
*/
|
410 |
+
$shipmentCollection = Mage::getResourceModel('sales/order_shipment_collection');
|
411 |
+
$shipmentCollection->addFieldToSelect('entity_id')
|
412 |
+
->addFieldToFilter('order_id', $order->getId());
|
413 |
+
|
414 |
+
$orderShipmentIds = $shipmentCollection->getColumnValues('entity_id');
|
415 |
+
|
416 |
+
if ($shipmentCollection->getSize() > 0) {
|
417 |
+
$shipmentIds = array_merge($orderShipmentIds, $shipmentIds);
|
418 |
+
|
419 |
+
if ($registerExisting) {
|
420 |
+
$existingShipmentsLoaded = array_merge($orderShipmentIds, $existingShipmentsLoaded);
|
421 |
+
}
|
422 |
+
} else {
|
423 |
+
/**
|
424 |
+
* If no shipments exist, add a warning message indicating the process failed for this order.
|
425 |
+
*/
|
426 |
+
$helper->logException($e);
|
427 |
+
$this->addWarning(
|
428 |
+
array(
|
429 |
+
'entity_id' => Mage::getResourceModel('sales/order')->getIncrementId($order->getId()),
|
430 |
+
'code' => $e->getCode(),
|
431 |
+
'description' => $e->getMessage(),
|
432 |
+
)
|
433 |
+
);
|
434 |
+
}
|
435 |
+
} catch (Exception $e) {
|
436 |
+
$helper->logException($e);
|
437 |
+
$this->addWarning(
|
438 |
+
array(
|
439 |
+
'entity_id' => Mage::getResourceModel('sales/order')->getIncrementId($order->getId()),
|
440 |
+
'code' => null,
|
441 |
+
'description' => $e->getMessage(),
|
442 |
+
)
|
443 |
+
);
|
444 |
+
}
|
445 |
+
}
|
446 |
+
|
447 |
+
if ($registerExisting) {
|
448 |
+
Mage::unregister('postnl_existing_shipments_loaded');
|
449 |
+
Mage::register('postnl_existing_shipments_loaded', $existingShipmentsLoaded);
|
450 |
+
}
|
451 |
+
|
452 |
+
return $shipmentIds;
|
453 |
+
}
|
454 |
+
|
455 |
+
/**
|
456 |
+
* Retrieves the shipping label for a given shipment ID.
|
457 |
+
*
|
458 |
+
* If the shipment has a stored label, it is returned. Otherwise a new one is generated.
|
459 |
+
*
|
460 |
+
* @param Mage_Sales_Model_Order_Shipment|TIG_PostNL_Model_Core_Shipment $shipment
|
461 |
+
* @param boolean $confirm Optional parameter to also
|
462 |
+
* confirm the shipment
|
463 |
+
* @param boolean|null $includeReturnLabels
|
464 |
+
*
|
465 |
+
* @return TIG_PostNL_Model_Core_Shipment_Label[]
|
466 |
+
*
|
467 |
+
* @throws TIG_PostNL_Exception
|
468 |
+
*/
|
469 |
+
public function getLabels($shipment, $confirm = false, $includeReturnLabels = null)
|
470 |
+
{
|
471 |
+
if (is_null($includeReturnLabels)) {
|
472 |
+
$includeReturnLabels = Mage::getStoreConfigFlag(
|
473 |
+
self::XPATH_PRINT_RETURN_AND_SHIPPING_LABEL,
|
474 |
+
$shipment->getStoreId()
|
475 |
+
);
|
476 |
+
|
477 |
+
/**
|
478 |
+
* Return labels may only be included if the current admin user is allowed to print them.
|
479 |
+
*/
|
480 |
+
if (!$this->_checkIsAllowed(array('print_return_labels'))) {
|
481 |
+
$includeReturnLabels = false;
|
482 |
+
}
|
483 |
+
}
|
484 |
+
|
485 |
+
/**
|
486 |
+
* Check if printing return labels is allowed.
|
487 |
+
*/
|
488 |
+
if (!Mage::helper('postnl')->isReturnsEnabled($shipment->getStoreId())) {
|
489 |
+
$includeReturnLabels = false;
|
490 |
+
}
|
491 |
+
|
492 |
+
/**
|
493 |
+
* Load the PostNL shipment.
|
494 |
+
*/
|
495 |
+
if ($shipment instanceof Mage_Sales_Model_Order_Shipment) {
|
496 |
+
$postnlShipment = $this->getPostnlShipment($shipment->getId());
|
497 |
+
} else {
|
498 |
+
$postnlShipment = $shipment;
|
499 |
+
}
|
500 |
+
|
501 |
+
/**
|
502 |
+
* Check if the shipment already has any labels. If so, return those. If we also need to confirm the shipment,
|
503 |
+
* do that first.
|
504 |
+
*/
|
505 |
+
if ($postnlShipment->hasLabels()) {
|
506 |
+
if ($confirm === true && !$postnlShipment->isConfirmed() && $postnlShipment->canConfirm()) {
|
507 |
+
$this->confirmShipment($postnlShipment);
|
508 |
+
}
|
509 |
+
} else {
|
510 |
+
/**
|
511 |
+
* Generate the required labels.
|
512 |
+
*/
|
513 |
+
$postnlShipment = $this->_generateLabels($shipment, $postnlShipment, $confirm);
|
514 |
+
}
|
515 |
+
|
516 |
+
$labels = $postnlShipment->getlabels($includeReturnLabels);
|
517 |
+
|
518 |
+
if (!$postnlShipment->getLabelsPrinted()) {
|
519 |
+
$postnlShipment->setLabelsPrinted(true);
|
520 |
+
}
|
521 |
+
|
522 |
+
if ($includeReturnLabels && !$postnlShipment->getReturnLabelsPrinted()) {
|
523 |
+
$postnlShipment->setReturnLabelsPrinted(true);
|
524 |
+
}
|
525 |
+
|
526 |
+
if ($postnlShipment->hasDataChanges()) {
|
527 |
+
$postnlShipment->save();
|
528 |
+
}
|
529 |
+
|
530 |
+
return $labels;
|
531 |
+
}
|
532 |
+
|
533 |
+
/**
|
534 |
+
* Get all return labels for a shipment.
|
535 |
+
*
|
536 |
+
* @param Mage_Sales_Model_Order_Shipment|TIG_PostNL_Model_Core_Shipment $shipment
|
537 |
+
*
|
538 |
+
* @return TIG_PostNL_Model_Core_Shipment_Label[]|false
|
539 |
+
*/
|
540 |
+
public function getReturnLabels($shipment)
|
541 |
+
{
|
542 |
+
/**
|
543 |
+
* Load the PostNL shipment.
|
544 |
+
*/
|
545 |
+
if ($shipment instanceof Mage_Sales_Model_Order_Shipment) {
|
546 |
+
$postnlShipment = $this->getPostnlShipment($shipment->getId());
|
547 |
+
} else {
|
548 |
+
$postnlShipment = $shipment;
|
549 |
+
}
|
550 |
+
|
551 |
+
if (!$postnlShipment->hasReturnBarcode() && !$postnlShipment->canGenerateReturnBarcode()) {
|
552 |
+
return false;
|
553 |
+
}
|
554 |
+
|
555 |
+
if ($postnlShipment->hasReturnLabels()) {
|
556 |
+
return $postnlShipment->getReturnLabels();
|
557 |
+
}
|
558 |
+
|
559 |
+
$postnlShipment = $this->_generateLabels($shipment, $postnlShipment, false);
|
560 |
+
|
561 |
+
$labels = $postnlShipment->getReturnLabels();
|
562 |
+
|
563 |
+
if (!$postnlShipment->getLabelsPrinted()) {
|
564 |
+
$postnlShipment->setLabelsPrinted(true);
|
565 |
+
}
|
566 |
+
|
567 |
+
if (!$postnlShipment->getReturnLabelsPrinted()) {
|
568 |
+
$postnlShipment->setReturnLabelsPrinted(true);
|
569 |
+
}
|
570 |
+
|
571 |
+
if ($postnlShipment->hasDataChanges()) {
|
572 |
+
$postnlShipment->save();
|
573 |
+
}
|
574 |
+
|
575 |
+
return $labels;
|
576 |
+
}
|
577 |
+
|
578 |
+
/**
|
579 |
+
* Confirms the shipment without printing labels.
|
580 |
+
*
|
581 |
+
* @param Mage_Sales_Model_Order_Shipment|TIG_PostNL_Model_Core_Shipment $shipment
|
582 |
+
*
|
583 |
+
* @return $this
|
584 |
+
*
|
585 |
+
* @throws TIG_PostNL_Exception
|
586 |
+
*/
|
587 |
+
public function confirmShipment($shipment)
|
588 |
+
{
|
589 |
+
$helper = Mage::helper('postnl');
|
590 |
+
|
591 |
+
/**
|
592 |
+
* Load the PostNL shipment.
|
593 |
+
*/
|
594 |
+
if ($shipment instanceof Mage_Sales_Model_Order_Shipment) {
|
595 |
+
$postnlShipment = $this->getPostnlShipment($shipment->getId());
|
596 |
+
} else {
|
597 |
+
$postnlShipment = $shipment;
|
598 |
+
}
|
599 |
+
|
600 |
+
/**
|
601 |
+
* Prevent EU shipments from being confirmed if their labels are not yet printed.
|
602 |
+
*/
|
603 |
+
if ($postnlShipment->isEuShipment() && !$postnlShipment->getLabelsPrinted()) {
|
604 |
+
throw new TIG_PostNL_Exception(
|
605 |
+
$helper->__(
|
606 |
+
"Shipment #%s could not be confirmed, because for EU shipments you may only confirm a shipment " .
|
607 |
+
"after it's labels have been printed.",
|
608 |
+
$postnlShipment->getShipment()->getIncrementId()
|
609 |
+
),
|
610 |
+
'POSTNL-0016'
|
611 |
+
);
|
612 |
+
}
|
613 |
+
|
614 |
+
/**
|
615 |
+
* If the PostNL shipment is new, set the magento shipment ID.
|
616 |
+
*/
|
617 |
+
if (!$postnlShipment->getShipmentId()) {
|
618 |
+
$postnlShipment->setShipmentId($shipment->getId());
|
619 |
+
}
|
620 |
+
|
621 |
+
/**
|
622 |
+
* If the shipment does not have a main barcode, generate new barcodes.
|
623 |
+
*/
|
624 |
+
if (!$postnlShipment->getMainBarcode() && $postnlShipment->canGenerateBarcode()) {
|
625 |
+
$postnlShipment->generateBarcodes();
|
626 |
+
}
|
627 |
+
|
628 |
+
$printReturnLabel = Mage::helper('postnl/cif')->isReturnsEnabled($shipment->getStoreId());
|
629 |
+
if ($printReturnLabel && !$postnlShipment->hasReturnBarcode() && $postnlShipment->canGenerateReturnBarcode()) {
|
630 |
+
$postnlShipment->generateReturnBarcode();
|
631 |
+
}
|
632 |
+
|
633 |
+
if ($postnlShipment->getConfirmStatus() === $postnlShipment::CONFIRM_STATUS_CONFIRMED) {
|
634 |
+
/**
|
635 |
+
* The shipment is already confirmed.
|
636 |
+
*/
|
637 |
+
$this->addWarning(
|
638 |
+
array(
|
639 |
+
'entity_id' => $postnlShipment->getShipmentId(),
|
640 |
+
'code' => 'POSTNL-0017',
|
641 |
+
'description' => $helper->__(
|
642 |
+
'Shipment #%s has already been confirmed.',
|
643 |
+
$postnlShipment->getShipment()->getIncrementId()
|
644 |
+
),
|
645 |
+
)
|
646 |
+
);
|
647 |
+
|
648 |
+
return $this;
|
649 |
+
}
|
650 |
+
|
651 |
+
if (!$postnlShipment->canConfirm()) {
|
652 |
+
/**
|
653 |
+
* The shipment cannot be confirmed at this time.
|
654 |
+
*/
|
655 |
+
throw new TIG_PostNL_Exception(
|
656 |
+
$helper->__(
|
657 |
+
'Shipment #%s cannot be confirmed at this time.',
|
658 |
+
$postnlShipment->getShipment()->getIncrementId()
|
659 |
+
),
|
660 |
+
'POSTNL-00018'
|
661 |
+
);
|
662 |
+
}
|
663 |
+
|
664 |
+
/**
|
665 |
+
* Confirm the shipment.
|
666 |
+
*/
|
667 |
+
$postnlShipment->confirm();
|
668 |
+
|
669 |
+
if ($postnlShipment->canAddTrackingCode()) {
|
670 |
+
$postnlShipment->addTrackingCodeToShipment();
|
671 |
+
}
|
672 |
+
|
673 |
+
$postnlShipment->save();
|
674 |
+
|
675 |
+
return $this;
|
676 |
+
}
|
677 |
+
|
678 |
+
/**
|
679 |
+
* @param TIG_PostNL_Model_Core_Shipment $postnlShipment
|
680 |
+
*
|
681 |
+
* @return $this
|
682 |
+
* @throws Exception
|
683 |
+
* @throws TIG_PostNL_Exception
|
684 |
+
* @throws TIG_PostNL_Model_Core_Cif_Exception
|
685 |
+
*/
|
686 |
+
public function updateShippingStatus(TIG_PostNL_Model_Core_Shipment $postnlShipment)
|
687 |
+
{
|
688 |
+
$helper = Mage::helper('postnl');
|
689 |
+
|
690 |
+
/**
|
691 |
+
* Only confirmed shipments cna be updated.
|
692 |
+
*/
|
693 |
+
if (!$postnlShipment->isConfirmed()) {
|
694 |
+
throw new TIG_PostNL_Exception(
|
695 |
+
$helper->__(
|
696 |
+
'The shipping status of shipment #%s cannot be updated, because it has not yet been confirmed.',
|
697 |
+
$postnlShipment->getShipmentIncrementId()
|
698 |
+
),
|
699 |
+
'POSTNL-0206'
|
700 |
+
);
|
701 |
+
}
|
702 |
+
|
703 |
+
/**
|
704 |
+
* Check if the shipment's shipping status or return status may be updated.
|
705 |
+
*/
|
706 |
+
if (!$postnlShipment->canUpdateShippingStatus() && !$postnlShipment->canUpdateReturnStatus()) {
|
707 |
+
throw new TIG_PostNL_Exception(
|
708 |
+
$helper->__(
|
709 |
+
'The shipping status of shipment #%s cannot be updated.',
|
710 |
+
$postnlShipment->getShipmentIncrementId()
|
711 |
+
),
|
712 |
+
'POSTNL-0220'
|
713 |
+
);
|
714 |
+
}
|
715 |
+
|
716 |
+
if ($postnlShipment->canUpdateShippingStatus()) {
|
717 |
+
$postnlShipment->updateShippingStatus(true);
|
718 |
+
}
|
719 |
+
|
720 |
+
if ($postnlShipment->canUpdateReturnStatus()) {
|
721 |
+
$postnlShipment->updateReturnStatus(true);
|
722 |
+
}
|
723 |
+
|
724 |
+
if ($postnlShipment->hasDataChanges()) {
|
725 |
+
$postnlShipment->save();
|
726 |
+
}
|
727 |
+
|
728 |
+
return $this;
|
729 |
+
}
|
730 |
+
|
731 |
+
/**
|
732 |
+
* Get the output of printing labels for an array of shipments.
|
733 |
+
*
|
734 |
+
* @param TIG_PostNL_Model_Core_Shipment[] $shipments
|
735 |
+
*
|
736 |
+
* @return string|false
|
737 |
+
*
|
738 |
+
* @throws TIG_PostNL_Exception
|
739 |
+
*/
|
740 |
+
public function getMassLabelsOutput($shipments)
|
741 |
+
{
|
742 |
+
$helper = Mage::helper('postnl');
|
743 |
+
|
744 |
+
/**
|
745 |
+
* Get the labels from CIF.
|
746 |
+
*/
|
747 |
+
$labels = array();
|
748 |
+
foreach ($shipments as $shipment) {
|
749 |
+
try {
|
750 |
+
$printReturnLabels = Mage::helper('postnl')->canPrintReturnLabelsWithShippingLabels(
|
751 |
+
$shipment->getStoreId()
|
752 |
+
);
|
753 |
+
|
754 |
+
$shipmentLabels = $this->getLabels($shipment, true, $printReturnLabels);
|
755 |
+
$labels = array_merge($labels, $shipmentLabels);
|
756 |
+
} catch (TIG_PostNL_Model_Core_Cif_Exception $e) {
|
757 |
+
Mage::helper('postnl/cif')->parseCifException($e);
|
758 |
+
|
759 |
+
$helper->logException($e);
|
760 |
+
$this->addWarning(
|
761 |
+
array(
|
762 |
+
'entity_id' => $shipment->getShipmentIncrementId(),
|
763 |
+
'code' => $e->getCode(),
|
764 |
+
'description' => $e->getMessage(),
|
765 |
+
)
|
766 |
+
);
|
767 |
+
} catch (TIG_PostNL_Exception $e) {
|
768 |
+
$helper->logException($e);
|
769 |
+
$this->addWarning(
|
770 |
+
array(
|
771 |
+
'entity_id' => $shipment->getShipmentIncrementId(),
|
772 |
+
'code' => $e->getCode(),
|
773 |
+
'description' => $e->getMessage(),
|
774 |
+
)
|
775 |
+
);
|
776 |
+
} catch (Exception $e) {
|
777 |
+
$helper->logException($e);
|
778 |
+
$this->addWarning(
|
779 |
+
array(
|
780 |
+
'entity_id' => $shipment->getShipmentIncrementId(),
|
781 |
+
'code' => null,
|
782 |
+
'description' => $e->getMessage(),
|
783 |
+
)
|
784 |
+
);
|
785 |
+
}
|
786 |
+
}
|
787 |
+
|
788 |
+
if (!$labels) {
|
789 |
+
return false;
|
790 |
+
}
|
791 |
+
|
792 |
+
/**
|
793 |
+
* The label wills be base64 encoded strings. Convert these to a single pdf.
|
794 |
+
*/
|
795 |
+
$label = Mage::getModel('postnl_core/label');
|
796 |
+
$output = $label->createPdf($labels);
|
797 |
+
|
798 |
+
return $output;
|
799 |
+
}
|
800 |
+
|
801 |
+
/**
|
802 |
+
* Get the output of printing packing slips for an array of shipments.
|
803 |
+
*
|
804 |
+
* @param TIG_PostNL_Model_Core_Shipment[] $shipments
|
805 |
+
*
|
806 |
+
* @return bool|string
|
807 |
+
*
|
808 |
+
* @throws Zend_Pdf_Exception
|
809 |
+
*/
|
810 |
+
public function getMassPackingSlipsOutput($shipments)
|
811 |
+
{
|
812 |
+
$helper = Mage::helper('postnl');
|
813 |
+
|
814 |
+
/**
|
815 |
+
* Get the packing slip model.
|
816 |
+
*/
|
817 |
+
$packingSlipModel = Mage::getModel('postnl_core/packingSlip');
|
818 |
+
|
819 |
+
/**
|
820 |
+
* Get the current memory limit as an integer in bytes. Because printing packing slips can be very memory
|
821 |
+
* intensive, we need to monitor memory usage.
|
822 |
+
*/
|
823 |
+
$memoryLimit = $helper->getMemoryLimit();
|
824 |
+
|
825 |
+
/**
|
826 |
+
* Create the pdf's and add them to the main pdf object.
|
827 |
+
*
|
828 |
+
* @var TIG_PostNL_Model_Core_Shipment $shipment
|
829 |
+
*/
|
830 |
+
$pdf = new Zend_Pdf();
|
831 |
+
foreach ($shipments as $shipment) {
|
832 |
+
try {
|
833 |
+
/**
|
834 |
+
* If the current memory usage exceeds 75%, end the script. Otherwise we risk other processes being
|
835 |
+
* unable to finish and throwing fatal errors.
|
836 |
+
*/
|
837 |
+
$memoryUsage = memory_get_usage(true);
|
838 |
+
|
839 |
+
if ($memoryUsage / $memoryLimit > 0.75) {
|
840 |
+
throw new TIG_PostNL_Exception(
|
841 |
+
$helper->__(
|
842 |
+
'Approaching memory limit for this operation. Please select fewer shipments and try ' .
|
843 |
+
'again.'
|
844 |
+
),
|
845 |
+
'POSTNL-0170'
|
846 |
+
);
|
847 |
+
}
|
848 |
+
|
849 |
+
$printReturnLabels = Mage::helper('postnl')->canPrintReturnLabelsWithShippingLabels(
|
850 |
+
$shipment->getStoreId()
|
851 |
+
);
|
852 |
+
|
853 |
+
$showLabelsOption = Mage::getStoreConfig(self::XPATH_SHOW_LABEL, Mage_Core_Model_App::ADMIN_STORE_ID);
|
854 |
+
if ($showLabelsOption == 'none') {
|
855 |
+
$shipmentLabels = array();
|
856 |
+
} else {
|
857 |
+
$shipmentLabels = $this->getLabels($shipment, true, $printReturnLabels);
|
858 |
+
}
|
859 |
+
|
860 |
+
$packingSlipModel->createPdf($shipmentLabels, $shipment, $pdf);
|
861 |
+
} catch (TIG_PostNL_Model_Core_Cif_Exception $e) {
|
862 |
+
Mage::helper('postnl/cif')->parseCifException($e);
|
863 |
+
|
864 |
+
$helper->logException($e);
|
865 |
+
$this->addWarning(
|
866 |
+
array(
|
867 |
+
'entity_id' => $shipment->getShipmentIncrementId(),
|
868 |
+
'code' => $e->getCode(),
|
869 |
+
'description' => $e->getMessage(),
|
870 |
+
)
|
871 |
+
);
|
872 |
+
} catch (TIG_PostNL_Exception $e) {
|
873 |
+
$helper->logException($e);
|
874 |
+
$this->addWarning(
|
875 |
+
array(
|
876 |
+
'entity_id' => $shipment->getShipmentIncrementId(),
|
877 |
+
'code' => $e->getCode(),
|
878 |
+
'description' => $e->getMessage(),
|
879 |
+
)
|
880 |
+
);
|
881 |
+
} catch (Exception $e) {
|
882 |
+
$helper->logException($e);
|
883 |
+
$this->addWarning(
|
884 |
+
array(
|
885 |
+
'entity_id' => $shipment->getShipmentIncrementId(),
|
886 |
+
'code' => null,
|
887 |
+
'description' => $e->getMessage(),
|
888 |
+
)
|
889 |
+
);
|
890 |
+
}
|
891 |
+
}
|
892 |
+
unset($shipment, $shipments, $shipmentLabels, $packingSlip, $packingSlipModel);
|
893 |
+
|
894 |
+
if (!$pdf->pages) {
|
895 |
+
return false;
|
896 |
+
}
|
897 |
+
|
898 |
+
/**
|
899 |
+
* Render the pdf as a string.
|
900 |
+
*/
|
901 |
+
$output = $pdf->render();
|
902 |
+
return $output;
|
903 |
+
}
|
904 |
+
|
905 |
+
/**
|
906 |
+
* Load an order collection based on an array of order IDs. Non-PostNL orders will be skipped.
|
907 |
+
*
|
908 |
+
* @param array|int $orderIds
|
909 |
+
*
|
910 |
+
* @return Mage_Sales_Model_Resource_Order_Collection
|
911 |
+
*/
|
912 |
+
protected function _loadOrders($orderIds)
|
913 |
+
{
|
914 |
+
if (!is_array($orderIds)) {
|
915 |
+
$orderIds = array($orderIds);
|
916 |
+
}
|
917 |
+
|
918 |
+
$postnlShippingMethods = Mage::helper('postnl/carrier')->getPostnlShippingMethods();
|
919 |
+
|
920 |
+
/**
|
921 |
+
* This regex will filter all non-postnl shipments.
|
922 |
+
*/
|
923 |
+
$postnlShippingMethodsRegex = '';
|
924 |
+
foreach ($postnlShippingMethods as $method) {
|
925 |
+
if ($postnlShippingMethodsRegex) {
|
926 |
+
$postnlShippingMethodsRegex .= '|';
|
927 |
+
} else {
|
928 |
+
$postnlShippingMethodsRegex .= '^';
|
929 |
+
}
|
930 |
+
|
931 |
+
$postnlShippingMethodsRegex .= "({$method})(_{0,1}[0-9]*)";
|
932 |
+
}
|
933 |
+
|
934 |
+
$postnlShippingMethodsRegex .= '$';
|
935 |
+
|
936 |
+
$orders = Mage::getResourceModel('sales/order_collection')
|
937 |
+
->addFieldToFilter('entity_id', array('in' => $orderIds))
|
938 |
+
->addFieldToFilter('shipping_method', array('regexp' => $postnlShippingMethodsRegex));
|
939 |
+
|
940 |
+
return $orders;
|
941 |
+
}
|
942 |
+
|
943 |
+
/**
|
944 |
+
* Generate shipping labels for this given shipment. This method includes the functionality required to prepare the
|
945 |
+
* shipment for generating labels if required.
|
946 |
+
*
|
947 |
+
* @param Mage_Sales_Model_Order_Shipment $shipment
|
948 |
+
* @param TIG_PostNL_Model_Core_Shipment $postnlShipment
|
949 |
+
* @param boolean $confirm
|
950 |
+
*
|
951 |
+
* @return TIG_PostNL_Model_Core_Shipment
|
952 |
+
*/
|
953 |
+
protected function _generateLabels($shipment, $postnlShipment, $confirm = false)
|
954 |
+
{
|
955 |
+
/**
|
956 |
+
* If the PostNL shipment is new, set the magento shipment ID.
|
957 |
+
*/
|
958 |
+
if (!$postnlShipment->getShipmentId()) {
|
959 |
+
$postnlShipment->setShipmentId($shipment->getId());
|
960 |
+
}
|
961 |
+
|
962 |
+
/**
|
963 |
+
* If the shipment does not have a barcode, generate one.
|
964 |
+
*/
|
965 |
+
if (!$postnlShipment->getMainBarcode() && $postnlShipment->canGenerateBarcode()) {
|
966 |
+
$postnlShipment->generateBarcodes();
|
967 |
+
}
|
968 |
+
|
969 |
+
$printReturnLabel = Mage::helper('postnl/cif')->isReturnsEnabled($postnlShipment->getStoreId());
|
970 |
+
if ($printReturnLabel && $postnlShipment->canGenerateReturnBarcode()) {
|
971 |
+
$postnlShipment->generateReturnBarcode();
|
972 |
+
}
|
973 |
+
|
974 |
+
if (true === $confirm
|
975 |
+
&& !$postnlShipment->hasLabels()
|
976 |
+
&& !$postnlShipment->isConfirmed()
|
977 |
+
&& $postnlShipment->canConfirm(true)
|
978 |
+
) {
|
979 |
+
/**
|
980 |
+
* Confirm the shipment and request a new label.
|
981 |
+
*/
|
982 |
+
$postnlShipment->confirmAndGenerateLabel();
|
983 |
+
|
984 |
+
if ($postnlShipment->canAddTrackingCode()) {
|
985 |
+
$postnlShipment->addTrackingCodeToShipment();
|
986 |
+
}
|
987 |
+
|
988 |
+
$postnlShipment->save();
|
989 |
+
} else {
|
990 |
+
/**
|
991 |
+
* Generate new shipping labels without confirming.
|
992 |
+
*/
|
993 |
+
$postnlShipment->generateLabel()
|
994 |
+
->save();
|
995 |
+
}
|
996 |
+
|
997 |
+
return $postnlShipment;
|
998 |
+
}
|
999 |
+
|
1000 |
+
/**
|
1001 |
+
* Initialize shipment items QTY
|
1002 |
+
*
|
1003 |
+
* @param Mage_Sales_Model_Order $order
|
1004 |
+
*
|
1005 |
+
* @return array
|
1006 |
+
*/
|
1007 |
+
protected function _getItemQtys($order)
|
1008 |
+
{
|
1009 |
+
$itemQtys = array();
|
1010 |
+
|
1011 |
+
/**
|
1012 |
+
* @var Mage_Sales_Model_Order_Item $item
|
1013 |
+
*/
|
1014 |
+
$items = $order->getAllVisibleItems();
|
1015 |
+
foreach ($items as $item) {
|
1016 |
+
/**
|
1017 |
+
* the qty to ship is the total remaining (not yet shipped) qty of every item
|
1018 |
+
*/
|
1019 |
+
$itemQty = $item->getQtyOrdered() - $item->getQtyShipped();
|
1020 |
+
|
1021 |
+
$itemQtys[$item->getId()] = $itemQty;
|
1022 |
+
}
|
1023 |
+
|
1024 |
+
return $itemQtys;
|
1025 |
+
}
|
1026 |
+
|
1027 |
+
/**
|
1028 |
+
* Save shipment and order in one transaction
|
1029 |
+
*
|
1030 |
+
* @param Mage_Sales_Model_Order_Shipment $shipment
|
1031 |
+
*
|
1032 |
+
* @return $this
|
1033 |
+
*/
|
1034 |
+
protected function _saveShipment($shipment)
|
1035 |
+
{
|
1036 |
+
$shipment->getOrder()->setIsInProcess(true);
|
1037 |
+
Mage::getModel('core/resource_transaction')
|
1038 |
+
->addObject($shipment)
|
1039 |
+
->addObject($shipment->getOrder())
|
1040 |
+
->save();
|
1041 |
+
|
1042 |
+
return $this;
|
1043 |
+
}
|
1044 |
+
|
1045 |
+
/**
|
1046 |
+
* Checks if the specified actions are allowed.
|
1047 |
+
*
|
1048 |
+
* @param array $actions
|
1049 |
+
*
|
1050 |
+
* @throws TIG_PostNL_Exception
|
1051 |
+
*
|
1052 |
+
* @return bool
|
1053 |
+
*/
|
1054 |
+
protected function _checkIsAllowed($actions = array())
|
1055 |
+
{
|
1056 |
+
$helper = Mage::helper('postnl');
|
1057 |
+
$isAllowed = $helper->checkIsPostnlActionAllowed($actions, false);
|
1058 |
+
|
1059 |
+
return $isAllowed;
|
1060 |
+
}
|
1061 |
+
}
|
@@ -1217,11 +1217,15 @@ class TIG_PostNL_Model_Core_Shipment extends Mage_Core_Model_Abstract
|
|
1217 |
$productCode = Mage::getStoreConfig($xpath, $storeId);
|
1218 |
|
1219 |
/**
|
1220 |
-
*
|
1221 |
*/
|
1222 |
-
|
1223 |
-
$availableProductCodes = $this->getAllowedProductCodes();
|
1224 |
|
|
|
|
|
|
|
|
|
|
|
1225 |
/**
|
1226 |
* If no other product codes are available for this shipment type, throw an error.
|
1227 |
*/
|
@@ -1653,6 +1657,10 @@ class TIG_PostNL_Model_Core_Shipment extends Mage_Core_Model_Abstract
|
|
1653 |
$shipmentAmount = $this->getShipmentBaseGrandTotal();
|
1654 |
$extraCoverAmount = ceil($shipmentAmount / 500) * 500;
|
1655 |
|
|
|
|
|
|
|
|
|
1656 |
return $extraCoverAmount;
|
1657 |
}
|
1658 |
|
@@ -1822,7 +1830,7 @@ class TIG_PostNL_Model_Core_Shipment extends Mage_Core_Model_Abstract
|
|
1822 |
*/
|
1823 |
$postnlOrder = $this->getPostnlOrder();
|
1824 |
if ($postnlOrder && $postnlOrder->hasConfirmDate()) {
|
1825 |
-
$confirmDate = new DateTime($postnlOrder->getConfirmDate());
|
1826 |
|
1827 |
$this->setData('confirm_date', $confirmDate->getTimestamp());
|
1828 |
return $this;
|
@@ -1836,7 +1844,7 @@ class TIG_PostNL_Model_Core_Shipment extends Mage_Core_Model_Abstract
|
|
1836 |
/**
|
1837 |
* Calculate the confirm based on the delivery date.
|
1838 |
*/
|
1839 |
-
$deliveryDate = new DateTime($deliveryDate);
|
1840 |
|
1841 |
$confirmDate = clone $deliveryDate;
|
1842 |
$confirmDate = $confirmDate->sub(new DateInterval('P1D'));
|
@@ -2069,6 +2077,7 @@ class TIG_PostNL_Model_Core_Shipment extends Mage_Core_Model_Abstract
|
|
2069 |
/**
|
2070 |
* @var $barcodeModel TIG_PostNL_Model_Core_Shipment_Barcode
|
2071 |
*/
|
|
|
2072 |
$barcodeModel = Mage::getConfig()->getModelClassName('postnl_core/shipment_barcode');
|
2073 |
$barcodes = $this->getBarcodes(false, $barcodeModel::BARCODE_TYPE_RETURN);
|
2074 |
|
@@ -3964,6 +3973,7 @@ class TIG_PostNL_Model_Core_Shipment extends Mage_Core_Model_Abstract
|
|
3964 |
/**
|
3965 |
* Add a comment to the order and shipment that the track & trace email has been sent.
|
3966 |
*/
|
|
|
3967 |
$order->addStatusHistoryComment(
|
3968 |
$helper->__(
|
3969 |
'PostNL track & trace email has been sent for shipment #%s.',
|
@@ -4370,6 +4380,7 @@ class TIG_PostNL_Model_Core_Shipment extends Mage_Core_Model_Abstract
|
|
4370 |
|
4371 |
/** @var Zend_Mail $mail */
|
4372 |
$mail = $transactionalEmail->getMail();
|
|
|
4373 |
$mail->createAttachment(
|
4374 |
$returnLabelObject->getData('label_pdf'),
|
4375 |
Zend_Mime::TYPE_OCTETSTREAM,
|
@@ -4384,12 +4395,13 @@ class TIG_PostNL_Model_Core_Shipment extends Mage_Core_Model_Abstract
|
|
4384 |
$emailInfo->getToEmails(),
|
4385 |
$emailInfo->getToNames(),
|
4386 |
$templateVariables->getData(),
|
4387 |
-
$
|
4388 |
);
|
4389 |
|
4390 |
/**
|
4391 |
* Add a comment to the order and shipment that the return label email has been sent.
|
4392 |
*/
|
|
|
4393 |
$order->addStatusHistoryComment(
|
4394 |
$helper->__(
|
4395 |
'PostNL return label email has been sent for shipment #%s.',
|
@@ -5119,7 +5131,7 @@ class TIG_PostNL_Model_Core_Shipment extends Mage_Core_Model_Abstract
|
|
5119 |
/**
|
5120 |
* If this is an extra cover shipment and no extra cover amount has been set, set the default of 500 EUR.
|
5121 |
*/
|
5122 |
-
if ($this->isExtraCover() &&
|
5123 |
$this->setExtraCoverAmount();
|
5124 |
}
|
5125 |
}
|
1217 |
$productCode = Mage::getStoreConfig($xpath, $storeId);
|
1218 |
|
1219 |
/**
|
1220 |
+
* Get a list of available product codes.
|
1221 |
*/
|
1222 |
+
$availableProductCodes = $this->getAllowedProductCodes();
|
|
|
1223 |
|
1224 |
+
/**
|
1225 |
+
* If no default product code was found or the product code is not available, try to use another product code
|
1226 |
+
* that is available.
|
1227 |
+
*/
|
1228 |
+
if (!$productCode || !in_array($productCode, $availableProductCodes)) {
|
1229 |
/**
|
1230 |
* If no other product codes are available for this shipment type, throw an error.
|
1231 |
*/
|
1657 |
$shipmentAmount = $this->getShipmentBaseGrandTotal();
|
1658 |
$extraCoverAmount = ceil($shipmentAmount / 500) * 500;
|
1659 |
|
1660 |
+
if ($extraCoverAmount < 500) {
|
1661 |
+
$extraCoverAmount = 500;
|
1662 |
+
}
|
1663 |
+
|
1664 |
return $extraCoverAmount;
|
1665 |
}
|
1666 |
|
1830 |
*/
|
1831 |
$postnlOrder = $this->getPostnlOrder();
|
1832 |
if ($postnlOrder && $postnlOrder->hasConfirmDate()) {
|
1833 |
+
$confirmDate = new DateTime($postnlOrder->getConfirmDate(), new DateTimeZone('UTC'));
|
1834 |
|
1835 |
$this->setData('confirm_date', $confirmDate->getTimestamp());
|
1836 |
return $this;
|
1844 |
/**
|
1845 |
* Calculate the confirm based on the delivery date.
|
1846 |
*/
|
1847 |
+
$deliveryDate = new DateTime($deliveryDate, new DateTimeZone('UTC'));
|
1848 |
|
1849 |
$confirmDate = clone $deliveryDate;
|
1850 |
$confirmDate = $confirmDate->sub(new DateInterval('P1D'));
|
2077 |
/**
|
2078 |
* @var $barcodeModel TIG_PostNL_Model_Core_Shipment_Barcode
|
2079 |
*/
|
2080 |
+
/** @noinspection PhpParamsInspection */
|
2081 |
$barcodeModel = Mage::getConfig()->getModelClassName('postnl_core/shipment_barcode');
|
2082 |
$barcodes = $this->getBarcodes(false, $barcodeModel::BARCODE_TYPE_RETURN);
|
2083 |
|
3973 |
/**
|
3974 |
* Add a comment to the order and shipment that the track & trace email has been sent.
|
3975 |
*/
|
3976 |
+
/** @noinspection PhpUndefinedMethodInspection */
|
3977 |
$order->addStatusHistoryComment(
|
3978 |
$helper->__(
|
3979 |
'PostNL track & trace email has been sent for shipment #%s.',
|
4380 |
|
4381 |
/** @var Zend_Mail $mail */
|
4382 |
$mail = $transactionalEmail->getMail();
|
4383 |
+
/** @noinspection PhpUndefinedClassInspection */
|
4384 |
$mail->createAttachment(
|
4385 |
$returnLabelObject->getData('label_pdf'),
|
4386 |
Zend_Mime::TYPE_OCTETSTREAM,
|
4395 |
$emailInfo->getToEmails(),
|
4396 |
$emailInfo->getToNames(),
|
4397 |
$templateVariables->getData(),
|
4398 |
+
$storeId
|
4399 |
);
|
4400 |
|
4401 |
/**
|
4402 |
* Add a comment to the order and shipment that the return label email has been sent.
|
4403 |
*/
|
4404 |
+
/** @noinspection PhpUndefinedMethodInspection */
|
4405 |
$order->addStatusHistoryComment(
|
4406 |
$helper->__(
|
4407 |
'PostNL return label email has been sent for shipment #%s.',
|
5131 |
/**
|
5132 |
* If this is an extra cover shipment and no extra cover amount has been set, set the default of 500 EUR.
|
5133 |
*/
|
5134 |
+
if ($this->isExtraCover() && $this->getExtraCoverAmount() < 200) {
|
5135 |
$this->setExtraCoverAmount();
|
5136 |
}
|
5137 |
}
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* Class TIG_PostNL_Model_Core_Shipment_Barcode
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* Class TIG_PostNL_Model_Core_Shipment_Barcode
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* Class TIG_PostNL_Model_Core_Shipment_Label
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* Class TIG_PostNL_Model_Core_Shipment_Label
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Shipment_Process extends Mage_Index_Model_Process
|
@@ -48,6 +48,11 @@ class TIG_PostNL_Model_Core_Shipment_Process extends Mage_Index_Model_Process
|
|
48 |
*/
|
49 |
protected $_isLocked = null;
|
50 |
|
|
|
|
|
|
|
|
|
|
|
51 |
/**
|
52 |
* Get lock file resource
|
53 |
*
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_Shipment_Process extends Mage_Index_Model_Process
|
48 |
*/
|
49 |
protected $_isLocked = null;
|
50 |
|
51 |
+
/**
|
52 |
+
* @var null|resource
|
53 |
+
*/
|
54 |
+
protected $_lockFile = null;
|
55 |
+
|
56 |
/**
|
57 |
* Get lock file resource
|
58 |
*
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* Class TIG_PostNL_Model_Core_Shipment_Status_History
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* Class TIG_PostNL_Model_Core_Shipment_Status_History
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Backend_HourMinute extends Mage_Core_Model_Config_Data
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Backend_HourMinute extends Mage_Core_Model_Config_Data
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Backend_Image_Pdf extends Mage_Adminhtml_Model_System_Config_Backend_Image_Pdf
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Backend_Image_Pdf extends Mage_Adminhtml_Model_System_Config_Backend_Image_Pdf
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasIsIncludingTax()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasIsIncludingTax()
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_AllProductOptions
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_AllProductOptions
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_Attributes
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_Attributes
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_BuspakjeProductOptions
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_BuspakjeProductOptions
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_CheckoutExtensions
|
@@ -55,6 +55,10 @@ class TIG_PostNL_Model_Core_System_Config_Source_CheckoutExtensions
|
|
55 |
'value' => 'idev_onestepcheckout',
|
56 |
'label' => $helper->__("Idev's OneStepCheckout"),
|
57 |
),
|
|
|
|
|
|
|
|
|
58 |
array(
|
59 |
'value' => 'other',
|
60 |
'label' => $helper->__('Other'),
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_CheckoutExtensions
|
55 |
'value' => 'idev_onestepcheckout',
|
56 |
'label' => $helper->__("Idev's OneStepCheckout"),
|
57 |
),
|
58 |
+
array(
|
59 |
+
'value' => 'gomage_lightcheckout',
|
60 |
+
'label' => $helper->__('GoMage LightCheckout'),
|
61 |
+
),
|
62 |
array(
|
63 |
'value' => 'other',
|
64 |
'label' => $helper->__('Other'),
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_CommentType
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_CommentType
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_CutOffTime
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_CutOffTime
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_DebugMode
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_DebugMode
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_Direction
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_Direction
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_EuProductOptions
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_EuProductOptions
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_GlobalProductOptions
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_GlobalProductOptions
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_GlobalpackShipmentType
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_GlobalpackShipmentType
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_HourMinute
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_HourMinute
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_LabelSize
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_LabelSize
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_ManualAutomatic
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_ManualAutomatic
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_PackingSlipItemFields
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_PackingSlipItemFields
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ___________ __ __
|
4 |
+
* \__ ___/____ _/ |_ _____ | |
|
5 |
+
* | | / _ \\ __\\__ \ | |
|
6 |
+
* | | | |_| || | / __ \_| |__
|
7 |
+
* |____| \____/ |__| (____ /|____/
|
8 |
+
* \/
|
9 |
+
* ___ __ __
|
10 |
+
* | | ____ _/ |_ ____ _______ ____ ____ _/ |_
|
11 |
+
* | | / \\ __\_/ __ \\_ __ \ / \ _/ __ \\ __\
|
12 |
+
* | || | \| | \ ___/ | | \/| | \\ ___/ | |
|
13 |
+
* |___||___| /|__| \_____>|__| |___| / \_____>|__|
|
14 |
+
* \/ \/
|
15 |
+
* ________
|
16 |
+
* / _____/_______ ____ __ __ ______
|
17 |
+
* / \ ___\_ __ \ / _ \ | | \\____ \
|
18 |
+
* \ \_\ \| | \/| |_| || | /| |_| |
|
19 |
+
* \______ /|__| \____/ |____/ | __/
|
20 |
+
* \/ |__|
|
21 |
+
*
|
22 |
+
* NOTICE OF LICENSE
|
23 |
+
*
|
24 |
+
* This source file is subject to the Creative Commons License.
|
25 |
+
* It is available through the world-wide-web at this URL:
|
26 |
+
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
27 |
+
* If you are unable to obtain it through the world-wide-web, please send an email
|
28 |
+
* to servicedesk@tig.nl so we can send you a copy immediately.
|
29 |
+
*
|
30 |
+
* DISCLAIMER
|
31 |
+
*
|
32 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
33 |
+
* versions in the future. If you wish to customize this module for your
|
34 |
+
* needs please contact servicedesk@tig.nl for more information.
|
35 |
+
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
+
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
+
*/
|
39 |
+
|
40 |
+
class TIG_PostNL_Model_Core_System_Config_Source_PackingSlipLabel
|
41 |
+
{
|
42 |
+
/**
|
43 |
+
* Source model for yes / no setting.
|
44 |
+
*
|
45 |
+
* @return array
|
46 |
+
*/
|
47 |
+
public function toOptionArray()
|
48 |
+
{
|
49 |
+
$helper = Mage::helper('postnl');
|
50 |
+
|
51 |
+
$array = array(
|
52 |
+
array(
|
53 |
+
'value' => 'together',
|
54 |
+
'label' => $helper->__('Print the shipping label on the same page as the packing slip')
|
55 |
+
),
|
56 |
+
array(
|
57 |
+
'value' => 'separate',
|
58 |
+
'label' => $helper->__('Print the shipping label on a separate page')
|
59 |
+
),
|
60 |
+
array(
|
61 |
+
'value' => 'none',
|
62 |
+
'label' => $helper->__("Don't print the shipping label")
|
63 |
+
),
|
64 |
+
);
|
65 |
+
return $array;
|
66 |
+
}
|
67 |
+
}
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_PakjeGemakProductOptions
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_PakjeGemakProductOptions
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_PakketautomaatProductOptions
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_PakketautomaatProductOptions
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
abstract class TIG_PostNL_Model_Core_System_Config_Source_ProductOptions_Abstract
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
abstract class TIG_PostNL_Model_Core_System_Config_Source_ProductOptions_Abstract
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_ReferenceType
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_ReferenceType
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_ShippingDays
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_ShippingDays
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_ShippingDuration
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_ShippingDuration
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_ShippingMethods
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_ShippingMethods
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_StandardProductOptions
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_StandardProductOptions
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_StaticBlocks
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_StaticBlocks
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_StreetField
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_StreetField
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_WeightUnit
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Core_System_Config_Source_WeightUnit
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method TIG_PostNL_Model_DeliveryOptions_Cif setStoreId(int $value)
|
@@ -94,7 +94,7 @@ class TIG_PostNL_Model_DeliveryOptions_Cif extends TIG_PostNL_Model_Core_Cif
|
|
94 |
|
95 |
$shippingDuration = Mage::helper('postnl/deliveryOptions')->getQuoteShippingDuration($quote);
|
96 |
|
97 |
-
$date = new DateTime(Mage::
|
98 |
$date->setTimezone(new DateTimeZone('Europe/Berlin'));
|
99 |
|
100 |
$soapParams = array(
|
@@ -158,7 +158,7 @@ class TIG_PostNL_Model_DeliveryOptions_Cif extends TIG_PostNL_Model_Core_Cif
|
|
158 |
$maximumNumberOfDeliveryDays = (int) Mage::getStoreConfig(self::XPATH_DELIVERY_DAYS_NUMBER, $storeId);
|
159 |
$maximumNumberOfDeliveryDays--;
|
160 |
|
161 |
-
$endDate = new DateTime($startDate);
|
162 |
$endDate->add(new DateInterval("P{$maximumNumberOfDeliveryDays}D"));
|
163 |
|
164 |
$soapParams = array(
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method TIG_PostNL_Model_DeliveryOptions_Cif setStoreId(int $value)
|
94 |
|
95 |
$shippingDuration = Mage::helper('postnl/deliveryOptions')->getQuoteShippingDuration($quote);
|
96 |
|
97 |
+
$date = new DateTime('now', Mage::helper('postnl')->getStoreTimeZone($quote->getStoreId(), true));
|
98 |
$date->setTimezone(new DateTimeZone('Europe/Berlin'));
|
99 |
|
100 |
$soapParams = array(
|
158 |
$maximumNumberOfDeliveryDays = (int) Mage::getStoreConfig(self::XPATH_DELIVERY_DAYS_NUMBER, $storeId);
|
159 |
$maximumNumberOfDeliveryDays--;
|
160 |
|
161 |
+
$endDate = new DateTime($startDate, new DateTimeZone('UTC'));
|
162 |
$endDate->add(new DateInterval("P{$maximumNumberOfDeliveryDays}D"));
|
163 |
|
164 |
$soapParams = array(
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ___________ __ __
|
4 |
+
* \__ ___/____ _/ |_ _____ | |
|
5 |
+
* | | / _ \\ __\\__ \ | |
|
6 |
+
* | | | |_| || | / __ \_| |__
|
7 |
+
* |____| \____/ |__| (____ /|____/
|
8 |
+
* \/
|
9 |
+
* ___ __ __
|
10 |
+
* | | ____ _/ |_ ____ _______ ____ ____ _/ |_
|
11 |
+
* | | / \\ __\_/ __ \\_ __ \ / \ _/ __ \\ __\
|
12 |
+
* | || | \| | \ ___/ | | \/| | \\ ___/ | |
|
13 |
+
* |___||___| /|__| \_____>|__| |___| / \_____>|__|
|
14 |
+
* \/ \/
|
15 |
+
* ________
|
16 |
+
* / _____/_______ ____ __ __ ______
|
17 |
+
* / \ ___\_ __ \ / _ \ | | \\____ \
|
18 |
+
* \ \_\ \| | \/| |_| || | /| |_| |
|
19 |
+
* \______ /|__| \____/ |____/ | __/
|
20 |
+
* \/ |__|
|
21 |
+
*
|
22 |
+
* NOTICE OF LICENSE
|
23 |
+
*
|
24 |
+
* This source file is subject to the Creative Commons License.
|
25 |
+
* It is available through the world-wide-web at this URL:
|
26 |
+
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
27 |
+
* If you are unable to obtain it through the world-wide-web, please send an email
|
28 |
+
* to servicedesk@tig.nl so we can send you a copy immediately.
|
29 |
+
*
|
30 |
+
* DISCLAIMER
|
31 |
+
*
|
32 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
33 |
+
* versions in the future. If you wish to customize this module for your
|
34 |
+
* needs please contact servicedesk@tig.nl for more information.
|
35 |
+
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
+
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
+
*/
|
39 |
+
class TIG_PostNL_Model_DeliveryOptions_Observer_GoMage_LightCheckout_Ajax
|
40 |
+
extends TIG_PostNL_Model_DeliveryOptions_Observer_ShippingMethodAvailable
|
41 |
+
{
|
42 |
+
/**
|
43 |
+
* Set a registry flag to prevent the PostNL Order from being reset unintentionally.
|
44 |
+
*
|
45 |
+
* @param Varien_Event_Observer $observer
|
46 |
+
*
|
47 |
+
* @return $this
|
48 |
+
*/
|
49 |
+
public function setRegistryFlag(Varien_Event_Observer $observer)
|
50 |
+
{
|
51 |
+
Mage::unregister(self::IGNORE_POSTNL_ORDER_RESET_REGISTRY_KEY);
|
52 |
+
|
53 |
+
/** @var GoMage_Checkout_OnepageController $controller */
|
54 |
+
/** @noinspection PhpUndefinedMethodInspection */
|
55 |
+
$controller = $observer->getControllerAction();
|
56 |
+
|
57 |
+
$request = $controller->getRequest();
|
58 |
+
$action = $request->getParam('action', false);
|
59 |
+
|
60 |
+
if ($action == 'get_totals' || $action == 'discount') {
|
61 |
+
Mage::register(self::IGNORE_POSTNL_ORDER_RESET_REGISTRY_KEY, true);
|
62 |
+
}
|
63 |
+
|
64 |
+
return $this;
|
65 |
+
}
|
66 |
+
}
|
@@ -42,12 +42,23 @@ class TIG_PostNL_Model_DeliveryOptions_Observer_ShippingMethodAvailable extends
|
|
42 |
* The block class that we want to edit.
|
43 |
*/
|
44 |
const BLOCK_NAME = 'checkout/onepage_shipping_method_available';
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
/**
|
47 |
* @var boolean|null
|
48 |
*/
|
49 |
protected $_canUseDeliveryOptions = null;
|
50 |
|
|
|
|
|
|
|
|
|
|
|
51 |
/**
|
52 |
* @param boolean $canUseDeliveryOptions
|
53 |
*/
|
@@ -75,6 +86,26 @@ class TIG_PostNL_Model_DeliveryOptions_Observer_ShippingMethodAvailable extends
|
|
75 |
return $this->_canUseDeliveryOptions;
|
76 |
}
|
77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
/**
|
79 |
* Gets the classname for the block that we want to alter.
|
80 |
*
|
@@ -92,6 +123,23 @@ class TIG_PostNL_Model_DeliveryOptions_Observer_ShippingMethodAvailable extends
|
|
92 |
return $blockClass;
|
93 |
}
|
94 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
/**
|
96 |
* Alters the template of the onepage checkout shipping method available block so that we can display our delivery
|
97 |
* options.
|
@@ -106,6 +154,10 @@ class TIG_PostNL_Model_DeliveryOptions_Observer_ShippingMethodAvailable extends
|
|
106 |
*/
|
107 |
public function addDeliveryOptions(Varien_Event_Observer $observer)
|
108 |
{
|
|
|
|
|
|
|
|
|
109 |
/**
|
110 |
* Checks if the current block is the one we want to edit.
|
111 |
*
|
@@ -113,6 +165,7 @@ class TIG_PostNL_Model_DeliveryOptions_Observer_ShippingMethodAvailable extends
|
|
113 |
*
|
114 |
* @var Mage_Checkout_Block_Onepage_Shipping_Method_Available $block
|
115 |
*/
|
|
|
116 |
$block = $observer->getBlock();
|
117 |
$blockClass = $this->getBlockClass();
|
118 |
|
@@ -120,7 +173,10 @@ class TIG_PostNL_Model_DeliveryOptions_Observer_ShippingMethodAvailable extends
|
|
120 |
return $this;
|
121 |
}
|
122 |
|
123 |
-
$
|
|
|
|
|
|
|
124 |
|
125 |
if (!$this->getCanUseDeliveryOptions()) {
|
126 |
return $this;
|
@@ -136,6 +192,12 @@ class TIG_PostNL_Model_DeliveryOptions_Observer_ShippingMethodAvailable extends
|
|
136 |
if (!$block->getChild('postnl.osc.delivery.options')) {
|
137 |
$block = $this->_addDeliveryOptionBlocks($block);
|
138 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
}
|
140 |
|
141 |
/**
|
@@ -167,6 +229,8 @@ class TIG_PostNL_Model_DeliveryOptions_Observer_ShippingMethodAvailable extends
|
|
167 |
->setShipmentCosts(0)
|
168 |
->setType(false)
|
169 |
->setOptions(false)
|
|
|
|
|
170 |
->save();
|
171 |
}
|
172 |
|
@@ -198,34 +262,151 @@ class TIG_PostNL_Model_DeliveryOptions_Observer_ShippingMethodAvailable extends
|
|
198 |
/**
|
199 |
* @var TIG_PostNL_Block_DeliveryOptions_Checkout_DeliveryOptions $firstChild
|
200 |
*/
|
201 |
-
$
|
202 |
'postnl_deliveryoptions/checkout_deliveryOptions',
|
203 |
'postnl.osc.delivery.options'
|
204 |
);
|
205 |
-
$
|
206 |
|
207 |
/**
|
208 |
-
* @var Mage_Core_Block_Template $
|
209 |
*/
|
210 |
-
$
|
211 |
'core/template',
|
212 |
'postnl.osc.add.location'
|
213 |
);
|
214 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
215 |
|
216 |
/**
|
217 |
-
* @var
|
218 |
*/
|
219 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
'postnl_deliveryoptions/checkout_addPhoneNumber',
|
221 |
'postnl.add.phonenumber'
|
222 |
);
|
223 |
-
$
|
|
|
|
|
|
|
224 |
|
225 |
-
$
|
226 |
-
$firstChild->append($secondChild);
|
227 |
-
$block->append($firstChild);
|
228 |
|
229 |
return $block;
|
230 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
231 |
}
|
42 |
* The block class that we want to edit.
|
43 |
*/
|
44 |
const BLOCK_NAME = 'checkout/onepage_shipping_method_available';
|
45 |
+
const BPOST_BLOCK_NAME = 'shippingmanager/onepage_shipping_method_available';
|
46 |
+
|
47 |
+
/**
|
48 |
+
*
|
49 |
+
*/
|
50 |
+
const IGNORE_POSTNL_ORDER_RESET_REGISTRY_KEY = 'IGNORE_POSTNL_ORDER_RESET_FLAG';
|
51 |
|
52 |
/**
|
53 |
* @var boolean|null
|
54 |
*/
|
55 |
protected $_canUseDeliveryOptions = null;
|
56 |
|
57 |
+
/**
|
58 |
+
* @var boolean
|
59 |
+
*/
|
60 |
+
protected $_bpostBlockModified = false;
|
61 |
+
|
62 |
/**
|
63 |
* @param boolean $canUseDeliveryOptions
|
64 |
*/
|
86 |
return $this->_canUseDeliveryOptions;
|
87 |
}
|
88 |
|
89 |
+
/**
|
90 |
+
* @return boolean
|
91 |
+
*/
|
92 |
+
public function isBpostBlockModified()
|
93 |
+
{
|
94 |
+
return $this->_bpostBlockModified;
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* @param boolean $bpostBlockModified
|
99 |
+
*
|
100 |
+
* @return $this
|
101 |
+
*/
|
102 |
+
public function setBpostBlockModified($bpostBlockModified)
|
103 |
+
{
|
104 |
+
$this->_bpostBlockModified = $bpostBlockModified;
|
105 |
+
|
106 |
+
return $this;
|
107 |
+
}
|
108 |
+
|
109 |
/**
|
110 |
* Gets the classname for the block that we want to alter.
|
111 |
*
|
123 |
return $blockClass;
|
124 |
}
|
125 |
|
126 |
+
/**
|
127 |
+
* Gets the classname for the Bpost block that we want to alter.
|
128 |
+
*
|
129 |
+
* @return string
|
130 |
+
*/
|
131 |
+
public function getBpostBlockClass()
|
132 |
+
{
|
133 |
+
if ($this->hasData('bpost_block_class')) {
|
134 |
+
return $this->getData('bpost_block_class');
|
135 |
+
}
|
136 |
+
|
137 |
+
$blockClass = Mage::getConfig()->getBlockClassName(self::BPOST_BLOCK_NAME);
|
138 |
+
|
139 |
+
$this->setData('bpost_block_class', $blockClass);
|
140 |
+
return $blockClass;
|
141 |
+
}
|
142 |
+
|
143 |
/**
|
144 |
* Alters the template of the onepage checkout shipping method available block so that we can display our delivery
|
145 |
* options.
|
154 |
*/
|
155 |
public function addDeliveryOptions(Varien_Event_Observer $observer)
|
156 |
{
|
157 |
+
if ($this->isBpostBlockModified()) {
|
158 |
+
return $this;
|
159 |
+
}
|
160 |
+
|
161 |
/**
|
162 |
* Checks if the current block is the one we want to edit.
|
163 |
*
|
165 |
*
|
166 |
* @var Mage_Checkout_Block_Onepage_Shipping_Method_Available $block
|
167 |
*/
|
168 |
+
/** @noinspection PhpUndefinedMethodInspection */
|
169 |
$block = $observer->getBlock();
|
170 |
$blockClass = $this->getBlockClass();
|
171 |
|
173 |
return $this;
|
174 |
}
|
175 |
|
176 |
+
$ignorePostnlOrderResetFlag = Mage::registry(self::IGNORE_POSTNL_ORDER_RESET_REGISTRY_KEY);
|
177 |
+
if (true !== $ignorePostnlOrderResetFlag) {
|
178 |
+
$this->_resetPostnlOrder();
|
179 |
+
}
|
180 |
|
181 |
if (!$this->getCanUseDeliveryOptions()) {
|
182 |
return $this;
|
192 |
if (!$block->getChild('postnl.osc.delivery.options')) {
|
193 |
$block = $this->_addDeliveryOptionBlocks($block);
|
194 |
}
|
195 |
+
} elseif (Mage::app()->getRequest()->getModuleName() == 'gomage_checkout') {
|
196 |
+
$template = 'TIG/PostNL/delivery_options/gomage_checkout/available.phtml';
|
197 |
+
|
198 |
+
if (!$block->getChild('postnl.gomage.delivery.options')) {
|
199 |
+
$block = $this->_addGoMageDeliveryOptionBlocks($block);
|
200 |
+
}
|
201 |
}
|
202 |
|
203 |
/**
|
229 |
->setShipmentCosts(0)
|
230 |
->setType(false)
|
231 |
->setOptions(false)
|
232 |
+
->setExpectedDeliveryTimeStart(false)
|
233 |
+
->setExpectedDeliveryTimeEnd(false)
|
234 |
->save();
|
235 |
}
|
236 |
|
262 |
/**
|
263 |
* @var TIG_PostNL_Block_DeliveryOptions_Checkout_DeliveryOptions $firstChild
|
264 |
*/
|
265 |
+
$deliveryOptionsBlock = $block->getLayout()->createBlock(
|
266 |
'postnl_deliveryoptions/checkout_deliveryOptions',
|
267 |
'postnl.osc.delivery.options'
|
268 |
);
|
269 |
+
$deliveryOptionsBlock->setTemplate('TIG/PostNL/delivery_options/onestepcheckout/deliveryoptions.phtml');
|
270 |
|
271 |
/**
|
272 |
+
* @var Mage_Core_Block_Template $addLocationBlock
|
273 |
*/
|
274 |
+
$addLocationBlock = $block->getLayout()->createBlock(
|
275 |
'core/template',
|
276 |
'postnl.osc.add.location'
|
277 |
);
|
278 |
+
$addLocationBlock->setTemplate('TIG/PostNL/delivery_options/addlocation.phtml');
|
279 |
+
|
280 |
+
/**
|
281 |
+
* @var TIG_PostNL_Block_DeliveryOptions_Checkout_AddPhoneNumber $addPhoneNumberBlock
|
282 |
+
*/
|
283 |
+
$addPhoneNumberBlock = $block->getLayout()->createBlock(
|
284 |
+
'postnl_deliveryoptions/checkout_addPhoneNumber',
|
285 |
+
'postnl.add.phonenumber'
|
286 |
+
);
|
287 |
+
$addPhoneNumberBlock->setTemplate('TIG/PostNL/delivery_options/addphonenumber.phtml');
|
288 |
+
|
289 |
+
$deliveryOptionsBlock->append($addLocationBlock)
|
290 |
+
->append($addPhoneNumberBlock);
|
291 |
+
|
292 |
+
$block->append($deliveryOptionsBlock);
|
293 |
+
|
294 |
+
return $block;
|
295 |
+
}
|
296 |
+
|
297 |
+
/**
|
298 |
+
* Adds the delivery option blocks in case these were not added by the layout XML. This occurs during certain GoMage
|
299 |
+
* LightCheckout AJAX requests that ignore the layout XML and generate blocks manually instead.
|
300 |
+
*
|
301 |
+
* @param Mage_Checkout_Block_Onepage_Shipping_Method_Available $block
|
302 |
+
*
|
303 |
+
* @return Mage_Checkout_Block_Onepage_Shipping_Method_Available
|
304 |
+
*/
|
305 |
+
protected function _addGoMageDeliveryOptionBlocks(Mage_Checkout_Block_Onepage_Shipping_Method_Available $block)
|
306 |
+
{
|
307 |
+
/**
|
308 |
+
* @var TIG_PostNL_Block_DeliveryOptions_Checkout_GoMage_LightCheckout_DeliveryOptions $deliveryOptionsBlock
|
309 |
+
*/
|
310 |
+
$deliveryOptionsBlock = $block->getLayout()->createBlock(
|
311 |
+
'postnl_deliveryoptions/checkout_goMage_lightCheckout_deliveryOptions',
|
312 |
+
'postnl.gomage.delivery.options'
|
313 |
+
);
|
314 |
+
$deliveryOptionsBlock->setTemplate('TIG/PostNL/delivery_options/gomage_checkout/deliveryoptions.phtml');
|
315 |
|
316 |
/**
|
317 |
+
* @var Mage_Core_Block_Template $addLocationBlock
|
318 |
*/
|
319 |
+
$addLocationBlock = $block->getLayout()->createBlock(
|
320 |
+
'core/template',
|
321 |
+
'postnl.gomage.add.location'
|
322 |
+
);
|
323 |
+
$addLocationBlock->setTemplate('TIG/PostNL/delivery_options/addlocation.phtml');
|
324 |
+
|
325 |
+
/**
|
326 |
+
* @var TIG_PostNL_Block_DeliveryOptions_Checkout_AddPhoneNumber $addPhoneNumberBlock
|
327 |
+
*/
|
328 |
+
$addPhoneNumberBlock = $block->getLayout()->createBlock(
|
329 |
'postnl_deliveryoptions/checkout_addPhoneNumber',
|
330 |
'postnl.add.phonenumber'
|
331 |
);
|
332 |
+
$addPhoneNumberBlock->setTemplate('TIG/PostNL/delivery_options/addphonenumber.phtml');
|
333 |
+
|
334 |
+
$deliveryOptionsBlock->append($addLocationBlock)
|
335 |
+
->append($addPhoneNumberBlock);
|
336 |
|
337 |
+
$block->append($deliveryOptionsBlock);
|
|
|
|
|
338 |
|
339 |
return $block;
|
340 |
}
|
341 |
+
|
342 |
+
/**
|
343 |
+
* Fix a conflict between PostNL delivery options and the Bpost shipping manager extension.
|
344 |
+
*
|
345 |
+
* @param Varien_Event_Observer $observer
|
346 |
+
*
|
347 |
+
* @return $this
|
348 |
+
*/
|
349 |
+
public function fixBpostConflict(Varien_Event_Observer $observer)
|
350 |
+
{
|
351 |
+
if ($this->isBpostBlockModified()) {
|
352 |
+
return $this;
|
353 |
+
}
|
354 |
+
|
355 |
+
/** @noinspection PhpUndefinedClassInspection */
|
356 |
+
/** @noinspection PhpUndefinedMethodInspection */
|
357 |
+
/**
|
358 |
+
* Checks if the current block is the one we want to edit.
|
359 |
+
*
|
360 |
+
* Unfortunately there is no unique event for this block.
|
361 |
+
*
|
362 |
+
* @var Bpost_ShippingManager_Block_Onepage_Shipping_Method_Available $block
|
363 |
+
*/
|
364 |
+
$block = $observer->getBlock();
|
365 |
+
$blockClass = $this->getBpostBlockClass();
|
366 |
+
|
367 |
+
if (!($block instanceof $blockClass)) {
|
368 |
+
return $this;
|
369 |
+
}
|
370 |
+
|
371 |
+
if (!$this->getCanUseDeliveryOptions()) {
|
372 |
+
return $this;
|
373 |
+
}
|
374 |
+
|
375 |
+
/**
|
376 |
+
* Make sure we don't end up in an infinite loop.
|
377 |
+
*/
|
378 |
+
/** @noinspection PhpUndefinedMethodInspection */
|
379 |
+
if ($block->getTemplate() == 'TIG/PostNL/delivery_options/onestepcheckout/bpost/available.phtml') {
|
380 |
+
return $this;
|
381 |
+
}
|
382 |
+
|
383 |
+
/**
|
384 |
+
* Same check as used by the Bpost ShippingManager extension to decide whether the block's template needs to be
|
385 |
+
* altered.
|
386 |
+
*/
|
387 |
+
if (Mage::getStoreConfig('onestepcheckout/general/rewrite_checkout_links') == 1) {
|
388 |
+
/** @noinspection PhpUndefinedMethodInspection */
|
389 |
+
$block->setTemplate('TIG/PostNL/delivery_options/onestepcheckout/bpost/available.phtml');
|
390 |
+
|
391 |
+
$this->setBpostBlockModified(true);
|
392 |
+
|
393 |
+
/**
|
394 |
+
* Re-render the block so it uses a modified version of the PostNL extension's shipping method available
|
395 |
+
* template that is compatible with both PostNL delivery options and the Bpost shipping manager.
|
396 |
+
*
|
397 |
+
* Re-rendering the block like this is a performance drain, however at present we have no other viable
|
398 |
+
* solution.
|
399 |
+
*/
|
400 |
+
/** @var Varien_Object $transport */
|
401 |
+
/** @noinspection PhpUndefinedMethodInspection */
|
402 |
+
$transport = $observer->getTransport();
|
403 |
+
/** @noinspection PhpUndefinedMethodInspection */
|
404 |
+
$transport->setHtml($block->renderView());
|
405 |
+
|
406 |
+
/** @noinspection PhpUndefinedMethodInspection */
|
407 |
+
$observer->setTransport($transport);
|
408 |
+
}
|
409 |
+
|
410 |
+
return $this;
|
411 |
+
}
|
412 |
}
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_DeliveryOptions_Observer_UpdatePostnlOrder
|
@@ -65,23 +65,50 @@ class TIG_PostNL_Model_DeliveryOptions_Observer_UpdatePostnlOrder
|
|
65 |
$postnlOrder = Mage::getModel('postnl_core/order')->load($order->getQuoteId(), 'quote_id');
|
66 |
|
67 |
/**
|
68 |
-
*
|
69 |
*/
|
70 |
-
$
|
71 |
|
72 |
/**
|
73 |
-
* If
|
74 |
-
*
|
|
|
75 |
*/
|
76 |
-
$
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
$this->_removePakjeGemakAddress($order);
|
82 |
|
|
|
|
|
|
|
83 |
if ($postnlOrder && $postnlOrder->getId()) {
|
84 |
$postnlOrder->delete();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
}
|
86 |
return $this;
|
87 |
}
|
@@ -89,17 +116,22 @@ class TIG_PostNL_Model_DeliveryOptions_Observer_UpdatePostnlOrder
|
|
89 |
/**
|
90 |
* If no such PostNL order exists or if the PostNL order has already been updated we don't need to do anything.
|
91 |
*/
|
92 |
-
if (!$postnlOrder->getId() || $postnlOrder->getOrderId()
|
93 |
return $this;
|
94 |
}
|
95 |
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
/**
|
97 |
* Update the order's shipment costs. If the order type is PGE or Avond, this will be a fee as configured in
|
98 |
* system > config. Otherwise it will be set to 0.
|
99 |
*/
|
100 |
$fee = 0;
|
101 |
-
$type
|
102 |
-
if ($type == 'PGE' || $type == 'Avond') {
|
103 |
/**
|
104 |
* Check whether the shipping prices are entered with or without tax.
|
105 |
*/
|
@@ -111,15 +143,23 @@ class TIG_PostNL_Model_DeliveryOptions_Observer_UpdatePostnlOrder
|
|
111 |
/**
|
112 |
* Calculate the correct fee based on the order type.
|
113 |
*/
|
114 |
-
if ($type ==
|
115 |
$fee = Mage::helper('postnl/deliveryOptions')
|
116 |
->getExpressFee(false, $includingTax, false);
|
117 |
-
} elseif ($type ==
|
118 |
$fee = Mage::helper('postnl/deliveryOptions')
|
119 |
->getEveningFee(false, $includingTax, false);
|
120 |
}
|
121 |
}
|
122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
/**
|
124 |
* Update the PostNL order.
|
125 |
*/
|
@@ -231,7 +271,7 @@ class TIG_PostNL_Model_DeliveryOptions_Observer_UpdatePostnlOrder
|
|
231 |
*/
|
232 |
$postnlOrder = Mage::getModel('postnl_core/order')->load($quote->getId(), 'quote_id');
|
233 |
if (!$postnlOrder->getId()) {
|
234 |
-
$
|
235 |
}
|
236 |
|
237 |
/**
|
@@ -247,6 +287,7 @@ class TIG_PostNL_Model_DeliveryOptions_Observer_UpdatePostnlOrder
|
|
247 |
if (!$shippingAddress
|
248 |
|| $shippingAddress->getCountryId() != 'NL'
|
249 |
|| !Mage::helper('postnl/carrier')->isPostnlShippingMethod($shippingMethod)
|
|
|
250 |
) {
|
251 |
$postnlOrder->setOptions(false)
|
252 |
->save();
|
@@ -275,6 +316,124 @@ class TIG_PostNL_Model_DeliveryOptions_Observer_UpdatePostnlOrder
|
|
275 |
return $this;
|
276 |
}
|
277 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
278 |
/**
|
279 |
* Deletes any PakjeGemak addresses associated with this order.
|
280 |
*
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_DeliveryOptions_Observer_UpdatePostnlOrder
|
65 |
$postnlOrder = Mage::getModel('postnl_core/order')->load($order->getQuoteId(), 'quote_id');
|
66 |
|
67 |
/**
|
68 |
+
* Check if the order was placed using a PostNL shipping method.
|
69 |
*/
|
70 |
+
$orderIsPostnl = Mage::helper('postnl/carrier')->isPostnlShippingMethod($order->getShippingMethod());
|
71 |
|
72 |
/**
|
73 |
+
* If the order was placed using a PostNL shipping method, yet does not have a PostNL order object; create one.
|
74 |
+
* Otherwise, if the order was not placed using a PostNL shipping method, yet does have a PostNL order object;
|
75 |
+
* delete the PostNL order object.
|
76 |
*/
|
77 |
+
if ($orderIsPostnl && !$postnlOrder->getId()) {
|
78 |
+
$this->_createPostnlOrder($postnlOrder, $order);
|
79 |
+
return $this;
|
80 |
+
} elseif (!$orderIsPostnl && $postnlOrder->getId()) {
|
81 |
+
$postnlOrder->delete();
|
82 |
+
return $this;
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Validate the PostNL order.
|
87 |
+
*/
|
88 |
+
if (!$this->_validatePostnlOrder($postnlOrder, $order)) {
|
89 |
+
/**
|
90 |
+
* Always remove the PakjeGemak order if it's available.
|
91 |
+
*/
|
92 |
$this->_removePakjeGemakAddress($order);
|
93 |
|
94 |
+
/**
|
95 |
+
* If the PostNL order exists, delete it.
|
96 |
+
*/
|
97 |
if ($postnlOrder && $postnlOrder->getId()) {
|
98 |
$postnlOrder->delete();
|
99 |
+
|
100 |
+
/**
|
101 |
+
* If the order is a PostNL order, create a new one. this way we can guarantee the new PostNL order will
|
102 |
+
* contain the correct data.
|
103 |
+
*/
|
104 |
+
if ($orderIsPostnl) {
|
105 |
+
/**
|
106 |
+
* We need a new instance, because the previous instance has been deleted. Causing any further save
|
107 |
+
* operations on that instance to fail.
|
108 |
+
*/
|
109 |
+
$postnlOrder = Mage::getModel('postnl_core/order');
|
110 |
+
$this->_createPostnlOrder($postnlOrder, $order);
|
111 |
+
}
|
112 |
}
|
113 |
return $this;
|
114 |
}
|
116 |
/**
|
117 |
* If no such PostNL order exists or if the PostNL order has already been updated we don't need to do anything.
|
118 |
*/
|
119 |
+
if (!$postnlOrder->getId() || $postnlOrder->getOrderId()) {
|
120 |
return $this;
|
121 |
}
|
122 |
|
123 |
+
$type = $postnlOrder->getType();
|
124 |
+
if (!$type) {
|
125 |
+
$type = $postnlOrder::TYPE_OVERDAG;
|
126 |
+
$postnlOrder->setType($type);
|
127 |
+
}
|
128 |
+
|
129 |
/**
|
130 |
* Update the order's shipment costs. If the order type is PGE or Avond, this will be a fee as configured in
|
131 |
* system > config. Otherwise it will be set to 0.
|
132 |
*/
|
133 |
$fee = 0;
|
134 |
+
if ($type == $postnlOrder::TYPE_PGE || $type == $postnlOrder::TYPE_AVOND) {
|
|
|
135 |
/**
|
136 |
* Check whether the shipping prices are entered with or without tax.
|
137 |
*/
|
143 |
/**
|
144 |
* Calculate the correct fee based on the order type.
|
145 |
*/
|
146 |
+
if ($type == $postnlOrder::TYPE_PGE) {
|
147 |
$fee = Mage::helper('postnl/deliveryOptions')
|
148 |
->getExpressFee(false, $includingTax, false);
|
149 |
+
} elseif ($type == $postnlOrder::TYPE_AVOND) {
|
150 |
$fee = Mage::helper('postnl/deliveryOptions')
|
151 |
->getEveningFee(false, $includingTax, false);
|
152 |
}
|
153 |
}
|
154 |
|
155 |
+
/**
|
156 |
+
* Make sure the PostNL order has at least a confirm and delivery date.
|
157 |
+
*/
|
158 |
+
if (!$postnlOrder->getConfirmDate() || !$postnlOrder->getDeliveryDate()) {
|
159 |
+
$this->_setDates($postnlOrder, $order);
|
160 |
+
}
|
161 |
+
|
162 |
+
|
163 |
/**
|
164 |
* Update the PostNL order.
|
165 |
*/
|
271 |
*/
|
272 |
$postnlOrder = Mage::getModel('postnl_core/order')->load($quote->getId(), 'quote_id');
|
273 |
if (!$postnlOrder->getId()) {
|
274 |
+
return $this;
|
275 |
}
|
276 |
|
277 |
/**
|
287 |
if (!$shippingAddress
|
288 |
|| $shippingAddress->getCountryId() != 'NL'
|
289 |
|| !Mage::helper('postnl/carrier')->isPostnlShippingMethod($shippingMethod)
|
290 |
+
|
291 |
) {
|
292 |
$postnlOrder->setOptions(false)
|
293 |
->save();
|
316 |
return $this;
|
317 |
}
|
318 |
|
319 |
+
/**
|
320 |
+
* Validates the PostNl order. This is to prevent problems when quotes have been deleted from the database with
|
321 |
+
* foreign key checks disabled.
|
322 |
+
*
|
323 |
+
* @param TIG_PostNL_Model_Core_Order $postnlOrder
|
324 |
+
* @param Mage_Sales_Model_Order $order
|
325 |
+
*
|
326 |
+
* @return bool
|
327 |
+
*/
|
328 |
+
protected function _validatePostnlOrder(TIG_PostNL_Model_Core_Order $postnlOrder, Mage_Sales_Model_Order $order)
|
329 |
+
{
|
330 |
+
/**
|
331 |
+
* The PostNL order cannot already have a Magento order associated with it.
|
332 |
+
*/
|
333 |
+
if ($postnlOrder->getOrderId()) {
|
334 |
+
return false;
|
335 |
+
}
|
336 |
+
|
337 |
+
$quote = Mage::getModel('sales/quote')->load($order->getQuoteId());
|
338 |
+
|
339 |
+
$utcTimeZone = new DateTimeZone('UTC');
|
340 |
+
|
341 |
+
/**
|
342 |
+
* Get the quote and the PostNL order's created at times.
|
343 |
+
*/
|
344 |
+
$postnlOrderCreated = new DateTime($postnlOrder->getCreatedAt(), $utcTimeZone);
|
345 |
+
$quoteCreated = new DateTime($quote->getCreatedAt(), $utcTimeZone);
|
346 |
+
|
347 |
+
/**
|
348 |
+
* The PostNL order cannot have been created before the quote.
|
349 |
+
*/
|
350 |
+
if ($postnlOrderCreated < $quoteCreated) {
|
351 |
+
return false;
|
352 |
+
}
|
353 |
+
|
354 |
+
/**
|
355 |
+
* Check if this order is being shipped to the Netherlands.
|
356 |
+
*/
|
357 |
+
$shippingAddress = $order->getShippingAddress();
|
358 |
+
|
359 |
+
if (!$shippingAddress
|
360 |
+
|| $shippingAddress->getCountryId() != 'NL'
|
361 |
+
) {
|
362 |
+
return false;
|
363 |
+
}
|
364 |
+
|
365 |
+
/**
|
366 |
+
* Check if the shipping method is a PostNL shipping method.
|
367 |
+
*/
|
368 |
+
$shippingMethod = $order->getShippingMethod();
|
369 |
+
if (!Mage::helper('postnl/carrier')->isPostnlShippingMethod($shippingMethod)) {
|
370 |
+
return false;
|
371 |
+
}
|
372 |
+
|
373 |
+
return true;
|
374 |
+
}
|
375 |
+
|
376 |
+
/**
|
377 |
+
* Creates a PostNL order for the given Magento order.
|
378 |
+
*
|
379 |
+
* @param TIG_PostNL_Model_Core_Order $postnlOrder
|
380 |
+
* @param Mage_Sales_Model_Order $order
|
381 |
+
*
|
382 |
+
* @return $this
|
383 |
+
* @throws Exception
|
384 |
+
*/
|
385 |
+
protected function _createPostnlOrder(TIG_PostNL_Model_Core_Order $postnlOrder, Mage_Sales_Model_Order $order)
|
386 |
+
{
|
387 |
+
$postnlOrder->setQuoteId($order->getQuoteId())
|
388 |
+
->setOrderId($order->getId())
|
389 |
+
->setType($postnlOrder::TYPE_OVERDAG)
|
390 |
+
->setIsActive(0)
|
391 |
+
->setIsCanceled(0)
|
392 |
+
->setShipmentCosts(0)
|
393 |
+
->setIsPakjeGemak(0)
|
394 |
+
->setIsPakketautomaat(0);
|
395 |
+
|
396 |
+
$postnlOrder = $this->_setDates($postnlOrder, $order);
|
397 |
+
|
398 |
+
$postnlOrder->save();
|
399 |
+
|
400 |
+
return $this;
|
401 |
+
}
|
402 |
+
|
403 |
+
/**
|
404 |
+
* Set the confirm and delivery dates for a given PostNl order.
|
405 |
+
*
|
406 |
+
* @param TIG_PostNL_Model_Core_Order $postnlOrder
|
407 |
+
* @param Mage_Sales_Model_Order $order
|
408 |
+
*
|
409 |
+
* @return TIG_PostNL_Model_Core_Order
|
410 |
+
*/
|
411 |
+
protected function _setDates(TIG_PostNL_Model_Core_Order $postnlOrder, Mage_Sales_Model_Order $order)
|
412 |
+
{
|
413 |
+
$helper = Mage::helper('postnl/deliveryOptions');
|
414 |
+
$shippingDuration = $helper->getOrderShippingDuration($order);
|
415 |
+
$deliveryDate = $helper->getDeliveryDate(
|
416 |
+
$order->getCreatedAt(),
|
417 |
+
$order->getStoreId(),
|
418 |
+
false,
|
419 |
+
true,
|
420 |
+
true,
|
421 |
+
$shippingDuration,
|
422 |
+
true
|
423 |
+
);
|
424 |
+
|
425 |
+
$deliveryDate = $helper->getValidDeliveryDate($deliveryDate);
|
426 |
+
|
427 |
+
$confirmDate = clone $deliveryDate;
|
428 |
+
$confirmDate->sub(new DateInterval('P1D'));
|
429 |
+
$confirmDate = $helper->getValidConfirmDate($confirmDate);
|
430 |
+
|
431 |
+
$postnlOrder->setDeliveryDate($deliveryDate->getTimestamp())
|
432 |
+
->setConfirmDate($confirmDate->getTimestamp());
|
433 |
+
|
434 |
+
return $postnlOrder;
|
435 |
+
}
|
436 |
+
|
437 |
/**
|
438 |
* Deletes any PakjeGemak addresses associated with this order.
|
439 |
*
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_DeliveryOptions_Product_Attribute_Source_ShippingDuration
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_DeliveryOptions_Product_Attribute_Source_ShippingDuration
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasQuote()
|
@@ -185,7 +185,7 @@ class TIG_PostNL_Model_DeliveryOptions_Service extends Varien_Object
|
|
185 |
* Get the date of the time frame and calculate the shipping day. The shipping day will be the day before
|
186 |
* the delivery date, but may not be a sunday.
|
187 |
*/
|
188 |
-
$timeframeDate = new DateTime($timeframe->Date);
|
189 |
$deliveryDay = (int) $timeframeDate->format('N');
|
190 |
|
191 |
$shippingDate = clone $timeframeDate;
|
@@ -237,7 +237,7 @@ class TIG_PostNL_Model_DeliveryOptions_Service extends Varien_Object
|
|
237 |
*/
|
238 |
protected function _validateSaturdayShipping($shippingDays, DateTime $shippingDate, DateTime $earliestShippingDate)
|
239 |
{
|
240 |
-
$shippingDate->modify('last saturday');
|
241 |
$shippingDay = 6;
|
242 |
|
243 |
if (!in_array($shippingDay, $shippingDays)) {
|
@@ -319,6 +319,7 @@ class TIG_PostNL_Model_DeliveryOptions_Service extends Varien_Object
|
|
319 |
*/
|
320 |
$postnlOrder = $this->getPostnlOrder();
|
321 |
$postnlOrder->setQuoteId($quote->getId())
|
|
|
322 |
->setIsActive(true)
|
323 |
->setIsPakjeGemak(false)
|
324 |
->setIsPakketautomaat(false)
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasQuote()
|
185 |
* Get the date of the time frame and calculate the shipping day. The shipping day will be the day before
|
186 |
* the delivery date, but may not be a sunday.
|
187 |
*/
|
188 |
+
$timeframeDate = new DateTime($timeframe->Date, new DateTimeZone('UTC'));
|
189 |
$deliveryDay = (int) $timeframeDate->format('N');
|
190 |
|
191 |
$shippingDate = clone $timeframeDate;
|
237 |
*/
|
238 |
protected function _validateSaturdayShipping($shippingDays, DateTime $shippingDate, DateTime $earliestShippingDate)
|
239 |
{
|
240 |
+
$shippingDate->modify('last saturday ' . $shippingDate->format('H:i:s'));
|
241 |
$shippingDay = 6;
|
242 |
|
243 |
if (!in_array($shippingDay, $shippingDays)) {
|
319 |
*/
|
320 |
$postnlOrder = $this->getPostnlOrder();
|
321 |
$postnlOrder->setQuoteId($quote->getId())
|
322 |
+
->setOrderId(null)
|
323 |
->setIsActive(true)
|
324 |
->setIsPakjeGemak(false)
|
325 |
->setIsPakketautomaat(false)
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasIsIncludingTax()
|
@@ -77,6 +77,7 @@ class TIG_PostNL_Model_DeliveryOptions_System_Config_Backend_ValidateFee extends
|
|
77 |
* @var Mage_Customer_Model_Address $mockShippingAddress
|
78 |
*/
|
79 |
$mockShippingAddress = Mage::getModel('customer/address');
|
|
|
80 |
$mockShippingAddress->setCountryId('NL')
|
81 |
->setPostcode('1000AA');
|
82 |
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method boolean hasIsIncludingTax()
|
77 |
* @var Mage_Customer_Model_Address $mockShippingAddress
|
78 |
*/
|
79 |
$mockShippingAddress = Mage::getModel('customer/address');
|
80 |
+
/** @noinspection PhpUndefinedMethodInspection */
|
81 |
$mockShippingAddress->setCountryId('NL')
|
82 |
->setPostcode('1000AA');
|
83 |
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_DeliveryOptions_System_Config_Source_DeliveryDaysNumber
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_DeliveryOptions_System_Config_Source_DeliveryDaysNumber
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ___________ __ __
|
4 |
+
* \__ ___/____ _/ |_ _____ | |
|
5 |
+
* | | / _ \\ __\\__ \ | |
|
6 |
+
* | | | |_| || | / __ \_| |__
|
7 |
+
* |____| \____/ |__| (____ /|____/
|
8 |
+
* \/
|
9 |
+
* ___ __ __
|
10 |
+
* | | ____ _/ |_ ____ _______ ____ ____ _/ |_
|
11 |
+
* | | / \\ __\_/ __ \\_ __ \ / \ _/ __ \\ __\
|
12 |
+
* | || | \| | \ ___/ | | \/| | \\ ___/ | |
|
13 |
+
* |___||___| /|__| \_____>|__| |___| / \_____>|__|
|
14 |
+
* \/ \/
|
15 |
+
* ________
|
16 |
+
* / _____/_______ ____ __ __ ______
|
17 |
+
* / \ ___\_ __ \ / _ \ | | \\____ \
|
18 |
+
* \ \_\ \| | \/| |_| || | /| |_| |
|
19 |
+
* \______ /|__| \____/ |____/ | __/
|
20 |
+
* \/ |__|
|
21 |
+
*
|
22 |
+
* NOTICE OF LICENSE
|
23 |
+
*
|
24 |
+
* This source file is subject to the Creative Commons License.
|
25 |
+
* It is available through the world-wide-web at this URL:
|
26 |
+
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
27 |
+
* If you are unable to obtain it through the world-wide-web, please send an email
|
28 |
+
* to servicedesk@tig.nl so we can send you a copy immediately.
|
29 |
+
*
|
30 |
+
* DISCLAIMER
|
31 |
+
*
|
32 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
33 |
+
* versions in the future. If you wish to customize this module for your
|
34 |
+
* needs please contact servicedesk@tig.nl for more information.
|
35 |
+
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
+
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
+
*/
|
39 |
+
class TIG_PostNL_Model_DeliveryOptions_System_Config_Source_StockOptions
|
40 |
+
{
|
41 |
+
/**
|
42 |
+
* Returns an option array for all supported stock options
|
43 |
+
*
|
44 |
+
* @return array
|
45 |
+
*/
|
46 |
+
public function toOptionArray()
|
47 |
+
{
|
48 |
+
$helper = Mage::helper('postnl');
|
49 |
+
$labelSizes = array(
|
50 |
+
array(
|
51 |
+
'value' => 'in_stock',
|
52 |
+
'label' => $helper->__('In stock products only')
|
53 |
+
),
|
54 |
+
array(
|
55 |
+
'value' => 'backordered',
|
56 |
+
'label' => $helper->__('In stock and backordered products')
|
57 |
+
),
|
58 |
+
/**
|
59 |
+
* This option is disabled by default, because core Magento does not allow purchasing out of stock products.
|
60 |
+
* However, using extensions this can be made possible.
|
61 |
+
*/
|
62 |
+
// array(
|
63 |
+
// 'value' => 'out_of_stock',
|
64 |
+
// 'label' => $helper->__('In stock, backordered and out of stock products')
|
65 |
+
// ),
|
66 |
+
);
|
67 |
+
|
68 |
+
return $labelSizes;
|
69 |
+
}
|
70 |
+
}
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_DeliveryOptions_System_Config_Source_Themes extends Varien_Object
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_DeliveryOptions_System_Config_Source_Themes extends Varien_Object
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_ExtensionControl_Config
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_ExtensionControl_Config
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_ExtensionControl_Feed extends Mage_AdminNotification_Model_Feed
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_ExtensionControl_Feed extends Mage_AdminNotification_Model_Feed
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_ExtensionControl_Observer_Cron
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_ExtensionControl_Observer_Cron
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* Primary webservices class. Contains all methods used to communicate with the extensioncontrol webservice.
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* Primary webservices class. Contains all methods used to communicate with the extensioncontrol webservice.
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
abstract class TIG_PostNL_Model_ExtensionControl_Webservices_Abstract extends Varien_Object
|
@@ -105,11 +105,11 @@ abstract class TIG_PostNL_Model_ExtensionControl_Webservices_Abstract extends Va
|
|
105 |
);
|
106 |
|
107 |
/**
|
108 |
-
* try to create a new
|
109 |
* using the wsdl cache.
|
110 |
*/
|
111 |
try {
|
112 |
-
$client = new
|
113 |
$wsdl,
|
114 |
$soapOptions
|
115 |
);
|
@@ -119,7 +119,7 @@ abstract class TIG_PostNL_Model_ExtensionControl_Webservices_Abstract extends Va
|
|
119 |
*/
|
120 |
$soapOptions['cache_wsdl'] = WSDL_CACHE_NONE;
|
121 |
|
122 |
-
$client = new
|
123 |
$wsdl,
|
124 |
$soapOptions
|
125 |
);
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
abstract class TIG_PostNL_Model_ExtensionControl_Webservices_Abstract extends Varien_Object
|
105 |
);
|
106 |
|
107 |
/**
|
108 |
+
* try to create a new SoapClient instance based on the supplied wsdl. If it fails, try again without
|
109 |
* using the wsdl cache.
|
110 |
*/
|
111 |
try {
|
112 |
+
$client = new SoapClient(
|
113 |
$wsdl,
|
114 |
$soapOptions
|
115 |
);
|
119 |
*/
|
120 |
$soapOptions['cache_wsdl'] = WSDL_CACHE_NONE;
|
121 |
|
122 |
+
$client = new SoapClient(
|
123 |
$wsdl,
|
124 |
$soapOptions
|
125 |
);
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @deprecated 1.3.0 This class has been moved to TIG_PostNL_Model_Admin_Inbox. A dummy class has been left behind to
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @deprecated 1.3.0 This class has been moved to TIG_PostNL_Model_Admin_Inbox. A dummy class has been left behind to
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Mijnpakket_Cif extends TIG_PostNL_Model_Checkout_Cif
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Mijnpakket_Cif extends TIG_PostNL_Model_Checkout_Cif
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Mijnpakket_Service extends Varien_Object
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Mijnpakket_Service extends Varien_Object
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method TIG_PostNL_Model_Parcelware_Export setIsGlobal(boolean $value)
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method TIG_PostNL_Model_Parcelware_Export setIsGlobal(boolean $value)
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Payment_Cod extends Mage_Payment_Model_Method_Abstract
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Payment_Cod extends Mage_Payment_Model_Method_Abstract
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Payment_Observer_Cod
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Payment_Observer_Cod
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Payment_Order_Creditmemo_Total_CodFee
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Payment_Order_Creditmemo_Total_CodFee
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
abstract class TIG_PostNL_Model_Payment_Order_Creditmemo_Total_CodFee_Abstract
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
abstract class TIG_PostNL_Model_Payment_Order_Creditmemo_Total_CodFee_Abstract
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Payment_Order_Creditmemo_Total_CodFeeTax
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Payment_Order_Creditmemo_Total_CodFeeTax
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Payment_Order_Invoice_Total_CodFee extends Mage_Sales_Model_Order_Invoice_Total_Abstract
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Payment_Order_Invoice_Total_CodFee extends Mage_Sales_Model_Order_Invoice_Total_Abstract
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Payment_Order_Invoice_Total_CodFeeTax extends Mage_Sales_Model_Order_Invoice_Total_Abstract
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Payment_Order_Invoice_Total_CodFeeTax extends Mage_Sales_Model_Order_Invoice_Total_Abstract
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Payment_Order_Invoice_Total_Subtotal extends Mage_Sales_Model_Order_Invoice_Total_Subtotal
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Payment_Order_Invoice_Total_Subtotal extends Mage_Sales_Model_Order_Invoice_Total_Subtotal
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method int|string getFontSize()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method int|string getFontSize()
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method Mage_Sales_Model_Order getOrder()
|
@@ -124,4 +124,20 @@ class TIG_PostNL_Model_Payment_Order_Pdf_Total_Grandtotal extends Mage_Tax_Model
|
|
124 |
{
|
125 |
return Mage::helper('tax');
|
126 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
}
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method Mage_Sales_Model_Order getOrder()
|
124 |
{
|
125 |
return Mage::helper('tax');
|
126 |
}
|
127 |
+
|
128 |
+
/**
|
129 |
+
* Get full rate info
|
130 |
+
*
|
131 |
+
* @return array
|
132 |
+
*/
|
133 |
+
protected function _getFullRateInfo()
|
134 |
+
{
|
135 |
+
if (method_exists('Mage_Tax_Model_Sales_Pdf_Grandtotal', '_getFullRateInfo')) {
|
136 |
+
return parent::_getFullRateInfo();
|
137 |
+
}
|
138 |
+
|
139 |
+
$rates = Mage::getModel('tax/sales_order_tax')->getCollection()->loadByOrder($this->getOrder())->toArray();
|
140 |
+
$fullInfo = Mage::getSingleton('tax/calculation')->reproduceProcess($rates['items']);
|
141 |
+
return $fullInfo;
|
142 |
+
}
|
143 |
}
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method Mage_Sales_Model_Order getOrder()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @method Mage_Sales_Model_Order getOrder()
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Payment_Quote_Address_Total_CodFee
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Payment_Quote_Address_Total_CodFee
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
abstract class TIG_PostNL_Model_Payment_Quote_Address_Total_CodFee_Abstract extends Mage_Tax_Model_Sales_Total_Quote_Tax
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
abstract class TIG_PostNL_Model_Payment_Quote_Address_Total_CodFee_Abstract extends Mage_Tax_Model_Sales_Total_Quote_Tax
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Payment_Quote_Address_Total_CodFeeTax
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Payment_Quote_Address_Total_CodFeeTax
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Payment_Service
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Payment_Service
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Payment_System_Config_Source_CodFeeTaxClass
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Payment_System_Config_Source_CodFeeTaxClass
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Resource_Catalog_Product extends Mage_Catalog_Model_Resource_Product
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Resource_Catalog_Product extends Mage_Catalog_Model_Resource_Product
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
abstract class TIG_PostNL_Model_Resource_Db_Abstract extends Mage_Core_Model_Resource_Db_Abstract
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
abstract class TIG_PostNL_Model_Resource_Db_Abstract extends Mage_Core_Model_Resource_Db_Abstract
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Resource_Db_Collection_Postnl extends Mage_Core_Model_Resource_Db_Collection_Abstract
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Resource_Db_Collection_Postnl extends Mage_Core_Model_Resource_Db_Collection_Abstract
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Resource_Order_Grid_Collection extends Mage_Sales_Model_Resource_Order_Grid_Collection
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Resource_Order_Grid_Collection extends Mage_Sales_Model_Resource_Order_Grid_Collection
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Resource_Order_Shipment extends Mage_Sales_Model_Resource_Order_Shipment
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Resource_Order_Shipment extends Mage_Sales_Model_Resource_Order_Shipment
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Resource_Order_Shipment_Grid_Collection extends Mage_Sales_Model_Resource_Order_Shipment_Grid_Collection
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_Resource_Order_Shipment_Grid_Collection extends Mage_Sales_Model_Resource_Order_Shipment_Grid_Collection
|
@@ -33,11 +33,13 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
-
class TIG_PostNL_Model_Resource_Setup extends
|
40 |
{
|
|
|
|
|
41 |
/**
|
42 |
* Cron expression and cron model definitions for shipping_status cron
|
43 |
*/
|
@@ -241,6 +243,22 @@ class TIG_PostNL_Model_Resource_Setup extends Mage_Catalog_Model_Resource_Setup
|
|
241 |
return parent::applyUpdates();
|
242 |
}
|
243 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
244 |
/**
|
245 |
* Check if the PostNL module has been updated. If so, add an admin notification to the inbox.
|
246 |
*
|
@@ -278,7 +296,7 @@ class TIG_PostNL_Model_Resource_Setup extends Mage_Catalog_Model_Resource_Setup
|
|
278 |
}
|
279 |
|
280 |
$message = $helper->__(
|
281 |
-
'You can read the
|
282 |
'knowledgebase</a>.',
|
283 |
$helper->getChangelogUrl()
|
284 |
);
|
@@ -289,6 +307,185 @@ class TIG_PostNL_Model_Resource_Setup extends Mage_Catalog_Model_Resource_Setup
|
|
289 |
return $this;
|
290 |
}
|
291 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
292 |
/**
|
293 |
* Generate a random cron expression for the status update cron for this merchant and store it in the database.
|
294 |
*
|
@@ -1451,4 +1648,37 @@ class TIG_PostNL_Model_Resource_Setup extends Mage_Catalog_Model_Resource_Setup
|
|
1451 |
|
1452 |
return $this;
|
1453 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1454 |
}
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
+
class TIG_PostNL_Model_Resource_Setup extends Mage_Eav_Model_Entity_Setup
|
40 |
{
|
41 |
+
const TYPE_DATA_UNINSTALL = 'data-uninstall';
|
42 |
+
|
43 |
/**
|
44 |
* Cron expression and cron model definitions for shipping_status cron
|
45 |
*/
|
243 |
return parent::applyUpdates();
|
244 |
}
|
245 |
|
246 |
+
/**
|
247 |
+
* Apply data updates to the system after upgrading.
|
248 |
+
*
|
249 |
+
* @return Mage_Core_Model_Resource_Setup
|
250 |
+
*/
|
251 |
+
public function applyDataUninstall()
|
252 |
+
{
|
253 |
+
$dataVer = $this->_getResource()->getDataVersion($this->_resourceName);
|
254 |
+
$configVer = (string)$this->_moduleConfig->version;
|
255 |
+
|
256 |
+
if ($dataVer !== false) {
|
257 |
+
$this->_uninstallData($dataVer, $configVer);
|
258 |
+
}
|
259 |
+
return $this;
|
260 |
+
}
|
261 |
+
|
262 |
/**
|
263 |
* Check if the PostNL module has been updated. If so, add an admin notification to the inbox.
|
264 |
*
|
296 |
}
|
297 |
|
298 |
$message = $helper->__(
|
299 |
+
'You can read the release notes in the <a href="%s" target="_blank" title="TIG knowledgebase">TIG ' .
|
300 |
'knowledgebase</a>.',
|
301 |
$helper->getChangelogUrl()
|
302 |
);
|
307 |
return $this;
|
308 |
}
|
309 |
|
310 |
+
/**
|
311 |
+
* Run data uninstall scripts
|
312 |
+
*
|
313 |
+
* @param string $oldVersion
|
314 |
+
* @param string $newVersion
|
315 |
+
* @return Mage_Core_Model_Resource_Setup
|
316 |
+
*/
|
317 |
+
protected function _uninstallData($oldVersion, $newVersion)
|
318 |
+
{
|
319 |
+
$this->_modifyResourceDb('data-uninstall', $oldVersion, $newVersion);
|
320 |
+
$this->_getResource()->setDataVersion($this->_resourceName, false);
|
321 |
+
|
322 |
+
return $this;
|
323 |
+
}
|
324 |
+
|
325 |
+
/**
|
326 |
+
* Save resource version
|
327 |
+
*
|
328 |
+
* @param string $actionType
|
329 |
+
* @param string $version
|
330 |
+
* @return Mage_Core_Model_Resource_Setup
|
331 |
+
*/
|
332 |
+
protected function _setResourceVersion($actionType, $version)
|
333 |
+
{
|
334 |
+
switch ($actionType) {
|
335 |
+
case self::TYPE_DB_INSTALL:
|
336 |
+
case self::TYPE_DB_UPGRADE:
|
337 |
+
$this->_getResource()->setDbVersion($this->_resourceName, $version);
|
338 |
+
break;
|
339 |
+
case self::TYPE_DATA_INSTALL:
|
340 |
+
case self::TYPE_DATA_UPGRADE:
|
341 |
+
$this->_getResource()->setDataVersion($this->_resourceName, $version);
|
342 |
+
break;
|
343 |
+
|
344 |
+
}
|
345 |
+
|
346 |
+
return $this;
|
347 |
+
}
|
348 |
+
|
349 |
+
/**
|
350 |
+
* Run module modification files. Return version of last applied upgrade (false if no upgrades applied)
|
351 |
+
*
|
352 |
+
* @param string $actionType self::TYPE_*
|
353 |
+
* @param string $fromVersion
|
354 |
+
* @param string $toVersion
|
355 |
+
* @return string|false
|
356 |
+
* @throws Mage_Core_Exception
|
357 |
+
*/
|
358 |
+
|
359 |
+
protected function _modifyResourceDb($actionType, $fromVersion, $toVersion)
|
360 |
+
{
|
361 |
+
switch ($actionType) {
|
362 |
+
case self::TYPE_DB_INSTALL:
|
363 |
+
case self::TYPE_DB_UPGRADE:
|
364 |
+
$files = $this->_getAvailableDbFiles($actionType, $fromVersion, $toVersion);
|
365 |
+
break;
|
366 |
+
case self::TYPE_DATA_INSTALL:
|
367 |
+
case self::TYPE_DATA_UPGRADE:
|
368 |
+
case self::TYPE_DATA_UNINSTALL:
|
369 |
+
$files = $this->_getAvailableDataFiles($actionType, $fromVersion, $toVersion);
|
370 |
+
break;
|
371 |
+
default:
|
372 |
+
$files = array();
|
373 |
+
break;
|
374 |
+
}
|
375 |
+
if (empty($files) || !$this->getConnection()) {
|
376 |
+
return false;
|
377 |
+
}
|
378 |
+
|
379 |
+
$version = false;
|
380 |
+
|
381 |
+
foreach ($files as $file) {
|
382 |
+
$fileName = $file['fileName'];
|
383 |
+
$fileType = pathinfo($fileName, PATHINFO_EXTENSION);
|
384 |
+
$this->getConnection()->disallowDdlCache();
|
385 |
+
try {
|
386 |
+
switch ($fileType) {
|
387 |
+
case 'php':
|
388 |
+
$conn = $this->getConnection();
|
389 |
+
$result = include $fileName;
|
390 |
+
break;
|
391 |
+
case 'sql':
|
392 |
+
$sql = file_get_contents($fileName);
|
393 |
+
if (!empty($sql)) {
|
394 |
+
|
395 |
+
$result = $this->run($sql);
|
396 |
+
} else {
|
397 |
+
$result = true;
|
398 |
+
}
|
399 |
+
break;
|
400 |
+
default:
|
401 |
+
$result = false;
|
402 |
+
break;
|
403 |
+
}
|
404 |
+
|
405 |
+
if ($result) {
|
406 |
+
$this->_setResourceVersion($actionType, $file['toVersion']);
|
407 |
+
}
|
408 |
+
} catch (Exception $e) {
|
409 |
+
// This printf is core Magento
|
410 |
+
printf('<pre>%s</pre>', print_r($e, true));
|
411 |
+
throw Mage::exception('Mage_Core', Mage::helper('core')->__('Error in file: "%s" - %s', $fileName, $e->getMessage()));
|
412 |
+
}
|
413 |
+
$version = $file['toVersion'];
|
414 |
+
$this->getConnection()->allowDdlCache();
|
415 |
+
}
|
416 |
+
self::$_hadUpdates = true;
|
417 |
+
return $version;
|
418 |
+
}
|
419 |
+
|
420 |
+
/**
|
421 |
+
* Get data files for modifications
|
422 |
+
*
|
423 |
+
* @param string $actionType
|
424 |
+
* @param string $fromVersion
|
425 |
+
* @param string $toVersion
|
426 |
+
* @param array $arrFiles
|
427 |
+
* @return array
|
428 |
+
*/
|
429 |
+
protected function _getModifySqlFiles($actionType, $fromVersion, $toVersion, $arrFiles)
|
430 |
+
{
|
431 |
+
$arrRes = array();
|
432 |
+
switch ($actionType) {
|
433 |
+
case self::TYPE_DB_INSTALL:
|
434 |
+
case self::TYPE_DATA_INSTALL:
|
435 |
+
uksort($arrFiles, 'version_compare');
|
436 |
+
foreach ($arrFiles as $version => $file) {
|
437 |
+
if (version_compare($version, $toVersion) !== self::VERSION_COMPARE_GREATER) {
|
438 |
+
$arrRes[0] = array(
|
439 |
+
'toVersion' => $version,
|
440 |
+
'fileName' => $file
|
441 |
+
);
|
442 |
+
}
|
443 |
+
}
|
444 |
+
break;
|
445 |
+
|
446 |
+
case self::TYPE_DB_UPGRADE:
|
447 |
+
case self::TYPE_DATA_UPGRADE:
|
448 |
+
uksort($arrFiles, 'version_compare');
|
449 |
+
foreach ($arrFiles as $version => $file) {
|
450 |
+
$versionInfo = explode('-', $version);
|
451 |
+
|
452 |
+
// In array must be 2 elements: 0 => version from, 1 => version to
|
453 |
+
if (count($versionInfo)!=2) {
|
454 |
+
break;
|
455 |
+
}
|
456 |
+
$infoFrom = $versionInfo[0];
|
457 |
+
$infoTo = $versionInfo[1];
|
458 |
+
if (version_compare($infoFrom, $fromVersion) !== self::VERSION_COMPARE_LOWER
|
459 |
+
&& version_compare($infoTo, $toVersion) !== self::VERSION_COMPARE_GREATER) {
|
460 |
+
$arrRes[] = array(
|
461 |
+
'toVersion' => $infoTo,
|
462 |
+
'fileName' => $file
|
463 |
+
);
|
464 |
+
}
|
465 |
+
}
|
466 |
+
break;
|
467 |
+
|
468 |
+
case self::TYPE_DATA_UNINSTALL:
|
469 |
+
uksort($arrFiles, 'version_compare');
|
470 |
+
foreach ($arrFiles as $version => $file) {
|
471 |
+
if (version_compare($version, $toVersion) !== self::VERSION_COMPARE_GREATER) {
|
472 |
+
$arrRes[0] = array(
|
473 |
+
'toVersion' => $version,
|
474 |
+
'fileName' => $file
|
475 |
+
);
|
476 |
+
}
|
477 |
+
}
|
478 |
+
break;
|
479 |
+
|
480 |
+
case self::TYPE_DB_ROLLBACK:
|
481 |
+
break;
|
482 |
+
|
483 |
+
case self::TYPE_DB_UNINSTALL:
|
484 |
+
break;
|
485 |
+
}
|
486 |
+
return $arrRes;
|
487 |
+
}
|
488 |
+
|
489 |
/**
|
490 |
* Generate a random cron expression for the status update cron for this merchant and store it in the database.
|
491 |
*
|
1648 |
|
1649 |
return $this;
|
1650 |
}
|
1651 |
+
|
1652 |
+
/**
|
1653 |
+
* Moves and merges the PostNL delivery options allow backorders setting to and with the PostNL delivery options
|
1654 |
+
* stock options setting.
|
1655 |
+
*
|
1656 |
+
* @return $this
|
1657 |
+
*/
|
1658 |
+
public function moveDeliveryOptionsStockSetting()
|
1659 |
+
{
|
1660 |
+
$conn = $this->getConnection();
|
1661 |
+
|
1662 |
+
try {
|
1663 |
+
/**
|
1664 |
+
* Modify all mode settings with value 1 (allow backorders) to value 'backordered' and modify the path to
|
1665 |
+
* the new setting.
|
1666 |
+
*/
|
1667 |
+
$conn->update(
|
1668 |
+
$this->getTable('core/config_data'),
|
1669 |
+
array(
|
1670 |
+
'path = ?' => 'postnl/delivery_options/stock_options',
|
1671 |
+
'value' => 'backordered',
|
1672 |
+
),
|
1673 |
+
array(
|
1674 |
+
'path = ?' => 'postnl/delivery_options/show_options_for_backorders',
|
1675 |
+
'value = ?' => 1
|
1676 |
+
)
|
1677 |
+
);
|
1678 |
+
} catch (Exception $e) {
|
1679 |
+
Mage::helper('postnl')->logException($e);
|
1680 |
+
}
|
1681 |
+
|
1682 |
+
return $this;
|
1683 |
+
}
|
1684 |
}
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_System_Config_Backend_Checkbox extends Mage_Core_Model_Config_Data
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Model_System_Config_Backend_Checkbox extends Mage_Core_Model_Config_Data
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_AddressValidationController extends Mage_Core_Controller_Front_Action
|
@@ -166,7 +166,7 @@ class TIG_PostNL_AddressValidationController extends Mage_Core_Controller_Front_
|
|
166 |
* Return the result as a json response
|
167 |
*/
|
168 |
$this->getResponse()
|
169 |
-
->setHeader('Content-type', 'application/x-json')
|
170 |
->setBody($response);
|
171 |
|
172 |
return $this;
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_AddressValidationController extends Mage_Core_Controller_Front_Action
|
166 |
* Return the result as a json response
|
167 |
*/
|
168 |
$this->getResponse()
|
169 |
+
->setHeader('Content-type', 'application/x-json', true)
|
170 |
->setBody($response);
|
171 |
|
172 |
return $this;
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Adminhtml_ConfigController extends TIG_PostNL_Controller_Adminhtml_Config
|
@@ -380,14 +380,39 @@ class TIG_PostNL_Adminhtml_ConfigController extends TIG_PostNL_Controller_Adminh
|
|
380 |
Mage::dispatchEvent("admin_system_config_changed_section_{$section}",
|
381 |
array('website' => $website, 'store' => $store)
|
382 |
);
|
383 |
-
|
384 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
385 |
$this->getResponse()
|
386 |
->setBody($e->getMessage());
|
387 |
|
388 |
return $this;
|
389 |
-
}
|
390 |
-
|
|
|
391 |
$this->getResponse()
|
392 |
->setBody(
|
393 |
Mage::helper('adminhtml')->__('An error occurred while saving this configuration:')
|
@@ -398,14 +423,45 @@ class TIG_PostNL_Adminhtml_ConfigController extends TIG_PostNL_Controller_Adminh
|
|
398 |
return $this;
|
399 |
}
|
400 |
|
401 |
-
$this
|
|
|
402 |
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
409 |
}
|
410 |
|
411 |
$this->getResponse()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Adminhtml_ConfigController extends TIG_PostNL_Controller_Adminhtml_Config
|
380 |
Mage::dispatchEvent("admin_system_config_changed_section_{$section}",
|
381 |
array('website' => $website, 'store' => $store)
|
382 |
);
|
383 |
+
|
384 |
+
$this->_saveState($this->getRequest()->getPost('config_state'));
|
385 |
+
|
386 |
+
/**
|
387 |
+
* Save the next wizard step as the current step the admin user is on.
|
388 |
+
*/
|
389 |
+
$nextStep = $this->getRequest()->getPost('next_step_hash');
|
390 |
+
if ($nextStep) {
|
391 |
+
$this->_saveCurrentWizardStep($nextStep);
|
392 |
+
}
|
393 |
+
|
394 |
+
$this->getResponse()
|
395 |
+
->setBody('success');
|
396 |
+
} catch (TIG_PostNL_Exception $e) {
|
397 |
+
Mage::helper('postnl')->logException($e);
|
398 |
+
|
399 |
+
$this->getResponse()
|
400 |
+
->setBody(
|
401 |
+
Mage::helper('postnl')->getSessionMessage($e->getCode(), 'error', $e->getMessage()
|
402 |
+
)
|
403 |
+
);
|
404 |
+
|
405 |
+
return $this;
|
406 |
+
} catch (Mage_Core_Exception $e) {
|
407 |
+
Mage::helper('postnl')->logException($e);
|
408 |
+
|
409 |
$this->getResponse()
|
410 |
->setBody($e->getMessage());
|
411 |
|
412 |
return $this;
|
413 |
+
} catch (Exception $e) {
|
414 |
+
Mage::helper('postnl')->logException($e);
|
415 |
+
|
416 |
$this->getResponse()
|
417 |
->setBody(
|
418 |
Mage::helper('adminhtml')->__('An error occurred while saving this configuration:')
|
423 |
return $this;
|
424 |
}
|
425 |
|
426 |
+
return $this;
|
427 |
+
}
|
428 |
|
429 |
+
/**
|
430 |
+
* Saves the hidden state for a specified admin notification.
|
431 |
+
*
|
432 |
+
* @return $this
|
433 |
+
*/
|
434 |
+
public function hideNotificationAction()
|
435 |
+
{
|
436 |
+
$notificationCode = $this->getRequest()->getParam('notification_code');
|
437 |
+
if (!$notificationCode) {
|
438 |
+
$this->getResponse()
|
439 |
+
->setBody('missing_code');
|
440 |
+
|
441 |
+
return $this;
|
442 |
+
}
|
443 |
+
|
444 |
+
$adminUser = Mage::getSingleton('admin/session')->getUser();
|
445 |
+
if (!$adminUser) {
|
446 |
+
$this->getResponse()
|
447 |
+
->setBody('error');
|
448 |
+
|
449 |
+
return $this;
|
450 |
+
}
|
451 |
+
|
452 |
+
try {
|
453 |
+
$extra = $adminUser->getExtra();
|
454 |
+
|
455 |
+
$extra['postnl']['hidden_notification'][$notificationCode] = true;
|
456 |
+
|
457 |
+
$adminUser->saveExtra($extra);
|
458 |
+
} catch (Exception $e) {
|
459 |
+
Mage::helper('postnl')->logException($e);
|
460 |
+
|
461 |
+
$this->getResponse()
|
462 |
+
->setBody('error');
|
463 |
+
|
464 |
+
return $this;
|
465 |
}
|
466 |
|
467 |
$this->getResponse()
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Adminhtml_ExtensionControlController extends TIG_PostNL_Controller_Adminhtml_Config
|
@@ -338,6 +338,19 @@ class TIG_PostNL_Adminhtml_ExtensionControlController extends TIG_PostNL_Control
|
|
338 |
* @return $this
|
339 |
*/
|
340 |
public function showActivationFieldsAction()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
341 |
{
|
342 |
Mage::getModel('core/config')->saveConfig(self::XPATH_IS_ACTIVATED, 0);
|
343 |
|
@@ -350,7 +363,32 @@ class TIG_PostNL_Adminhtml_ExtensionControlController extends TIG_PostNL_Control
|
|
350 |
*/
|
351 |
$this->_saveCurrentWizardStep('#wizard1');
|
352 |
|
353 |
-
$this->_redirect('adminhtml/system_config/edit', array('section' => 'postnl'));
|
354 |
return $this;
|
355 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
356 |
}
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Adminhtml_ExtensionControlController extends TIG_PostNL_Controller_Adminhtml_Config
|
338 |
* @return $this
|
339 |
*/
|
340 |
public function showActivationFieldsAction()
|
341 |
+
{
|
342 |
+
$this->_resetActivation();
|
343 |
+
|
344 |
+
$this->_redirect('adminhtml/system_config/edit', array('section' => 'postnl'));
|
345 |
+
return $this;
|
346 |
+
}
|
347 |
+
|
348 |
+
/**
|
349 |
+
* Reset the extension's activation state.
|
350 |
+
*
|
351 |
+
* @return $this
|
352 |
+
*/
|
353 |
+
protected function _resetActivation()
|
354 |
{
|
355 |
Mage::getModel('core/config')->saveConfig(self::XPATH_IS_ACTIVATED, 0);
|
356 |
|
363 |
*/
|
364 |
$this->_saveCurrentWizardStep('#wizard1');
|
365 |
|
|
|
366 |
return $this;
|
367 |
}
|
368 |
+
|
369 |
+
/**
|
370 |
+
* Uninstall the PostNl extension.
|
371 |
+
*
|
372 |
+
* @throws Exception
|
373 |
+
* @throws TIG_PostNL_Exception
|
374 |
+
*
|
375 |
+
* @return void
|
376 |
+
*/
|
377 |
+
public function uninstallAction()
|
378 |
+
{
|
379 |
+
$setup = Mage::getResourceModel('postnl/setup', 'postnl_setup');
|
380 |
+
$setup->applyDataUninstall();
|
381 |
+
|
382 |
+
// Set session message that we've been successful
|
383 |
+
$title = $this->__('The PostNL extension has been successfully uninstalled.');
|
384 |
+
Mage::helper('postnl')->addSessionMessage('core/session', 'POSTNL-0223', 'success', $title);
|
385 |
+
|
386 |
+
$message = Mage::helper('postnl')->getSessionMessage('POSTNL-0223', 'success', $title);
|
387 |
+
|
388 |
+
$inbox = Mage::getModel('postnl_admin/inbox');
|
389 |
+
$inbox->addNotice($message, $title)
|
390 |
+
->save();
|
391 |
+
|
392 |
+
$this->_redirect('adminhtml');
|
393 |
+
}
|
394 |
}
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Adminhtml_ReturnsController extends Mage_Adminhtml_Controller_Sales_Shipment
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Adminhtml_ReturnsController extends Mage_Adminhtml_Controller_Sales_Shipment
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Adminhtml_ShipmentController extends TIG_PostNL_Controller_Adminhtml_Shipment
|
@@ -1241,18 +1241,27 @@ class TIG_PostNL_Adminhtml_ShipmentController extends TIG_PostNL_Controller_Admi
|
|
1241 |
|
1242 |
$orderIds = $this->_getOrderIds();
|
1243 |
|
1244 |
-
$this->
|
1245 |
-
$this->_createShipments($orderIds);
|
1246 |
|
1247 |
/**
|
1248 |
* Add either a success or failure message and redirect the user accordingly.
|
1249 |
*/
|
1250 |
-
if ($this->
|
1251 |
$helper->addSessionMessage(
|
1252 |
'adminhtml/session', null, 'success',
|
1253 |
$this->__('The shipments were successfully created.')
|
1254 |
);
|
1255 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1256 |
$this->_redirect('adminhtml/sales_shipment/index');
|
1257 |
} else {
|
1258 |
$helper->addSessionMessage(
|
@@ -1396,14 +1405,12 @@ class TIG_PostNL_Adminhtml_ShipmentController extends TIG_PostNL_Controller_Admi
|
|
1396 |
)
|
1397 |
);
|
1398 |
|
1399 |
-
$this->
|
1400 |
-
|
1401 |
-
$shipmentIds = $this->_createShipments($orderIds, true);
|
1402 |
|
1403 |
/**
|
1404 |
* Add either a success or failure message and redirect the user accordingly.
|
1405 |
*/
|
1406 |
-
if ($this->
|
1407 |
$existingShipmentsLoaded = Mage::registry('postnl_existing_shipments_loaded');
|
1408 |
if (!is_array($existingShipmentsLoaded) || count($existingShipmentsLoaded) != count($shipmentIds)) {
|
1409 |
$helper->addSessionMessage(
|
@@ -1411,6 +1418,16 @@ class TIG_PostNL_Adminhtml_ShipmentController extends TIG_PostNL_Controller_Admi
|
|
1411 |
$this->__('The shipments were successfully created.')
|
1412 |
);
|
1413 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1414 |
} else {
|
1415 |
$helper->addSessionMessage(
|
1416 |
'adminhtml/session',
|
@@ -1523,6 +1540,11 @@ class TIG_PostNL_Adminhtml_ShipmentController extends TIG_PostNL_Controller_Admi
|
|
1523 |
);
|
1524 |
}
|
1525 |
|
|
|
|
|
|
|
|
|
|
|
1526 |
/**
|
1527 |
* Load the shipments and check if they are valid
|
1528 |
*/
|
@@ -1545,7 +1567,7 @@ class TIG_PostNL_Adminhtml_ShipmentController extends TIG_PostNL_Controller_Admi
|
|
1545 |
Mage::helper('postnl/cif')->parseCifException($e);
|
1546 |
|
1547 |
$helper->logException($e);
|
1548 |
-
$this->addWarning(
|
1549 |
array(
|
1550 |
'entity_id' => $shipment->getShipmentIncrementId(),
|
1551 |
'code' => $e->getCode(),
|
@@ -1554,7 +1576,7 @@ class TIG_PostNL_Adminhtml_ShipmentController extends TIG_PostNL_Controller_Admi
|
|
1554 |
);
|
1555 |
} catch (TIG_PostNL_Exception $e) {
|
1556 |
$helper->logException($e);
|
1557 |
-
$this->addWarning(
|
1558 |
array(
|
1559 |
'entity_id' => $shipment->getShipmentIncrementId(),
|
1560 |
'code' => $e->getCode(),
|
@@ -1563,7 +1585,7 @@ class TIG_PostNL_Adminhtml_ShipmentController extends TIG_PostNL_Controller_Admi
|
|
1563 |
);
|
1564 |
} catch (Exception $e) {
|
1565 |
$helper->logException($e);
|
1566 |
-
$this->addWarning(
|
1567 |
array(
|
1568 |
'entity_id' => $shipment->getShipmentIncrementId(),
|
1569 |
'code' => null,
|
@@ -1659,56 +1681,49 @@ class TIG_PostNL_Adminhtml_ShipmentController extends TIG_PostNL_Controller_Admi
|
|
1659 |
);
|
1660 |
}
|
1661 |
|
1662 |
-
/**
|
1663 |
-
* Load the shipments and check if they are valid
|
1664 |
-
*/
|
1665 |
-
$shipments = $this->_loadAndCheckShipments($shipmentIds, true, false);
|
1666 |
-
|
1667 |
/**
|
1668 |
* Get the labels from CIF.
|
1669 |
*
|
1670 |
* @var TIG_PostNL_Model_Core_Shipment $shipment
|
1671 |
*/
|
1672 |
$output = false;
|
1673 |
-
|
1674 |
-
|
1675 |
-
|
1676 |
-
|
1677 |
-
|
1678 |
-
|
1679 |
-
|
1680 |
-
|
1681 |
-
|
1682 |
-
|
1683 |
-
|
1684 |
-
|
1685 |
-
|
1686 |
-
|
1687 |
-
|
1688 |
-
|
1689 |
-
|
1690 |
-
|
1691 |
-
|
1692 |
-
|
1693 |
-
|
1694 |
-
|
1695 |
-
|
1696 |
-
|
1697 |
-
|
1698 |
-
|
1699 |
-
|
1700 |
-
|
1701 |
-
|
1702 |
-
|
1703 |
-
|
1704 |
-
|
1705 |
-
|
1706 |
-
|
1707 |
-
|
1708 |
-
|
1709 |
-
|
1710 |
-
);
|
1711 |
-
}
|
1712 |
}
|
1713 |
|
1714 |
/**
|
@@ -1787,6 +1802,11 @@ class TIG_PostNL_Adminhtml_ShipmentController extends TIG_PostNL_Controller_Admi
|
|
1787 |
);
|
1788 |
}
|
1789 |
|
|
|
|
|
|
|
|
|
|
|
1790 |
/**
|
1791 |
* Load the shipments and check if they are valid.
|
1792 |
*/
|
@@ -1807,7 +1827,7 @@ class TIG_PostNL_Adminhtml_ShipmentController extends TIG_PostNL_Controller_Admi
|
|
1807 |
$labels = array_merge($labels, $shipmentLabels);
|
1808 |
} catch (TIG_PostNL_Exception $e) {
|
1809 |
$helper->logException($e);
|
1810 |
-
$this->addWarning(
|
1811 |
array(
|
1812 |
'entity_id' => $shipment->getShipmentIncrementId(),
|
1813 |
'code' => $e->getCode(),
|
@@ -1816,7 +1836,7 @@ class TIG_PostNL_Adminhtml_ShipmentController extends TIG_PostNL_Controller_Admi
|
|
1816 |
);
|
1817 |
} catch (Exception $e) {
|
1818 |
$helper->logException($e);
|
1819 |
-
$this->addWarning(
|
1820 |
array(
|
1821 |
'entity_id' => $shipment->getShipmentIncrementId(),
|
1822 |
'code' => null,
|
@@ -1999,7 +2019,7 @@ class TIG_PostNL_Adminhtml_ShipmentController extends TIG_PostNL_Controller_Admi
|
|
1999 |
Mage::helper('postnl/cif')->parseCifException($e);
|
2000 |
|
2001 |
$helper->logException($e);
|
2002 |
-
$this->addWarning(
|
2003 |
array(
|
2004 |
'entity_id' => $shipment->getShipmentIncrementId(),
|
2005 |
'code' => $e->getCode(),
|
@@ -2008,7 +2028,7 @@ class TIG_PostNL_Adminhtml_ShipmentController extends TIG_PostNL_Controller_Admi
|
|
2008 |
);
|
2009 |
} catch (TIG_PostNL_Exception $e) {
|
2010 |
$helper->logException($e);
|
2011 |
-
$this->addWarning(
|
2012 |
array(
|
2013 |
'entity_id' => $shipment->getShipmentIncrementId(),
|
2014 |
'code' => $e->getCode(),
|
@@ -2017,7 +2037,7 @@ class TIG_PostNL_Adminhtml_ShipmentController extends TIG_PostNL_Controller_Admi
|
|
2017 |
);
|
2018 |
} catch (Exception $e) {
|
2019 |
$helper->logException($e);
|
2020 |
-
$this->addWarning(
|
2021 |
array(
|
2022 |
'entity_id' => $shipment->getShipmentIncrementId(),
|
2023 |
'code' => null,
|
@@ -2115,7 +2135,7 @@ class TIG_PostNL_Adminhtml_ShipmentController extends TIG_PostNL_Controller_Admi
|
|
2115 |
Mage::helper('postnl/cif')->parseCifException($e);
|
2116 |
|
2117 |
$helper->logException($e);
|
2118 |
-
$this->addWarning(
|
2119 |
array(
|
2120 |
'entity_id' => $shipment->getShipmentIncrementId(),
|
2121 |
'code' => $e->getCode(),
|
@@ -2125,7 +2145,7 @@ class TIG_PostNL_Adminhtml_ShipmentController extends TIG_PostNL_Controller_Admi
|
|
2125 |
$errors++;
|
2126 |
} catch (TIG_PostNL_Exception $e) {
|
2127 |
$helper->logException($e);
|
2128 |
-
$this->addWarning(
|
2129 |
array(
|
2130 |
'entity_id' => $shipment->getShipmentIncrementId(),
|
2131 |
'code' => $e->getCode(),
|
@@ -2135,7 +2155,7 @@ class TIG_PostNL_Adminhtml_ShipmentController extends TIG_PostNL_Controller_Admi
|
|
2135 |
$errors++;
|
2136 |
} catch (Exception $e) {
|
2137 |
$helper->logException($e);
|
2138 |
-
$this->addWarning(
|
2139 |
array(
|
2140 |
'entity_id' => $shipment->getShipmentIncrementId(),
|
2141 |
'code' => null,
|
@@ -2270,7 +2290,7 @@ class TIG_PostNL_Adminhtml_ShipmentController extends TIG_PostNL_Controller_Admi
|
|
2270 |
Mage::helper('postnl/cif')->parseCifException($e);
|
2271 |
|
2272 |
$helper->logException($e);
|
2273 |
-
$this->addWarning(
|
2274 |
array(
|
2275 |
'entity_id' => $shipment->getShipmentIncrementId(),
|
2276 |
'code' => $e->getCode(),
|
@@ -2280,7 +2300,7 @@ class TIG_PostNL_Adminhtml_ShipmentController extends TIG_PostNL_Controller_Admi
|
|
2280 |
$errors++;
|
2281 |
} catch (TIG_PostNL_Exception $e) {
|
2282 |
$helper->logException($e);
|
2283 |
-
$this->addWarning(
|
2284 |
array(
|
2285 |
'entity_id' => $shipment->getShipmentIncrementId(),
|
2286 |
'code' => $e->getCode(),
|
@@ -2290,7 +2310,7 @@ class TIG_PostNL_Adminhtml_ShipmentController extends TIG_PostNL_Controller_Admi
|
|
2290 |
$errors++;
|
2291 |
} catch (Exception $e) {
|
2292 |
$helper->logException($e);
|
2293 |
-
$this->addWarning(
|
2294 |
array(
|
2295 |
'entity_id' => $shipment->getShipmentIncrementId(),
|
2296 |
'code' => null,
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_Adminhtml_ShipmentController extends TIG_PostNL_Controller_Adminhtml_Shipment
|
1241 |
|
1242 |
$orderIds = $this->_getOrderIds();
|
1243 |
|
1244 |
+
$shipmentIds = $this->getServiceModel()->createShipments($orderIds, true);
|
|
|
1245 |
|
1246 |
/**
|
1247 |
* Add either a success or failure message and redirect the user accordingly.
|
1248 |
*/
|
1249 |
+
if (count($shipmentIds) > 0 && !$this->getServiceModel()->hasWarnings()) {
|
1250 |
$helper->addSessionMessage(
|
1251 |
'adminhtml/session', null, 'success',
|
1252 |
$this->__('The shipments were successfully created.')
|
1253 |
);
|
1254 |
|
1255 |
+
$this->_redirect('adminhtml/sales_shipment/index');
|
1256 |
+
} elseif (count($shipmentIds) > 0) {
|
1257 |
+
$helper->addSessionMessage(
|
1258 |
+
'adminhtml/session', null, 'success',
|
1259 |
+
$this->__(
|
1260 |
+
'The shipments were successfully created, however some warnings may have occurred. Please check' .
|
1261 |
+
' the warnings below.'
|
1262 |
+
)
|
1263 |
+
);
|
1264 |
+
|
1265 |
$this->_redirect('adminhtml/sales_shipment/index');
|
1266 |
} else {
|
1267 |
$helper->addSessionMessage(
|
1405 |
)
|
1406 |
);
|
1407 |
|
1408 |
+
$shipmentIds = $this->getServiceModel()->createShipments($orderIds, true);
|
|
|
|
|
1409 |
|
1410 |
/**
|
1411 |
* Add either a success or failure message and redirect the user accordingly.
|
1412 |
*/
|
1413 |
+
if (count($shipmentIds) > 0 && !$this->getServiceModel()->hasWarnings()) {
|
1414 |
$existingShipmentsLoaded = Mage::registry('postnl_existing_shipments_loaded');
|
1415 |
if (!is_array($existingShipmentsLoaded) || count($existingShipmentsLoaded) != count($shipmentIds)) {
|
1416 |
$helper->addSessionMessage(
|
1418 |
$this->__('The shipments were successfully created.')
|
1419 |
);
|
1420 |
}
|
1421 |
+
} elseif (count($shipmentIds) > 0) {
|
1422 |
+
$helper->addSessionMessage(
|
1423 |
+
'adminhtml/session', null, 'success',
|
1424 |
+
$this->__(
|
1425 |
+
'The shipments were successfully created, however some warnings may have occurred. Please check' .
|
1426 |
+
' the warnings below.'
|
1427 |
+
)
|
1428 |
+
);
|
1429 |
+
|
1430 |
+
$this->_redirect('adminhtml/sales_shipment/index');
|
1431 |
} else {
|
1432 |
$helper->addSessionMessage(
|
1433 |
'adminhtml/session',
|
1540 |
);
|
1541 |
}
|
1542 |
|
1543 |
+
/**
|
1544 |
+
* Printing many labels can take a while, therefore we need to disable the PHP execution time limit.
|
1545 |
+
*/
|
1546 |
+
set_time_limit(0);
|
1547 |
+
|
1548 |
/**
|
1549 |
* Load the shipments and check if they are valid
|
1550 |
*/
|
1567 |
Mage::helper('postnl/cif')->parseCifException($e);
|
1568 |
|
1569 |
$helper->logException($e);
|
1570 |
+
$this->getServiceModel()->addWarning(
|
1571 |
array(
|
1572 |
'entity_id' => $shipment->getShipmentIncrementId(),
|
1573 |
'code' => $e->getCode(),
|
1576 |
);
|
1577 |
} catch (TIG_PostNL_Exception $e) {
|
1578 |
$helper->logException($e);
|
1579 |
+
$this->getServiceModel()->addWarning(
|
1580 |
array(
|
1581 |
'entity_id' => $shipment->getShipmentIncrementId(),
|
1582 |
'code' => $e->getCode(),
|
1585 |
);
|
1586 |
} catch (Exception $e) {
|
1587 |
$helper->logException($e);
|
1588 |
+
$this->getServiceModel()->addWarning(
|
1589 |
array(
|
1590 |
'entity_id' => $shipment->getShipmentIncrementId(),
|
1591 |
'code' => null,
|
1681 |
);
|
1682 |
}
|
1683 |
|
|
|
|
|
|
|
|
|
|
|
1684 |
/**
|
1685 |
* Get the labels from CIF.
|
1686 |
*
|
1687 |
* @var TIG_PostNL_Model_Core_Shipment $shipment
|
1688 |
*/
|
1689 |
$output = false;
|
1690 |
+
try {
|
1691 |
+
/**
|
1692 |
+
* Load the shipments and check if they are valid
|
1693 |
+
*/
|
1694 |
+
$shipments = $this->_loadAndCheckShipments($shipmentIds, true, false);
|
1695 |
+
|
1696 |
+
$output = $this->_getMassPackingSlipsOutput($shipments);
|
1697 |
+
$this->_checkForWarnings();
|
1698 |
+
} catch (TIG_PostNL_Model_Core_Cif_Exception $e) {
|
1699 |
+
Mage::helper('postnl/cif')->parseCifException($e);
|
1700 |
+
|
1701 |
+
$helper->logException($e);
|
1702 |
+
$this->getServiceModel()->addWarning(
|
1703 |
+
array(
|
1704 |
+
'entity_id' => $shipment->getShipmentIncrementId(),
|
1705 |
+
'code' => $e->getCode(),
|
1706 |
+
'description' => $e->getMessage(),
|
1707 |
+
)
|
1708 |
+
);
|
1709 |
+
} catch (TIG_PostNL_Exception $e) {
|
1710 |
+
$helper->logException($e);
|
1711 |
+
$this->getServiceModel()->addWarning(
|
1712 |
+
array(
|
1713 |
+
'entity_id' => $shipment->getShipmentIncrementId(),
|
1714 |
+
'code' => $e->getCode(),
|
1715 |
+
'description' => $e->getMessage(),
|
1716 |
+
)
|
1717 |
+
);
|
1718 |
+
} catch (Exception $e) {
|
1719 |
+
$helper->logException($e);
|
1720 |
+
$this->getServiceModel()->addWarning(
|
1721 |
+
array(
|
1722 |
+
'entity_id' => $shipment->getShipmentIncrementId(),
|
1723 |
+
'code' => null,
|
1724 |
+
'description' => $e->getMessage(),
|
1725 |
+
)
|
1726 |
+
);
|
|
|
|
|
1727 |
}
|
1728 |
|
1729 |
/**
|
1802 |
);
|
1803 |
}
|
1804 |
|
1805 |
+
/**
|
1806 |
+
* Printing many labels can take a while, therefore we need to disable the PHP execution time limit.
|
1807 |
+
*/
|
1808 |
+
set_time_limit(0);
|
1809 |
+
|
1810 |
/**
|
1811 |
* Load the shipments and check if they are valid.
|
1812 |
*/
|
1827 |
$labels = array_merge($labels, $shipmentLabels);
|
1828 |
} catch (TIG_PostNL_Exception $e) {
|
1829 |
$helper->logException($e);
|
1830 |
+
$this->getServiceModel()->addWarning(
|
1831 |
array(
|
1832 |
'entity_id' => $shipment->getShipmentIncrementId(),
|
1833 |
'code' => $e->getCode(),
|
1836 |
);
|
1837 |
} catch (Exception $e) {
|
1838 |
$helper->logException($e);
|
1839 |
+
$this->getServiceModel()->addWarning(
|
1840 |
array(
|
1841 |
'entity_id' => $shipment->getShipmentIncrementId(),
|
1842 |
'code' => null,
|
2019 |
Mage::helper('postnl/cif')->parseCifException($e);
|
2020 |
|
2021 |
$helper->logException($e);
|
2022 |
+
$this->getServiceModel()->addWarning(
|
2023 |
array(
|
2024 |
'entity_id' => $shipment->getShipmentIncrementId(),
|
2025 |
'code' => $e->getCode(),
|
2028 |
);
|
2029 |
} catch (TIG_PostNL_Exception $e) {
|
2030 |
$helper->logException($e);
|
2031 |
+
$this->getServiceModel()->addWarning(
|
2032 |
array(
|
2033 |
'entity_id' => $shipment->getShipmentIncrementId(),
|
2034 |
'code' => $e->getCode(),
|
2037 |
);
|
2038 |
} catch (Exception $e) {
|
2039 |
$helper->logException($e);
|
2040 |
+
$this->getServiceModel()->addWarning(
|
2041 |
array(
|
2042 |
'entity_id' => $shipment->getShipmentIncrementId(),
|
2043 |
'code' => null,
|
2135 |
Mage::helper('postnl/cif')->parseCifException($e);
|
2136 |
|
2137 |
$helper->logException($e);
|
2138 |
+
$this->getServiceModel()->addWarning(
|
2139 |
array(
|
2140 |
'entity_id' => $shipment->getShipmentIncrementId(),
|
2141 |
'code' => $e->getCode(),
|
2145 |
$errors++;
|
2146 |
} catch (TIG_PostNL_Exception $e) {
|
2147 |
$helper->logException($e);
|
2148 |
+
$this->getServiceModel()->addWarning(
|
2149 |
array(
|
2150 |
'entity_id' => $shipment->getShipmentIncrementId(),
|
2151 |
'code' => $e->getCode(),
|
2155 |
$errors++;
|
2156 |
} catch (Exception $e) {
|
2157 |
$helper->logException($e);
|
2158 |
+
$this->getServiceModel()->addWarning(
|
2159 |
array(
|
2160 |
'entity_id' => $shipment->getShipmentIncrementId(),
|
2161 |
'code' => null,
|
2290 |
Mage::helper('postnl/cif')->parseCifException($e);
|
2291 |
|
2292 |
$helper->logException($e);
|
2293 |
+
$this->getServiceModel()->addWarning(
|
2294 |
array(
|
2295 |
'entity_id' => $shipment->getShipmentIncrementId(),
|
2296 |
'code' => $e->getCode(),
|
2300 |
$errors++;
|
2301 |
} catch (TIG_PostNL_Exception $e) {
|
2302 |
$helper->logException($e);
|
2303 |
+
$this->getServiceModel()->addWarning(
|
2304 |
array(
|
2305 |
'entity_id' => $shipment->getShipmentIncrementId(),
|
2306 |
'code' => $e->getCode(),
|
2310 |
$errors++;
|
2311 |
} catch (Exception $e) {
|
2312 |
$helper->logException($e);
|
2313 |
+
$this->getServiceModel()->addWarning(
|
2314 |
array(
|
2315 |
'entity_id' => $shipment->getShipmentIncrementId(),
|
2316 |
'code' => null,
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_CheckoutController extends Mage_Core_Controller_Front_Action
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_CheckoutController extends Mage_Core_Controller_Front_Action
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_DeliveryOptionsController extends Mage_Core_Controller_Front_Action
|
@@ -48,9 +48,8 @@ class TIG_PostNL_DeliveryOptionsController extends Mage_Core_Controller_Front_Ac
|
|
48 |
* Regular expressions to validate various address fields.
|
49 |
*/
|
50 |
const CITY_NAME_REGEX = '#^[a-zA-Z]+(?:(?:\\s+|-)[a-zA-Z]+)*$#';
|
51 |
-
const STREET_NAME_REGEX = "#^[a-zA-Z0-9\s,'
|
52 |
const HOUSENR_EXT_REGEX = "#^[a-zA-Z0-9\s,'-]*$#";
|
53 |
-
const NAME_REGEX = "#^[a-zA-Z0-9\s,'&-]*$#";
|
54 |
|
55 |
/**
|
56 |
* Regular expression to validate dutch phone number.
|
@@ -185,6 +184,8 @@ class TIG_PostNL_DeliveryOptionsController extends Mage_Core_Controller_Front_Ac
|
|
185 |
/**
|
186 |
* Save Extra costs associated with a selected option.
|
187 |
*
|
|
|
|
|
188 |
* @return $this
|
189 |
*/
|
190 |
public function saveOptionCostsAction()
|
@@ -293,13 +294,6 @@ class TIG_PostNL_DeliveryOptionsController extends Mage_Core_Controller_Front_Ac
|
|
293 |
return $this;
|
294 |
}
|
295 |
|
296 |
-
if (!$this->_canUseDeliveryOptions()) {
|
297 |
-
$this->getResponse()
|
298 |
-
->setBody('not_allowed');
|
299 |
-
|
300 |
-
return $this;
|
301 |
-
}
|
302 |
-
|
303 |
$params = $this->getRequest()->getPost();
|
304 |
|
305 |
try {
|
@@ -394,7 +388,7 @@ class TIG_PostNL_DeliveryOptionsController extends Mage_Core_Controller_Front_Ac
|
|
394 |
* Return the result as a json response
|
395 |
*/
|
396 |
$this->getResponse()
|
397 |
-
->setHeader('Content-type', 'application/x-json')
|
398 |
->setBody($timeframes);
|
399 |
|
400 |
return $this;
|
@@ -474,7 +468,7 @@ class TIG_PostNL_DeliveryOptionsController extends Mage_Core_Controller_Front_Ac
|
|
474 |
* Return the result as a json response
|
475 |
*/
|
476 |
$this->getResponse()
|
477 |
-
->setHeader('Content-type', 'application/x-json')
|
478 |
->setBody($locations);
|
479 |
|
480 |
return $this;
|
@@ -915,7 +909,6 @@ class TIG_PostNL_DeliveryOptionsController extends Mage_Core_Controller_Front_Ac
|
|
915 |
$streetValidator = new Zend_Validate_Regex(array('pattern' => self::STREET_NAME_REGEX));
|
916 |
$housenumberValidator = new Zend_Validate_Digits();
|
917 |
$postcodeValidator = new Zend_Validate_PostCode('nl_NL');
|
918 |
-
$nameValidator = new Zend_Validate_Regex(array('pattern' => self::NAME_REGEX));
|
919 |
|
920 |
if (!$cityValidator->isValid($city)) {
|
921 |
throw new TIG_PostNL_Exception(
|
@@ -967,15 +960,11 @@ class TIG_PostNL_DeliveryOptionsController extends Mage_Core_Controller_Front_Ac
|
|
967 |
);
|
968 |
}
|
969 |
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
),
|
976 |
-
'POSTNL-0154'
|
977 |
-
);
|
978 |
-
}
|
979 |
|
980 |
$data = array(
|
981 |
'city' => $city,
|
@@ -1112,7 +1101,8 @@ class TIG_PostNL_DeliveryOptionsController extends Mage_Core_Controller_Front_Ac
|
|
1112 |
);
|
1113 |
}
|
1114 |
} else {
|
1115 |
-
$
|
|
|
1116 |
$deliveryDate->setTimestamp(Mage::getModel('core/date')->timestamp())
|
1117 |
->add(new DateInterval('P1D'));
|
1118 |
$deliveryDate = $deliveryDate->format('d-m-Y');
|
@@ -1171,7 +1161,8 @@ class TIG_PostNL_DeliveryOptionsController extends Mage_Core_Controller_Front_Ac
|
|
1171 |
);
|
1172 |
}
|
1173 |
} else {
|
1174 |
-
$
|
|
|
1175 |
$deliveryDate->setTimestamp(Mage::getModel('core/date')->timestamp())
|
1176 |
->add(new DateInterval('P1D'));
|
1177 |
$deliveryDate = $deliveryDate->format('d-m-Y');
|
@@ -1301,7 +1292,8 @@ class TIG_PostNL_DeliveryOptionsController extends Mage_Core_Controller_Front_Ac
|
|
1301 |
);
|
1302 |
}
|
1303 |
} else {
|
1304 |
-
$
|
|
|
1305 |
$deliveryDate->setTimestamp(Mage::getModel('core/date')->timestamp())
|
1306 |
->add(new DateInterval('P1D'));
|
1307 |
$deliveryDate = $deliveryDate->format('d-m-Y');
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_DeliveryOptionsController extends Mage_Core_Controller_Front_Action
|
48 |
* Regular expressions to validate various address fields.
|
49 |
*/
|
50 |
const CITY_NAME_REGEX = '#^[a-zA-Z]+(?:(?:\\s+|-)[a-zA-Z]+)*$#';
|
51 |
+
const STREET_NAME_REGEX = "#^[a-zA-Z0-9\s,'-.]*$#";
|
52 |
const HOUSENR_EXT_REGEX = "#^[a-zA-Z0-9\s,'-]*$#";
|
|
|
53 |
|
54 |
/**
|
55 |
* Regular expression to validate dutch phone number.
|
184 |
/**
|
185 |
* Save Extra costs associated with a selected option.
|
186 |
*
|
187 |
+
* @deprecated v1.6.0
|
188 |
+
*
|
189 |
* @return $this
|
190 |
*/
|
191 |
public function saveOptionCostsAction()
|
294 |
return $this;
|
295 |
}
|
296 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
297 |
$params = $this->getRequest()->getPost();
|
298 |
|
299 |
try {
|
388 |
* Return the result as a json response
|
389 |
*/
|
390 |
$this->getResponse()
|
391 |
+
->setHeader('Content-type', 'application/x-json', true)
|
392 |
->setBody($timeframes);
|
393 |
|
394 |
return $this;
|
468 |
* Return the result as a json response
|
469 |
*/
|
470 |
$this->getResponse()
|
471 |
+
->setHeader('Content-type', 'application/x-json', true)
|
472 |
->setBody($locations);
|
473 |
|
474 |
return $this;
|
909 |
$streetValidator = new Zend_Validate_Regex(array('pattern' => self::STREET_NAME_REGEX));
|
910 |
$housenumberValidator = new Zend_Validate_Digits();
|
911 |
$postcodeValidator = new Zend_Validate_PostCode('nl_NL');
|
|
|
912 |
|
913 |
if (!$cityValidator->isValid($city)) {
|
914 |
throw new TIG_PostNL_Exception(
|
960 |
);
|
961 |
}
|
962 |
|
963 |
+
/**
|
964 |
+
* Names are essentially impossible to build a regex for. Eventually you will run into a name that the regex
|
965 |
+
* thinks is 'wrong' and you will have offended someone. Better to just strip any tags to prevent XSS attacks.
|
966 |
+
*/
|
967 |
+
$name = Mage::helper('core')->stripTags($name);
|
|
|
|
|
|
|
|
|
968 |
|
969 |
$data = array(
|
970 |
'city' => $city,
|
1101 |
);
|
1102 |
}
|
1103 |
} else {
|
1104 |
+
$timeZone = Mage::helper('postnl')->getStoreTimeZone(Mage::app()->getStore()->getId(), true);
|
1105 |
+
$deliveryDate = new DateTime('now', $timeZone);
|
1106 |
$deliveryDate->setTimestamp(Mage::getModel('core/date')->timestamp())
|
1107 |
->add(new DateInterval('P1D'));
|
1108 |
$deliveryDate = $deliveryDate->format('d-m-Y');
|
1161 |
);
|
1162 |
}
|
1163 |
} else {
|
1164 |
+
$timeZone = Mage::helper('postnl')->getStoreTimeZone(Mage::app()->getStore()->getId(), true);
|
1165 |
+
$deliveryDate = new DateTime('now', $timeZone);
|
1166 |
$deliveryDate->setTimestamp(Mage::getModel('core/date')->timestamp())
|
1167 |
->add(new DateInterval('P1D'));
|
1168 |
$deliveryDate = $deliveryDate->format('d-m-Y');
|
1292 |
);
|
1293 |
}
|
1294 |
} else {
|
1295 |
+
$timeZone = Mage::helper('postnl')->getStoreTimeZone(Mage::app()->getStore()->getId(), true);
|
1296 |
+
$deliveryDate = new DateTime('now', $timeZone);
|
1297 |
$deliveryDate->setTimestamp(Mage::getModel('core/date')->timestamp())
|
1298 |
->add(new DateInterval('P1D'));
|
1299 |
$deliveryDate = $deliveryDate->format('d-m-Y');
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_GuestController extends TIG_PostNL_Controller_Sales
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_GuestController extends TIG_PostNL_Controller_Sales
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_MijnpakketController extends Mage_Core_Controller_Front_Action
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_MijnpakketController extends Mage_Core_Controller_Front_Action
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_OrderController extends TIG_PostNL_Controller_Sales
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
class TIG_PostNL_OrderController extends TIG_PostNL_Controller_Sales
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Model_Resource_Setup $installer
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Model_Resource_Setup $installer
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Model_Resource_Setup $installer
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Model_Resource_Setup $installer
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Model_Resource_Setup $installer
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Model_Resource_Setup $installer
|
@@ -0,0 +1,159 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ___________ __ __
|
4 |
+
* \__ ___/____ _/ |_ _____ | |
|
5 |
+
* | | / _ \\ __\\__ \ | |
|
6 |
+
* | | | |_| || | / __ \_| |__
|
7 |
+
* |____| \____/ |__| (____ /|____/
|
8 |
+
* \/
|
9 |
+
* ___ __ __
|
10 |
+
* | | ____ _/ |_ ____ _______ ____ ____ _/ |_
|
11 |
+
* | | / \\ __\_/ __ \\_ __ \ / \ _/ __ \\ __\
|
12 |
+
* | || | \| | \ ___/ | | \/| | \\ ___/ | |
|
13 |
+
* |___||___| /|__| \_____>|__| |___| / \_____>|__|
|
14 |
+
* \/ \/
|
15 |
+
* ________
|
16 |
+
* / _____/_______ ____ __ __ ______
|
17 |
+
* / \ ___\_ __ \ / _ \ | | \\____ \
|
18 |
+
* \ \_\ \| | \/| |_| || | /| |_| |
|
19 |
+
* \______ /|__| \____/ |____/ | __/
|
20 |
+
* \/ |__|
|
21 |
+
*
|
22 |
+
* NOTICE OF LICENSE
|
23 |
+
*
|
24 |
+
* This source file is subject to the Creative Commons License.
|
25 |
+
* It is available through the world-wide-web at this URL:
|
26 |
+
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
27 |
+
* If you are unable to obtain it through the world-wide-web, please send an email
|
28 |
+
* to servicedesk@tig.nl so we can send you a copy immediately.
|
29 |
+
*
|
30 |
+
* DISCLAIMER
|
31 |
+
*
|
32 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
33 |
+
* versions in the future. If you wish to customize this module for your
|
34 |
+
* needs please contact servicedesk@tig.nl for more information.
|
35 |
+
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
+
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
+
*
|
39 |
+
* @var TIG_PostNL_Model_Resource_Setup $installer
|
40 |
+
*/
|
41 |
+
$installer = $this;
|
42 |
+
|
43 |
+
set_time_limit(0);
|
44 |
+
|
45 |
+
/**
|
46 |
+
* This attribute needs to be updated for simple products.
|
47 |
+
*/
|
48 |
+
$simpleAttributesData = array(
|
49 |
+
'postnl_max_qty_for_buspakje' => 0,
|
50 |
+
);
|
51 |
+
|
52 |
+
/**
|
53 |
+
* These attributes need to be updated for the product types specified below.
|
54 |
+
*/
|
55 |
+
$attributesData = array(
|
56 |
+
'postnl_allow_pakje_gemak' => 1,
|
57 |
+
'postnl_allow_delivery_days' => 1,
|
58 |
+
'postnl_allow_timeframes' => 1,
|
59 |
+
'postnl_allow_pakketautomaat' => 1,
|
60 |
+
'postnl_allow_delivery_options' => 1,
|
61 |
+
);
|
62 |
+
|
63 |
+
$productTypes = array(
|
64 |
+
Mage_Catalog_Model_Product_Type::TYPE_SIMPLE,
|
65 |
+
Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE,
|
66 |
+
Mage_Catalog_Model_Product_Type::TYPE_GROUPED,
|
67 |
+
Mage_Catalog_Model_Product_Type::TYPE_BUNDLE,
|
68 |
+
);
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Matrix rate data.
|
72 |
+
*/
|
73 |
+
$matrixRateData = array(
|
74 |
+
array('NL', '*', '*', '0', '0', '0', 'regular', '5'), // Regular Dutch shipments
|
75 |
+
array('NL', '*', '*', '0', '0', '0', 'letter_box', '2.5'), // Dutch buspakje shipments
|
76 |
+
array('BE', '*', '*', '0', '0', '0', '*', '5'), // Belgian shipments
|
77 |
+
array('BE', '*', '*', '1', '0', '0', '*', '5'),
|
78 |
+
array('BE', '*', '*', '2', '0', '0', '*', '5'),
|
79 |
+
array('BE', '*', '*', '3', '0', '0', '*', '5'),
|
80 |
+
array('BE', '*', '*', '4', '0', '0', '*', '5'),
|
81 |
+
array('BE', '*', '*', '5', '0', '0', '*', '5'),
|
82 |
+
array('BE', '*', '*', '6', '0', '0', '*', '5'),
|
83 |
+
array('BE', '*', '*', '7', '0', '0', '*', '5'),
|
84 |
+
array('BE', '*', '*', '8', '0', '0', '*', '5'),
|
85 |
+
array('BE', '*', '*', '9', '0', '0', '*', '5'),
|
86 |
+
array('BE', '*', '*', '10', '0', '0', '*', '5'),
|
87 |
+
array('BE', '*', '*', '11', '0', '0', '*', '5'),
|
88 |
+
array('BE', '*', '*', '12', '0', '0', '*', '5'),
|
89 |
+
array('BE', '*', '*', '13', '0', '0', '*', '5'),
|
90 |
+
array('BE', '*', '*', '14', '0', '0', '*', '5'),
|
91 |
+
array('BE', '*', '*', '15', '0', '0', '*', '5'),
|
92 |
+
array('BE', '*', '*', '16', '0', '0', '*', '5'),
|
93 |
+
array('BE', '*', '*', '17', '0', '0', '*', '5'),
|
94 |
+
array('BE', '*', '*', '18', '0', '0', '*', '5'),
|
95 |
+
array('BE', '*', '*', '19', '0', '0', '*', '5'),
|
96 |
+
array('BE', '*', '*', '20', '0', '0', '*', '5'),
|
97 |
+
array('BE', '*', '*', '21', '0', '0', '*', '5'),
|
98 |
+
array('BE', '*', '*', '22', '0', '0', '*', '5'),
|
99 |
+
array('BE', '*', '*', '23', '0', '0', '*', '5'),
|
100 |
+
array('BE', '*', '*', '24', '0', '0', '*', '5'),
|
101 |
+
array('BE', '*', '*', '25', '0', '0', '*', '5'),
|
102 |
+
array('BE', '*', '*', '26', '0', '0', '*', '5'),
|
103 |
+
array('BE', '*', '*', '27', '0', '0', '*', '5'),
|
104 |
+
array('BE', '*', '*', '28', '0', '0', '*', '5'),
|
105 |
+
array('BE', '*', '*', '29', '0', '0', '*', '5'),
|
106 |
+
array('DE', '*', '*', '0', '0', '0', '*', '5'), // German shipments
|
107 |
+
array('DE', '*', '*', '1', '0', '0', '*', '5'),
|
108 |
+
array('DE', '*', '*', '2', '0', '0', '*', '5'),
|
109 |
+
array('DE', '*', '*', '3', '0', '0', '*', '5'),
|
110 |
+
array('DE', '*', '*', '4', '0', '0', '*', '5'),
|
111 |
+
array('DE', '*', '*', '5', '0', '0', '*', '5'),
|
112 |
+
array('DE', '*', '*', '6', '0', '0', '*', '5'),
|
113 |
+
array('DE', '*', '*', '7', '0', '0', '*', '5'),
|
114 |
+
array('DE', '*', '*', '8', '0', '0', '*', '5'),
|
115 |
+
array('DE', '*', '*', '9', '0', '0', '*', '5'),
|
116 |
+
array('DE', '*', '*', '10', '0', '0', '*', '5'),
|
117 |
+
array('DE', '*', '*', '11', '0', '0', '*', '5'),
|
118 |
+
array('DE', '*', '*', '12', '0', '0', '*', '5'),
|
119 |
+
array('DE', '*', '*', '13', '0', '0', '*', '5'),
|
120 |
+
array('DE', '*', '*', '14', '0', '0', '*', '5'),
|
121 |
+
array('DE', '*', '*', '15', '0', '0', '*', '5'),
|
122 |
+
array('DE', '*', '*', '16', '0', '0', '*', '5'),
|
123 |
+
array('DE', '*', '*', '17', '0', '0', '*', '5'),
|
124 |
+
array('DE', '*', '*', '18', '0', '0', '*', '5'),
|
125 |
+
array('DE', '*', '*', '19', '0', '0', '*', '5'),
|
126 |
+
array('DE', '*', '*', '20', '0', '0', '*', '5'),
|
127 |
+
array('DE', '*', '*', '21', '0', '0', '*', '5'),
|
128 |
+
array('DE', '*', '*', '22', '0', '0', '*', '5'),
|
129 |
+
array('DE', '*', '*', '23', '0', '0', '*', '5'),
|
130 |
+
array('DE', '*', '*', '24', '0', '0', '*', '5'),
|
131 |
+
array('DE', '*', '*', '25', '0', '0', '*', '5'),
|
132 |
+
array('DE', '*', '*', '26', '0', '0', '*', '5'),
|
133 |
+
array('DE', '*', '*', '27', '0', '0', '*', '5'),
|
134 |
+
array('DE', '*', '*', '28', '0', '0', '*', '5'),
|
135 |
+
array('DE', '*', '*', '29', '0', '0', '*', '5'),
|
136 |
+
array('*', '*', '*', '0', '0', '0', '*', '5'), // GlobalPack shipments
|
137 |
+
);
|
138 |
+
|
139 |
+
$installer->generateShippingStatusCronExpr()
|
140 |
+
->generateUpdateStatisticsCronExpr()
|
141 |
+
->generateReturnStatusCronExpr()
|
142 |
+
->expandSupportTab()
|
143 |
+
->installTestPassword()
|
144 |
+
->installWebshopId()
|
145 |
+
->installPackingSlipItemColumns()
|
146 |
+
->setProductAttributeUpdateCron(
|
147 |
+
array(
|
148 |
+
array(
|
149 |
+
$simpleAttributesData,
|
150 |
+
array(Mage_Catalog_Model_Product_Type::TYPE_SIMPLE),
|
151 |
+
),
|
152 |
+
array(
|
153 |
+
$attributesData,
|
154 |
+
$productTypes,
|
155 |
+
)
|
156 |
+
)
|
157 |
+
)
|
158 |
+
->installMatrixRates($matrixRateData)
|
159 |
+
->clearConfigCache();
|
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ___________ __ __
|
4 |
+
* \__ ___/____ _/ |_ _____ | |
|
5 |
+
* | | / _ \\ __\\__ \ | |
|
6 |
+
* | | | |_| || | / __ \_| |__
|
7 |
+
* |____| \____/ |__| (____ /|____/
|
8 |
+
* \/
|
9 |
+
* ___ __ __
|
10 |
+
* | | ____ _/ |_ ____ _______ ____ ____ _/ |_
|
11 |
+
* | | / \\ __\_/ __ \\_ __ \ / \ _/ __ \\ __\
|
12 |
+
* | || | \| | \ ___/ | | \/| | \\ ___/ | |
|
13 |
+
* |___||___| /|__| \_____>|__| |___| / \_____>|__|
|
14 |
+
* \/ \/
|
15 |
+
* ________
|
16 |
+
* / _____/_______ ____ __ __ ______
|
17 |
+
* / \ ___\_ __ \ / _ \ | | \\____ \
|
18 |
+
* \ \_\ \| | \/| |_| || | /| |_| |
|
19 |
+
* \______ /|__| \____/ |____/ | __/
|
20 |
+
* \/ |__|
|
21 |
+
*
|
22 |
+
* NOTICE OF LICENSE
|
23 |
+
*
|
24 |
+
* This source file is subject to the Creative Commons License.
|
25 |
+
* It is available through the world-wide-web at this URL:
|
26 |
+
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
27 |
+
* If you are unable to obtain it through the world-wide-web, please send an email
|
28 |
+
* to servicedesk@tig.nl so we can send you a copy immediately.
|
29 |
+
*
|
30 |
+
* DISCLAIMER
|
31 |
+
*
|
32 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
33 |
+
* versions in the future. If you wish to customize this module for your
|
34 |
+
* needs please contact servicedesk@tig.nl for more information.
|
35 |
+
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
+
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
+
*/
|
39 |
+
|
40 |
+
/** @var TIG_PostNL_Model_Resource_Setup $this */
|
41 |
+
$installer = $this;
|
42 |
+
|
43 |
+
/** @var TIG_PostNL_Helper_Data $helper */
|
44 |
+
$helper = Mage::helper('postnl');
|
45 |
+
|
46 |
+
// First delete table row
|
47 |
+
$installer->deleteTableRow($installer->getTable('core/resource'), 'code', 'postnl_setup');
|
48 |
+
|
49 |
+
// These are the cronjobs we're going to delete
|
50 |
+
$config = Mage::getConfig();
|
51 |
+
$deleteCronjobs = array(
|
52 |
+
'crontab/jobs/postnl_update_shipping_status/schedule/cron_expr',
|
53 |
+
'crontab/jobs/postnl_update_shipping_status/run/model',
|
54 |
+
'crontab/jobs/postnl_update_statistics/schedule/cron_expr',
|
55 |
+
'crontab/jobs/postnl_update_statistics/run/model',
|
56 |
+
'crontab/jobs/postnl_update_product_attribute/schedule/cron_expr',
|
57 |
+
'crontab/jobs/postnl_update_product_attribute/run/model',
|
58 |
+
'crontab/jobs/postnl_update_return_status/schedule/cron_expr',
|
59 |
+
'crontab/jobs/postnl_update_return_status/run/model',
|
60 |
+
'crontab/jobs/postnl_update_date_time_zone/schedule/cron_expr',
|
61 |
+
'crontab/jobs/postnl_update_date_time_zone/run/model',
|
62 |
+
);
|
63 |
+
// And then we delete them
|
64 |
+
foreach ($deleteCronjobs as $cron) {
|
65 |
+
$config->deleteConfig($cron);
|
66 |
+
}
|
67 |
+
|
68 |
+
// These are the attributes we're going to delete
|
69 |
+
$deleteAttributes = array(
|
70 |
+
'postnl_shipping_duration',
|
71 |
+
'postnl_allow_delivery_options',
|
72 |
+
'postnl_max_qty_for_buspakje',
|
73 |
+
'postnl_allow_delivery_days',
|
74 |
+
'postnl_allow_timeframes',
|
75 |
+
'postnl_allow_pakje_gemak',
|
76 |
+
'postnl_allow_pakketautomaat'
|
77 |
+
);
|
78 |
+
|
79 |
+
// And then we (try to) delete them
|
80 |
+
foreach($deleteAttributes as $attribute){
|
81 |
+
try {
|
82 |
+
$installer->removeAttribute('catalog_product', $attribute);
|
83 |
+
} catch (Mage_Core_Exception $e) {
|
84 |
+
// Log that we couldn't remove the attribute, but do continue
|
85 |
+
$message = $helper->__('PostNL uninstall failed on removing product attribute: %s', $attribute);
|
86 |
+
$helper->log($message, Zend_Log::ERR, null, true, 'TIG_PostNL' . DS . 'TIG_Uninstall_Log.log');
|
87 |
+
}
|
88 |
+
}
|
89 |
+
|
90 |
+
// Load TIG_PostNL.xml file and set active to false
|
91 |
+
$xmlLocation = 'app' . DS . 'etc' . DS . 'modules' . DS . 'TIG_PostNL.xml';
|
92 |
+
|
93 |
+
// Check if the file exists and is writable
|
94 |
+
if (file_exists($xmlLocation)) {
|
95 |
+
// If $xmlLocation is_writable, we can load the XML file, change it and then save it
|
96 |
+
$writable = is_writable($xmlLocation);
|
97 |
+
if ($writable) {
|
98 |
+
// Load the XML
|
99 |
+
$xml = simplexml_load_file($xmlLocation);
|
100 |
+
$xml->modules->TIG_PostNL->active = 'false';
|
101 |
+
// Suppress errors in case of the file not being writable after all (which should not happen)
|
102 |
+
$writable = @file_put_contents($xmlLocation, $xml->asXML());
|
103 |
+
}
|
104 |
+
// If either $writable is false due to is_writable or because file_put_contents failed, we're going to log a message
|
105 |
+
if ($writable === false) {
|
106 |
+
// Log that we really couldn't write the file
|
107 |
+
$message = $helper->__('PostNL uninstall found but could not write to XML file: %s', $xmlLocation);
|
108 |
+
$helper->log($message, Zend_Log::ERR, null, true, 'TIG_PostNL' . DS . 'TIG_Uninstall_Log.log');
|
109 |
+
} else {
|
110 |
+
$message = $helper->__('PostNL has been uninstalled successfully.');
|
111 |
+
$helper->log($message, Zend_Log::NOTICE, null, true, 'TIG_PostNL' . DS . 'TIG_Uninstall_Log.log');
|
112 |
+
}
|
113 |
+
} else {
|
114 |
+
// Log that the file doesn't exist or isn't writable
|
115 |
+
$message = $helper->__('PostNL uninstall could not find or XML file: %s', $xmlLocation);
|
116 |
+
$helper->log($message, Zend_Log::ERR, null, true, 'TIG_PostNL' . DS . 'TIG_Uninstall_Log.log');
|
117 |
+
}
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @deprecated This file has been superseded by the data-upgrade-1.2.2-1.4.0.php file.
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @deprecated This file has been superseded by the data-upgrade-1.2.2-1.4.0.php file.
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
@@ -34,7 +34,7 @@
|
|
34 |
* versions in the future. If you wish to customize this module for your
|
35 |
* needs please contact servicedesk@tig.nl for more information.
|
36 |
*
|
37 |
-
* @copyright Copyright (c)
|
38 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
39 |
*
|
40 |
* @var TIG_PostNL_Model_Resource_Setup $installer
|
34 |
* versions in the future. If you wish to customize this module for your
|
35 |
* needs please contact servicedesk@tig.nl for more information.
|
36 |
*
|
37 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
38 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
39 |
*
|
40 |
* @var TIG_PostNL_Model_Resource_Setup $installer
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ___________ __ __
|
4 |
+
* \__ ___/____ _/ |_ _____ | |
|
5 |
+
* | | / _ \\ __\\__ \ | |
|
6 |
+
* | | | |_| || | / __ \_| |__
|
7 |
+
* |____| \____/ |__| (____ /|____/
|
8 |
+
* \/
|
9 |
+
* ___ __ __
|
10 |
+
* | | ____ _/ |_ ____ _______ ____ ____ _/ |_
|
11 |
+
* | | / \\ __\_/ __ \\_ __ \ / \ _/ __ \\ __\
|
12 |
+
* | || | \| | \ ___/ | | \/| | \\ ___/ | |
|
13 |
+
* |___||___| /|__| \_____>|__| |___| / \_____>|__|
|
14 |
+
* \/ \/
|
15 |
+
* ________
|
16 |
+
* / _____/_______ ____ __ __ ______
|
17 |
+
* / \ ___\_ __ \ / _ \ | | \\____ \
|
18 |
+
* \ \_\ \| | \/| |_| || | /| |_| |
|
19 |
+
* \______ /|__| \____/ |____/ | __/
|
20 |
+
* \/ |__|
|
21 |
+
*
|
22 |
+
* NOTICE OF LICENSE
|
23 |
+
*
|
24 |
+
* This source file is subject to the Creative Commons License.
|
25 |
+
* It is available through the world-wide-web at this URL:
|
26 |
+
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
27 |
+
* If you are unable to obtain it through the world-wide-web, please send an email
|
28 |
+
* to servicedesk@tig.nl so we can send you a copy immediately.
|
29 |
+
*
|
30 |
+
* DISCLAIMER
|
31 |
+
*
|
32 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
33 |
+
* versions in the future. If you wish to customize this module for your
|
34 |
+
* needs please contact servicedesk@tig.nl for more information.
|
35 |
+
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
+
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
+
*/
|
39 |
+
|
40 |
+
/**
|
41 |
+
* @var TIG_PostNL_Model_Resource_Setup $installer
|
42 |
+
*/
|
43 |
+
$installer = $this;
|
44 |
+
|
45 |
+
$installer->moveDeliveryOptionsStockSetting()
|
46 |
+
->clearConfigCache();
|
@@ -34,7 +34,7 @@
|
|
34 |
* versions in the future. If you wish to customize this module for your
|
35 |
* needs please contact servicedesk@tig.nl for more information.
|
36 |
*
|
37 |
-
* @copyright Copyright (c)
|
38 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
39 |
*/
|
40 |
-->
|
@@ -54,27 +54,27 @@
|
|
54 |
</sales>
|
55 |
</menu>
|
56 |
<acl>
|
57 |
-
|
58 |
<admin>
|
59 |
-
|
60 |
<system>
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
<children>
|
68 |
<download_logs translate="title" module="postnl">
|
69 |
<title>Download PostNL log files</title>
|
70 |
<sort_order>10</sort_order>
|
71 |
</download_logs>
|
72 |
</children>
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
<postnl translate="title" module="postnl">
|
79 |
<title>PostNL</title>
|
80 |
<children>
|
@@ -165,8 +165,8 @@
|
|
165 |
</postnl_returns>
|
166 |
</children>
|
167 |
</sales>
|
168 |
-
|
169 |
-
|
170 |
</resources>
|
171 |
</acl>
|
172 |
</config>
|
34 |
* versions in the future. If you wish to customize this module for your
|
35 |
* needs please contact servicedesk@tig.nl for more information.
|
36 |
*
|
37 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
38 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
39 |
*/
|
40 |
-->
|
54 |
</sales>
|
55 |
</menu>
|
56 |
<acl>
|
57 |
+
<resources>
|
58 |
<admin>
|
59 |
+
<children>
|
60 |
<system>
|
61 |
+
<children>
|
62 |
+
<config>
|
63 |
+
<children>
|
64 |
+
<postnl translate="title" module="postnl">
|
65 |
+
<title>PostNL</title>
|
66 |
+
<sort_order>330</sort_order>
|
67 |
<children>
|
68 |
<download_logs translate="title" module="postnl">
|
69 |
<title>Download PostNL log files</title>
|
70 |
<sort_order>10</sort_order>
|
71 |
</download_logs>
|
72 |
</children>
|
73 |
+
</postnl>
|
74 |
+
</children>
|
75 |
+
</config>
|
76 |
+
</children>
|
77 |
+
</system>
|
78 |
<postnl translate="title" module="postnl">
|
79 |
<title>PostNL</title>
|
80 |
<children>
|
165 |
</postnl_returns>
|
166 |
</children>
|
167 |
</sales>
|
168 |
+
</children>
|
169 |
+
</admin>
|
170 |
</resources>
|
171 |
</acl>
|
172 |
</config>
|
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* ___________ __ __
|
5 |
+
* \__ ___/____ _/ |_ _____ | |
|
6 |
+
* | | / _ \\ __\\__ \ | |
|
7 |
+
* | | | |_| || | / __ \_| |__
|
8 |
+
* |____| \____/ |__| (____ /|____/
|
9 |
+
* \/
|
10 |
+
* ___ __ __
|
11 |
+
* | | ____ _/ |_ ____ _______ ____ ____ _/ |_
|
12 |
+
* | | / \\ __\_/ __ \\_ __ \ / \ _/ __ \\ __\
|
13 |
+
* | || | \| | \ ___/ | | \/| | \\ ___/ | |
|
14 |
+
* |___||___| /|__| \_____>|__| |___| / \_____>|__|
|
15 |
+
* \/ \/
|
16 |
+
* ________
|
17 |
+
* / _____/_______ ____ __ __ ______
|
18 |
+
* / \ ___\_ __ \ / _ \ | | \\____ \
|
19 |
+
* \ \_\ \| | \/| |_| || | /| |_| |
|
20 |
+
* \______ /|__| \____/ |____/ | __/
|
21 |
+
* \/ |__|
|
22 |
+
*
|
23 |
+
* NOTICE OF LICENSE
|
24 |
+
*
|
25 |
+
* This source file is subject to the Creative Commons License.
|
26 |
+
* It is available through the world-wide-web at this URL:
|
27 |
+
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
28 |
+
* If you are unable to obtain it through the world-wide-web, please send an email
|
29 |
+
* to servicedesk@tig.nl so we can send you a copy immediately.
|
30 |
+
*
|
31 |
+
* DISCLAIMER
|
32 |
+
*
|
33 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
34 |
+
* versions in the future. If you wish to customize this module for your
|
35 |
+
* needs please contact servicedesk@tig.nl for more information.
|
36 |
+
*
|
37 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
38 |
+
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
39 |
+
*/
|
40 |
+
-->
|
41 |
+
<config>
|
42 |
+
<api>
|
43 |
+
<resources>
|
44 |
+
<postnl translate="title" module="postnl">
|
45 |
+
<title>PostNL Resource</title>
|
46 |
+
<acl>postnl</acl>
|
47 |
+
<model>postnl_core/api</model>
|
48 |
+
<methods>
|
49 |
+
<createShipments translate="title" module="postnl">
|
50 |
+
<title>Create PostNL Shipments</title>
|
51 |
+
<acl>postnl/order/create_shipments</acl>
|
52 |
+
<method>createShipments</method>
|
53 |
+
</createShipments>
|
54 |
+
<createShipmentsConfirmAndPrintLabels translate="title" module="postnl">
|
55 |
+
<title>Create PostNL Shipments, Confirm and Print Shipping Labels</title>
|
56 |
+
<acl>postnl/order/create_shipment_confirm_and_print_labels</acl>
|
57 |
+
<method>fullPostnlFlow</method>
|
58 |
+
</createShipmentsConfirmAndPrintLabels>
|
59 |
+
<confirmShipments translate="title" module="postnl">
|
60 |
+
<title>Confirm PostNL Shipments</title>
|
61 |
+
<acl>postnl/shipment/confirm</acl>
|
62 |
+
<method>confirmShipments</method>
|
63 |
+
</confirmShipments>
|
64 |
+
<printShippingLabels translate="title" module="postnl">
|
65 |
+
<title>Print PostNL Shipping Labels</title>
|
66 |
+
<acl>postnl/shipment/print_labels</acl>
|
67 |
+
<method>printShippingLabels</method>
|
68 |
+
</printShippingLabels>
|
69 |
+
<confirmAndPrintShippingLabels translate="title" module="postnl">
|
70 |
+
<title>Confirm PostNL Shipments and Print Shipping Labels</title>
|
71 |
+
<acl>postnl/shipment/confirm_and_print_labels</acl>
|
72 |
+
<method>confirmAndPrintShippingLabels</method>
|
73 |
+
</confirmAndPrintShippingLabels>
|
74 |
+
<getTrackAndTraceUrls translate="title" module="postnl">
|
75 |
+
<title>Get PostNL Shipments Track And Trace URLs</title>
|
76 |
+
<acl>postnl/shipment/get_track_and_trace_urls</acl>
|
77 |
+
<method>getTrackAndTraceUrls</method>
|
78 |
+
</getTrackAndTraceUrls>
|
79 |
+
<getStatusInfo translate="title" module="postnl">
|
80 |
+
<title>Get PostNL Shipments Shipping Status Info</title>
|
81 |
+
<acl>postnl/shipment/get_status_info</acl>
|
82 |
+
<method>getStatusInfo</method>
|
83 |
+
</getStatusInfo>
|
84 |
+
</methods>
|
85 |
+
<faults module="postnl">
|
86 |
+
<POSTNL-0226>
|
87 |
+
<code>POSTNL-0226</code>
|
88 |
+
<message>Only A4 or A6 are valid values for the 'labelSize' parameter.</message>
|
89 |
+
</POSTNL-0226>
|
90 |
+
<POSTNL-0227>
|
91 |
+
<code>POSTNL-0227</code>
|
92 |
+
<message>The 'labelStartPosition' parameter must contain an integer value between 1 and 4.</message>
|
93 |
+
</POSTNL-0227>
|
94 |
+
<POSTNL-0228>
|
95 |
+
<code>POSTNL-0228</code>
|
96 |
+
<message>The 'orderIds' parameter must contain a non-empty array of order IDs.</message>
|
97 |
+
</POSTNL-0228>
|
98 |
+
<POSTNL-0229>
|
99 |
+
<code>POSTNL-0229</code>
|
100 |
+
<message>The 'shipmentIds' parameter must contain a non-empty array of shipment IDs.</message>
|
101 |
+
</POSTNL-0229>
|
102 |
+
</faults>
|
103 |
+
</postnl>
|
104 |
+
</resources>
|
105 |
+
|
106 |
+
<v2>
|
107 |
+
<resources_function_prefix>
|
108 |
+
<postnl>postnl</postnl>
|
109 |
+
</resources_function_prefix>
|
110 |
+
</v2>
|
111 |
+
|
112 |
+
<acl>
|
113 |
+
<resources>
|
114 |
+
<postnl translate="title" module="postnl">
|
115 |
+
<title>PostNL</title>
|
116 |
+
<sort_order>2</sort_order>
|
117 |
+
<order translate="title" module="postnl">
|
118 |
+
<title>Order</title>
|
119 |
+
<sort_order>10</sort_order>
|
120 |
+
<create_shipments translate="title" module="postnl">
|
121 |
+
<title>Create PostNL Shipments</title>
|
122 |
+
<sort_order>10</sort_order>
|
123 |
+
</create_shipments>
|
124 |
+
<create_shipment_confirm_and_print_labels translate="title" module="postnl">
|
125 |
+
<title>Create PostNL Shipments, Confirm and Print Labels</title>
|
126 |
+
<sort_order>20</sort_order>
|
127 |
+
</create_shipment_confirm_and_print_labels>
|
128 |
+
</order>
|
129 |
+
<shipment translate="title" module="postnl">
|
130 |
+
<title>Shipment</title>
|
131 |
+
<sort_order>10</sort_order>
|
132 |
+
<confirm translate="title" module="postnl">
|
133 |
+
<title>Confirm Shipment</title>
|
134 |
+
<sort_order>10</sort_order>
|
135 |
+
</confirm>
|
136 |
+
<print_labels translate="title" module="postnl">
|
137 |
+
<title>Print Shipping Labels</title>
|
138 |
+
<sort_order>20</sort_order>
|
139 |
+
</print_labels>
|
140 |
+
<confirm_and_print_labels translate="title" module="postnl">
|
141 |
+
<title>Confirm Shipment and Print Shipping Labels</title>
|
142 |
+
<sort_order>30</sort_order>
|
143 |
+
</confirm_and_print_labels>
|
144 |
+
<get_track_and_trace_urls translate="title" module="postnl">
|
145 |
+
<title>Get Track and Trace URLs</title>
|
146 |
+
<sort_order>40</sort_order>
|
147 |
+
</get_track_and_trace_urls>
|
148 |
+
<get_status_info translate="title" module="postnl">
|
149 |
+
<title>Get Shipping Status</title>
|
150 |
+
<sort_order>50</sort_order>
|
151 |
+
</get_status_info>
|
152 |
+
</shipment>
|
153 |
+
</postnl>
|
154 |
+
</resources>
|
155 |
+
</acl>
|
156 |
+
</api>
|
157 |
+
</config>
|
@@ -34,16 +34,16 @@
|
|
34 |
* versions in the future. If you wish to customize this module for your
|
35 |
* needs please contact servicedesk@tig.nl for more information.
|
36 |
*
|
37 |
-
* @copyright Copyright (c)
|
38 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
39 |
*/
|
40 |
-->
|
41 |
<config>
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
|
48 |
<global>
|
49 |
<blocks>
|
@@ -69,12 +69,15 @@
|
|
69 |
<postnl_payment>
|
70 |
<class>TIG_PostNL_Block_Payment</class>
|
71 |
</postnl_payment>
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
|
|
|
|
|
|
78 |
<models>
|
79 |
<!-- Model definitions per submodule -->
|
80 |
<postnl>
|
@@ -385,13 +388,13 @@
|
|
385 |
</admin>
|
386 |
|
387 |
<adminhtml>
|
388 |
-
|
389 |
<updates>
|
390 |
<postnl>
|
391 |
<file>TIG/postnl.xml</file>
|
392 |
</postnl>
|
393 |
-
|
394 |
-
|
395 |
<translate>
|
396 |
<modules>
|
397 |
<TIG_PostNL>
|
@@ -401,29 +404,29 @@
|
|
401 |
</TIG_PostNL>
|
402 |
</modules>
|
403 |
</translate>
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
<postnl_adminhtml_ordergrid>
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
<!-- Adds new columns to the shipment grid and allows these columns to be filtered and sorted properly -->
|
414 |
<postnl_adminhtml_shipmentgrid>
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
<!-- Adds a new print shipping label button to the shipment view page -->
|
420 |
<postnl_adminhtml_shipmentview>
|
421 |
<type>singleton</type>
|
422 |
<class>postnl_adminhtml/observer_shipmentView</class>
|
423 |
<method>addPrintLabelButton</method>
|
424 |
</postnl_adminhtml_shipmentview>
|
425 |
-
|
426 |
-
|
427 |
<postnl_shipment_confirm_after>
|
428 |
<observers>
|
429 |
<!-- Updates a PostNL Checkout order -->
|
@@ -434,7 +437,7 @@
|
|
434 |
</postnl_checkout_update_order>
|
435 |
</observers>
|
436 |
</postnl_shipment_confirm_after>
|
437 |
-
|
438 |
<observers>
|
439 |
<!-- Registers the product option the user selected on the sales_order_shipment_new page -->
|
440 |
<postnl_core_shipment_save>
|
@@ -443,7 +446,7 @@
|
|
443 |
<method>registerProductOption</method>
|
444 |
</postnl_core_shipment_save>
|
445 |
</observers>
|
446 |
-
|
447 |
<controller_action_postdispatch_postnl_admin>
|
448 |
<observers>
|
449 |
<!-- Admin logging -->
|
@@ -484,7 +487,7 @@
|
|
484 |
</postnl_add_download_log_button>
|
485 |
</observers>
|
486 |
</controller_action_layout_render_before_adminhtml_system_config_edit>
|
487 |
-
|
488 |
</adminhtml>
|
489 |
|
490 |
<frontend>
|
@@ -505,13 +508,13 @@
|
|
505 |
</args>
|
506 |
</postnl>
|
507 |
</routers>
|
508 |
-
|
509 |
<updates>
|
510 |
<postnl>
|
511 |
<file>TIG/postnl.xml</file>
|
512 |
</postnl>
|
513 |
-
|
514 |
-
|
515 |
<translate>
|
516 |
<modules>
|
517 |
<TIG_PostNL>
|
@@ -562,6 +565,16 @@
|
|
562 |
</returns_view_link>
|
563 |
</observers>
|
564 |
</core_block_abstract_to_html_before>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
565 |
<controller_action_postdispatch_checkout_onepage_saveShippingMethod>
|
566 |
<observers>
|
567 |
<!-- Saves selected PostNL options for Onepage checkout. -->
|
@@ -582,18 +595,28 @@
|
|
582 |
</checkout_shipping_method_save_options>
|
583 |
</observers>
|
584 |
</controller_action_predispatch_onestepcheckout_ajax_set_methods_separate>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
585 |
</events>
|
586 |
</frontend>
|
587 |
|
588 |
<crontab>
|
589 |
<jobs>
|
590 |
-
|
591 |
<postnl_clean_temp_labels>
|
592 |
<schedule>
|
593 |
-
|
594 |
</schedule>
|
595 |
<run>
|
596 |
-
|
597 |
</run>
|
598 |
</postnl_clean_temp_labels>
|
599 |
<!-- remove old lock files (by default files older than 1 hour will be deleted) -->
|
@@ -605,13 +628,13 @@
|
|
605 |
<model>postnl_core/observer_cron::cleanOldLocks</model>
|
606 |
</run>
|
607 |
</postnl_clean_old_locks>
|
608 |
-
|
609 |
<postnl_get_missing_barcodes>
|
610 |
<schedule>
|
611 |
-
|
612 |
</schedule>
|
613 |
<run>
|
614 |
-
|
615 |
</run>
|
616 |
</postnl_get_missing_barcodes>
|
617 |
<!-- Update the shipping status for all undelivered PostNL shipments -->
|
@@ -620,8 +643,8 @@
|
|
620 |
<cron_expr>30 3,11,15 * * *</cron_expr> <!-- This schedule will be overwritten by a semi-random cron expression that is generated when the extension is first installed. It's stored in the core_config_data table. -->
|
621 |
</schedule>
|
622 |
<run>
|
623 |
-
|
624 |
-
|
625 |
</postnl_update_shipping_status>
|
626 |
<!-- Update the return status for all undelivered PostNL shipments -->
|
627 |
<postnl_update_return_status>
|
@@ -629,8 +652,8 @@
|
|
629 |
<cron_expr>30 2,10,18 * * *</cron_expr> <!-- This schedule will be overwritten by a semi-random cron expression that is generated when the extension is first installed. It's stored in the core_config_data table. -->
|
630 |
</schedule>
|
631 |
<run>
|
632 |
-
|
633 |
-
|
634 |
</postnl_update_return_status>
|
635 |
<!-- Expire confirmations of shipments that have been confirmed, but have not been shipped within the maximum number of days -->
|
636 |
<postnl_expire_confirmation>
|
@@ -769,20 +792,20 @@
|
|
769 |
<handling_fee/>
|
770 |
<specificerrmsg>This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.</specificerrmsg> <!-- Method not available message -->
|
771 |
<sallowspecific>1</sallowspecific> <!-- Allow only specific countries -->
|
772 |
-
<specificcountry>NL,BE,BG,DK,DE,EE,FI,FR,GB,HU,IE,IT,LV,LT,LU,AT,PL,PT,RO,SI,SK,ES,CZ,SE</specificcountry> <!-- Allow the Netherlands and all EPS countries -->
|
773 |
<showmethod>0</showmethod> <!-- Do not show the shipping method if unavailable -->
|
774 |
<sort_order>0</sort_order> <!-- First method shown -->
|
775 |
<model>postnl_carrier/postnl</model> <!-- TIG_PostNL_Model_Carrier_Postnl -->
|
776 |
</postnl>
|
777 |
</carriers>
|
778 |
<postnl>
|
779 |
-
|
780 |
-
|
781 |
<unique_key/>
|
782 |
-
|
783 |
-
|
784 |
<webservice_wsdl_url>http://api.tigpostnl.nl/soap?wsdl</webservice_wsdl_url> <!-- URL of the TIG extension control system that is used for activating the extension -->
|
785 |
-
|
786 |
<postnl_register_url>http://www.postnl.nl/zakelijk/e-commerce/flexibele-bezorgopties</postnl_register_url> <!-- URL where new PostNL customers can register -->
|
787 |
<knowledgebase_url>http://kb.tig.nl</knowledgebase_url> <!-- URL of the TIG knowledgebase -->
|
788 |
<new_ticket_url>http://kb.tig.nl/ticket/form/new</new_ticket_url> <!-- URL where merchants can submit a support ticket -->
|
@@ -843,7 +866,7 @@
|
|
843 |
<delivery_options_active>0</delivery_options_active> <!-- Delivery options are disabled -->
|
844 |
<theme>default</theme> <!-- Use the default PostNL theme -->
|
845 |
<responsive>0</responsive> <!-- Do not use the responsive design -->
|
846 |
-
<
|
847 |
<enable_delivery_days>1</enable_delivery_days> <!-- Delivery days are allowed -->
|
848 |
<delivery_days_number>7</delivery_days_number> <!-- Show up to 7 delivery days -->
|
849 |
<enable_timeframes>1</enable_timeframes> <!-- Timeframes are allowed -->
|
@@ -878,26 +901,26 @@
|
|
878 |
<mijnpakket_login_btn_url_path>Button/PremiumLogin</mijnpakket_login_btn_url_path> <!-- Path to MijnPakket login button -->
|
879 |
<default_pakketautomaat_product_option>3553</default_pakketautomaat_product_option> <!-- Parcel dispenser -->
|
880 |
</delivery_options>
|
881 |
-
|
882 |
<mode>0</mode> <!-- The extension is disabled by default -->
|
883 |
<customer_number>11223344</customer_number> <!-- Demo customer number -->
|
884 |
-
|
885 |
<live_username/>
|
886 |
<live_password/>
|
887 |
<test_username>Dem0#Magnt01</test_username> <!-- Demo username -->
|
888 |
<test_password/> <!-- The demo password will be generated on install as it needs to be encrypted -->
|
889 |
-
|
890 |
<webshop_id/> <!-- The demo webshop ID will be generated on install as it needs to be encrypted -->
|
891 |
<public_webshop_id>a98e0769d6bf40a8b49d85e7aff41d7a</public_webshop_id> <!-- Demo public webshop ID -->
|
892 |
-
|
893 |
-
|
894 |
<track_and_trace_nl_base_url>https://mijnpakket.postnl.nl/Inbox/Search?</track_and_trace_nl_base_url> <!-- Base URL for the Dutch track & trace page -->
|
895 |
<track_and_trace_int_base_url>https://www.internationalparceltracking.com/Main.aspx#/track</track_and_trace_int_base_url> <!-- Base URL for the international track & trace page -->
|
896 |
</cif>
|
897 |
<packing_slip>
|
898 |
<shipment_reference_type>shipment_increment_id</shipment_reference_type> <!-- Use the shipment's increment ID as the shipment reference -->
|
899 |
<custom_shipment_reference/>
|
900 |
-
<show_label>
|
901 |
<logo/>
|
902 |
<show_webshop_info>1</show_webshop_info> <!-- Show webshop info on the packing slip -->
|
903 |
<coc_number/>
|
@@ -967,35 +990,35 @@
|
|
967 |
<product_sorting_direction>desc</product_sorting_direction> <!-- descending -->
|
968 |
<default_global_product_option>4945</default_global_product_option> <!-- GlobalPack -->
|
969 |
</cif_globalpack_settings>
|
970 |
-
|
971 |
-
|
972 |
<show_exclusively_for_mijnpakket_users>0</show_exclusively_for_mijnpakket_users> <!-- Do not show PostNL Checkout exclusively to MijnPakket users -->
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
<use_mobile>0</use_mobile> <!-- Do not use mobile phonenumbers -->
|
980 |
<use_dob>0</use_dob> <!-- Do not use the date of birth field -->
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
<contact_url/>
|
986 |
-
|
987 |
<checkout_button_test_base_url>https://tppcb-sandbox.e-id.nl/Button/Checkout</checkout_button_test_base_url> <!-- Base URL for PostNl Checkout button in test mode -->
|
988 |
<checkout_button_live_base_url>https://checkout.postnl.nl/Button/Checkout</checkout_button_live_base_url> <!-- Base URL for PostNl Checkout button -->
|
989 |
<test_checkout_js_url>https://tppwscheckout-sandbox.e-id.nl/Checkout2/Scripts/Checkout.js</test_checkout_js_url> <!-- URL for PostNL Checkout JS file in test mode -->
|
990 |
<live_checkout_js_url>https://mijnpakket.postnl.nl/Checkout2/Scripts/Checkout.js</live_checkout_js_url> <!-- URL for PostNL Checkout JS file -->
|
991 |
<test_checkout_premium_js_url>https://tppwscheckout-sandbox.e-id.nl/Checkout2/CheckoutPremium.js</test_checkout_premium_js_url> <!-- URL for PostNL Checkout premium JS file in test mode -->
|
992 |
<live_checkout_premium_js_url>https://mijnpakket.postnl.nl/Checkout2/CheckoutPremium.js</live_checkout_premium_js_url> <!-- URL for PostNL Checkout premium JS file -->
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
<creditcard_method/>
|
1000 |
<creditcard_option_field/>
|
1001 |
<checkpay>0</checkpay> <!-- Do not use Checkpay -->
|
@@ -1018,7 +1041,7 @@
|
|
1018 |
<afterpay_method/>
|
1019 |
<klarna>0</klarna> <!-- Do not use Klarna -->
|
1020 |
<klarna_method/>
|
1021 |
-
|
1022 |
<parcelware_export>
|
1023 |
<active>0</active> <!-- Inactive -->
|
1024 |
<auto_confirm>0</auto_confirm> <!-- Do not auto confirm -->
|
@@ -1026,7 +1049,7 @@
|
|
1026 |
<contract_name/>
|
1027 |
<sender_ref_nr/>
|
1028 |
</parcelware_export>
|
1029 |
-
|
1030 |
<show_grid_options>1</show_grid_options> <!-- Show product options in the order grid -->
|
1031 |
<show_buspakje_option>1</show_buspakje_option> <!-- Show the option to mark a shipment as being a buspakje -->
|
1032 |
<order_grid_columns>shipment_type,confirm_date,confirm_status,shipping_phase</order_grid_columns> <!-- Show the shipment type, confirm date, confirm status and shipping phase columns -->
|
@@ -1045,38 +1068,38 @@
|
|
1045 |
<default_stated_address_only_product_option>3385</default_stated_address_only_product_option> <!-- Deliver to stated address only -->
|
1046 |
<default_eu_product_option>4952</default_eu_product_option> <!-- EU Pack Special to consumer (combilabel) -->
|
1047 |
<default_eu_be_product_option>4955</default_eu_be_product_option> <!-- EU Pack Standard (Belgium only, no signature) (combilabel) -->
|
1048 |
-
|
1049 |
<cif_product_options>
|
1050 |
<allow_eps_be_only_options>0</allow_eps_be_only_options> <!-- Do not allow the EPS BE only product option -->
|
1051 |
</cif_product_options>
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
<return_expire_days>30</return_expire_days> <!-- 17 days -->
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
<cif_version_shippingstatus>1_4</cif_version_shippingstatus> <!-- v1.4 -->
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
<cif_version_checkout>2_2</cif_version_checkout> <!-- v2.2 -->
|
1070 |
<cif_version_deliverydate>1_2</cif_version_deliverydate> <!-- v1.2 -->
|
1071 |
<cif_version_timeframe>1_2</cif_version_timeframe> <!-- v1.2 -->
|
1072 |
<cif_version_location>1_1</cif_version_location> <!-- v1.1 -->
|
1073 |
-
|
1074 |
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
|
1081 |
<!-- Google maps API key. -->
|
1082 |
<google_maps>
|
@@ -1090,7 +1113,7 @@
|
|
1090 |
</postnl>
|
1091 |
</default>
|
1092 |
|
1093 |
-
<!-- Custom
|
1094 |
<tig>
|
1095 |
<!-- Version compatibility per Magento edition as well as PHP version compatibility -->
|
1096 |
<compatibility>
|
@@ -1098,6 +1121,12 @@
|
|
1098 |
<enterprise>1.11,1.12,1.13,1.14</enterprise>
|
1099 |
<community>1.6,1.7,1.8,1.9</community>
|
1100 |
<php>5.3,5.4</php>
|
|
|
|
|
|
|
|
|
|
|
|
|
1101 |
</postnl>
|
1102 |
</compatibility>
|
1103 |
|
@@ -1126,6 +1155,12 @@
|
|
1126 |
<osc>css/TIG/PostNL/deliveryoptions/onestepcheckout_mediaqueries.css</osc>
|
1127 |
</responsive>
|
1128 |
</onestepcheckout>
|
|
|
|
|
|
|
|
|
|
|
|
|
1129 |
</files>
|
1130 |
</default>
|
1131 |
<!-- An unbranded, white, gray and blue theme -->
|
@@ -1146,6 +1181,13 @@
|
|
1146 |
<osc>css/TIG/PostNL/deliveryoptions/onestepcheckout_mediaqueries.css</osc>
|
1147 |
</responsive>
|
1148 |
</onestepcheckout>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1149 |
</files>
|
1150 |
</neutral>
|
1151 |
</themes>
|
@@ -1660,9 +1702,9 @@
|
|
1660 |
<type>notice</type>
|
1661 |
</POSTNL-0101>
|
1662 |
<POSTNL-0102>
|
1663 |
-
<message>One or more items in the cart are out of stock.</message>
|
1664 |
<url>http://kb.tig.nl/topic/31993743</url>
|
1665 |
-
<type>
|
1666 |
</POSTNL-0102>
|
1667 |
<POSTNL-0103>
|
1668 |
<message>PostNL Checkout has been disabled.</message>
|
@@ -2254,6 +2296,56 @@
|
|
2254 |
<url>http://kb.tig.nl/topic/84686768</url>
|
2255 |
<type>error</type>
|
2256 |
</POSTNL-0220>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2257 |
|
2258 |
<!-- These error codes are generated by CIF, not by this extension -->
|
2259 |
<LIRS_0>
|
34 |
* versions in the future. If you wish to customize this module for your
|
35 |
* needs please contact servicedesk@tig.nl for more information.
|
36 |
*
|
37 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
38 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
39 |
*/
|
40 |
-->
|
41 |
<config>
|
42 |
+
<modules>
|
43 |
+
<TIG_PostNL>
|
44 |
+
<version>1.6.0</version>
|
45 |
+
</TIG_PostNL>
|
46 |
+
</modules>
|
47 |
|
48 |
<global>
|
49 |
<blocks>
|
69 |
<postnl_payment>
|
70 |
<class>TIG_PostNL_Block_Payment</class>
|
71 |
</postnl_payment>
|
72 |
+
<postnl_addressvalidation>
|
73 |
+
<class>TIG_PostNL_Block_AddressValidation</class>
|
74 |
+
</postnl_addressvalidation>
|
75 |
+
</blocks>
|
76 |
+
<helpers>
|
77 |
+
<postnl>
|
78 |
+
<class>TIG_PostNL_Helper</class>
|
79 |
+
</postnl>
|
80 |
+
</helpers>
|
81 |
<models>
|
82 |
<!-- Model definitions per submodule -->
|
83 |
<postnl>
|
388 |
</admin>
|
389 |
|
390 |
<adminhtml>
|
391 |
+
<layout>
|
392 |
<updates>
|
393 |
<postnl>
|
394 |
<file>TIG/postnl.xml</file>
|
395 |
</postnl>
|
396 |
+
</updates>
|
397 |
+
</layout>
|
398 |
<translate>
|
399 |
<modules>
|
400 |
<TIG_PostNL>
|
404 |
</TIG_PostNL>
|
405 |
</modules>
|
406 |
</translate>
|
407 |
+
<events>
|
408 |
+
<adminhtml_block_html_before>
|
409 |
+
<observers>
|
410 |
+
<!-- Adds a massaction the grid that allows merchants to create shipments for selected orders-->
|
411 |
<postnl_adminhtml_ordergrid>
|
412 |
+
<type>singleton</type>
|
413 |
+
<class>postnl_adminhtml/observer_orderGrid</class>
|
414 |
+
<method>modifyGrid</method>
|
415 |
+
</postnl_adminhtml_ordergrid>
|
416 |
<!-- Adds new columns to the shipment grid and allows these columns to be filtered and sorted properly -->
|
417 |
<postnl_adminhtml_shipmentgrid>
|
418 |
+
<type>singleton</type>
|
419 |
+
<class>postnl_adminhtml/observer_shipmentGrid</class>
|
420 |
+
<method>modifyGrid</method>
|
421 |
+
</postnl_adminhtml_shipmentgrid>
|
422 |
<!-- Adds a new print shipping label button to the shipment view page -->
|
423 |
<postnl_adminhtml_shipmentview>
|
424 |
<type>singleton</type>
|
425 |
<class>postnl_adminhtml/observer_shipmentView</class>
|
426 |
<method>addPrintLabelButton</method>
|
427 |
</postnl_adminhtml_shipmentview>
|
428 |
+
</observers>
|
429 |
+
</adminhtml_block_html_before>
|
430 |
<postnl_shipment_confirm_after>
|
431 |
<observers>
|
432 |
<!-- Updates a PostNL Checkout order -->
|
437 |
</postnl_checkout_update_order>
|
438 |
</observers>
|
439 |
</postnl_shipment_confirm_after>
|
440 |
+
<controller_action_predispatch_adminhtml_sales_order_shipment_save>
|
441 |
<observers>
|
442 |
<!-- Registers the product option the user selected on the sales_order_shipment_new page -->
|
443 |
<postnl_core_shipment_save>
|
446 |
<method>registerProductOption</method>
|
447 |
</postnl_core_shipment_save>
|
448 |
</observers>
|
449 |
+
</controller_action_predispatch_adminhtml_sales_order_shipment_save>
|
450 |
<controller_action_postdispatch_postnl_admin>
|
451 |
<observers>
|
452 |
<!-- Admin logging -->
|
487 |
</postnl_add_download_log_button>
|
488 |
</observers>
|
489 |
</controller_action_layout_render_before_adminhtml_system_config_edit>
|
490 |
+
</events>
|
491 |
</adminhtml>
|
492 |
|
493 |
<frontend>
|
508 |
</args>
|
509 |
</postnl>
|
510 |
</routers>
|
511 |
+
<layout>
|
512 |
<updates>
|
513 |
<postnl>
|
514 |
<file>TIG/postnl.xml</file>
|
515 |
</postnl>
|
516 |
+
</updates>
|
517 |
+
</layout>
|
518 |
<translate>
|
519 |
<modules>
|
520 |
<TIG_PostNL>
|
565 |
</returns_view_link>
|
566 |
</observers>
|
567 |
</core_block_abstract_to_html_before>
|
568 |
+
<core_block_abstract_to_html_after>
|
569 |
+
<observers>
|
570 |
+
<!-- Fix conflict with Bpost's Shipping Manager extension -->
|
571 |
+
<checkout_deliveryoptions>
|
572 |
+
<type>singleton</type>
|
573 |
+
<class>postnl_deliveryoptions/observer_shippingMethodAvailable</class>
|
574 |
+
<method>fixBpostConflict</method>
|
575 |
+
</checkout_deliveryoptions>
|
576 |
+
</observers>
|
577 |
+
</core_block_abstract_to_html_after>
|
578 |
<controller_action_postdispatch_checkout_onepage_saveShippingMethod>
|
579 |
<observers>
|
580 |
<!-- Saves selected PostNL options for Onepage checkout. -->
|
595 |
</checkout_shipping_method_save_options>
|
596 |
</observers>
|
597 |
</controller_action_predispatch_onestepcheckout_ajax_set_methods_separate>
|
598 |
+
<controller_action_predispatch_gomage_checkout_onepage_ajax>
|
599 |
+
<observers>
|
600 |
+
<!-- Set a registry flag to prevent the PostNL order from being reset. -->
|
601 |
+
<set_registry_flag>
|
602 |
+
<type>model</type>
|
603 |
+
<class>postnl_deliveryoptions/observer_goMage_lightCheckout_ajax</class>
|
604 |
+
<method>setRegistryFlag</method>
|
605 |
+
</set_registry_flag>
|
606 |
+
</observers>
|
607 |
+
</controller_action_predispatch_gomage_checkout_onepage_ajax>
|
608 |
</events>
|
609 |
</frontend>
|
610 |
|
611 |
<crontab>
|
612 |
<jobs>
|
613 |
+
<!-- remove old temporary label files (by default files older than 5 min will be deleted) -->
|
614 |
<postnl_clean_temp_labels>
|
615 |
<schedule>
|
616 |
+
<cron_expr>30 * * * *</cron_expr> <!-- every hour at 30 minutes minutes -->
|
617 |
</schedule>
|
618 |
<run>
|
619 |
+
<model>postnl_core/observer_cron::cleanTempLabels</model>
|
620 |
</run>
|
621 |
</postnl_clean_temp_labels>
|
622 |
<!-- remove old lock files (by default files older than 1 hour will be deleted) -->
|
628 |
<model>postnl_core/observer_cron::cleanOldLocks</model>
|
629 |
</run>
|
630 |
</postnl_clean_old_locks>
|
631 |
+
<!-- get missing barcodes for postnl shipments -->
|
632 |
<postnl_get_missing_barcodes>
|
633 |
<schedule>
|
634 |
+
<cron_expr>*/30 * * * *</cron_expr> <!-- every 30 minutes -->
|
635 |
</schedule>
|
636 |
<run>
|
637 |
+
<model>postnl_core/observer_cron::getBarcodes</model>
|
638 |
</run>
|
639 |
</postnl_get_missing_barcodes>
|
640 |
<!-- Update the shipping status for all undelivered PostNL shipments -->
|
643 |
<cron_expr>30 3,11,15 * * *</cron_expr> <!-- This schedule will be overwritten by a semi-random cron expression that is generated when the extension is first installed. It's stored in the core_config_data table. -->
|
644 |
</schedule>
|
645 |
<run>
|
646 |
+
<model>postnl_core/observer_cron::updateShippingStatus</model>
|
647 |
+
</run>
|
648 |
</postnl_update_shipping_status>
|
649 |
<!-- Update the return status for all undelivered PostNL shipments -->
|
650 |
<postnl_update_return_status>
|
652 |
<cron_expr>30 2,10,18 * * *</cron_expr> <!-- This schedule will be overwritten by a semi-random cron expression that is generated when the extension is first installed. It's stored in the core_config_data table. -->
|
653 |
</schedule>
|
654 |
<run>
|
655 |
+
<model>postnl_core/observer_cron::updateReturnStatus</model>
|
656 |
+
</run>
|
657 |
</postnl_update_return_status>
|
658 |
<!-- Expire confirmations of shipments that have been confirmed, but have not been shipped within the maximum number of days -->
|
659 |
<postnl_expire_confirmation>
|
792 |
<handling_fee/>
|
793 |
<specificerrmsg>This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.</specificerrmsg> <!-- Method not available message -->
|
794 |
<sallowspecific>1</sallowspecific> <!-- Allow only specific countries -->
|
795 |
+
<specificcountry>NL,BE,BG,DK,DE,EE,FI,FR,GB,HU,IE,IT,LV,LT,LU,AT,PL,PT,RO,SI,SK,ES,CZ,SE,MT</specificcountry> <!-- Allow the Netherlands and all EPS countries -->
|
796 |
<showmethod>0</showmethod> <!-- Do not show the shipping method if unavailable -->
|
797 |
<sort_order>0</sort_order> <!-- First method shown -->
|
798 |
<model>postnl_carrier/postnl</model> <!-- TIG_PostNL_Model_Carrier_Postnl -->
|
799 |
</postnl>
|
800 |
</carriers>
|
801 |
<postnl>
|
802 |
+
<general>
|
803 |
+
<email/>
|
804 |
<unique_key/>
|
805 |
+
<private_key/>
|
806 |
+
<is_activated>0</is_activated> <!-- Not activated -->
|
807 |
<webservice_wsdl_url>http://api.tigpostnl.nl/soap?wsdl</webservice_wsdl_url> <!-- URL of the TIG extension control system that is used for activating the extension -->
|
808 |
+
<changelog_url>http://kb.tig.nl/topic/38584893/</changelog_url> <!-- URL of the extension's changelog -->
|
809 |
<postnl_register_url>http://www.postnl.nl/zakelijk/e-commerce/flexibele-bezorgopties</postnl_register_url> <!-- URL where new PostNL customers can register -->
|
810 |
<knowledgebase_url>http://kb.tig.nl</knowledgebase_url> <!-- URL of the TIG knowledgebase -->
|
811 |
<new_ticket_url>http://kb.tig.nl/ticket/form/new</new_ticket_url> <!-- URL where merchants can submit a support ticket -->
|
866 |
<delivery_options_active>0</delivery_options_active> <!-- Delivery options are disabled -->
|
867 |
<theme>default</theme> <!-- Use the default PostNL theme -->
|
868 |
<responsive>0</responsive> <!-- Do not use the responsive design -->
|
869 |
+
<stock_options>in_stock</stock_options> <!-- Do not show delivery options if the order is not in stock -->
|
870 |
<enable_delivery_days>1</enable_delivery_days> <!-- Delivery days are allowed -->
|
871 |
<delivery_days_number>7</delivery_days_number> <!-- Show up to 7 delivery days -->
|
872 |
<enable_timeframes>1</enable_timeframes> <!-- Timeframes are allowed -->
|
901 |
<mijnpakket_login_btn_url_path>Button/PremiumLogin</mijnpakket_login_btn_url_path> <!-- Path to MijnPakket login button -->
|
902 |
<default_pakketautomaat_product_option>3553</default_pakketautomaat_product_option> <!-- Parcel dispenser -->
|
903 |
</delivery_options>
|
904 |
+
<cif>
|
905 |
<mode>0</mode> <!-- The extension is disabled by default -->
|
906 |
<customer_number>11223344</customer_number> <!-- Demo customer number -->
|
907 |
+
<customer_code>TOTA</customer_code> <!-- Demo customer code -->
|
908 |
<live_username/>
|
909 |
<live_password/>
|
910 |
<test_username>Dem0#Magnt01</test_username> <!-- Demo username -->
|
911 |
<test_password/> <!-- The demo password will be generated on install as it needs to be encrypted -->
|
912 |
+
<collection_location>103861</collection_location> <!-- Demo collection location -->
|
913 |
<webshop_id/> <!-- The demo webshop ID will be generated on install as it needs to be encrypted -->
|
914 |
<public_webshop_id>a98e0769d6bf40a8b49d85e7aff41d7a</public_webshop_id> <!-- Demo public webshop ID -->
|
915 |
+
<wsdl_base_url>https://service.postnl.com/CIF/</wsdl_base_url> <!-- Base URL of CIF WSDL files -->
|
916 |
+
<test_wsdl_base_url>https://testservice.postnl.com/CIF_SB/</test_wsdl_base_url> <!-- Base URL of CIF sandbox WSDL files -->
|
917 |
<track_and_trace_nl_base_url>https://mijnpakket.postnl.nl/Inbox/Search?</track_and_trace_nl_base_url> <!-- Base URL for the Dutch track & trace page -->
|
918 |
<track_and_trace_int_base_url>https://www.internationalparceltracking.com/Main.aspx#/track</track_and_trace_int_base_url> <!-- Base URL for the international track & trace page -->
|
919 |
</cif>
|
920 |
<packing_slip>
|
921 |
<shipment_reference_type>shipment_increment_id</shipment_reference_type> <!-- Use the shipment's increment ID as the shipment reference -->
|
922 |
<custom_shipment_reference/>
|
923 |
+
<show_label>together</show_label> <!-- Automatically add the shipping label to the packing slip -->
|
924 |
<logo/>
|
925 |
<show_webshop_info>1</show_webshop_info> <!-- Show webshop info on the packing slip -->
|
926 |
<coc_number/>
|
990 |
<product_sorting_direction>desc</product_sorting_direction> <!-- descending -->
|
991 |
<default_global_product_option>4945</default_global_product_option> <!-- GlobalPack -->
|
992 |
</cif_globalpack_settings>
|
993 |
+
<checkout>
|
994 |
+
<active>0</active> <!-- PostNL Checkout is inactive -->
|
995 |
<show_exclusively_for_mijnpakket_users>0</show_exclusively_for_mijnpakket_users> <!-- Do not show PostNL Checkout exclusively to MijnPakket users -->
|
996 |
+
<instruction_cms_page/>
|
997 |
+
<show_checkout_for_letter>0</show_checkout_for_letter> <!-- Do not show the PostNL Checkout button for orders under 2 kg -->
|
998 |
+
<show_checkout_for_backorders>0</show_checkout_for_backorders> <!-- Do not show the PostNL Checkout button if the order contains out-of-stock products -->
|
999 |
+
<show_summary_page>1</show_summary_page> <!-- Show an order summary page before finalizing the order -->
|
1000 |
+
<newsletter_subscription>0</newsletter_subscription> <!--Do not show the option to subscribe to the webshop's newsletter -->
|
1001 |
+
<remark>0</remark> <!-- Do not allow the customer to enter a remark for the webshop -->
|
1002 |
<use_mobile>0</use_mobile> <!-- Do not use mobile phonenumbers -->
|
1003 |
<use_dob>0</use_dob> <!-- Do not use the date of birth field -->
|
1004 |
+
<allow_retail_location>1</allow_retail_location> <!-- Customers may have their goods delivered at a retail location -->
|
1005 |
+
<allow_foreign_address>1</allow_foreign_address> <!-- Customers may have their goods shipped to a foreign address -->
|
1006 |
+
<allow_price_overview>1</allow_price_overview> <!-- Customers will see a price overview -->
|
1007 |
+
<agree_conditions>1</agree_conditions> <!-- Customers must first agree to the webshop's terms and conditions -->
|
1008 |
<contact_url/>
|
1009 |
+
<service_url/>
|
1010 |
<checkout_button_test_base_url>https://tppcb-sandbox.e-id.nl/Button/Checkout</checkout_button_test_base_url> <!-- Base URL for PostNl Checkout button in test mode -->
|
1011 |
<checkout_button_live_base_url>https://checkout.postnl.nl/Button/Checkout</checkout_button_live_base_url> <!-- Base URL for PostNl Checkout button -->
|
1012 |
<test_checkout_js_url>https://tppwscheckout-sandbox.e-id.nl/Checkout2/Scripts/Checkout.js</test_checkout_js_url> <!-- URL for PostNL Checkout JS file in test mode -->
|
1013 |
<live_checkout_js_url>https://mijnpakket.postnl.nl/Checkout2/Scripts/Checkout.js</live_checkout_js_url> <!-- URL for PostNL Checkout JS file -->
|
1014 |
<test_checkout_premium_js_url>https://tppwscheckout-sandbox.e-id.nl/Checkout2/CheckoutPremium.js</test_checkout_premium_js_url> <!-- URL for PostNL Checkout premium JS file in test mode -->
|
1015 |
<live_checkout_premium_js_url>https://mijnpakket.postnl.nl/Checkout2/CheckoutPremium.js</live_checkout_premium_js_url> <!-- URL for PostNL Checkout premium JS file -->
|
1016 |
+
</checkout>
|
1017 |
+
<checkout_payment_methods>
|
1018 |
+
<ideal>0</ideal> <!-- Do not use iDEAL -->
|
1019 |
+
<ideal_method/>
|
1020 |
+
<ideal_option_field/>
|
1021 |
+
<creditcard>0</creditcard> <!-- Do not use creditcard -->
|
1022 |
<creditcard_method/>
|
1023 |
<creditcard_option_field/>
|
1024 |
<checkpay>0</checkpay> <!-- Do not use Checkpay -->
|
1041 |
<afterpay_method/>
|
1042 |
<klarna>0</klarna> <!-- Do not use Klarna -->
|
1043 |
<klarna_method/>
|
1044 |
+
</checkout_payment_methods>
|
1045 |
<parcelware_export>
|
1046 |
<active>0</active> <!-- Inactive -->
|
1047 |
<auto_confirm>0</auto_confirm> <!-- Do not auto confirm -->
|
1049 |
<contract_name/>
|
1050 |
<sender_ref_nr/>
|
1051 |
</parcelware_export>
|
1052 |
+
<grid>
|
1053 |
<show_grid_options>1</show_grid_options> <!-- Show product options in the order grid -->
|
1054 |
<show_buspakje_option>1</show_buspakje_option> <!-- Show the option to mark a shipment as being a buspakje -->
|
1055 |
<order_grid_columns>shipment_type,confirm_date,confirm_status,shipping_phase</order_grid_columns> <!-- Show the shipment type, confirm date, confirm status and shipping phase columns -->
|
1068 |
<default_stated_address_only_product_option>3385</default_stated_address_only_product_option> <!-- Deliver to stated address only -->
|
1069 |
<default_eu_product_option>4952</default_eu_product_option> <!-- EU Pack Special to consumer (combilabel) -->
|
1070 |
<default_eu_be_product_option>4955</default_eu_be_product_option> <!-- EU Pack Standard (Belgium only, no signature) (combilabel) -->
|
1071 |
+
</grid>
|
1072 |
<cif_product_options>
|
1073 |
<allow_eps_be_only_options>0</allow_eps_be_only_options> <!-- Do not allow the EPS BE only product option -->
|
1074 |
</cif_product_options>
|
1075 |
+
<advanced>
|
1076 |
+
<debug_mode>1</debug_mode> <!-- Exception logging only -->
|
1077 |
+
<infinite_label_printing>0</infinite_label_printing> <!-- do not allow infinite printing -->
|
1078 |
+
<max_parcel_count>200</max_parcel_count> <!-- Maximum of 200 parcels per shipment allowed -->
|
1079 |
+
<max_temp_file_storage_time>300</max_temp_file_storage_time> <!-- 300 seconds (5 minutes) -->
|
1080 |
+
<confirm_expire_days>9</confirm_expire_days> <!-- 9 days -->
|
1081 |
<return_expire_days>30</return_expire_days> <!-- 17 days -->
|
1082 |
+
<send_statistics>1</send_statistics> <!-- Send extension usage statistics to PostNL -->
|
1083 |
+
<receive_updates>1</receive_updates> <!-- Automatically receive updates regarding the PostNL extension -->
|
1084 |
+
<feed_url>ext.tigpostnl.nl/rss</feed_url> <!-- Default URL for the RSS notification feed -->
|
1085 |
+
<feed_use_https>0</feed_use_https> <!-- use regular http:// to get the latest feed updates. At the moment https is not yet supported, however it may be in the future. -->
|
1086 |
+
<show_error_details_in_frontend>0</show_error_details_in_frontend> <!-- Do not show error details in the frontend -->
|
1087 |
+
<postnl_shipping_methods>postnl_flatrate,postnl_tablerate,postnl_matrixrate</postnl_shipping_methods> <!-- By default only the PostNL shipping methods may be consider to be 'PostNL shipping methods' -->
|
1088 |
<cif_version_shippingstatus>1_4</cif_version_shippingstatus> <!-- v1.4 -->
|
1089 |
+
<cif_version_confirming>1_5</cif_version_confirming> <!-- v1.5 -->
|
1090 |
+
<cif_version_labelling>1_6</cif_version_labelling> <!-- v1.6 -->
|
1091 |
+
<cif_version_barcode>1_1</cif_version_barcode> <!-- v1.1 -->
|
1092 |
<cif_version_checkout>2_2</cif_version_checkout> <!-- v2.2 -->
|
1093 |
<cif_version_deliverydate>1_2</cif_version_deliverydate> <!-- v1.2 -->
|
1094 |
<cif_version_timeframe>1_2</cif_version_timeframe> <!-- v1.2 -->
|
1095 |
<cif_version_location>1_1</cif_version_location> <!-- v1.1 -->
|
1096 |
+
</advanced>
|
1097 |
|
1098 |
+
<!-- Login data for the postcode check functionality. -->
|
1099 |
+
<cendris>
|
1100 |
+
<username>tpgpost030</username>
|
1101 |
+
<password>Post2014!</password>
|
1102 |
+
</cendris>
|
1103 |
|
1104 |
<!-- Google maps API key. -->
|
1105 |
<google_maps>
|
1113 |
</postnl>
|
1114 |
</default>
|
1115 |
|
1116 |
+
<!-- Custom TIG config values -->
|
1117 |
<tig>
|
1118 |
<!-- Version compatibility per Magento edition as well as PHP version compatibility -->
|
1119 |
<compatibility>
|
1121 |
<enterprise>1.11,1.12,1.13,1.14</enterprise>
|
1122 |
<community>1.6,1.7,1.8,1.9</community>
|
1123 |
<php>5.3,5.4</php>
|
1124 |
+
<!-- Compatibility with other extensions -->
|
1125 |
+
<extensions>
|
1126 |
+
<Idev_OneStepCheckout>4.0,4.1</Idev_OneStepCheckout>
|
1127 |
+
<Bpost_ShippingManager>4.2.8</Bpost_ShippingManager>
|
1128 |
+
<GoMage_Checkout>0.0.5.8</GoMage_Checkout>
|
1129 |
+
</extensions>
|
1130 |
</postnl>
|
1131 |
</compatibility>
|
1132 |
|
1155 |
<osc>css/TIG/PostNL/deliveryoptions/onestepcheckout_mediaqueries.css</osc>
|
1156 |
</responsive>
|
1157 |
</onestepcheckout>
|
1158 |
+
<gomage_checkout>
|
1159 |
+
<responsive>
|
1160 |
+
<default>css/TIG/PostNL/deliveryoptions/mediaqueries.css</default>
|
1161 |
+
<gomage_checkout>css/TIG/PostNL/deliveryoptions/gomage_checkout_mediaqueries.css</gomage_checkout>
|
1162 |
+
</responsive>
|
1163 |
+
</gomage_checkout>
|
1164 |
</files>
|
1165 |
</default>
|
1166 |
<!-- An unbranded, white, gray and blue theme -->
|
1181 |
<osc>css/TIG/PostNL/deliveryoptions/onestepcheckout_mediaqueries.css</osc>
|
1182 |
</responsive>
|
1183 |
</onestepcheckout>
|
1184 |
+
<gomage_checkout>
|
1185 |
+
<main>css/TIG/PostNL/deliveryoptions/gomage_checkout_neutral.css</main>
|
1186 |
+
<responsive>
|
1187 |
+
<default>css/TIG/PostNL/deliveryoptions/mediaqueries.css</default>
|
1188 |
+
<gomage_checkout>css/TIG/PostNL/deliveryoptions/gomage_checkout_mediaqueries.css</gomage_checkout>
|
1189 |
+
</responsive>
|
1190 |
+
</gomage_checkout>
|
1191 |
</files>
|
1192 |
</neutral>
|
1193 |
</themes>
|
1702 |
<type>notice</type>
|
1703 |
</POSTNL-0101>
|
1704 |
<POSTNL-0102>
|
1705 |
+
<message>One or more items in the cart are backordered or out of stock.</message>
|
1706 |
<url>http://kb.tig.nl/topic/31993743</url>
|
1707 |
+
<type>error</type>
|
1708 |
</POSTNL-0102>
|
1709 |
<POSTNL-0103>
|
1710 |
<message>PostNL Checkout has been disabled.</message>
|
2296 |
<url>http://kb.tig.nl/topic/84686768</url>
|
2297 |
<type>error</type>
|
2298 |
</POSTNL-0220>
|
2299 |
+
<POSTNL-0221>
|
2300 |
+
<message>Delivery options are not allowed for one or more items in the cart based on the configured stock options.</message>
|
2301 |
+
<url/>
|
2302 |
+
<type>error</type>
|
2303 |
+
</POSTNL-0221>
|
2304 |
+
<POSTNL-0222>
|
2305 |
+
<message>Warning: possible PostNL and GoMage LightCheckout conflict.</message>
|
2306 |
+
<url/>
|
2307 |
+
<type>warning</type>
|
2308 |
+
</POSTNL-0222>
|
2309 |
+
<POSTNL-0223>
|
2310 |
+
<message>The PostNL extension has been successfully uninstalled.</message>
|
2311 |
+
<url/>
|
2312 |
+
<type>notice</type>
|
2313 |
+
</POSTNL-0223>
|
2314 |
+
<POSTNL-0224>
|
2315 |
+
<message>An error occurred while saving this step of the configuration wizard. Please use the regular "Save Config" button instead.</message>
|
2316 |
+
<url/>
|
2317 |
+
<type>error</type>
|
2318 |
+
</POSTNL-0224>
|
2319 |
+
<POSTNL-0225>
|
2320 |
+
<message>No PostNL Shipment found for shipment ID #%s.</message>
|
2321 |
+
<url/>
|
2322 |
+
<type>error</type>
|
2323 |
+
</POSTNL-0225>
|
2324 |
+
<POSTNL-0226>
|
2325 |
+
<message>Only A4 or A6 are valid values for the 'labelSize' parameter.</message>
|
2326 |
+
<url/>
|
2327 |
+
<type>error</type>
|
2328 |
+
</POSTNL-0226>
|
2329 |
+
<POSTNL-0227>
|
2330 |
+
<message>The 'labelStartPosition' parameter must contain an integer value between 1 and 4.</message>
|
2331 |
+
<url/>
|
2332 |
+
<type>error</type>
|
2333 |
+
</POSTNL-0227>
|
2334 |
+
<POSTNL-0228>
|
2335 |
+
<message>The 'orderIds' parameter must contain a non-empty array of order IDs.</message>
|
2336 |
+
<url/>
|
2337 |
+
<type>error</type>
|
2338 |
+
</POSTNL-0228>
|
2339 |
+
<POSTNL-0229>
|
2340 |
+
<message>The 'shipmentIds' parameter must contain a non-empty array of shipment IDs.</message>
|
2341 |
+
<url/>
|
2342 |
+
<type>error</type>
|
2343 |
+
</POSTNL-0229>
|
2344 |
+
<POSTNL-0230>
|
2345 |
+
<message>Could not create or find a shipment for order #%s.</message>
|
2346 |
+
<url/>
|
2347 |
+
<type>error</type>
|
2348 |
+
</POSTNL-0230>
|
2349 |
|
2350 |
<!-- These error codes are generated by CIF, not by this extension -->
|
2351 |
<LIRS_0>
|
@@ -34,7 +34,7 @@
|
|
34 |
* versions in the future. If you wish to customize this module for your
|
35 |
* needs please contact servicedesk@tig.nl for more information.
|
36 |
*
|
37 |
-
* @copyright Copyright (c)
|
38 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
39 |
*/
|
40 |
-->
|
@@ -58,7 +58,7 @@
|
|
58 |
<message>Post Office</message>
|
59 |
</post_office>
|
60 |
<package_dispenser translate="message" module="postnl">
|
61 |
-
<message>
|
62 |
</package_dispenser>
|
63 |
<monday_short translate="message" module="postnl">
|
64 |
<message>Mo</message>
|
34 |
* versions in the future. If you wish to customize this module for your
|
35 |
* needs please contact servicedesk@tig.nl for more information.
|
36 |
*
|
37 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
38 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
39 |
*/
|
40 |
-->
|
58 |
<message>Post Office</message>
|
59 |
</post_office>
|
60 |
<package_dispenser translate="message" module="postnl">
|
61 |
+
<message>Parcel Dispenser</message>
|
62 |
</package_dispenser>
|
63 |
<monday_short translate="message" module="postnl">
|
64 |
<message>Mo</message>
|
@@ -34,7 +34,7 @@
|
|
34 |
* versions in the future. If you wish to customize this module for your
|
35 |
* needs please contact servicedesk@tig.nl for more information.
|
36 |
*
|
37 |
-
* @copyright Copyright (c)
|
38 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
39 |
*/
|
40 |
-->
|
34 |
* versions in the future. If you wish to customize this module for your
|
35 |
* needs please contact servicedesk@tig.nl for more information.
|
36 |
*
|
37 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
38 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
39 |
*/
|
40 |
-->
|
@@ -34,7 +34,7 @@
|
|
34 |
* versions in the future. If you wish to customize this module for your
|
35 |
* needs please contact servicedesk@tig.nl for more information.
|
36 |
*
|
37 |
-
* @copyright Copyright (c)
|
38 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
39 |
*/
|
40 |
-->
|
@@ -1025,6 +1025,25 @@
|
|
1025 |
<checkout_extension>other</checkout_extension>
|
1026 |
</depends>
|
1027 |
</checkout_extension_other>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1028 |
<use_postcode_check translate="label tooltip" module="postnl">
|
1029 |
<label>Use postcode check</label>
|
1030 |
<tooltip>Automatically complete Dutch addresses after your customer fills in his postcode and house number.</tooltip>
|
@@ -1038,9 +1057,10 @@
|
|
1038 |
<show_in_store>1</show_in_store>
|
1039 |
<depends>
|
1040 |
<checkout_extension>
|
1041 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1042 |
<separator>||</separator>
|
1043 |
</checkout_extension>
|
|
|
1044 |
</depends>
|
1045 |
</use_postcode_check>
|
1046 |
<postcode_check_in_checkout translate="label" module="postnl">
|
@@ -1055,9 +1075,10 @@
|
|
1055 |
<depends>
|
1056 |
<use_postcode_check>1</use_postcode_check>
|
1057 |
<checkout_extension>
|
1058 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1059 |
<separator>||</separator>
|
1060 |
</checkout_extension>
|
|
|
1061 |
</depends>
|
1062 |
</postcode_check_in_checkout>
|
1063 |
<postcode_check_in_addressbook translate="label" module="postnl">
|
@@ -1072,9 +1093,10 @@
|
|
1072 |
<depends>
|
1073 |
<use_postcode_check>1</use_postcode_check>
|
1074 |
<checkout_extension>
|
1075 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1076 |
<separator>||</separator>
|
1077 |
</checkout_extension>
|
|
|
1078 |
</depends>
|
1079 |
</postcode_check_in_addressbook>
|
1080 |
<postcode_check_max_attempts translate="label tooltip" module="postnl">
|
@@ -1088,9 +1110,10 @@
|
|
1088 |
<depends>
|
1089 |
<use_postcode_check>1</use_postcode_check>
|
1090 |
<checkout_extension>
|
1091 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1092 |
<separator>||</separator>
|
1093 |
</checkout_extension>
|
|
|
1094 |
</depends>
|
1095 |
<validate>validate-int validate-greater-than-zero</validate>
|
1096 |
</postcode_check_max_attempts>
|
@@ -1105,16 +1128,29 @@
|
|
1105 |
<depends>
|
1106 |
<use_postcode_check>1</use_postcode_check>
|
1107 |
<checkout_extension>
|
1108 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1109 |
<separator>||</separator>
|
1110 |
</checkout_extension>
|
|
|
1111 |
</depends>
|
1112 |
<validate>validate-int validate-greater-than-zero</validate>
|
1113 |
</postcode_check_timeout>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1114 |
<address_lines>
|
1115 |
<frontend_type>hidden</frontend_type>
|
1116 |
<frontend_model>postnl_adminhtml/system_config_form_field_addressLines</frontend_model>
|
1117 |
-
<sort_order>
|
1118 |
<show_in_default>1</show_in_default>
|
1119 |
<show_in_website>1</show_in_website>
|
1120 |
<show_in_store>0</show_in_store>
|
@@ -1122,7 +1158,7 @@
|
|
1122 |
<split_street_unavailable_info translate="comment" module="postnl">
|
1123 |
<comment><![CDATA[You are currently using fewer than 2 address lines. In order to guarantee proper address processing, the PostNL extension requires at least 2 address lines. You can read more on how to configure split address lines <a href="http://kb.tig.nl/topic/55961916" target="_blank">here</a>.]]></comment>
|
1124 |
<frontend_model>postnl_adminhtml/system_config_form_field_infoBox</frontend_model>
|
1125 |
-
<sort_order>
|
1126 |
<show_in_default>1</show_in_default>
|
1127 |
<show_in_website>1</show_in_website>
|
1128 |
<show_in_store>0</show_in_store>
|
@@ -1140,7 +1176,7 @@
|
|
1140 |
<frontend_type>checkbox</frontend_type>
|
1141 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1142 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1143 |
-
<sort_order>
|
1144 |
<show_in_default>1</show_in_default>
|
1145 |
<show_in_website>1</show_in_website>
|
1146 |
<show_in_store>0</show_in_store>
|
@@ -1148,14 +1184,16 @@
|
|
1148 |
<address_lines>
|
1149 |
<eval><![CDATA[{{value}} > 1]]></eval>
|
1150 |
</address_lines>
|
1151 |
-
<use_postcode_check>
|
|
|
|
|
1152 |
</depends>
|
1153 |
</split_street>
|
1154 |
<streetname_field translate="label" module="postnl">
|
1155 |
<label>Streetname field</label>
|
1156 |
<frontend_type>select</frontend_type>
|
1157 |
<source_model>postnl_core/system_config_source_streetField</source_model>
|
1158 |
-
<sort_order>
|
1159 |
<show_in_default>1</show_in_default>
|
1160 |
<show_in_website>1</show_in_website>
|
1161 |
<show_in_store>0</show_in_store>
|
@@ -1164,7 +1202,9 @@
|
|
1164 |
<eval><![CDATA[{{value}} > 1]]></eval>
|
1165 |
</address_lines>
|
1166 |
<split_street>1</split_street>
|
1167 |
-
<use_postcode_check>
|
|
|
|
|
1168 |
</depends>
|
1169 |
<validate>validate-select postnl-street-field</validate>
|
1170 |
</streetname_field>
|
@@ -1172,7 +1212,7 @@
|
|
1172 |
<label>Housenr. field</label>
|
1173 |
<frontend_type>select</frontend_type>
|
1174 |
<source_model>postnl_core/system_config_source_streetField</source_model>
|
1175 |
-
<sort_order>
|
1176 |
<show_in_default>1</show_in_default>
|
1177 |
<show_in_website>1</show_in_website>
|
1178 |
<show_in_store>0</show_in_store>
|
@@ -1181,7 +1221,9 @@
|
|
1181 |
<eval><![CDATA[{{value}} > 1]]></eval>
|
1182 |
</address_lines>
|
1183 |
<split_street>1</split_street>
|
1184 |
-
<use_postcode_check>
|
|
|
|
|
1185 |
</depends>
|
1186 |
<validate>validate-select postnl-street-field</validate>
|
1187 |
</housenr_field>
|
@@ -1190,7 +1232,7 @@
|
|
1190 |
<frontend_type>checkbox</frontend_type>
|
1191 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1192 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1193 |
-
<sort_order>
|
1194 |
<show_in_default>1</show_in_default>
|
1195 |
<show_in_website>1</show_in_website>
|
1196 |
<show_in_store>0</show_in_store>
|
@@ -1199,14 +1241,16 @@
|
|
1199 |
<eval><![CDATA[{{value}} > 2]]></eval>
|
1200 |
</address_lines>
|
1201 |
<split_street>1</split_street>
|
1202 |
-
<use_postcode_check>
|
|
|
|
|
1203 |
</depends>
|
1204 |
</split_housenr>
|
1205 |
<housenr_extension_field translate="label" module="postnl">
|
1206 |
<label>Housenr. extension field</label>
|
1207 |
<frontend_type>select</frontend_type>
|
1208 |
<source_model>postnl_core/system_config_source_streetField</source_model>
|
1209 |
-
<sort_order>
|
1210 |
<show_in_default>1</show_in_default>
|
1211 |
<show_in_website>1</show_in_website>
|
1212 |
<show_in_store>0</show_in_store>
|
@@ -1216,14 +1260,16 @@
|
|
1216 |
</address_lines>
|
1217 |
<split_street>1</split_street>
|
1218 |
<split_housenr>1</split_housenr>
|
1219 |
-
<use_postcode_check>
|
|
|
|
|
1220 |
</depends>
|
1221 |
<validate>validate-select postnl-street-field</validate>
|
1222 |
</housenr_extension_field>
|
1223 |
<optional_street_fields_header translate="label" module="postnl">
|
1224 |
<label>Optional address fields</label>
|
1225 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
1226 |
-
<sort_order>
|
1227 |
<show_in_default>1</show_in_default>
|
1228 |
<show_in_website>1</show_in_website>
|
1229 |
<show_in_store>0</show_in_store>
|
@@ -1232,7 +1278,7 @@
|
|
1232 |
<label>Area field</label>
|
1233 |
<frontend_type>select</frontend_type>
|
1234 |
<source_model>postnl_core/system_config_source_streetFieldWithDefault</source_model>
|
1235 |
-
<sort_order>
|
1236 |
<show_in_default>1</show_in_default>
|
1237 |
<show_in_website>1</show_in_website>
|
1238 |
<show_in_store>0</show_in_store>
|
@@ -1241,7 +1287,7 @@
|
|
1241 |
<label>Building name field</label>
|
1242 |
<frontend_type>select</frontend_type>
|
1243 |
<source_model>postnl_core/system_config_source_streetFieldWithDefault</source_model>
|
1244 |
-
<sort_order>
|
1245 |
<show_in_default>1</show_in_default>
|
1246 |
<show_in_website>1</show_in_website>
|
1247 |
<show_in_store>0</show_in_store>
|
@@ -1250,7 +1296,7 @@
|
|
1250 |
<label>Department field</label>
|
1251 |
<frontend_type>select</frontend_type>
|
1252 |
<source_model>postnl_core/system_config_source_streetFieldWithDefault</source_model>
|
1253 |
-
<sort_order>
|
1254 |
<show_in_default>1</show_in_default>
|
1255 |
<show_in_website>1</show_in_website>
|
1256 |
<show_in_store>0</show_in_store>
|
@@ -1260,7 +1306,7 @@
|
|
1260 |
<tooltip>Doorcodes are often used in foreign addresses such as those used in France and Singapore.</tooltip>
|
1261 |
<frontend_type>select</frontend_type>
|
1262 |
<source_model>postnl_core/system_config_source_streetFieldWithDefault</source_model>
|
1263 |
-
<sort_order>
|
1264 |
<show_in_default>1</show_in_default>
|
1265 |
<show_in_website>1</show_in_website>
|
1266 |
<show_in_store>0</show_in_store>
|
@@ -1269,7 +1315,7 @@
|
|
1269 |
<label>Floor field</label>
|
1270 |
<frontend_type>select</frontend_type>
|
1271 |
<source_model>postnl_core/system_config_source_streetFieldWithDefault</source_model>
|
1272 |
-
<sort_order>
|
1273 |
<show_in_default>1</show_in_default>
|
1274 |
<show_in_website>1</show_in_website>
|
1275 |
<show_in_store>0</show_in_store>
|
@@ -1278,7 +1324,7 @@
|
|
1278 |
<label>Remark field</label>
|
1279 |
<frontend_type>select</frontend_type>
|
1280 |
<source_model>postnl_core/system_config_source_streetFieldWithDefault</source_model>
|
1281 |
-
<sort_order>
|
1282 |
<show_in_default>1</show_in_default>
|
1283 |
<show_in_website>1</show_in_website>
|
1284 |
<show_in_store>0</show_in_store>
|
@@ -1286,7 +1332,7 @@
|
|
1286 |
<save_and_continue translate="label" module="postnl">
|
1287 |
<label>Save and continue</label>
|
1288 |
<frontend_model>postnl_adminhtml/system_config_form_field_wizardSaveButton</frontend_model>
|
1289 |
-
<sort_order>
|
1290 |
<show_in_default>1</show_in_default>
|
1291 |
<show_in_website>1</show_in_website>
|
1292 |
<show_in_store>1</show_in_store>
|
@@ -1314,13 +1360,13 @@
|
|
1314 |
<depends>
|
1315 |
<checkout_extension>
|
1316 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1317 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1318 |
<separator>||</separator>
|
1319 |
</checkout_extension>
|
1320 |
</depends>
|
1321 |
</delivery_options_header>
|
1322 |
<delivery_options_disabled_header translate="label" module="postnl">
|
1323 |
-
<label>PostNL delivery options are only available for Magento's One Page Checkout
|
1324 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
1325 |
<sort_order>20</sort_order>
|
1326 |
<show_in_default>1</show_in_default>
|
@@ -1345,17 +1391,42 @@
|
|
1345 |
<depends>
|
1346 |
<checkout_extension>
|
1347 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1348 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1349 |
<separator>||</separator>
|
1350 |
</checkout_extension>
|
1351 |
</depends>
|
1352 |
</delivery_options_active>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1353 |
<theme translate="label comment" module="postnl">
|
1354 |
<label>Delivery options theme</label>
|
1355 |
<comment><![CDATA[You can view an example of the different themes <a href="http://kb.tig.nl/topic/58787233" target="_blank" title="PostNL delivery option themes">here</a>.]]></comment>
|
1356 |
<frontend_type>select</frontend_type>
|
1357 |
<source_model>postnl_deliveryoptions/system_config_source_themes</source_model>
|
1358 |
-
<sort_order>
|
1359 |
<show_in_default>1</show_in_default>
|
1360 |
<show_in_website>1</show_in_website>
|
1361 |
<show_in_store>1</show_in_store>
|
@@ -1363,7 +1434,7 @@
|
|
1363 |
<delivery_options_active>1</delivery_options_active>
|
1364 |
<checkout_extension>
|
1365 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1366 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1367 |
<separator>||</separator>
|
1368 |
</checkout_extension>
|
1369 |
</depends>
|
@@ -1374,7 +1445,7 @@
|
|
1374 |
<frontend_type>checkbox</frontend_type>
|
1375 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1376 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1377 |
-
<sort_order>
|
1378 |
<show_in_default>1</show_in_default>
|
1379 |
<show_in_website>1</show_in_website>
|
1380 |
<show_in_store>1</show_in_store>
|
@@ -1382,18 +1453,17 @@
|
|
1382 |
<delivery_options_active>1</delivery_options_active>
|
1383 |
<checkout_extension>
|
1384 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1385 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1386 |
<separator>||</separator>
|
1387 |
</checkout_extension>
|
1388 |
</depends>
|
1389 |
</responsive>
|
1390 |
-
<
|
1391 |
-
<label>
|
1392 |
-
<tooltip>
|
1393 |
-
<frontend_type>
|
1394 |
-
<
|
1395 |
-
<
|
1396 |
-
<sort_order>60</sort_order>
|
1397 |
<show_in_default>1</show_in_default>
|
1398 |
<show_in_website>1</show_in_website>
|
1399 |
<show_in_store>1</show_in_store>
|
@@ -1401,18 +1471,18 @@
|
|
1401 |
<delivery_options_active>1</delivery_options_active>
|
1402 |
<checkout_extension>
|
1403 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1404 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1405 |
<separator>||</separator>
|
1406 |
</checkout_extension>
|
1407 |
</depends>
|
1408 |
-
</
|
1409 |
<enable_delivery_days translate="label tooltip" module="postnl">
|
1410 |
<label>Enable delivery days</label>
|
1411 |
<tooltip>Delivery days allow customers to choose on which date they want their order delivered.</tooltip>
|
1412 |
<frontend_type>checkbox</frontend_type>
|
1413 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1414 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1415 |
-
<sort_order>
|
1416 |
<show_in_default>1</show_in_default>
|
1417 |
<show_in_website>1</show_in_website>
|
1418 |
<show_in_store>1</show_in_store>
|
@@ -1420,7 +1490,7 @@
|
|
1420 |
<delivery_options_active>1</delivery_options_active>
|
1421 |
<checkout_extension>
|
1422 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1423 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1424 |
<separator>||</separator>
|
1425 |
</checkout_extension>
|
1426 |
</depends>
|
@@ -1430,7 +1500,7 @@
|
|
1430 |
<tooltip>Submit how many days in the future after the first delivery moment your customers can choose to receive their orders.</tooltip>
|
1431 |
<frontend_type>select</frontend_type>
|
1432 |
<source_model>postnl_deliveryoptions/system_config_source_deliveryDaysNumber</source_model>
|
1433 |
-
<sort_order>
|
1434 |
<show_in_default>1</show_in_default>
|
1435 |
<show_in_website>1</show_in_website>
|
1436 |
<show_in_store>1</show_in_store>
|
@@ -1439,7 +1509,7 @@
|
|
1439 |
<enable_delivery_days>1</enable_delivery_days>
|
1440 |
<checkout_extension>
|
1441 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1442 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1443 |
<separator>||</separator>
|
1444 |
</checkout_extension>
|
1445 |
</depends>
|
@@ -1450,7 +1520,7 @@
|
|
1450 |
<frontend_type>checkbox</frontend_type>
|
1451 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1452 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1453 |
-
<sort_order>
|
1454 |
<show_in_default>1</show_in_default>
|
1455 |
<show_in_website>1</show_in_website>
|
1456 |
<show_in_store>1</show_in_store>
|
@@ -1459,7 +1529,7 @@
|
|
1459 |
<delivery_options_active>1</delivery_options_active>
|
1460 |
<checkout_extension>
|
1461 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1462 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1463 |
<separator>||</separator>
|
1464 |
</checkout_extension>
|
1465 |
</depends>
|
@@ -1470,7 +1540,7 @@
|
|
1470 |
<frontend_type>checkbox</frontend_type>
|
1471 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1472 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1473 |
-
<sort_order>
|
1474 |
<show_in_default>1</show_in_default>
|
1475 |
<show_in_website>1</show_in_website>
|
1476 |
<show_in_store>1</show_in_store>
|
@@ -1480,7 +1550,7 @@
|
|
1480 |
<enable_timeframes>1</enable_timeframes>
|
1481 |
<checkout_extension>
|
1482 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1483 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1484 |
<separator>||</separator>
|
1485 |
</checkout_extension>
|
1486 |
</depends>
|
@@ -1490,7 +1560,7 @@
|
|
1490 |
<tooltip>Additional costs for evening timeframes in the store's base currency. This fee will be added to the shipping costs. This value must be between 0.00 and 2.00 EUR incl. VAT. Leave this field empty to charge no extra fee for evening timeframes.</tooltip>
|
1491 |
<frontend_type>text</frontend_type>
|
1492 |
<backend_model>postnl_deliveryoptions/system_config_backend_validateFee</backend_model>
|
1493 |
-
<sort_order>
|
1494 |
<show_in_default>1</show_in_default>
|
1495 |
<show_in_website>1</show_in_website>
|
1496 |
<show_in_store>1</show_in_store>
|
@@ -1502,7 +1572,7 @@
|
|
1502 |
<enable_evening_timeframes>1</enable_evening_timeframes>
|
1503 |
<checkout_extension>
|
1504 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1505 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1506 |
<separator>||</separator>
|
1507 |
</checkout_extension>
|
1508 |
</depends>
|
@@ -1513,7 +1583,7 @@
|
|
1513 |
<frontend_type>checkbox</frontend_type>
|
1514 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1515 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1516 |
-
<sort_order>
|
1517 |
<show_in_default>1</show_in_default>
|
1518 |
<show_in_website>1</show_in_website>
|
1519 |
<show_in_store>1</show_in_store>
|
@@ -1521,7 +1591,7 @@
|
|
1521 |
<delivery_options_active>1</delivery_options_active>
|
1522 |
<checkout_extension>
|
1523 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1524 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1525 |
<separator>||</separator>
|
1526 |
</checkout_extension>
|
1527 |
</depends>
|
@@ -1532,7 +1602,7 @@
|
|
1532 |
<frontend_type>checkbox</frontend_type>
|
1533 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1534 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1535 |
-
<sort_order>
|
1536 |
<show_in_default>1</show_in_default>
|
1537 |
<show_in_website>1</show_in_website>
|
1538 |
<show_in_store>1</show_in_store>
|
@@ -1541,7 +1611,7 @@
|
|
1541 |
<enable_pakjegemak>1</enable_pakjegemak>
|
1542 |
<checkout_extension>
|
1543 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1544 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1545 |
<separator>||</separator>
|
1546 |
</checkout_extension>
|
1547 |
</depends>
|
@@ -1551,7 +1621,7 @@
|
|
1551 |
<tooltip>Additional costs for early delivery locations in the store's base currency. This fee will be added to the shipping costs. This value must be between 0.00 and 2.00 EUR incl. VAT. Leave this field empty to charge no extra fee for early delivery locations.</tooltip>
|
1552 |
<frontend_type>text</frontend_type>
|
1553 |
<backend_model>postnl_deliveryoptions/system_config_backend_validateFee</backend_model>
|
1554 |
-
<sort_order>
|
1555 |
<show_in_default>1</show_in_default>
|
1556 |
<show_in_website>1</show_in_website>
|
1557 |
<show_in_store>1</show_in_store>
|
@@ -1562,7 +1632,7 @@
|
|
1562 |
<enable_pakjegemak_express>1</enable_pakjegemak_express>
|
1563 |
<checkout_extension>
|
1564 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1565 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1566 |
<separator>||</separator>
|
1567 |
</checkout_extension>
|
1568 |
</depends>
|
@@ -1573,7 +1643,7 @@
|
|
1573 |
<frontend_type>checkbox</frontend_type>
|
1574 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1575 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1576 |
-
<sort_order>
|
1577 |
<show_in_default>1</show_in_default>
|
1578 |
<show_in_website>1</show_in_website>
|
1579 |
<show_in_store>1</show_in_store>
|
@@ -1581,7 +1651,7 @@
|
|
1581 |
<delivery_options_active>1</delivery_options_active>
|
1582 |
<checkout_extension>
|
1583 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1584 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1585 |
<separator>||</separator>
|
1586 |
</checkout_extension>
|
1587 |
</depends>
|
@@ -1592,7 +1662,7 @@
|
|
1592 |
<frontend_type>checkbox</frontend_type>
|
1593 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1594 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1595 |
-
<sort_order>
|
1596 |
<show_in_default>1</show_in_default>
|
1597 |
<show_in_website>1</show_in_website>
|
1598 |
<show_in_store>1</show_in_store>
|
@@ -1600,7 +1670,7 @@
|
|
1600 |
<delivery_options_active>1</delivery_options_active>
|
1601 |
<checkout_extension>
|
1602 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1603 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1604 |
<separator>||</separator>
|
1605 |
</checkout_extension>
|
1606 |
</depends>
|
@@ -1611,7 +1681,7 @@
|
|
1611 |
<frontend_type>checkbox</frontend_type>
|
1612 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1613 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1614 |
-
<sort_order>
|
1615 |
<show_in_default>1</show_in_default>
|
1616 |
<show_in_website>1</show_in_website>
|
1617 |
<show_in_store>1</show_in_store>
|
@@ -1621,7 +1691,7 @@
|
|
1621 |
<buspakje_calculation_mode>automatic</buspakje_calculation_mode>
|
1622 |
<checkout_extension>
|
1623 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1624 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1625 |
<separator>||</separator>
|
1626 |
</checkout_extension>
|
1627 |
</depends>
|
@@ -1632,7 +1702,7 @@
|
|
1632 |
<frontend_type>checkbox</frontend_type>
|
1633 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1634 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1635 |
-
<sort_order>
|
1636 |
<show_in_default>1</show_in_default>
|
1637 |
<show_in_website>1</show_in_website>
|
1638 |
<show_in_store>1</show_in_store>
|
@@ -1643,7 +1713,7 @@
|
|
1643 |
<show_options_for_buspakje>1</show_options_for_buspakje>
|
1644 |
<checkout_extension>
|
1645 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1646 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1647 |
<separator>||</separator>
|
1648 |
</checkout_extension>
|
1649 |
</depends>
|
@@ -1653,7 +1723,7 @@
|
|
1653 |
<frontend_type>checkbox</frontend_type>
|
1654 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1655 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1656 |
-
<sort_order>
|
1657 |
<show_in_default>1</show_in_default>
|
1658 |
<show_in_website>1</show_in_website>
|
1659 |
<show_in_store>1</show_in_store>
|
@@ -1666,7 +1736,7 @@
|
|
1666 |
<enable_delivery_days>1</enable_delivery_days>
|
1667 |
<checkout_extension>
|
1668 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1669 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1670 |
<separator>||</separator>
|
1671 |
</checkout_extension>
|
1672 |
</depends>
|
@@ -1677,7 +1747,7 @@
|
|
1677 |
<frontend_type>checkbox</frontend_type>
|
1678 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1679 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1680 |
-
<sort_order>
|
1681 |
<show_in_default>1</show_in_default>
|
1682 |
<show_in_website>1</show_in_website>
|
1683 |
<show_in_store>1</show_in_store>
|
@@ -1690,7 +1760,7 @@
|
|
1690 |
<enable_pakjegemak>1</enable_pakjegemak>
|
1691 |
<checkout_extension>
|
1692 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1693 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1694 |
<separator>||</separator>
|
1695 |
</checkout_extension>
|
1696 |
</depends>
|
@@ -1701,7 +1771,7 @@
|
|
1701 |
<frontend_type>checkbox</frontend_type>
|
1702 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1703 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1704 |
-
<sort_order>
|
1705 |
<show_in_default>1</show_in_default>
|
1706 |
<show_in_website>1</show_in_website>
|
1707 |
<show_in_store>1</show_in_store>
|
@@ -1714,7 +1784,7 @@
|
|
1714 |
<enable_pakketautomaat_locations>1</enable_pakketautomaat_locations>
|
1715 |
<checkout_extension>
|
1716 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1717 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1718 |
<separator>||</separator>
|
1719 |
</checkout_extension>
|
1720 |
</depends>
|
@@ -1722,7 +1792,7 @@
|
|
1722 |
<stated_address_header translate="label" module="postnl">
|
1723 |
<label>Only stated address</label>
|
1724 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
1725 |
-
<sort_order>
|
1726 |
<show_in_default>1</show_in_default>
|
1727 |
<show_in_website>1</show_in_website>
|
1728 |
<show_in_store>1</show_in_store>
|
@@ -1730,7 +1800,7 @@
|
|
1730 |
<delivery_options_active>1</delivery_options_active>
|
1731 |
<checkout_extension>
|
1732 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1733 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1734 |
<separator>||</separator>
|
1735 |
</checkout_extension>
|
1736 |
</depends>
|
@@ -1741,7 +1811,7 @@
|
|
1741 |
<frontend_type>checkbox</frontend_type>
|
1742 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1743 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1744 |
-
<sort_order>
|
1745 |
<show_in_default>1</show_in_default>
|
1746 |
<show_in_website>1</show_in_website>
|
1747 |
<show_in_store>1</show_in_store>
|
@@ -1749,7 +1819,7 @@
|
|
1749 |
<delivery_options_active>1</delivery_options_active>
|
1750 |
<checkout_extension>
|
1751 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1752 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1753 |
<separator>||</separator>
|
1754 |
</checkout_extension>
|
1755 |
</depends>
|
@@ -1759,7 +1829,7 @@
|
|
1759 |
<frontend_type>checkbox</frontend_type>
|
1760 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1761 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1762 |
-
<sort_order>
|
1763 |
<show_in_default>1</show_in_default>
|
1764 |
<show_in_website>1</show_in_website>
|
1765 |
<show_in_store>1</show_in_store>
|
@@ -1768,7 +1838,7 @@
|
|
1768 |
<delivery_options_active>1</delivery_options_active>
|
1769 |
<checkout_extension>
|
1770 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1771 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1772 |
<separator>||</separator>
|
1773 |
</checkout_extension>
|
1774 |
</depends>
|
@@ -1777,7 +1847,7 @@
|
|
1777 |
<label>Stated address only fee</label>
|
1778 |
<frontend_type>text</frontend_type>
|
1779 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1780 |
-
<sort_order>
|
1781 |
<show_in_default>1</show_in_default>
|
1782 |
<show_in_website>1</show_in_website>
|
1783 |
<show_in_store>1</show_in_store>
|
@@ -1786,7 +1856,7 @@
|
|
1786 |
<delivery_options_active>1</delivery_options_active>
|
1787 |
<checkout_extension>
|
1788 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1789 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1790 |
<separator>||</separator>
|
1791 |
</checkout_extension>
|
1792 |
</depends>
|
@@ -1794,7 +1864,7 @@
|
|
1794 |
<mijnpakket_header translate="label" module="postnl">
|
1795 |
<label>MijnPakket</label>
|
1796 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
1797 |
-
<sort_order>
|
1798 |
<show_in_default>1</show_in_default>
|
1799 |
<show_in_website>1</show_in_website>
|
1800 |
<show_in_store>1</show_in_store>
|
@@ -1802,7 +1872,7 @@
|
|
1802 |
<delivery_options_active>1</delivery_options_active>
|
1803 |
<checkout_extension>
|
1804 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1805 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1806 |
<separator>||</separator>
|
1807 |
</checkout_extension>
|
1808 |
</depends>
|
@@ -1813,7 +1883,7 @@
|
|
1813 |
<frontend_type>checkbox</frontend_type>
|
1814 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1815 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1816 |
-
<sort_order>
|
1817 |
<show_in_default>1</show_in_default>
|
1818 |
<show_in_website>1</show_in_website>
|
1819 |
<show_in_store>1</show_in_store>
|
@@ -1821,7 +1891,7 @@
|
|
1821 |
<delivery_options_active>1</delivery_options_active>
|
1822 |
<checkout_extension>
|
1823 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1824 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1825 |
<separator>||</separator>
|
1826 |
</checkout_extension>
|
1827 |
</depends>
|
@@ -1832,7 +1902,7 @@
|
|
1832 |
<frontend_type>checkbox</frontend_type>
|
1833 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1834 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1835 |
-
<sort_order>
|
1836 |
<show_in_default>1</show_in_default>
|
1837 |
<show_in_website>1</show_in_website>
|
1838 |
<show_in_store>1</show_in_store>
|
@@ -1840,7 +1910,7 @@
|
|
1840 |
<delivery_options_active>1</delivery_options_active>
|
1841 |
<checkout_extension>
|
1842 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1843 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1844 |
<separator>||</separator>
|
1845 |
</checkout_extension>
|
1846 |
</depends>
|
@@ -1851,7 +1921,7 @@
|
|
1851 |
<frontend_type>checkbox</frontend_type>
|
1852 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1853 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1854 |
-
<sort_order>
|
1855 |
<show_in_default>1</show_in_default>
|
1856 |
<show_in_website>1</show_in_website>
|
1857 |
<show_in_store>1</show_in_store>
|
@@ -1860,7 +1930,7 @@
|
|
1860 |
<mijnpakket_notification>1</mijnpakket_notification>
|
1861 |
<checkout_extension>
|
1862 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1863 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1864 |
<separator>||</separator>
|
1865 |
</checkout_extension>
|
1866 |
</depends>
|
@@ -1871,7 +1941,7 @@
|
|
1871 |
<frontend_type>checkbox</frontend_type>
|
1872 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1873 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1874 |
-
<sort_order>
|
1875 |
<show_in_default>1</show_in_default>
|
1876 |
<show_in_website>1</show_in_website>
|
1877 |
<show_in_store>1</show_in_store>
|
@@ -1880,7 +1950,7 @@
|
|
1880 |
<mijnpakket_notification>1</mijnpakket_notification>
|
1881 |
<checkout_extension>
|
1882 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1883 |
-
<value>magento_onepagecheckout||idev_onestepcheckout</value>
|
1884 |
<separator>||</separator>
|
1885 |
</checkout_extension>
|
1886 |
</depends>
|
@@ -1888,7 +1958,7 @@
|
|
1888 |
<buspakje_header translate="label" module="postnl">
|
1889 |
<label>Letter box parcels</label>
|
1890 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
1891 |
-
<sort_order>
|
1892 |
<show_in_default>1</show_in_default>
|
1893 |
<show_in_website>0</show_in_website>
|
1894 |
<show_in_store>0</show_in_store>
|
@@ -1899,7 +1969,7 @@
|
|
1899 |
<frontend_type>checkbox</frontend_type>
|
1900 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1901 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1902 |
-
<sort_order>
|
1903 |
<show_in_default>1</show_in_default>
|
1904 |
<show_in_website>0</show_in_website>
|
1905 |
<show_in_store>0</show_in_store>
|
@@ -1910,7 +1980,7 @@
|
|
1910 |
<tooltip>You can let the PostNL extension calculate automatically whether a shipment would fit in a mail slot or you can manually determine this when creating shipments in the backend. If set to 'automatic' the PostNL extension will check the 'Weight' and 'PostNL Max Qty For Letter Box Parcels' of all products in an order to determine whether the shipment would fit through a mail slot. You may always overrule this and manually set whether a shipment is a letter box parcel or not.</tooltip>
|
1911 |
<frontend_type>select</frontend_type>
|
1912 |
<source_model>postnl_core/system_config_source_manualAutomatic</source_model>
|
1913 |
-
<sort_order>
|
1914 |
<show_in_default>1</show_in_default>
|
1915 |
<show_in_website>0</show_in_website>
|
1916 |
<show_in_store>0</show_in_store>
|
@@ -1921,7 +1991,7 @@
|
|
1921 |
<save_and_continue translate="label" module="postnl">
|
1922 |
<label>Save and continue</label>
|
1923 |
<frontend_model>postnl_adminhtml/system_config_form_field_wizardSaveButton</frontend_model>
|
1924 |
-
<sort_order>
|
1925 |
<show_in_default>1</show_in_default>
|
1926 |
<show_in_website>1</show_in_website>
|
1927 |
<show_in_store>1</show_in_store>
|
@@ -2143,10 +2213,9 @@
|
|
2143 |
</packing_slip_fields_header>
|
2144 |
<show_label translate="label tooltip" module="postnl">
|
2145 |
<label>Show shipping label</label>
|
2146 |
-
<tooltip>If
|
2147 |
-
<frontend_type>
|
2148 |
-
<
|
2149 |
-
<source_model>postnl/system_config_source_yesno</source_model>
|
2150 |
<sort_order>50</sort_order>
|
2151 |
<show_in_default>1</show_in_default>
|
2152 |
<show_in_website>1</show_in_website>
|
@@ -2406,7 +2475,7 @@
|
|
2406 |
</track_and_trace_email_template>
|
2407 |
<send_copy translate="label tooltip" module="postnl">
|
2408 |
<label>Send a copy of the track & trace email</label>
|
2409 |
-
<tooltip>If enabled, you may enter
|
2410 |
<frontend_type>checkbox</frontend_type>
|
2411 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
2412 |
<source_model>postnl/system_config_source_yesno</source_model>
|
@@ -2417,7 +2486,7 @@
|
|
2417 |
</send_copy>
|
2418 |
<copy_to translate="label tooltip" module="postnl">
|
2419 |
<label>Send track & trace email copy to</label>
|
2420 |
-
<tooltip>You can enter multiple email addresses
|
2421 |
<frontend_type>text</frontend_type>
|
2422 |
<sort_order>50</sort_order>
|
2423 |
<show_in_default>1</show_in_default>
|
@@ -4214,7 +4283,7 @@
|
|
4214 |
<show_in_store>0</show_in_store>
|
4215 |
<depends>
|
4216 |
<use_buspakje>
|
4217 |
-
<fieldset>
|
4218 |
<value>1</value>
|
4219 |
</use_buspakje>
|
4220 |
</depends>
|
@@ -4321,7 +4390,7 @@
|
|
4321 |
</receive_updates>
|
4322 |
<show_error_details_in_frontend translate="label tooltip" module="postnl">
|
4323 |
<label>Show error details in the frontend</label>
|
4324 |
-
<tooltip>If set to 'yes', error details will be shown in the frontend when an error occurs. Error details include the error code as well as a link to the
|
4325 |
<frontend_type>checkbox</frontend_type>
|
4326 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
4327 |
<source_model>postnl/system_config_source_yesno</source_model>
|
@@ -4350,7 +4419,7 @@
|
|
4350 |
<show_in_store>0</show_in_store>
|
4351 |
</cif_versions_header>
|
4352 |
<cif_versions_infobox translate="comment" module="postnl">
|
4353 |
-
<
|
4354 |
<frontend_model>postnl_adminhtml/system_config_form_field_warningBox</frontend_model>
|
4355 |
<sort_order>110</sort_order>
|
4356 |
<show_in_default>1</show_in_default>
|
@@ -4429,6 +4498,22 @@
|
|
4429 |
<show_in_store>0</show_in_store>
|
4430 |
<validate>postnl-validate-webservice-version</validate>
|
4431 |
</cif_version_location>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4432 |
</fields>
|
4433 |
</advanced>
|
4434 |
</groups>
|
34 |
* versions in the future. If you wish to customize this module for your
|
35 |
* needs please contact servicedesk@tig.nl for more information.
|
36 |
*
|
37 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
38 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
39 |
*/
|
40 |
-->
|
1025 |
<checkout_extension>other</checkout_extension>
|
1026 |
</depends>
|
1027 |
</checkout_extension_other>
|
1028 |
+
<postcode_nl_extension_active>
|
1029 |
+
<frontend_type>hidden</frontend_type>
|
1030 |
+
<frontend_model>postnl_adminhtml/system_config_form_field_postcodeNlExtensionActive</frontend_model>
|
1031 |
+
<sort_order>105</sort_order>
|
1032 |
+
<show_in_default>1</show_in_default>
|
1033 |
+
<show_in_website>1</show_in_website>
|
1034 |
+
<show_in_store>1</show_in_store>
|
1035 |
+
</postcode_nl_extension_active>
|
1036 |
+
<postcode_nl_extension_conflict_info translate="comment" module="postnl">
|
1037 |
+
<comment><![CDATA[You are currently using the Postcode.nl extension. This extension conflicts with the PostNL extension's built-in postcode validator. We recommend you disable the Postcode.nl extension if you wish to use the PostNL extensions' postcode validator.]]></comment>
|
1038 |
+
<frontend_model>postnl_adminhtml/system_config_form_field_infoBox</frontend_model>
|
1039 |
+
<sort_order>106</sort_order>
|
1040 |
+
<show_in_default>1</show_in_default>
|
1041 |
+
<show_in_website>1</show_in_website>
|
1042 |
+
<show_in_store>0</show_in_store>
|
1043 |
+
<depends>
|
1044 |
+
<postcode_nl_extension_active>1</postcode_nl_extension_active>
|
1045 |
+
</depends>
|
1046 |
+
</postcode_nl_extension_conflict_info>
|
1047 |
<use_postcode_check translate="label tooltip" module="postnl">
|
1048 |
<label>Use postcode check</label>
|
1049 |
<tooltip>Automatically complete Dutch addresses after your customer fills in his postcode and house number.</tooltip>
|
1057 |
<show_in_store>1</show_in_store>
|
1058 |
<depends>
|
1059 |
<checkout_extension>
|
1060 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1061 |
<separator>||</separator>
|
1062 |
</checkout_extension>
|
1063 |
+
<postcode_nl_extension_active>0</postcode_nl_extension_active>
|
1064 |
</depends>
|
1065 |
</use_postcode_check>
|
1066 |
<postcode_check_in_checkout translate="label" module="postnl">
|
1075 |
<depends>
|
1076 |
<use_postcode_check>1</use_postcode_check>
|
1077 |
<checkout_extension>
|
1078 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1079 |
<separator>||</separator>
|
1080 |
</checkout_extension>
|
1081 |
+
<postcode_nl_extension_active>0</postcode_nl_extension_active>
|
1082 |
</depends>
|
1083 |
</postcode_check_in_checkout>
|
1084 |
<postcode_check_in_addressbook translate="label" module="postnl">
|
1093 |
<depends>
|
1094 |
<use_postcode_check>1</use_postcode_check>
|
1095 |
<checkout_extension>
|
1096 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1097 |
<separator>||</separator>
|
1098 |
</checkout_extension>
|
1099 |
+
<postcode_nl_extension_active>0</postcode_nl_extension_active>
|
1100 |
</depends>
|
1101 |
</postcode_check_in_addressbook>
|
1102 |
<postcode_check_max_attempts translate="label tooltip" module="postnl">
|
1110 |
<depends>
|
1111 |
<use_postcode_check>1</use_postcode_check>
|
1112 |
<checkout_extension>
|
1113 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1114 |
<separator>||</separator>
|
1115 |
</checkout_extension>
|
1116 |
+
<postcode_nl_extension_active>0</postcode_nl_extension_active>
|
1117 |
</depends>
|
1118 |
<validate>validate-int validate-greater-than-zero</validate>
|
1119 |
</postcode_check_max_attempts>
|
1128 |
<depends>
|
1129 |
<use_postcode_check>1</use_postcode_check>
|
1130 |
<checkout_extension>
|
1131 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1132 |
<separator>||</separator>
|
1133 |
</checkout_extension>
|
1134 |
+
<postcode_nl_extension_active>0</postcode_nl_extension_active>
|
1135 |
</depends>
|
1136 |
<validate>validate-int validate-greater-than-zero</validate>
|
1137 |
</postcode_check_timeout>
|
1138 |
+
<gomage_postcode_check_info translate="comment" module="postnl">
|
1139 |
+
<comment><![CDATA[If you are using the Gomage Lightcheckout extension in combination with the PostNL Postcode check;<br/>Please know that the street-settings from the Gomage Lightcheckout extension will be ignored.<br/> Read more about the settings <a href="##MUST_BE_REPLACED##" target="_blank">here</a>]]></comment>
|
1140 |
+
<frontend_model>postnl_adminhtml/system_config_form_field_infoBox</frontend_model>
|
1141 |
+
<sort_order>160</sort_order>
|
1142 |
+
<show_in_default>1</show_in_default>
|
1143 |
+
<show_in_website>1</show_in_website>
|
1144 |
+
<show_in_store>0</show_in_store>
|
1145 |
+
<depends>
|
1146 |
+
<use_postcode_check>1</use_postcode_check>
|
1147 |
+
<checkout_extension>gomage_lightcheckout</checkout_extension>
|
1148 |
+
</depends>
|
1149 |
+
</gomage_postcode_check_info>
|
1150 |
<address_lines>
|
1151 |
<frontend_type>hidden</frontend_type>
|
1152 |
<frontend_model>postnl_adminhtml/system_config_form_field_addressLines</frontend_model>
|
1153 |
+
<sort_order>170</sort_order>
|
1154 |
<show_in_default>1</show_in_default>
|
1155 |
<show_in_website>1</show_in_website>
|
1156 |
<show_in_store>0</show_in_store>
|
1158 |
<split_street_unavailable_info translate="comment" module="postnl">
|
1159 |
<comment><![CDATA[You are currently using fewer than 2 address lines. In order to guarantee proper address processing, the PostNL extension requires at least 2 address lines. You can read more on how to configure split address lines <a href="http://kb.tig.nl/topic/55961916" target="_blank">here</a>.]]></comment>
|
1160 |
<frontend_model>postnl_adminhtml/system_config_form_field_infoBox</frontend_model>
|
1161 |
+
<sort_order>180</sort_order>
|
1162 |
<show_in_default>1</show_in_default>
|
1163 |
<show_in_website>1</show_in_website>
|
1164 |
<show_in_store>0</show_in_store>
|
1176 |
<frontend_type>checkbox</frontend_type>
|
1177 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1178 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1179 |
+
<sort_order>190</sort_order>
|
1180 |
<show_in_default>1</show_in_default>
|
1181 |
<show_in_website>1</show_in_website>
|
1182 |
<show_in_store>0</show_in_store>
|
1184 |
<address_lines>
|
1185 |
<eval><![CDATA[{{value}} > 1]]></eval>
|
1186 |
</address_lines>
|
1187 |
+
<use_postcode_check>
|
1188 |
+
<eval><![CDATA[!{{value}} || $('postnl_cif_labels_and_confirming_postcode_nl_extension_active').getValue() == 1]]></eval>
|
1189 |
+
</use_postcode_check>
|
1190 |
</depends>
|
1191 |
</split_street>
|
1192 |
<streetname_field translate="label" module="postnl">
|
1193 |
<label>Streetname field</label>
|
1194 |
<frontend_type>select</frontend_type>
|
1195 |
<source_model>postnl_core/system_config_source_streetField</source_model>
|
1196 |
+
<sort_order>200</sort_order>
|
1197 |
<show_in_default>1</show_in_default>
|
1198 |
<show_in_website>1</show_in_website>
|
1199 |
<show_in_store>0</show_in_store>
|
1202 |
<eval><![CDATA[{{value}} > 1]]></eval>
|
1203 |
</address_lines>
|
1204 |
<split_street>1</split_street>
|
1205 |
+
<use_postcode_check>
|
1206 |
+
<eval><![CDATA[!{{value}} || $('postnl_cif_labels_and_confirming_postcode_nl_extension_active').getValue() == 1]]></eval>
|
1207 |
+
</use_postcode_check>
|
1208 |
</depends>
|
1209 |
<validate>validate-select postnl-street-field</validate>
|
1210 |
</streetname_field>
|
1212 |
<label>Housenr. field</label>
|
1213 |
<frontend_type>select</frontend_type>
|
1214 |
<source_model>postnl_core/system_config_source_streetField</source_model>
|
1215 |
+
<sort_order>210</sort_order>
|
1216 |
<show_in_default>1</show_in_default>
|
1217 |
<show_in_website>1</show_in_website>
|
1218 |
<show_in_store>0</show_in_store>
|
1221 |
<eval><![CDATA[{{value}} > 1]]></eval>
|
1222 |
</address_lines>
|
1223 |
<split_street>1</split_street>
|
1224 |
+
<use_postcode_check>
|
1225 |
+
<eval><![CDATA[!{{value}} || $('postnl_cif_labels_and_confirming_postcode_nl_extension_active').getValue() == 1]]></eval>
|
1226 |
+
</use_postcode_check>
|
1227 |
</depends>
|
1228 |
<validate>validate-select postnl-street-field</validate>
|
1229 |
</housenr_field>
|
1232 |
<frontend_type>checkbox</frontend_type>
|
1233 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1234 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1235 |
+
<sort_order>220</sort_order>
|
1236 |
<show_in_default>1</show_in_default>
|
1237 |
<show_in_website>1</show_in_website>
|
1238 |
<show_in_store>0</show_in_store>
|
1241 |
<eval><![CDATA[{{value}} > 2]]></eval>
|
1242 |
</address_lines>
|
1243 |
<split_street>1</split_street>
|
1244 |
+
<use_postcode_check>
|
1245 |
+
<eval><![CDATA[!{{value}} || $('postnl_cif_labels_and_confirming_postcode_nl_extension_active').getValue() == 1]]></eval>
|
1246 |
+
</use_postcode_check>
|
1247 |
</depends>
|
1248 |
</split_housenr>
|
1249 |
<housenr_extension_field translate="label" module="postnl">
|
1250 |
<label>Housenr. extension field</label>
|
1251 |
<frontend_type>select</frontend_type>
|
1252 |
<source_model>postnl_core/system_config_source_streetField</source_model>
|
1253 |
+
<sort_order>230</sort_order>
|
1254 |
<show_in_default>1</show_in_default>
|
1255 |
<show_in_website>1</show_in_website>
|
1256 |
<show_in_store>0</show_in_store>
|
1260 |
</address_lines>
|
1261 |
<split_street>1</split_street>
|
1262 |
<split_housenr>1</split_housenr>
|
1263 |
+
<use_postcode_check>
|
1264 |
+
<eval><![CDATA[!{{value}} || $('postnl_cif_labels_and_confirming_postcode_nl_extension_active').getValue() == 1]]></eval>
|
1265 |
+
</use_postcode_check>
|
1266 |
</depends>
|
1267 |
<validate>validate-select postnl-street-field</validate>
|
1268 |
</housenr_extension_field>
|
1269 |
<optional_street_fields_header translate="label" module="postnl">
|
1270 |
<label>Optional address fields</label>
|
1271 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
1272 |
+
<sort_order>240</sort_order>
|
1273 |
<show_in_default>1</show_in_default>
|
1274 |
<show_in_website>1</show_in_website>
|
1275 |
<show_in_store>0</show_in_store>
|
1278 |
<label>Area field</label>
|
1279 |
<frontend_type>select</frontend_type>
|
1280 |
<source_model>postnl_core/system_config_source_streetFieldWithDefault</source_model>
|
1281 |
+
<sort_order>250</sort_order>
|
1282 |
<show_in_default>1</show_in_default>
|
1283 |
<show_in_website>1</show_in_website>
|
1284 |
<show_in_store>0</show_in_store>
|
1287 |
<label>Building name field</label>
|
1288 |
<frontend_type>select</frontend_type>
|
1289 |
<source_model>postnl_core/system_config_source_streetFieldWithDefault</source_model>
|
1290 |
+
<sort_order>260</sort_order>
|
1291 |
<show_in_default>1</show_in_default>
|
1292 |
<show_in_website>1</show_in_website>
|
1293 |
<show_in_store>0</show_in_store>
|
1296 |
<label>Department field</label>
|
1297 |
<frontend_type>select</frontend_type>
|
1298 |
<source_model>postnl_core/system_config_source_streetFieldWithDefault</source_model>
|
1299 |
+
<sort_order>270</sort_order>
|
1300 |
<show_in_default>1</show_in_default>
|
1301 |
<show_in_website>1</show_in_website>
|
1302 |
<show_in_store>0</show_in_store>
|
1306 |
<tooltip>Doorcodes are often used in foreign addresses such as those used in France and Singapore.</tooltip>
|
1307 |
<frontend_type>select</frontend_type>
|
1308 |
<source_model>postnl_core/system_config_source_streetFieldWithDefault</source_model>
|
1309 |
+
<sort_order>280</sort_order>
|
1310 |
<show_in_default>1</show_in_default>
|
1311 |
<show_in_website>1</show_in_website>
|
1312 |
<show_in_store>0</show_in_store>
|
1315 |
<label>Floor field</label>
|
1316 |
<frontend_type>select</frontend_type>
|
1317 |
<source_model>postnl_core/system_config_source_streetFieldWithDefault</source_model>
|
1318 |
+
<sort_order>290</sort_order>
|
1319 |
<show_in_default>1</show_in_default>
|
1320 |
<show_in_website>1</show_in_website>
|
1321 |
<show_in_store>0</show_in_store>
|
1324 |
<label>Remark field</label>
|
1325 |
<frontend_type>select</frontend_type>
|
1326 |
<source_model>postnl_core/system_config_source_streetFieldWithDefault</source_model>
|
1327 |
+
<sort_order>300</sort_order>
|
1328 |
<show_in_default>1</show_in_default>
|
1329 |
<show_in_website>1</show_in_website>
|
1330 |
<show_in_store>0</show_in_store>
|
1332 |
<save_and_continue translate="label" module="postnl">
|
1333 |
<label>Save and continue</label>
|
1334 |
<frontend_model>postnl_adminhtml/system_config_form_field_wizardSaveButton</frontend_model>
|
1335 |
+
<sort_order>310</sort_order>
|
1336 |
<show_in_default>1</show_in_default>
|
1337 |
<show_in_website>1</show_in_website>
|
1338 |
<show_in_store>1</show_in_store>
|
1360 |
<depends>
|
1361 |
<checkout_extension>
|
1362 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1363 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1364 |
<separator>||</separator>
|
1365 |
</checkout_extension>
|
1366 |
</depends>
|
1367 |
</delivery_options_header>
|
1368 |
<delivery_options_disabled_header translate="label" module="postnl">
|
1369 |
+
<label>PostNL delivery options are only available for Magento's One Page Checkout, Idev's OneStepCheckout and the GoMage LightCheckout extensions.</label>
|
1370 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
1371 |
<sort_order>20</sort_order>
|
1372 |
<show_in_default>1</show_in_default>
|
1391 |
<depends>
|
1392 |
<checkout_extension>
|
1393 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1394 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1395 |
<separator>||</separator>
|
1396 |
</checkout_extension>
|
1397 |
</depends>
|
1398 |
</delivery_options_active>
|
1399 |
+
<gomage_delivery_date_conflict>
|
1400 |
+
<frontend_type>hidden</frontend_type>
|
1401 |
+
<frontend_model>postnl_adminhtml/system_config_form_field_goMageDeliveryDateConflicts</frontend_model>
|
1402 |
+
<sort_order>40</sort_order>
|
1403 |
+
<show_in_default>1</show_in_default>
|
1404 |
+
<show_in_website>1</show_in_website>
|
1405 |
+
<show_in_store>1</show_in_store>
|
1406 |
+
</gomage_delivery_date_conflict>
|
1407 |
+
<delivery_options_gomage_conflict_warning translate="comment" module="postnl">
|
1408 |
+
<label><![CDATA[[POSTNL-0222] Warning: possible PostNL and GoMage LightCheckout conflict. <a href="http://kb.tig.nl/topic/" target="blank">Click here for more information from the TIG knowledgebase.</a>]]></label>
|
1409 |
+
<comment>You have enabled PostNL delivery options and GoMage LightCheckout's Delivery Date functionality for the same shipping methods. Unfortunately these two functionalities conflict. Please disable one of these features.</comment>
|
1410 |
+
<frontend_model>postnl_adminhtml/system_config_form_field_warningBox</frontend_model>
|
1411 |
+
<sort_order>50</sort_order>
|
1412 |
+
<show_in_default>1</show_in_default>
|
1413 |
+
<show_in_website>1</show_in_website>
|
1414 |
+
<show_in_store>1</show_in_store>
|
1415 |
+
<depends>
|
1416 |
+
<delivery_options_active>1</delivery_options_active>
|
1417 |
+
<checkout_extension>
|
1418 |
+
<fieldset>cif_labels_and_confirming</fieldset>
|
1419 |
+
<value>gomage_lightcheckout</value>
|
1420 |
+
</checkout_extension>
|
1421 |
+
<gomage_delivery_date_conflict>1</gomage_delivery_date_conflict>
|
1422 |
+
</depends>
|
1423 |
+
</delivery_options_gomage_conflict_warning>
|
1424 |
<theme translate="label comment" module="postnl">
|
1425 |
<label>Delivery options theme</label>
|
1426 |
<comment><![CDATA[You can view an example of the different themes <a href="http://kb.tig.nl/topic/58787233" target="_blank" title="PostNL delivery option themes">here</a>.]]></comment>
|
1427 |
<frontend_type>select</frontend_type>
|
1428 |
<source_model>postnl_deliveryoptions/system_config_source_themes</source_model>
|
1429 |
+
<sort_order>60</sort_order>
|
1430 |
<show_in_default>1</show_in_default>
|
1431 |
<show_in_website>1</show_in_website>
|
1432 |
<show_in_store>1</show_in_store>
|
1434 |
<delivery_options_active>1</delivery_options_active>
|
1435 |
<checkout_extension>
|
1436 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1437 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1438 |
<separator>||</separator>
|
1439 |
</checkout_extension>
|
1440 |
</depends>
|
1445 |
<frontend_type>checkbox</frontend_type>
|
1446 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1447 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1448 |
+
<sort_order>70</sort_order>
|
1449 |
<show_in_default>1</show_in_default>
|
1450 |
<show_in_website>1</show_in_website>
|
1451 |
<show_in_store>1</show_in_store>
|
1453 |
<delivery_options_active>1</delivery_options_active>
|
1454 |
<checkout_extension>
|
1455 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1456 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1457 |
<separator>||</separator>
|
1458 |
</checkout_extension>
|
1459 |
</depends>
|
1460 |
</responsive>
|
1461 |
+
<stock_options translate="label tooltip" module="postnl">
|
1462 |
+
<label>Stock options</label>
|
1463 |
+
<tooltip>Select for which products PostNL delivery options should be available.</tooltip>
|
1464 |
+
<frontend_type>postnl_radios</frontend_type>
|
1465 |
+
<source_model>postnl_deliveryoptions/system_config_source_stockOptions</source_model>
|
1466 |
+
<sort_order>80</sort_order>
|
|
|
1467 |
<show_in_default>1</show_in_default>
|
1468 |
<show_in_website>1</show_in_website>
|
1469 |
<show_in_store>1</show_in_store>
|
1471 |
<delivery_options_active>1</delivery_options_active>
|
1472 |
<checkout_extension>
|
1473 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1474 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1475 |
<separator>||</separator>
|
1476 |
</checkout_extension>
|
1477 |
</depends>
|
1478 |
+
</stock_options>
|
1479 |
<enable_delivery_days translate="label tooltip" module="postnl">
|
1480 |
<label>Enable delivery days</label>
|
1481 |
<tooltip>Delivery days allow customers to choose on which date they want their order delivered.</tooltip>
|
1482 |
<frontend_type>checkbox</frontend_type>
|
1483 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1484 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1485 |
+
<sort_order>90</sort_order>
|
1486 |
<show_in_default>1</show_in_default>
|
1487 |
<show_in_website>1</show_in_website>
|
1488 |
<show_in_store>1</show_in_store>
|
1490 |
<delivery_options_active>1</delivery_options_active>
|
1491 |
<checkout_extension>
|
1492 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1493 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1494 |
<separator>||</separator>
|
1495 |
</checkout_extension>
|
1496 |
</depends>
|
1500 |
<tooltip>Submit how many days in the future after the first delivery moment your customers can choose to receive their orders.</tooltip>
|
1501 |
<frontend_type>select</frontend_type>
|
1502 |
<source_model>postnl_deliveryoptions/system_config_source_deliveryDaysNumber</source_model>
|
1503 |
+
<sort_order>100</sort_order>
|
1504 |
<show_in_default>1</show_in_default>
|
1505 |
<show_in_website>1</show_in_website>
|
1506 |
<show_in_store>1</show_in_store>
|
1509 |
<enable_delivery_days>1</enable_delivery_days>
|
1510 |
<checkout_extension>
|
1511 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1512 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1513 |
<separator>||</separator>
|
1514 |
</checkout_extension>
|
1515 |
</depends>
|
1520 |
<frontend_type>checkbox</frontend_type>
|
1521 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1522 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1523 |
+
<sort_order>110</sort_order>
|
1524 |
<show_in_default>1</show_in_default>
|
1525 |
<show_in_website>1</show_in_website>
|
1526 |
<show_in_store>1</show_in_store>
|
1529 |
<delivery_options_active>1</delivery_options_active>
|
1530 |
<checkout_extension>
|
1531 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1532 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1533 |
<separator>||</separator>
|
1534 |
</checkout_extension>
|
1535 |
</depends>
|
1540 |
<frontend_type>checkbox</frontend_type>
|
1541 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1542 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1543 |
+
<sort_order>120</sort_order>
|
1544 |
<show_in_default>1</show_in_default>
|
1545 |
<show_in_website>1</show_in_website>
|
1546 |
<show_in_store>1</show_in_store>
|
1550 |
<enable_timeframes>1</enable_timeframes>
|
1551 |
<checkout_extension>
|
1552 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1553 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1554 |
<separator>||</separator>
|
1555 |
</checkout_extension>
|
1556 |
</depends>
|
1560 |
<tooltip>Additional costs for evening timeframes in the store's base currency. This fee will be added to the shipping costs. This value must be between 0.00 and 2.00 EUR incl. VAT. Leave this field empty to charge no extra fee for evening timeframes.</tooltip>
|
1561 |
<frontend_type>text</frontend_type>
|
1562 |
<backend_model>postnl_deliveryoptions/system_config_backend_validateFee</backend_model>
|
1563 |
+
<sort_order>130</sort_order>
|
1564 |
<show_in_default>1</show_in_default>
|
1565 |
<show_in_website>1</show_in_website>
|
1566 |
<show_in_store>1</show_in_store>
|
1572 |
<enable_evening_timeframes>1</enable_evening_timeframes>
|
1573 |
<checkout_extension>
|
1574 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1575 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1576 |
<separator>||</separator>
|
1577 |
</checkout_extension>
|
1578 |
</depends>
|
1583 |
<frontend_type>checkbox</frontend_type>
|
1584 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1585 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1586 |
+
<sort_order>140</sort_order>
|
1587 |
<show_in_default>1</show_in_default>
|
1588 |
<show_in_website>1</show_in_website>
|
1589 |
<show_in_store>1</show_in_store>
|
1591 |
<delivery_options_active>1</delivery_options_active>
|
1592 |
<checkout_extension>
|
1593 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1594 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1595 |
<separator>||</separator>
|
1596 |
</checkout_extension>
|
1597 |
</depends>
|
1602 |
<frontend_type>checkbox</frontend_type>
|
1603 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1604 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1605 |
+
<sort_order>150</sort_order>
|
1606 |
<show_in_default>1</show_in_default>
|
1607 |
<show_in_website>1</show_in_website>
|
1608 |
<show_in_store>1</show_in_store>
|
1611 |
<enable_pakjegemak>1</enable_pakjegemak>
|
1612 |
<checkout_extension>
|
1613 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1614 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1615 |
<separator>||</separator>
|
1616 |
</checkout_extension>
|
1617 |
</depends>
|
1621 |
<tooltip>Additional costs for early delivery locations in the store's base currency. This fee will be added to the shipping costs. This value must be between 0.00 and 2.00 EUR incl. VAT. Leave this field empty to charge no extra fee for early delivery locations.</tooltip>
|
1622 |
<frontend_type>text</frontend_type>
|
1623 |
<backend_model>postnl_deliveryoptions/system_config_backend_validateFee</backend_model>
|
1624 |
+
<sort_order>160</sort_order>
|
1625 |
<show_in_default>1</show_in_default>
|
1626 |
<show_in_website>1</show_in_website>
|
1627 |
<show_in_store>1</show_in_store>
|
1632 |
<enable_pakjegemak_express>1</enable_pakjegemak_express>
|
1633 |
<checkout_extension>
|
1634 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1635 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1636 |
<separator>||</separator>
|
1637 |
</checkout_extension>
|
1638 |
</depends>
|
1643 |
<frontend_type>checkbox</frontend_type>
|
1644 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1645 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1646 |
+
<sort_order>170</sort_order>
|
1647 |
<show_in_default>1</show_in_default>
|
1648 |
<show_in_website>1</show_in_website>
|
1649 |
<show_in_store>1</show_in_store>
|
1651 |
<delivery_options_active>1</delivery_options_active>
|
1652 |
<checkout_extension>
|
1653 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1654 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1655 |
<separator>||</separator>
|
1656 |
</checkout_extension>
|
1657 |
</depends>
|
1662 |
<frontend_type>checkbox</frontend_type>
|
1663 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1664 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1665 |
+
<sort_order>180</sort_order>
|
1666 |
<show_in_default>1</show_in_default>
|
1667 |
<show_in_website>1</show_in_website>
|
1668 |
<show_in_store>1</show_in_store>
|
1670 |
<delivery_options_active>1</delivery_options_active>
|
1671 |
<checkout_extension>
|
1672 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1673 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1674 |
<separator>||</separator>
|
1675 |
</checkout_extension>
|
1676 |
</depends>
|
1681 |
<frontend_type>checkbox</frontend_type>
|
1682 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1683 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1684 |
+
<sort_order>190</sort_order>
|
1685 |
<show_in_default>1</show_in_default>
|
1686 |
<show_in_website>1</show_in_website>
|
1687 |
<show_in_store>1</show_in_store>
|
1691 |
<buspakje_calculation_mode>automatic</buspakje_calculation_mode>
|
1692 |
<checkout_extension>
|
1693 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1694 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1695 |
<separator>||</separator>
|
1696 |
</checkout_extension>
|
1697 |
</depends>
|
1702 |
<frontend_type>checkbox</frontend_type>
|
1703 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1704 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1705 |
+
<sort_order>200</sort_order>
|
1706 |
<show_in_default>1</show_in_default>
|
1707 |
<show_in_website>1</show_in_website>
|
1708 |
<show_in_store>1</show_in_store>
|
1713 |
<show_options_for_buspakje>1</show_options_for_buspakje>
|
1714 |
<checkout_extension>
|
1715 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1716 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1717 |
<separator>||</separator>
|
1718 |
</checkout_extension>
|
1719 |
</depends>
|
1723 |
<frontend_type>checkbox</frontend_type>
|
1724 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1725 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1726 |
+
<sort_order>210</sort_order>
|
1727 |
<show_in_default>1</show_in_default>
|
1728 |
<show_in_website>1</show_in_website>
|
1729 |
<show_in_store>1</show_in_store>
|
1736 |
<enable_delivery_days>1</enable_delivery_days>
|
1737 |
<checkout_extension>
|
1738 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1739 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1740 |
<separator>||</separator>
|
1741 |
</checkout_extension>
|
1742 |
</depends>
|
1747 |
<frontend_type>checkbox</frontend_type>
|
1748 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1749 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1750 |
+
<sort_order>220</sort_order>
|
1751 |
<show_in_default>1</show_in_default>
|
1752 |
<show_in_website>1</show_in_website>
|
1753 |
<show_in_store>1</show_in_store>
|
1760 |
<enable_pakjegemak>1</enable_pakjegemak>
|
1761 |
<checkout_extension>
|
1762 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1763 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1764 |
<separator>||</separator>
|
1765 |
</checkout_extension>
|
1766 |
</depends>
|
1771 |
<frontend_type>checkbox</frontend_type>
|
1772 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1773 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1774 |
+
<sort_order>230</sort_order>
|
1775 |
<show_in_default>1</show_in_default>
|
1776 |
<show_in_website>1</show_in_website>
|
1777 |
<show_in_store>1</show_in_store>
|
1784 |
<enable_pakketautomaat_locations>1</enable_pakketautomaat_locations>
|
1785 |
<checkout_extension>
|
1786 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1787 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1788 |
<separator>||</separator>
|
1789 |
</checkout_extension>
|
1790 |
</depends>
|
1792 |
<stated_address_header translate="label" module="postnl">
|
1793 |
<label>Only stated address</label>
|
1794 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
1795 |
+
<sort_order>240</sort_order>
|
1796 |
<show_in_default>1</show_in_default>
|
1797 |
<show_in_website>1</show_in_website>
|
1798 |
<show_in_store>1</show_in_store>
|
1800 |
<delivery_options_active>1</delivery_options_active>
|
1801 |
<checkout_extension>
|
1802 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1803 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1804 |
<separator>||</separator>
|
1805 |
</checkout_extension>
|
1806 |
</depends>
|
1811 |
<frontend_type>checkbox</frontend_type>
|
1812 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1813 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1814 |
+
<sort_order>250</sort_order>
|
1815 |
<show_in_default>1</show_in_default>
|
1816 |
<show_in_website>1</show_in_website>
|
1817 |
<show_in_store>1</show_in_store>
|
1819 |
<delivery_options_active>1</delivery_options_active>
|
1820 |
<checkout_extension>
|
1821 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1822 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1823 |
<separator>||</separator>
|
1824 |
</checkout_extension>
|
1825 |
</depends>
|
1829 |
<frontend_type>checkbox</frontend_type>
|
1830 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1831 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1832 |
+
<sort_order>260</sort_order>
|
1833 |
<show_in_default>1</show_in_default>
|
1834 |
<show_in_website>1</show_in_website>
|
1835 |
<show_in_store>1</show_in_store>
|
1838 |
<delivery_options_active>1</delivery_options_active>
|
1839 |
<checkout_extension>
|
1840 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1841 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1842 |
<separator>||</separator>
|
1843 |
</checkout_extension>
|
1844 |
</depends>
|
1847 |
<label>Stated address only fee</label>
|
1848 |
<frontend_type>text</frontend_type>
|
1849 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1850 |
+
<sort_order>270</sort_order>
|
1851 |
<show_in_default>1</show_in_default>
|
1852 |
<show_in_website>1</show_in_website>
|
1853 |
<show_in_store>1</show_in_store>
|
1856 |
<delivery_options_active>1</delivery_options_active>
|
1857 |
<checkout_extension>
|
1858 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1859 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1860 |
<separator>||</separator>
|
1861 |
</checkout_extension>
|
1862 |
</depends>
|
1864 |
<mijnpakket_header translate="label" module="postnl">
|
1865 |
<label>MijnPakket</label>
|
1866 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
1867 |
+
<sort_order>280</sort_order>
|
1868 |
<show_in_default>1</show_in_default>
|
1869 |
<show_in_website>1</show_in_website>
|
1870 |
<show_in_store>1</show_in_store>
|
1872 |
<delivery_options_active>1</delivery_options_active>
|
1873 |
<checkout_extension>
|
1874 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1875 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1876 |
<separator>||</separator>
|
1877 |
</checkout_extension>
|
1878 |
</depends>
|
1883 |
<frontend_type>checkbox</frontend_type>
|
1884 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1885 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1886 |
+
<sort_order>290</sort_order>
|
1887 |
<show_in_default>1</show_in_default>
|
1888 |
<show_in_website>1</show_in_website>
|
1889 |
<show_in_store>1</show_in_store>
|
1891 |
<delivery_options_active>1</delivery_options_active>
|
1892 |
<checkout_extension>
|
1893 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1894 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1895 |
<separator>||</separator>
|
1896 |
</checkout_extension>
|
1897 |
</depends>
|
1902 |
<frontend_type>checkbox</frontend_type>
|
1903 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1904 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1905 |
+
<sort_order>300</sort_order>
|
1906 |
<show_in_default>1</show_in_default>
|
1907 |
<show_in_website>1</show_in_website>
|
1908 |
<show_in_store>1</show_in_store>
|
1910 |
<delivery_options_active>1</delivery_options_active>
|
1911 |
<checkout_extension>
|
1912 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1913 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1914 |
<separator>||</separator>
|
1915 |
</checkout_extension>
|
1916 |
</depends>
|
1921 |
<frontend_type>checkbox</frontend_type>
|
1922 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1923 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1924 |
+
<sort_order>310</sort_order>
|
1925 |
<show_in_default>1</show_in_default>
|
1926 |
<show_in_website>1</show_in_website>
|
1927 |
<show_in_store>1</show_in_store>
|
1930 |
<mijnpakket_notification>1</mijnpakket_notification>
|
1931 |
<checkout_extension>
|
1932 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1933 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1934 |
<separator>||</separator>
|
1935 |
</checkout_extension>
|
1936 |
</depends>
|
1941 |
<frontend_type>checkbox</frontend_type>
|
1942 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1943 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1944 |
+
<sort_order>320</sort_order>
|
1945 |
<show_in_default>1</show_in_default>
|
1946 |
<show_in_website>1</show_in_website>
|
1947 |
<show_in_store>1</show_in_store>
|
1950 |
<mijnpakket_notification>1</mijnpakket_notification>
|
1951 |
<checkout_extension>
|
1952 |
<fieldset>cif_labels_and_confirming</fieldset>
|
1953 |
+
<value>magento_onepagecheckout||idev_onestepcheckout||gomage_lightcheckout</value>
|
1954 |
<separator>||</separator>
|
1955 |
</checkout_extension>
|
1956 |
</depends>
|
1958 |
<buspakje_header translate="label" module="postnl">
|
1959 |
<label>Letter box parcels</label>
|
1960 |
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
1961 |
+
<sort_order>330</sort_order>
|
1962 |
<show_in_default>1</show_in_default>
|
1963 |
<show_in_website>0</show_in_website>
|
1964 |
<show_in_store>0</show_in_store>
|
1969 |
<frontend_type>checkbox</frontend_type>
|
1970 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
1971 |
<source_model>postnl/system_config_source_yesno</source_model>
|
1972 |
+
<sort_order>340</sort_order>
|
1973 |
<show_in_default>1</show_in_default>
|
1974 |
<show_in_website>0</show_in_website>
|
1975 |
<show_in_store>0</show_in_store>
|
1980 |
<tooltip>You can let the PostNL extension calculate automatically whether a shipment would fit in a mail slot or you can manually determine this when creating shipments in the backend. If set to 'automatic' the PostNL extension will check the 'Weight' and 'PostNL Max Qty For Letter Box Parcels' of all products in an order to determine whether the shipment would fit through a mail slot. You may always overrule this and manually set whether a shipment is a letter box parcel or not.</tooltip>
|
1981 |
<frontend_type>select</frontend_type>
|
1982 |
<source_model>postnl_core/system_config_source_manualAutomatic</source_model>
|
1983 |
+
<sort_order>350</sort_order>
|
1984 |
<show_in_default>1</show_in_default>
|
1985 |
<show_in_website>0</show_in_website>
|
1986 |
<show_in_store>0</show_in_store>
|
1991 |
<save_and_continue translate="label" module="postnl">
|
1992 |
<label>Save and continue</label>
|
1993 |
<frontend_model>postnl_adminhtml/system_config_form_field_wizardSaveButton</frontend_model>
|
1994 |
+
<sort_order>360</sort_order>
|
1995 |
<show_in_default>1</show_in_default>
|
1996 |
<show_in_website>1</show_in_website>
|
1997 |
<show_in_store>1</show_in_store>
|
2213 |
</packing_slip_fields_header>
|
2214 |
<show_label translate="label tooltip" module="postnl">
|
2215 |
<label>Show shipping label</label>
|
2216 |
+
<tooltip>If you select 'on the same page' in some cases the shipping label may not fit. In this case, the shipping label will be printed on a separate page instead.</tooltip>
|
2217 |
+
<frontend_type>postnl_radios</frontend_type>
|
2218 |
+
<source_model>postnl_core/system_config_source_packingSlipLabel</source_model>
|
|
|
2219 |
<sort_order>50</sort_order>
|
2220 |
<show_in_default>1</show_in_default>
|
2221 |
<show_in_website>1</show_in_website>
|
2475 |
</track_and_trace_email_template>
|
2476 |
<send_copy translate="label tooltip" module="postnl">
|
2477 |
<label>Send a copy of the track & trace email</label>
|
2478 |
+
<tooltip>If enabled, you may enter separate email addresses to which the track & trace email will be sent in addition to the customer.</tooltip>
|
2479 |
<frontend_type>checkbox</frontend_type>
|
2480 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
2481 |
<source_model>postnl/system_config_source_yesno</source_model>
|
2486 |
</send_copy>
|
2487 |
<copy_to translate="label tooltip" module="postnl">
|
2488 |
<label>Send track & trace email copy to</label>
|
2489 |
+
<tooltip>You can enter multiple email addresses separated by commas.</tooltip>
|
2490 |
<frontend_type>text</frontend_type>
|
2491 |
<sort_order>50</sort_order>
|
2492 |
<show_in_default>1</show_in_default>
|
4283 |
<show_in_store>0</show_in_store>
|
4284 |
<depends>
|
4285 |
<use_buspakje>
|
4286 |
+
<fieldset>delivery_options</fieldset>
|
4287 |
<value>1</value>
|
4288 |
</use_buspakje>
|
4289 |
</depends>
|
4390 |
</receive_updates>
|
4391 |
<show_error_details_in_frontend translate="label tooltip" module="postnl">
|
4392 |
<label>Show error details in the frontend</label>
|
4393 |
+
<tooltip>If set to 'yes', error details will be shown in the frontend when an error occurs. Error details include the error code as well as a link to the TIG knowledgebase article concerning the error. This is useful for debugging purposes, but should be disabled in a production environment.</tooltip>
|
4394 |
<frontend_type>checkbox</frontend_type>
|
4395 |
<backend_model>postnl/system_config_backend_checkbox</backend_model>
|
4396 |
<source_model>postnl/system_config_source_yesno</source_model>
|
4419 |
<show_in_store>0</show_in_store>
|
4420 |
</cif_versions_header>
|
4421 |
<cif_versions_infobox translate="comment" module="postnl">
|
4422 |
+
<label>ONLY CHANGE THESE SETTINGS WITH DIRECT INSTRUCTION FROM POSTNL OR TOTAL INTERNET GROUP</label>
|
4423 |
<frontend_model>postnl_adminhtml/system_config_form_field_warningBox</frontend_model>
|
4424 |
<sort_order>110</sort_order>
|
4425 |
<show_in_default>1</show_in_default>
|
4498 |
<show_in_store>0</show_in_store>
|
4499 |
<validate>postnl-validate-webservice-version</validate>
|
4500 |
</cif_version_location>
|
4501 |
+
<uninstall_header translate="label" module="postnl">
|
4502 |
+
<label>Uninstall the PostNL extension</label>
|
4503 |
+
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
4504 |
+
<sort_order>200</sort_order>
|
4505 |
+
<show_in_default>1</show_in_default>
|
4506 |
+
<show_in_website>0</show_in_website>
|
4507 |
+
<show_in_store>0</show_in_store>
|
4508 |
+
</uninstall_header>
|
4509 |
+
<uninstall_button translate="comment" module="postnl">
|
4510 |
+
<comment><![CDATA[Click <a href="https://kb.tig.nl/topic/94842766" target="_blank">here</a> for more information about the uninstall process.]]></comment>
|
4511 |
+
<frontend_model>postnl_adminhtml/system_config_form_field_uninstallButton</frontend_model>
|
4512 |
+
<sort_order>210</sort_order>
|
4513 |
+
<show_in_default>1</show_in_default>
|
4514 |
+
<show_in_website>0</show_in_website>
|
4515 |
+
<show_in_store>0</show_in_store>
|
4516 |
+
</uninstall_button>
|
4517 |
</fields>
|
4518 |
</advanced>
|
4519 |
</groups>
|
@@ -0,0 +1,283 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<definitions xmlns:typens="urn:{{var wsdl.name}}" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" name="{{var wsdl.name}}" targetNamespace="urn:{{var wsdl.name}}" xmlns:ns0="urn:Magento">
|
3 |
+
|
4 |
+
<types>
|
5 |
+
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:Magento">
|
6 |
+
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" schemaLocation="http://schemas.xmlsoap.org/soap/encoding/" />
|
7 |
+
<complexType name="postnlError">
|
8 |
+
<all>
|
9 |
+
<element name="entity_id" type="xsd:string" minOccurs="1" />
|
10 |
+
<element name="code" type="xsd:string" minOccurs="1" />
|
11 |
+
<element name="description" type="xsd:string" minOccurs="1" />
|
12 |
+
</all>
|
13 |
+
</complexType>
|
14 |
+
<complexType name="postnlErrorArray">
|
15 |
+
<complexContent>
|
16 |
+
<restriction base="soapenc:Array">
|
17 |
+
<attribute ref="soapenc:arrayType" wsdl:arrayType="typens:postnlError[]" />
|
18 |
+
</restriction>
|
19 |
+
</complexContent>
|
20 |
+
</complexType>
|
21 |
+
|
22 |
+
<complexType name="postnlWarning">
|
23 |
+
<all>
|
24 |
+
<element name="entity_id" type="xsd:string" minOccurs="1" />
|
25 |
+
<element name="code" type="xsd:string" minOccurs="1" />
|
26 |
+
<element name="description" type="xsd:string" minOccurs="1" />
|
27 |
+
</all>
|
28 |
+
</complexType>
|
29 |
+
<complexType name="postnlWarningArray">
|
30 |
+
<complexContent>
|
31 |
+
<restriction base="soapenc:Array">
|
32 |
+
<attribute ref="soapenc:arrayType" wsdl:arrayType="typens:postnlWarning[]" />
|
33 |
+
</restriction>
|
34 |
+
</complexContent>
|
35 |
+
</complexType>
|
36 |
+
|
37 |
+
<complexType name="postnlShipmentEntity">
|
38 |
+
<all>
|
39 |
+
<element name="order_id" type="xsd:string" minOccurs="1" />
|
40 |
+
<element name="shipment_id" type="xsd:string" minOccurs="1" />
|
41 |
+
<element name="warning" type="typens:postnlWarningArray" minOccurs="0" />
|
42 |
+
<element name="error" type="typens:postnlErrorArray" minOccurs="0" />
|
43 |
+
</all>
|
44 |
+
</complexType>
|
45 |
+
<complexType name="postnlShipmentEntityArray">
|
46 |
+
<complexContent>
|
47 |
+
<restriction base="soapenc:Array">
|
48 |
+
<attribute ref="soapenc:arrayType" wsdl:arrayType="typens:postnlShipmentEntity[]" />
|
49 |
+
</restriction>
|
50 |
+
</complexContent>
|
51 |
+
</complexType>
|
52 |
+
|
53 |
+
<complexType name="postnlPrintedLabelEntity">
|
54 |
+
<all>
|
55 |
+
<element name="order_id" type="xsd:string" minOccurs="1" />
|
56 |
+
<element name="shipment_id" type="xsd:string" minOccurs="1" />
|
57 |
+
<element name="label" type="xsd:string" minOccurs="1" />
|
58 |
+
<element name="warning" type="typens:postnlWarningArray" minOccurs="0" />
|
59 |
+
<element name="error" type="typens:postnlErrorArray" minOccurs="0" />
|
60 |
+
</all>
|
61 |
+
</complexType>
|
62 |
+
<complexType name="postnlPrintedLabelEntityArray">
|
63 |
+
<complexContent>
|
64 |
+
<restriction base="soapenc:Array">
|
65 |
+
<attribute ref="soapenc:arrayType" wsdl:arrayType="typens:postnlPrintedLabelEntity[]" />
|
66 |
+
</restriction>
|
67 |
+
</complexContent>
|
68 |
+
</complexType>
|
69 |
+
|
70 |
+
<complexType name="postnlBarcodesArray">
|
71 |
+
<all>
|
72 |
+
<element name="shipment" type="typens:ArrayOfString" minOccurs="1" />
|
73 |
+
<element name="return" type="typens:ArrayOfString" minOccurs="0" />
|
74 |
+
</all>
|
75 |
+
</complexType>
|
76 |
+
|
77 |
+
<complexType name="postnlTrackAndTraceUrlEntity">
|
78 |
+
<all>
|
79 |
+
<element name="order_id" type="xsd:string" minOccurs="1" />
|
80 |
+
<element name="shipment_id" type="xsd:string" minOccurs="1" />
|
81 |
+
<element name="track_and_trace_url" type="xsd:string" minOccurs="1" />
|
82 |
+
<element name="main_barcode" type="xsd:string" minOccurs="1" />
|
83 |
+
<element name="return_barcode" type="xsd:string" minOccurs="0" />
|
84 |
+
<element name="all_barcodes" type="typens:postnlBarcodesArray" minOccurs="1" />
|
85 |
+
<element name="warning" type="typens:postnlWarningArray" minOccurs="0" />
|
86 |
+
<element name="error" type="typens:postnlErrorArray" minOccurs="0" />
|
87 |
+
</all>
|
88 |
+
</complexType>
|
89 |
+
<complexType name="postnlTrackAndTraceUrlEntityArray">
|
90 |
+
<complexContent>
|
91 |
+
<restriction base="soapenc:Array">
|
92 |
+
<attribute ref="soapenc:arrayType" wsdl:arrayType="typens:postnlTrackAndTraceUrlEntity[]" />
|
93 |
+
</restriction>
|
94 |
+
</complexContent>
|
95 |
+
</complexType>
|
96 |
+
|
97 |
+
<complexType name="postnlShippingStatusEntity">
|
98 |
+
<all>
|
99 |
+
<element name="order_id" type="xsd:string" minOccurs="1" />
|
100 |
+
<element name="shipment_id" type="xsd:string" minOccurs="1" />
|
101 |
+
<element name="shipping_phase" type="xsd:string" minOccurs="1" />
|
102 |
+
<element name="return_phase" type="xsd:string" minOccurs="1" />
|
103 |
+
<element name="warning" type="typens:postnlWarningArray" minOccurs="0" />
|
104 |
+
<element name="error" type="typens:postnlErrorArray" minOccurs="0" />
|
105 |
+
</all>
|
106 |
+
</complexType>
|
107 |
+
<complexType name="postnlShippingStatusEntityArray">
|
108 |
+
<complexContent>
|
109 |
+
<restriction base="soapenc:Array">
|
110 |
+
<attribute ref="soapenc:arrayType" wsdl:arrayType="typens:postnlShippingStatusEntity[]" />
|
111 |
+
</restriction>
|
112 |
+
</complexContent>
|
113 |
+
</complexType>
|
114 |
+
</schema>
|
115 |
+
</types>
|
116 |
+
|
117 |
+
<message name="postnlCreateShipmentsRequest">
|
118 |
+
<part name="sessionId" type="xsd:string" />
|
119 |
+
<part name="orderIds" type="typens:ArrayOfString" />
|
120 |
+
</message>
|
121 |
+
<message name="postnlCreateShipmentsResponse">
|
122 |
+
<part name="result" type="typens:postnlShipmentEntityArray" />
|
123 |
+
</message>
|
124 |
+
|
125 |
+
<message name="postnlCreateShipmentsConfirmAndPrintLabelsRequest">
|
126 |
+
<part name="sessionId" type="xsd:string" />
|
127 |
+
<part name="orderIds" type="typens:ArrayOfString" />
|
128 |
+
</message>
|
129 |
+
<message name="postnlCreateShipmentsConfirmAndPrintLabelsResponse">
|
130 |
+
<part name="result" type="typens:postnlPrintedLabelEntityArray" />
|
131 |
+
</message>
|
132 |
+
|
133 |
+
<message name="postnlConfirmShipmentsRequest">
|
134 |
+
<part name="sessionId" type="xsd:string" />
|
135 |
+
<part name="orderIds" type="typens:ArrayOfString" />
|
136 |
+
</message>
|
137 |
+
<message name="postnlConfirmShipmentsResponse">
|
138 |
+
<part name="result" type="typens:postnlShipmentEntityArray" />
|
139 |
+
</message>
|
140 |
+
|
141 |
+
<message name="postnlPrintShippingLabelsRequest">
|
142 |
+
<part name="sessionId" type="xsd:string" />
|
143 |
+
<part name="orderIds" type="typens:ArrayOfString" />
|
144 |
+
<part name="labelSize" type="xsd:string" minOccurs="0" />
|
145 |
+
<part name="labelStartPosition" type="xsd:int" minOccurs="0" />
|
146 |
+
</message>
|
147 |
+
<message name="postnlPrintShippingLabelsResponse">
|
148 |
+
<part name="result" type="typens:postnlPrintedLabelEntityArray" />
|
149 |
+
</message>
|
150 |
+
|
151 |
+
<message name="postnlConfirmAndPrintShippingLabelsRequest">
|
152 |
+
<part name="sessionId" type="xsd:string" />
|
153 |
+
<part name="orderIds" type="typens:ArrayOfString" />
|
154 |
+
<part name="labelSize" type="xsd:string" minOccurs="0" />
|
155 |
+
<part name="labelStartPosition" type="xsd:int" minOccurs="0" />
|
156 |
+
</message>
|
157 |
+
<message name="postnlConfirmAndPrintShippingLabelsResponse">
|
158 |
+
<part name="result" type="typens:postnlPrintedLabelEntityArray" />
|
159 |
+
</message>
|
160 |
+
|
161 |
+
<message name="postnlGetTrackAndTraceUrlsRequest">
|
162 |
+
<part name="sessionId" type="xsd:string" />
|
163 |
+
<part name="orderIds" type="typens:ArrayOfString" />
|
164 |
+
</message>
|
165 |
+
<message name="postnlGetTrackAndTraceUrlsResponse">
|
166 |
+
<part name="result" type="typens:postnlTrackAndTraceUrlEntityArray" />
|
167 |
+
</message>
|
168 |
+
|
169 |
+
<message name="postnlGetStatusInfoRequest">
|
170 |
+
<part name="sessionId" type="xsd:string" />
|
171 |
+
<part name="orderIds" type="typens:ArrayOfString" />
|
172 |
+
</message>
|
173 |
+
<message name="postnlGetStatusInfoResponse">
|
174 |
+
<part name="result" type="typens:postnlShippingStatusEntityArray" />
|
175 |
+
</message>
|
176 |
+
|
177 |
+
<portType name="{{var wsdl.handler}}PortType">
|
178 |
+
<operation name="postnlCreateShipments">
|
179 |
+
<documentation>Create PostNL Shipments</documentation>
|
180 |
+
<input message="typens:postnlCreateShipmentsRequest" />
|
181 |
+
<output message="typens:postnlCreateShipmentsResponse" />
|
182 |
+
</operation>
|
183 |
+
<operation name="postnlCreateShipmentsConfirmAndPrintLabels">
|
184 |
+
<documentation>Create PostNL Shipments, Confirm and Print Shipping Labels</documentation>
|
185 |
+
<input message="typens:postnlCreateShipmentsConfirmAndPrintLabelsRequest" />
|
186 |
+
<output message="typens:postnlCreateShipmentsConfirmAndPrintLabelsResponse" />
|
187 |
+
</operation>
|
188 |
+
<operation name="postnlConfirmShipments">
|
189 |
+
<documentation>Confirm PostNL Shipments</documentation>
|
190 |
+
<input message="typens:postnlConfirmShipmentsRequest" />
|
191 |
+
<output message="typens:postnlConfirmShipmentsResponse" />
|
192 |
+
</operation>
|
193 |
+
<operation name="postnlPrintShippingLabels">
|
194 |
+
<documentation>Print PostNL Shipping Labels</documentation>
|
195 |
+
<input message="typens:postnlPrintShippingLabelsRequest" />
|
196 |
+
<output message="typens:postnlPrintShippingLabelsResponse" />
|
197 |
+
</operation>
|
198 |
+
<operation name="postnlConfirmAndPrintShippingLabels">
|
199 |
+
<documentation>Confirm PostNL Shipments and Print Shipping Labels</documentation>
|
200 |
+
<input message="typens:postnlConfirmAndPrintShippingLabelsRequest" />
|
201 |
+
<output message="typens:postnlConfirmAndPrintShippingLabelsResponse" />
|
202 |
+
</operation>
|
203 |
+
<operation name="postnlGetTrackAndTraceUrls">
|
204 |
+
<documentation>Get PostNL Shipments Track And Trace URLs</documentation>
|
205 |
+
<input message="typens:postnlGetTrackAndTraceUrlsRequest" />
|
206 |
+
<output message="typens:postnlGetTrackAndTraceUrlsResponse" />
|
207 |
+
</operation>
|
208 |
+
<operation name="postnlGetStatusInfo">
|
209 |
+
<documentation>Get PostNL Shipments Shipping Status Info</documentation>
|
210 |
+
<input message="typens:postnlGetStatusInfoRequest" />
|
211 |
+
<output message="typens:postnlGetStatusInfoResponse" />
|
212 |
+
</operation>
|
213 |
+
</portType>
|
214 |
+
|
215 |
+
<binding name="{{var wsdl.handler}}Binding" type="typens:{{var wsdl.handler}}PortType">
|
216 |
+
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
|
217 |
+
<operation name="postnlCreateShipments">
|
218 |
+
<soap:operation soapAction="urn:{{var wsdl.handler}}Action" />
|
219 |
+
<input>
|
220 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
221 |
+
</input>
|
222 |
+
|
223 |
+
<output>
|
224 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
225 |
+
</output>
|
226 |
+
</operation>
|
227 |
+
<operation name="postnlCreateShipmentsConfirmAndPrintLabels">
|
228 |
+
<soap:operation soapAction="urn:{{var wsdl.handler}}Action" />
|
229 |
+
<input>
|
230 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
231 |
+
</input>
|
232 |
+
<output>
|
233 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
234 |
+
</output>
|
235 |
+
</operation>
|
236 |
+
<operation name="postnlConfirmShipments">
|
237 |
+
<soap:operation soapAction="urn:{{var wsdl.handler}}Action" />
|
238 |
+
<input>
|
239 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
240 |
+
</input>
|
241 |
+
<output>
|
242 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
243 |
+
</output>
|
244 |
+
</operation>
|
245 |
+
<operation name="postnlPrintShippingLabels">
|
246 |
+
<soap:operation soapAction="urn:{{var wsdl.handler}}Action" />
|
247 |
+
<input>
|
248 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
249 |
+
</input>
|
250 |
+
<output>
|
251 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
252 |
+
</output>
|
253 |
+
</operation>
|
254 |
+
<operation name="postnlConfirmAndPrintShippingLabels">
|
255 |
+
<soap:operation soapAction="urn:{{var wsdl.handler}}Action" />
|
256 |
+
<input>
|
257 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
258 |
+
</input>
|
259 |
+
<output>
|
260 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
261 |
+
</output>
|
262 |
+
</operation>
|
263 |
+
<operation name="postnlGetTrackAndTraceUrls">
|
264 |
+
<soap:operation soapAction="urn:{{var wsdl.handler}}Action" />
|
265 |
+
<input>
|
266 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
267 |
+
</input>
|
268 |
+
<output>
|
269 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
270 |
+
</output>
|
271 |
+
</operation>
|
272 |
+
<operation name="postnlGetStatusInfo">
|
273 |
+
<soap:operation soapAction="urn:{{var wsdl.handler}}Action" />
|
274 |
+
<input>
|
275 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
276 |
+
</input>
|
277 |
+
<output>
|
278 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
279 |
+
</output>
|
280 |
+
</operation>
|
281 |
+
</binding>
|
282 |
+
|
283 |
+
</definitions>
|
@@ -0,0 +1,379 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<wsdl:definitions xmlns:typens="urn:{{var wsdl.name}}" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="{{var wsdl.name}}" targetNamespace="urn:{{var wsdl.name}}">
|
3 |
+
|
4 |
+
<wsdl:types>
|
5 |
+
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:{{var wsdl.name}}">
|
6 |
+
<xsd:complexType name="postnlError">
|
7 |
+
<xsd:sequence>
|
8 |
+
<xsd:element name="entity_id" type="xsd:string" minOccurs="1" />
|
9 |
+
<xsd:element name="code" type="xsd:string" minOccurs="1" />
|
10 |
+
<xsd:element name="description" type="xsd:string" minOccurs="1" />
|
11 |
+
</xsd:sequence>
|
12 |
+
</xsd:complexType>
|
13 |
+
<xsd:complexType name="postnlErrorArray">
|
14 |
+
<xsd:sequence>
|
15 |
+
<xsd:element minOccurs="0" maxOccurs="unbounded" name="complexObjectArray" type="typens:postnlError" />
|
16 |
+
</xsd:sequence>
|
17 |
+
</xsd:complexType>
|
18 |
+
|
19 |
+
<xsd:complexType name="postnlWarning">
|
20 |
+
<xsd:sequence>
|
21 |
+
<xsd:element name="entity_id" type="xsd:string" minOccurs="1" />
|
22 |
+
<xsd:element name="code" type="xsd:string" minOccurs="1" />
|
23 |
+
<xsd:element name="description" type="xsd:string" minOccurs="1" />
|
24 |
+
</xsd:sequence>
|
25 |
+
</xsd:complexType>
|
26 |
+
<xsd:complexType name="postnlWarningArray">
|
27 |
+
<xsd:sequence>
|
28 |
+
<xsd:element minOccurs="0" maxOccurs="unbounded" name="complexObjectArray" type="typens:postnlWarning" />
|
29 |
+
</xsd:sequence>
|
30 |
+
</xsd:complexType>
|
31 |
+
|
32 |
+
<xsd:complexType name="postnlShipmentEntity">
|
33 |
+
<xsd:sequence>
|
34 |
+
<xsd:element name="order_id" type="xsd:string" minOccurs="1" />
|
35 |
+
<xsd:element name="shipment_id" type="xsd:string" minOccurs="1" />
|
36 |
+
<xsd:element name="warning" type="typens:postnlWarningArray" minOccurs="0" />
|
37 |
+
<xsd:element name="error" type="typens:postnlErrorArray" minOccurs="0" />
|
38 |
+
</xsd:sequence>
|
39 |
+
</xsd:complexType>
|
40 |
+
<xsd:complexType name="postnlShipmentEntityArray">
|
41 |
+
<xsd:sequence>
|
42 |
+
<xsd:element minOccurs="0" maxOccurs="unbounded" name="complexObjectArray" type="typens:postnlShipmentEntity" />
|
43 |
+
</xsd:sequence>
|
44 |
+
</xsd:complexType>
|
45 |
+
|
46 |
+
<xsd:complexType name="postnlPrintedLabelEntity">
|
47 |
+
<xsd:sequence>
|
48 |
+
<xsd:element name="order_id" type="xsd:string" minOccurs="1" />
|
49 |
+
<xsd:element name="shipment_id" type="xsd:string" minOccurs="1" />
|
50 |
+
<xsd:element name="label" type="xsd:string" minOccurs="1" />
|
51 |
+
<xsd:element name="warning" type="typens:postnlWarningArray" minOccurs="0" />
|
52 |
+
<xsd:element name="error" type="typens:postnlErrorArray" minOccurs="0" />
|
53 |
+
</xsd:sequence>
|
54 |
+
</xsd:complexType>
|
55 |
+
<xsd:complexType name="postnlPrintedLabelEntityArray">
|
56 |
+
<xsd:sequence>
|
57 |
+
<xsd:element minOccurs="0" maxOccurs="unbounded" name="complexObjectArray" type="typens:postnlPrintedLabelEntity" />
|
58 |
+
</xsd:sequence>
|
59 |
+
</xsd:complexType>
|
60 |
+
|
61 |
+
<xsd:complexType name="postnlBarcodesArray">
|
62 |
+
<xsd:sequence>
|
63 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="shipment" type="typens:ArrayOfString" />
|
64 |
+
<xsd:element minOccurs="0" maxOccurs="1" name="return" type="typens:ArrayOfString" />
|
65 |
+
</xsd:sequence>
|
66 |
+
</xsd:complexType>
|
67 |
+
|
68 |
+
<xsd:complexType name="postnlTrackAndTraceUrlEntity">
|
69 |
+
<xsd:sequence>
|
70 |
+
<xsd:element name="order_id" type="xsd:string" minOccurs="1" />
|
71 |
+
<xsd:element name="shipment_id" type="xsd:string" minOccurs="1" />
|
72 |
+
<xsd:element name="track_and_trace_url" type="xsd:string" minOccurs="1" />
|
73 |
+
<xsd:element name="main_barcode" type="xsd:string" minOccurs="1" />
|
74 |
+
<xsd:element name="return_barcode" type="xsd:string" minOccurs="0" />
|
75 |
+
<xsd:element name="all_barcodes" type="typens:postnlBarcodesArray" minOccurs="1" />
|
76 |
+
<xsd:element name="warning" type="typens:postnlWarningArray" minOccurs="0" />
|
77 |
+
<xsd:element name="error" type="typens:postnlErrorArray" minOccurs="0" />
|
78 |
+
</xsd:sequence>
|
79 |
+
</xsd:complexType>
|
80 |
+
<xsd:complexType name="postnlTrackAndTraceUrlEntityArray">
|
81 |
+
<xsd:sequence>
|
82 |
+
<xsd:element minOccurs="0" maxOccurs="unbounded" name="complexObjectArray" type="typens:postnlTrackAndTraceUrlEntity" />
|
83 |
+
</xsd:sequence>
|
84 |
+
</xsd:complexType>
|
85 |
+
|
86 |
+
<xsd:complexType name="postnlShippingStatusEntity">
|
87 |
+
<xsd:sequence>
|
88 |
+
<xsd:element name="order_id" type="xsd:string" minOccurs="1" />
|
89 |
+
<xsd:element name="shipment_id" type="xsd:string" minOccurs="1" />
|
90 |
+
<xsd:element name="shipping_phase" type="xsd:string" minOccurs="1" />
|
91 |
+
<xsd:element name="return_phase" type="xsd:string" minOccurs="0" />
|
92 |
+
<xsd:element name="warning" type="typens:postnlWarningArray" minOccurs="0" />
|
93 |
+
<xsd:element name="error" type="typens:postnlErrorArray" minOccurs="0" />
|
94 |
+
</xsd:sequence>
|
95 |
+
</xsd:complexType>
|
96 |
+
<xsd:complexType name="postnlShippingStatusEntityArray">
|
97 |
+
<xsd:sequence>
|
98 |
+
<xsd:element minOccurs="0" maxOccurs="unbounded" name="complexObjectArray" type="typens:postnlShippingStatusEntity" />
|
99 |
+
</xsd:sequence>
|
100 |
+
</xsd:complexType>
|
101 |
+
|
102 |
+
<xsd:element name="postnlCreateShipmentsRequestParam">
|
103 |
+
<xsd:complexType>
|
104 |
+
<xsd:sequence>
|
105 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="sessionId" type="xsd:string" />
|
106 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="orderIds" type="typens:ArrayOfString" />
|
107 |
+
</xsd:sequence>
|
108 |
+
</xsd:complexType>
|
109 |
+
</xsd:element>
|
110 |
+
<xsd:element name="postnlCreateShipmentsResponseParam">
|
111 |
+
<xsd:complexType>
|
112 |
+
<xsd:sequence>
|
113 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="result" type="typens:postnlShipmentEntityArray" />
|
114 |
+
</xsd:sequence>
|
115 |
+
</xsd:complexType>
|
116 |
+
</xsd:element>
|
117 |
+
|
118 |
+
<xsd:element name="postnlCreateShipmentsConfirmAndPrintLabelsRequestParam">
|
119 |
+
<xsd:complexType>
|
120 |
+
<xsd:sequence>
|
121 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="sessionId" type="xsd:string" />
|
122 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="orderIds" type="typens:ArrayOfString" />
|
123 |
+
</xsd:sequence>
|
124 |
+
</xsd:complexType>
|
125 |
+
</xsd:element>
|
126 |
+
<xsd:element name="postnlCreateShipmentsConfirmAndPrintLabelsResponseParam">
|
127 |
+
<xsd:complexType>
|
128 |
+
<xsd:sequence>
|
129 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="result" type="typens:postnlPrintedLabelEntityArray" />
|
130 |
+
</xsd:sequence>
|
131 |
+
</xsd:complexType>
|
132 |
+
</xsd:element>
|
133 |
+
|
134 |
+
<xsd:element name="postnlConfirmShipmentsRequestParam">
|
135 |
+
<xsd:complexType>
|
136 |
+
<xsd:sequence>
|
137 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="sessionId" type="xsd:string" />
|
138 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="shipmentIds" type="typens:ArrayOfString" />
|
139 |
+
</xsd:sequence>
|
140 |
+
</xsd:complexType>
|
141 |
+
</xsd:element>
|
142 |
+
<xsd:element name="postnlConfirmShipmentsResponseParam">
|
143 |
+
<xsd:complexType>
|
144 |
+
<xsd:sequence>
|
145 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="result" type="typens:postnlShipmentEntityArray" />
|
146 |
+
</xsd:sequence>
|
147 |
+
</xsd:complexType>
|
148 |
+
</xsd:element>
|
149 |
+
|
150 |
+
<xsd:element name="postnlPrintShippingLabelsRequestParam">
|
151 |
+
<xsd:complexType>
|
152 |
+
<xsd:sequence>
|
153 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="sessionId" type="xsd:string" />
|
154 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="shipmentIds" type="typens:ArrayOfString" />
|
155 |
+
<xsd:element minOccurs="0" maxOccurs="1" name="labelSize" type="xsd:string" />
|
156 |
+
<xsd:element minOccurs="0" maxOccurs="1" name="labelStartPosition" type="xsd:int" />
|
157 |
+
</xsd:sequence>
|
158 |
+
</xsd:complexType>
|
159 |
+
</xsd:element>
|
160 |
+
<xsd:element name="postnlPrintShippingLabelsResponseParam">
|
161 |
+
<xsd:complexType>
|
162 |
+
<xsd:sequence>
|
163 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="result" type="typens:postnlPrintedLabelEntityArray" />
|
164 |
+
</xsd:sequence>
|
165 |
+
</xsd:complexType>
|
166 |
+
</xsd:element>
|
167 |
+
|
168 |
+
<xsd:element name="postnlConfirmAndPrintShippingLabelsRequestParam">
|
169 |
+
<xsd:complexType>
|
170 |
+
<xsd:sequence>
|
171 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="sessionId" type="xsd:string" />
|
172 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="shipmentIds" type="typens:ArrayOfString" />
|
173 |
+
<xsd:element minOccurs="0" maxOccurs="1" name="labelSize" type="xsd:string" />
|
174 |
+
<xsd:element minOccurs="0" maxOccurs="1" name="labelStartPosition" type="xsd:int" />
|
175 |
+
</xsd:sequence>
|
176 |
+
</xsd:complexType>
|
177 |
+
</xsd:element>
|
178 |
+
<xsd:element name="postnlConfirmAndPrintShippingLabelsResponseParam">
|
179 |
+
<xsd:complexType>
|
180 |
+
<xsd:sequence>
|
181 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="result" type="typens:postnlPrintedLabelEntityArray" />
|
182 |
+
</xsd:sequence>
|
183 |
+
</xsd:complexType>
|
184 |
+
</xsd:element>
|
185 |
+
|
186 |
+
<xsd:element name="postnlGetTrackAndTraceUrlsRequestParam">
|
187 |
+
<xsd:complexType>
|
188 |
+
<xsd:sequence>
|
189 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="sessionId" type="xsd:string" />
|
190 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="shipmentIds" type="typens:ArrayOfString" />
|
191 |
+
</xsd:sequence>
|
192 |
+
</xsd:complexType>
|
193 |
+
</xsd:element>
|
194 |
+
<xsd:element name="postnlGetTrackAndTraceUrlsResponseParam">
|
195 |
+
<xsd:complexType>
|
196 |
+
<xsd:sequence>
|
197 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="result" type="typens:postnlTrackAndTraceUrlEntityArray" />
|
198 |
+
</xsd:sequence>
|
199 |
+
</xsd:complexType>
|
200 |
+
</xsd:element>
|
201 |
+
|
202 |
+
<xsd:element name="postnlGetStatusInfoRequestParam">
|
203 |
+
<xsd:complexType>
|
204 |
+
<xsd:sequence>
|
205 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="sessionId" type="xsd:string" />
|
206 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="shipmentIds" type="typens:ArrayOfString" />
|
207 |
+
</xsd:sequence>
|
208 |
+
</xsd:complexType>
|
209 |
+
</xsd:element>
|
210 |
+
<xsd:element name="postnlGetStatusInfoResponseParam">
|
211 |
+
<xsd:complexType>
|
212 |
+
<xsd:sequence>
|
213 |
+
<xsd:element minOccurs="1" maxOccurs="1" name="result" type="typens:postnlShippingStatusEntityArray" />
|
214 |
+
</xsd:sequence>
|
215 |
+
</xsd:complexType>
|
216 |
+
</xsd:element>
|
217 |
+
</xsd:schema>
|
218 |
+
</wsdl:types>
|
219 |
+
|
220 |
+
<wsdl:message name="postnlCreateShipmentsRequest">
|
221 |
+
<wsdl:part name="parameters" element="typens:postnlCreateShipmentsRequestParam" />
|
222 |
+
</wsdl:message>
|
223 |
+
<wsdl:message name="postnlCreateShipmentsResponse">
|
224 |
+
<wsdl:part name="parameters" element="typens:postnlCreateShipmentsResponseParam" />
|
225 |
+
</wsdl:message>
|
226 |
+
|
227 |
+
<wsdl:message name="postnlCreateShipmentsConfirmAndPrintLabelsRequest">
|
228 |
+
<wsdl:part name="parameters" element="typens:postnlCreateShipmentsConfirmAndPrintLabelsRequestParam" />
|
229 |
+
</wsdl:message>
|
230 |
+
<wsdl:message name="postnlCreateShipmentsConfirmAndPrintLabelsResponse">
|
231 |
+
<wsdl:part name="parameters" element="typens:postnlCreateShipmentsConfirmAndPrintLabelsResponseParam" />
|
232 |
+
</wsdl:message>
|
233 |
+
|
234 |
+
<wsdl:message name="postnlConfirmShipmentsRequest">
|
235 |
+
<wsdl:part name="parameters" element="typens:postnlConfirmShipmentsRequestParam" />
|
236 |
+
</wsdl:message>
|
237 |
+
<wsdl:message name="postnlConfirmShipmentsResponse">
|
238 |
+
<wsdl:part name="parameters" element="typens:postnlConfirmShipmentsResponseParam" />
|
239 |
+
</wsdl:message>
|
240 |
+
|
241 |
+
<wsdl:message name="postnlPrintShippingLabelsRequest">
|
242 |
+
<wsdl:part name="parameters" element="typens:postnlPrintShippingLabelsRequestParam" />
|
243 |
+
</wsdl:message>
|
244 |
+
<wsdl:message name="postnlPrintShippingLabelsResponse">
|
245 |
+
<wsdl:part name="parameters" element="typens:postnlPrintShippingLabelsResponseParam" />
|
246 |
+
</wsdl:message>
|
247 |
+
|
248 |
+
<wsdl:message name="postnlConfirmAndPrintShippingLabelsRequest">
|
249 |
+
<wsdl:part name="parameters" element="typens:postnlConfirmAndPrintShippingLabelsRequestParam" />
|
250 |
+
</wsdl:message>
|
251 |
+
<wsdl:message name="postnlConfirmAndPrintShippingLabelsResponse">
|
252 |
+
<wsdl:part name="parameters" element="typens:postnlConfirmAndPrintShippingLabelsResponseParam" />
|
253 |
+
</wsdl:message>
|
254 |
+
|
255 |
+
<wsdl:message name="postnlGetTrackAndTraceUrlsRequest">
|
256 |
+
<wsdl:part name="parameters" element="typens:postnlGetTrackAndTraceUrlsRequestParam" />
|
257 |
+
</wsdl:message>
|
258 |
+
<wsdl:message name="postnlGetTrackAndTraceUrlsResponse">
|
259 |
+
<wsdl:part name="parameters" element="typens:postnlGetTrackAndTraceUrlsResponseParam" />
|
260 |
+
</wsdl:message>
|
261 |
+
|
262 |
+
<wsdl:message name="postnlGetStatusInfoRequest">
|
263 |
+
<wsdl:part name="parameters" element="typens:postnlGetStatusInfoRequestParam" />
|
264 |
+
</wsdl:message>
|
265 |
+
<wsdl:message name="postnlGetStatusInfoResponse">
|
266 |
+
<wsdl:part name="parameters" element="typens:postnlGetStatusInfoResponseParam" />
|
267 |
+
</wsdl:message>
|
268 |
+
|
269 |
+
<wsdl:portType name="{{var wsdl.handler}}PortType">
|
270 |
+
<wsdl:operation name="postnlCreateShipments">
|
271 |
+
<wsdl:documentation>Create PostNL Shipments</wsdl:documentation>
|
272 |
+
<wsdl:input message="typens:postnlCreateShipmentsRequest" />
|
273 |
+
<wsdl:output message="typens:postnlCreateShipmentsResponse" />
|
274 |
+
</wsdl:operation>
|
275 |
+
<wsdl:operation name="postnlCreateShipmentsConfirmAndPrintLabels">
|
276 |
+
<wsdl:documentation>Create PostNL Shipments, Confirm and Print Shipping Labels</wsdl:documentation>
|
277 |
+
<wsdl:input message="typens:postnlCreateShipmentsConfirmAndPrintLabelsRequest" />
|
278 |
+
<wsdl:output message="typens:postnlCreateShipmentsConfirmAndPrintLabelsResponse" />
|
279 |
+
</wsdl:operation>
|
280 |
+
<wsdl:operation name="postnlConfirmShipments">
|
281 |
+
<wsdl:documentation>Confirm PostNL Shipments</wsdl:documentation>
|
282 |
+
<wsdl:input message="typens:postnlConfirmShipmentsRequest" />
|
283 |
+
<wsdl:output message="typens:postnlConfirmShipmentsResponse" />
|
284 |
+
</wsdl:operation>
|
285 |
+
<wsdl:operation name="postnlPrintShippingLabels">
|
286 |
+
<wsdl:documentation>Print PostNL Shipping Labels</wsdl:documentation>
|
287 |
+
<wsdl:input message="typens:postnlPrintShippingLabelsRequest" />
|
288 |
+
<wsdl:output message="typens:postnlPrintShippingLabelsResponse" />
|
289 |
+
</wsdl:operation>
|
290 |
+
<wsdl:operation name="postnlConfirmAndPrintShippingLabels">
|
291 |
+
<wsdl:documentation>Confirm PostNL Shipments and Print Shipping Labels</wsdl:documentation>
|
292 |
+
<wsdl:input message="typens:postnlConfirmAndPrintShippingLabelsRequest" />
|
293 |
+
<wsdl:output message="typens:postnlConfirmAndPrintShippingLabelsResponse" />
|
294 |
+
</wsdl:operation>
|
295 |
+
<wsdl:operation name="postnlGetTrackAndTraceUrls">
|
296 |
+
<wsdl:documentation>Get PostNL Shipments Track And Trace URLs</wsdl:documentation>
|
297 |
+
<wsdl:input message="typens:postnlGetTrackAndTraceUrlsRequest" />
|
298 |
+
<wsdl:output message="typens:postnlGetTrackAndTraceUrlsResponse" />
|
299 |
+
</wsdl:operation>
|
300 |
+
<wsdl:operation name="postnlGetStatusInfo">
|
301 |
+
<wsdl:documentation>Get PostNL Shipments Shipping Status Info</wsdl:documentation>
|
302 |
+
<wsdl:input message="typens:postnlGetStatusInfoRequest" />
|
303 |
+
<wsdl:output message="typens:postnlGetStatusInfoResponse" />
|
304 |
+
</wsdl:operation>
|
305 |
+
</wsdl:portType>
|
306 |
+
|
307 |
+
<wsdl:binding name="{{var wsdl.handler}}Binding" type="typens:{{var wsdl.handler}}PortType">
|
308 |
+
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
|
309 |
+
<wsdl:operation name="postnlCreateShipments">
|
310 |
+
<soap:operation soapAction="" />
|
311 |
+
<wsdl:input>
|
312 |
+
<soap:body use="literal" />
|
313 |
+
</wsdl:input>
|
314 |
+
<wsdl:output>
|
315 |
+
<soap:body use="literal" />
|
316 |
+
</wsdl:output>
|
317 |
+
</wsdl:operation>
|
318 |
+
<wsdl:operation name="postnlCreateShipmentsConfirmAndPrintLabels">
|
319 |
+
<soap:operation soapAction="" />
|
320 |
+
<wsdl:input>
|
321 |
+
<soap:body use="literal" />
|
322 |
+
</wsdl:input>
|
323 |
+
<wsdl:output>
|
324 |
+
<soap:body use="literal" />
|
325 |
+
</wsdl:output>
|
326 |
+
</wsdl:operation>
|
327 |
+
<wsdl:operation name="postnlConfirmShipments">
|
328 |
+
<soap:operation soapAction="" />
|
329 |
+
<wsdl:input>
|
330 |
+
<soap:body use="literal" />
|
331 |
+
</wsdl:input>
|
332 |
+
<wsdl:output>
|
333 |
+
<soap:body use="literal" />
|
334 |
+
</wsdl:output>
|
335 |
+
</wsdl:operation>
|
336 |
+
<wsdl:operation name="postnlPrintShippingLabels">
|
337 |
+
<soap:operation soapAction="" />
|
338 |
+
<wsdl:input>
|
339 |
+
<soap:body use="literal" />
|
340 |
+
</wsdl:input>
|
341 |
+
<wsdl:output>
|
342 |
+
<soap:body use="literal" />
|
343 |
+
</wsdl:output>
|
344 |
+
</wsdl:operation>
|
345 |
+
<wsdl:operation name="postnlConfirmAndPrintShippingLabels">
|
346 |
+
<soap:operation soapAction="" />
|
347 |
+
<wsdl:input>
|
348 |
+
<soap:body use="literal" />
|
349 |
+
</wsdl:input>
|
350 |
+
<wsdl:output>
|
351 |
+
<soap:body use="literal" />
|
352 |
+
</wsdl:output>
|
353 |
+
</wsdl:operation>
|
354 |
+
<wsdl:operation name="postnlGetTrackAndTraceUrls">
|
355 |
+
<soap:operation soapAction="" />
|
356 |
+
<wsdl:input>
|
357 |
+
<soap:body use="literal" />
|
358 |
+
</wsdl:input>
|
359 |
+
<wsdl:output>
|
360 |
+
<soap:body use="literal" />
|
361 |
+
</wsdl:output>
|
362 |
+
</wsdl:operation>
|
363 |
+
<wsdl:operation name="postnlGetStatusInfo">
|
364 |
+
<soap:operation soapAction="" />
|
365 |
+
<wsdl:input>
|
366 |
+
<soap:body use="literal" />
|
367 |
+
</wsdl:input>
|
368 |
+
<wsdl:output>
|
369 |
+
<soap:body use="literal" />
|
370 |
+
</wsdl:output>
|
371 |
+
</wsdl:operation>
|
372 |
+
</wsdl:binding>
|
373 |
+
|
374 |
+
<wsdl:service name="{{var wsdl.name}}Service">
|
375 |
+
<wsdl:port name="{{var wsdl.handler}}Port" binding="typens:{{var wsdl.handler}}Binding">
|
376 |
+
<soap:address location="{{var wsdl.url}}" />
|
377 |
+
</wsdl:port>
|
378 |
+
</wsdl:service>
|
379 |
+
</wsdl:definitions>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
@@ -44,6 +44,8 @@ $installer = $this;
|
|
44 |
|
45 |
$installer->startSetup();
|
46 |
|
|
|
|
|
47 |
$tableName = $installer->getTable('postnl_core/shipment');
|
48 |
if (!$conn->isTableExists($tableName)) {
|
49 |
$postnlShipmentTable = $installer->getConnection()
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
44 |
|
45 |
$installer->startSetup();
|
46 |
|
47 |
+
$conn = $installer->getConnection();
|
48 |
+
|
49 |
$tableName = $installer->getTable('postnl_core/shipment');
|
50 |
if (!$conn->isTableExists($tableName)) {
|
51 |
$postnlShipmentTable = $installer->getConnection()
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
@@ -96,7 +96,9 @@ if (!$conn->tableColumnExists($tableName, 'is_pakketautomaat')) {
|
|
96 |
/**
|
97 |
* Modify the shipment_type column to avoid confusion with the PostNL order's 'type' column.
|
98 |
*/
|
99 |
-
if ($conn->tableColumnExists($tableName, 'shipment_type')
|
|
|
|
|
100 |
$conn->changeColumn(
|
101 |
$tableName,
|
102 |
'shipment_type',
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
96 |
/**
|
97 |
* Modify the shipment_type column to avoid confusion with the PostNL order's 'type' column.
|
98 |
*/
|
99 |
+
if ($conn->tableColumnExists($tableName, 'shipment_type')
|
100 |
+
&& !$conn->tableColumnExists($tableName, 'globalpack_shipment_type')
|
101 |
+
) {
|
102 |
$conn->changeColumn(
|
103 |
$tableName,
|
104 |
'shipment_type',
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
@@ -34,7 +34,7 @@
|
|
34 |
* versions in the future. If you wish to customize this module for your
|
35 |
* needs please contact servicedesk@tig.nl for more information.
|
36 |
*
|
37 |
-
* @copyright Copyright (c)
|
38 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
39 |
*/
|
40 |
-->
|
@@ -56,6 +56,13 @@
|
|
56 |
|
57 |
<adminhtml_system_config_edit>
|
58 |
<reference name="head">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
<action method="addItem">
|
60 |
<type>skin_css</type>
|
61 |
<name>css/TIG/PostNL/system_config_edit.css</name>
|
34 |
* versions in the future. If you wish to customize this module for your
|
35 |
* needs please contact servicedesk@tig.nl for more information.
|
36 |
*
|
37 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
38 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
39 |
*/
|
40 |
-->
|
56 |
|
57 |
<adminhtml_system_config_edit>
|
58 |
<reference name="head">
|
59 |
+
<reference name="head">
|
60 |
+
<action method="addItem">
|
61 |
+
<type>js_css</type>
|
62 |
+
<name>prototype/windows/themes/default.css</name>
|
63 |
+
</action>
|
64 |
+
<block type="postnl_adminhtml/windowsTheme" name="postnl_order_windows_theme" template="TIG/PostNL/sales/order/windows_theme.phtml" output="toHtml"/>
|
65 |
+
</reference>
|
66 |
<action method="addItem">
|
67 |
<type>skin_css</type>
|
68 |
<name>css/TIG/PostNL/system_config_edit.css</name>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -43,6 +43,6 @@
|
|
43 |
<div class="notification-global">
|
44 |
<strong>[POSTNL-0006] <?php echo $this->__('PostNL: It appears that your cron is not working properly.'); ?></strong>
|
45 |
<?php echo $this->__('PostNL requires the cron to be active in order to function.') ?>
|
46 |
-
<a href="<?php echo $_helper->getErrorUrl('POSTNL-0006'); ?>" target="blank"><?php echo $this->__('Click here for more information from the
|
47 |
</div>
|
48 |
<?php endif;?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
43 |
<div class="notification-global">
|
44 |
<strong>[POSTNL-0006] <?php echo $this->__('PostNL: It appears that your cron is not working properly.'); ?></strong>
|
45 |
<?php echo $this->__('PostNL requires the cron to be active in order to function.') ?>
|
46 |
+
<a href="<?php echo $_helper->getErrorUrl('POSTNL-0006'); ?>" target="blank"><?php echo $this->__('Click here for more information from the TIG knowledgebase.') ?></a>
|
47 |
</div>
|
48 |
<?php endif;?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_Adminhtml_IntegrityNotification $this
|
@@ -47,7 +47,7 @@
|
|
47 |
<div class="notification-global">
|
48 |
<strong>[POSTNL-0219] <?php echo $this->__("The PostNL extension has detected some issues with the PostNL extension's data integrity."); ?></strong>
|
49 |
<?php if ($_errorUrl): ?>
|
50 |
-
<a href="<?php echo $_errorUrl; ?>" target="blank"><?php echo $this->__('Click here for more information from the
|
51 |
<?php endif; ?>
|
52 |
</div>
|
53 |
<?php endif; ?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_Adminhtml_IntegrityNotification $this
|
47 |
<div class="notification-global">
|
48 |
<strong>[POSTNL-0219] <?php echo $this->__("The PostNL extension has detected some issues with the PostNL extension's data integrity."); ?></strong>
|
49 |
<?php if ($_errorUrl): ?>
|
50 |
+
<a href="<?php echo $_errorUrl; ?>" target="blank"><?php echo $this->__('Click here for more information from the TIG knowledgebase.') ?></a>
|
51 |
<?php endif; ?>
|
52 |
</div>
|
53 |
<?php endif; ?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_Adminhtml_LogNotification $this
|
@@ -46,6 +46,6 @@
|
|
46 |
<div class="notification-global">
|
47 |
<strong>[POSTNL-0187] <?php echo $this->__('The total size of all PostNL logs exceeds %.0fMB!', $this->getMaxLogSize() / 1024 / 1024); ?></strong>
|
48 |
<?php echo $this->__('We recommend you disable logging and remove these log files.') ?>
|
49 |
-
<a href="<?php echo $_helper->getErrorUrl('POSTNL-0187'); ?>" target="blank"><?php echo $this->__('Click here for more information from the
|
50 |
</div>
|
51 |
<?php endif;?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_Adminhtml_LogNotification $this
|
46 |
<div class="notification-global">
|
47 |
<strong>[POSTNL-0187] <?php echo $this->__('The total size of all PostNL logs exceeds %.0fMB!', $this->getMaxLogSize() / 1024 / 1024); ?></strong>
|
48 |
<?php echo $this->__('We recommend you disable logging and remove these log files.') ?>
|
49 |
+
<a href="<?php echo $_helper->getErrorUrl('POSTNL-0187'); ?>" target="blank"><?php echo $this->__('Click here for more information from the TIG knowledgebase.') ?></a>
|
50 |
</div>
|
51 |
<?php endif;?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_Adminhtml_Sales_Items_Column_Qty $this
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_Adminhtml_Sales_Items_Column_Qty $this
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -116,7 +116,6 @@
|
|
116 |
$('print_label_spinner').show();
|
117 |
var printWindow = window.open(url);
|
118 |
Event.observe(printWindow, 'unload', function() {
|
119 |
-
Event.stopObserving(printWindow);
|
120 |
window.location.reload();
|
121 |
});
|
122 |
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
116 |
$('print_label_spinner').show();
|
117 |
var printWindow = window.open(url);
|
118 |
Event.observe(printWindow, 'unload', function() {
|
|
|
119 |
window.location.reload();
|
120 |
});
|
121 |
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
@@ -52,9 +52,10 @@
|
|
52 |
<?php $_isDutchShipment = (bool) $_cifHelper->isDutchShipment($_shipment); ?>
|
53 |
<?php $_isCod = (bool) $_cifHelper->isCodShipment($_shipment);?>
|
54 |
<?php $_isPakjeGemak = (bool) $_cifHelper->isPakjeGemakShipment($_shipment);?>
|
|
|
55 |
<?php $_parcelCount = $this->getParcelCount(); ?>
|
56 |
<div id="postnl_product_options">
|
57 |
-
<?php if(Mage::helper('postnl')->canUseBuspakje() && $_isDutchShipment && !$_isCod && !$_isPakjeGemak): ?>
|
58 |
<?php $_fitsAsBuspakje = $this->getFitsAsBuspakje(); ?>
|
59 |
<?php $_buspakjeCalcMode = $this->getBuspakjeCalcMode(); ?>
|
60 |
<div id="postnl_is_buspakje_container" <?php if ($_buspakjeCalcMode == 'automatic'): ?>style="display:none;"<?php endif; ?>>
|
@@ -181,6 +182,8 @@
|
|
181 |
before: $('postnl_product_options')
|
182 |
});
|
183 |
|
|
|
|
|
184 |
var isBuspakjeField = $('postnl_is_buspakje');
|
185 |
var isBuspakjeCheckbox = $('postnl_is_buspakje_checkbox');
|
186 |
var parcelCountContainer = $('postnl_parcel_count_container');
|
@@ -211,8 +214,6 @@
|
|
211 |
parcelCountContainer.show();
|
212 |
}
|
213 |
|
214 |
-
toggleExtraCoverField();
|
215 |
-
|
216 |
<?php if (isset($_buspakjeCalcMode) && $_buspakjeCalcMode == 'automatic'): ?>
|
217 |
var showBuspakjeToggle = function() {
|
218 |
$('postnl_is_buspakje_container').show();
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
52 |
<?php $_isDutchShipment = (bool) $_cifHelper->isDutchShipment($_shipment); ?>
|
53 |
<?php $_isCod = (bool) $_cifHelper->isCodShipment($_shipment);?>
|
54 |
<?php $_isPakjeGemak = (bool) $_cifHelper->isPakjeGemakShipment($_shipment);?>
|
55 |
+
<?php $_isAvond = (bool) $_cifHelper->isAvondShipment($_shipment); ?>
|
56 |
<?php $_parcelCount = $this->getParcelCount(); ?>
|
57 |
<div id="postnl_product_options">
|
58 |
+
<?php if(Mage::helper('postnl')->canUseBuspakje() && $_isDutchShipment && !$_isCod && !$_isPakjeGemak && !$_isAvond): ?>
|
59 |
<?php $_fitsAsBuspakje = $this->getFitsAsBuspakje(); ?>
|
60 |
<?php $_buspakjeCalcMode = $this->getBuspakjeCalcMode(); ?>
|
61 |
<div id="postnl_is_buspakje_container" <?php if ($_buspakjeCalcMode == 'automatic'): ?>style="display:none;"<?php endif; ?>>
|
182 |
before: $('postnl_product_options')
|
183 |
});
|
184 |
|
185 |
+
toggleExtraCoverField();
|
186 |
+
|
187 |
var isBuspakjeField = $('postnl_is_buspakje');
|
188 |
var isBuspakjeCheckbox = $('postnl_is_buspakje_checkbox');
|
189 |
var parcelCountContainer = $('postnl_parcel_count_container');
|
214 |
parcelCountContainer.show();
|
215 |
}
|
216 |
|
|
|
|
|
217 |
<?php if (isset($_buspakjeCalcMode) && $_buspakjeCalcMode == 'automatic'): ?>
|
218 |
var showBuspakjeToggle = function() {
|
219 |
$('postnl_is_buspakje_container').show();
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -66,7 +66,6 @@
|
|
66 |
$('print_label_spinner').show();
|
67 |
var printWindow = window.open(url);
|
68 |
Event.observe(printWindow, 'unload', function() {
|
69 |
-
Event.stopObserving(printWindow);
|
70 |
window.location.reload();
|
71 |
});
|
72 |
};
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
66 |
$('print_label_spinner').show();
|
67 |
var printWindow = window.open(url);
|
68 |
Event.observe(printWindow, 'unload', function() {
|
|
|
69 |
window.location.reload();
|
70 |
});
|
71 |
};
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
*/
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
*/
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_Adminhtml_Sales_Order_Shipment_View_ShippingStatus $this
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_Adminhtml_Sales_Order_Shipment_View_ShippingStatus $this
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
*/
|
@@ -91,7 +91,7 @@
|
|
91 |
|
92 |
<script type="text/javascript">
|
93 |
//<![CDATA[
|
94 |
-
var shippingFieldset = $$('.box-right
|
95 |
|
96 |
shippingFieldset.insert({
|
97 |
bottom: $('postnl_delivery_option_info')
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
*/
|
91 |
|
92 |
<script type="text/javascript">
|
93 |
//<![CDATA[
|
94 |
+
var shippingFieldset = $$('.box-right .head-shipping-method')[0].up('.entry-edit').down('fieldset');
|
95 |
|
96 |
shippingFieldset.insert({
|
97 |
bottom: $('postnl_delivery_option_info')
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_Adminhtml_WindowsTheme $this
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_Adminhtml_WindowsTheme $this
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,10 +33,12 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
|
|
|
|
40 |
<div id="print_label_spinner" class="waiting-notification" style="display:none;">
|
41 |
<div class="content">
|
42 |
<img src="<?php echo $this->getSkinUrl('images/ajax-loader-tr.gif') ?>" alt="spinner" />
|
@@ -110,6 +112,25 @@
|
|
110 |
}
|
111 |
}
|
112 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
});
|
114 |
printLabel = function(url) {
|
115 |
$$('body')[0].addClassName('no-scroll').scrollTo();
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
40 |
+
<?php $_hideNotificationUrl = $this->getUrl('postnl_admin/adminhtml_config/hideNotification'); ?>
|
41 |
+
|
42 |
<div id="print_label_spinner" class="waiting-notification" style="display:none;">
|
43 |
<div class="content">
|
44 |
<img src="<?php echo $this->getSkinUrl('images/ajax-loader-tr.gif') ?>" alt="spinner" />
|
112 |
}
|
113 |
}
|
114 |
});
|
115 |
+
|
116 |
+
var hideNotification = function(event) {
|
117 |
+
event.stop();
|
118 |
+
|
119 |
+
var element = Event.element(event);
|
120 |
+
var notificationCode = element.getAttribute('data-notification_code');
|
121 |
+
|
122 |
+
new Ajax.Request('<?php echo $_hideNotificationUrl; ?>', {
|
123 |
+
method : 'post',
|
124 |
+
parameters : {
|
125 |
+
notification_code : notificationCode
|
126 |
+
},
|
127 |
+
onSuccess : function() {
|
128 |
+
element.up('.module-message').fade();
|
129 |
+
}
|
130 |
+
});
|
131 |
+
};
|
132 |
+
|
133 |
+
$$('.postnl-hide-notification-link').invoke('observe', 'click', hideNotification.bindAsEventListener());
|
134 |
});
|
135 |
printLabel = function(url) {
|
136 |
$$('body')[0].addClassName('no-scroll').scrollTo();
|
@@ -33,21 +33,23 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_ConfigCheck $this
|
40 |
*/
|
41 |
?>
|
42 |
-
<?php $_testEnabled
|
43 |
-
<?php $_isTestMode
|
44 |
-
<?php $_helper
|
45 |
-
<?php
|
|
|
46 |
<?php return ''; ?>
|
47 |
<?php endif; ?>
|
48 |
|
49 |
<div class="module-message warning" id="postnl_testmode_warning">
|
50 |
-
<h4>[POSTNL-0098] <?php echo $this->__('The PostNL Extension is currently configured in test mode.')?> <a href="<?php echo $_helper->getErrorUrl('POSTNL-0098'); ?>" target="blank"><?php echo $this->__('Click here for more information from the
|
51 |
<p><?php echo $this->__('You may test the extension, however you cannot send any shipments in this mode. Any shipments that you confirm or whose labels you print while in this mode will be registered as test shipments and may not be physically shipped. If you attempt to do so, you may incur fines from PostNL. To use the extension in live mode you first need to enter your PostNL account credentials and set the extension to live mode. You can then send shipments using the PostNL extension.'); ?></p>
|
52 |
<p><?php echo $this->__("You can enter your live username and password in the 'Account Settings' tab of the PostNL extension configuration. Don't forget to also update your customer number, customer code and BLS (location) code. You can then set the extension to live mode."); ?></p>
|
|
|
53 |
</div>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_ConfigCheck $this
|
40 |
*/
|
41 |
?>
|
42 |
+
<?php $_testEnabled = $this->isTestEnabled(); ?>
|
43 |
+
<?php $_isTestMode = $this->isTestModeActive(); ?>
|
44 |
+
<?php $_helper = Mage::helper('postnl/adminhtml'); ?>
|
45 |
+
<?php $_hiddenNotifications = $_helper->getHiddenNotifications(); ?>
|
46 |
+
<?php if (!empty($_hiddenNotifications['test_mode_warning']) || !$_testEnabled || !$_isTestMode): ?>
|
47 |
<?php return ''; ?>
|
48 |
<?php endif; ?>
|
49 |
|
50 |
<div class="module-message warning" id="postnl_testmode_warning">
|
51 |
+
<h4>[POSTNL-0098] <?php echo $this->__('The PostNL Extension is currently configured in test mode.')?> <a href="<?php echo $_helper->getErrorUrl('POSTNL-0098'); ?>" target="blank"><?php echo $this->__('Click here for more information from the TIG knowledgebase.') ?></a></h4>
|
52 |
<p><?php echo $this->__('You may test the extension, however you cannot send any shipments in this mode. Any shipments that you confirm or whose labels you print while in this mode will be registered as test shipments and may not be physically shipped. If you attempt to do so, you may incur fines from PostNL. To use the extension in live mode you first need to enter your PostNL account credentials and set the extension to live mode. You can then send shipments using the PostNL extension.'); ?></p>
|
53 |
<p><?php echo $this->__("You can enter your live username and password in the 'Account Settings' tab of the PostNL extension configuration. Don't forget to also update your customer number, customer code and BLS (location) code. You can then set the extension to live mode."); ?></p>
|
54 |
+
<p><a class="postnl-hide-notification-link" data-notification_code="test_mode_warning" href="#" title="<?php echo $this->__('Hide this warning.'); ?>"><?php echo $this->__('Hide this warning.'); ?></a></p>
|
55 |
</div>
|
@@ -33,23 +33,24 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_ConfigCheck $this
|
40 |
*/
|
41 |
?>
|
42 |
-
<?php $_enabled
|
43 |
-
<?php $_isTestMode
|
44 |
-
<?php $_globalConfigured
|
45 |
-
<?php $_checkoutEnabled
|
46 |
-
<?php $_helper
|
|
|
47 |
|
48 |
<?php if ((!$_isTestMode && !$this->isLiveEnabled()) || ($_isTestMode && !$this->isTestEnabled())): ?>
|
49 |
<?php $_enabled = false; ?>
|
50 |
<?php $_errorArray = $this->getConfigErrors(); ?>
|
51 |
<div class="module-message error">
|
52 |
-
<h4>[POSTNL-0002] <?php echo $this->__('You have not yet fully configured the extension. You must complete this process before you can use it.')?> <a href="<?php echo $_helper->getErrorUrl('POSTNL-0002'); ?>" target="blank"><?php echo $this->__('Click here for more information from the
|
53 |
<?php if ($_errorArray): ?>
|
54 |
<ul class="postnl-errors">
|
55 |
<?php foreach ($_errorArray as $_errorData): ?>
|
@@ -59,7 +60,7 @@
|
|
59 |
<?php if (!is_int($_code)): ?>[<?php echo $_code; ?>] <?php endif; ?><?php echo $_error; ?>
|
60 |
<?php $_errorUrl = $_helper->getErrorUrl($_code); ?>
|
61 |
<?php if ($_errorUrl): ?>
|
62 |
-
<a href="<?php echo $_helper->getErrorUrl($_code); ?>" target="blank"><?php echo $this->__('Click here for more information from the
|
63 |
<?php endif; ?>
|
64 |
</li>
|
65 |
<?php endforeach; ?>
|
@@ -71,7 +72,7 @@
|
|
71 |
<?php if (!$_globalConfigured && $_enabled): ?>
|
72 |
<?php $_globalConfigErrors = $this->getGlobalConfigErrors(); ?>
|
73 |
<div class="module-message warning">
|
74 |
-
<h4>[POSTNL-0003] <?php echo $this->__('You have not yet configured the extension to use GlobalPack shipments. Please complete this process if you wish to ship parcels to outside the EU.')?> <a href="<?php echo $_helper->getErrorUrl('POSTNL-0003'); ?>" target="blank"><?php echo $this->__('Click here for more information from the
|
75 |
<?php if ($_globalConfigErrors): ?>
|
76 |
<ul class="postnl-errors">
|
77 |
<?php foreach ($_globalConfigErrors as $_errorData): ?>
|
@@ -81,7 +82,7 @@
|
|
81 |
<?php if (!is_int($_code)): ?>[<?php echo $_code; ?>] <?php endif; ?><?php echo $_error; ?>
|
82 |
<?php $_errorUrl = $_helper->getErrorUrl($_code); ?>
|
83 |
<?php if ($_errorUrl): ?>
|
84 |
-
<a href="<?php echo $_helper->getErrorUrl($_code); ?>" target="blank"><?php echo $this->__('Click here for more information from the
|
85 |
<?php endif; ?>
|
86 |
</li>
|
87 |
<?php endforeach; ?>
|
@@ -90,10 +91,10 @@
|
|
90 |
</div>
|
91 |
<?php endif; ?>
|
92 |
|
93 |
-
<?php if (!$_checkoutEnabled && $_enabled): ?>
|
94 |
<?php $_checkoutConfigErrors = $this->getCheckoutConfigErrors(); ?>
|
95 |
<div class="module-message warning">
|
96 |
-
<h4>[POSTNL-0004] <?php echo $this->__('You have not yet configured PostNL Checkout. Please complete this process if you wish to use PostNL Checkout.')?> <a href="<?php echo $_helper->getErrorUrl('POSTNL-0004'); ?>" target="blank"><?php echo $this->__('Click here for more information from the
|
97 |
<?php if ($_checkoutConfigErrors): ?>
|
98 |
<ul class="postnl-errors">
|
99 |
<?php foreach ($_checkoutConfigErrors as $_errorData): ?>
|
@@ -103,19 +104,21 @@
|
|
103 |
<?php if (!is_int($_code)): ?>[<?php echo $_code; ?>] <?php endif; ?><?php echo $_error; ?>
|
104 |
<?php $_errorUrl = $_helper->getErrorUrl($_code); ?>
|
105 |
<?php if ($_errorUrl): ?>
|
106 |
-
<a href="<?php echo $_helper->getErrorUrl($_code); ?>" target="blank"><?php echo $this->__('Click here for more information from the
|
107 |
<?php endif; ?>
|
108 |
</li>
|
109 |
<?php endforeach; ?>
|
110 |
</ul>
|
111 |
<?php endif; ?>
|
|
|
112 |
</div>
|
113 |
<?php endif; ?>
|
114 |
|
115 |
-
<?php if ($_enabled && $_isTestMode): ?>
|
116 |
<div class="module-message warning">
|
117 |
-
<h4>[POSTNL-0098] <?php echo $this->__('The PostNL Extension is currently configured in test mode.')?> <a href="<?php echo $_helper->getErrorUrl('POSTNL-0098'); ?>" target="blank"><?php echo $this->__('Click here for more information from the
|
118 |
<p><?php echo $this->__('You may test the extension, however you cannot send any shipments in this mode. Any shipments that you confirm or whose labels you print while in this mode will be registered as test shipments and may not be physically shipped. If you attempt to do so, you may incur fines from PostNL. To use the extension in live mode you first need to enter your PostNL account credentials and set the extension to live mode. You can then send shipments using the PostNL extension.'); ?></p>
|
119 |
<p><?php echo $this->__("You can enter your live username and password in the 'Account Settings' tab. Don't forget to also update your customer number, customer code and BLS (location) code. You can then set the extension to live mode."); ?></p>
|
|
|
120 |
</div>
|
121 |
<?php endif; ?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_ConfigCheck $this
|
40 |
*/
|
41 |
?>
|
42 |
+
<?php $_enabled = true; ?>
|
43 |
+
<?php $_isTestMode = $this->isTestModeActive(); ?>
|
44 |
+
<?php $_globalConfigured = $this->isGlobalConfigured(); ?>
|
45 |
+
<?php $_checkoutEnabled = $this->isCheckoutEnabled(); ?>
|
46 |
+
<?php $_helper = Mage::helper('postnl/adminhtml'); ?>
|
47 |
+
<?php $_hiddenNotifications = $_helper->getHiddenNotifications(); ?>
|
48 |
|
49 |
<?php if ((!$_isTestMode && !$this->isLiveEnabled()) || ($_isTestMode && !$this->isTestEnabled())): ?>
|
50 |
<?php $_enabled = false; ?>
|
51 |
<?php $_errorArray = $this->getConfigErrors(); ?>
|
52 |
<div class="module-message error">
|
53 |
+
<h4>[POSTNL-0002] <?php echo $this->__('You have not yet fully configured the extension. You must complete this process before you can use it.')?> <a href="<?php echo $_helper->getErrorUrl('POSTNL-0002'); ?>" target="blank"><?php echo $this->__('Click here for more information from the TIG knowledgebase.') ?></a></h4>
|
54 |
<?php if ($_errorArray): ?>
|
55 |
<ul class="postnl-errors">
|
56 |
<?php foreach ($_errorArray as $_errorData): ?>
|
60 |
<?php if (!is_int($_code)): ?>[<?php echo $_code; ?>] <?php endif; ?><?php echo $_error; ?>
|
61 |
<?php $_errorUrl = $_helper->getErrorUrl($_code); ?>
|
62 |
<?php if ($_errorUrl): ?>
|
63 |
+
<a href="<?php echo $_helper->getErrorUrl($_code); ?>" target="blank"><?php echo $this->__('Click here for more information from the TIG knowledgebase.') ?></a>
|
64 |
<?php endif; ?>
|
65 |
</li>
|
66 |
<?php endforeach; ?>
|
72 |
<?php if (!$_globalConfigured && $_enabled): ?>
|
73 |
<?php $_globalConfigErrors = $this->getGlobalConfigErrors(); ?>
|
74 |
<div class="module-message warning">
|
75 |
+
<h4>[POSTNL-0003] <?php echo $this->__('You have not yet configured the extension to use GlobalPack shipments. Please complete this process if you wish to ship parcels to outside the EU.')?> <a href="<?php echo $_helper->getErrorUrl('POSTNL-0003'); ?>" target="blank"><?php echo $this->__('Click here for more information from the TIG knowledgebase.') ?></a></h4>
|
76 |
<?php if ($_globalConfigErrors): ?>
|
77 |
<ul class="postnl-errors">
|
78 |
<?php foreach ($_globalConfigErrors as $_errorData): ?>
|
82 |
<?php if (!is_int($_code)): ?>[<?php echo $_code; ?>] <?php endif; ?><?php echo $_error; ?>
|
83 |
<?php $_errorUrl = $_helper->getErrorUrl($_code); ?>
|
84 |
<?php if ($_errorUrl): ?>
|
85 |
+
<a href="<?php echo $_helper->getErrorUrl($_code); ?>" target="blank"><?php echo $this->__('Click here for more information from the TIG knowledgebase.') ?></a>
|
86 |
<?php endif; ?>
|
87 |
</li>
|
88 |
<?php endforeach; ?>
|
91 |
</div>
|
92 |
<?php endif; ?>
|
93 |
|
94 |
+
<?php if (empty($_hiddenNotifications['postnl_checkout_configured_warning']) && !$_checkoutEnabled && $_enabled): ?>
|
95 |
<?php $_checkoutConfigErrors = $this->getCheckoutConfigErrors(); ?>
|
96 |
<div class="module-message warning">
|
97 |
+
<h4>[POSTNL-0004] <?php echo $this->__('You have not yet configured PostNL Checkout. Please complete this process if you wish to use PostNL Checkout.')?> <a href="<?php echo $_helper->getErrorUrl('POSTNL-0004'); ?>" target="blank"><?php echo $this->__('Click here for more information from the TIG knowledgebase.') ?></a></h4>
|
98 |
<?php if ($_checkoutConfigErrors): ?>
|
99 |
<ul class="postnl-errors">
|
100 |
<?php foreach ($_checkoutConfigErrors as $_errorData): ?>
|
104 |
<?php if (!is_int($_code)): ?>[<?php echo $_code; ?>] <?php endif; ?><?php echo $_error; ?>
|
105 |
<?php $_errorUrl = $_helper->getErrorUrl($_code); ?>
|
106 |
<?php if ($_errorUrl): ?>
|
107 |
+
<a href="<?php echo $_helper->getErrorUrl($_code); ?>" target="blank"><?php echo $this->__('Click here for more information from the TIG knowledgebase.') ?></a>
|
108 |
<?php endif; ?>
|
109 |
</li>
|
110 |
<?php endforeach; ?>
|
111 |
</ul>
|
112 |
<?php endif; ?>
|
113 |
+
<p><a class="postnl-hide-notification-link" data-notification_code="postnl_checkout_configured_warning" href="#" title="<?php echo $this->__('Hide this warning.'); ?>"><?php echo $this->__('Hide this warning.'); ?></a></p>
|
114 |
</div>
|
115 |
<?php endif; ?>
|
116 |
|
117 |
+
<?php if (empty($_hiddenNotifications['test_mode_warning']) && $_enabled && $_isTestMode): ?>
|
118 |
<div class="module-message warning">
|
119 |
+
<h4>[POSTNL-0098] <?php echo $this->__('The PostNL Extension is currently configured in test mode.')?> <a href="<?php echo $_helper->getErrorUrl('POSTNL-0098'); ?>" target="blank"><?php echo $this->__('Click here for more information from the TIG knowledgebase.') ?></a></h4>
|
120 |
<p><?php echo $this->__('You may test the extension, however you cannot send any shipments in this mode. Any shipments that you confirm or whose labels you print while in this mode will be registered as test shipments and may not be physically shipped. If you attempt to do so, you may incur fines from PostNL. To use the extension in live mode you first need to enter your PostNL account credentials and set the extension to live mode. You can then send shipments using the PostNL extension.'); ?></p>
|
121 |
<p><?php echo $this->__("You can enter your live username and password in the 'Account Settings' tab. Don't forget to also update your customer number, customer code and BLS (location) code. You can then set the extension to live mode."); ?></p>
|
122 |
+
<p><a class="postnl-hide-notification-link" data-notification_code="test_mode_warning" href="#" title="<?php echo $this->__('Hide this warning.'); ?>"><?php echo $this->__('Hide this warning.'); ?></a></p>
|
123 |
</div>
|
124 |
<?php endif; ?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_InfoBox $this
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_InfoBox $this
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_Adminhtml_System_Config_Js $this
|
@@ -45,8 +45,47 @@
|
|
45 |
<?php $_website = Mage::app()->getRequest()->getParam('website'); ?>
|
46 |
<?php $_currentWizardStep = $this->getCurrentWizardStep(); ?>
|
47 |
<?php $_saveWizardStepUrl = $this->getSaveWizardStepUrl(); ?>
|
|
|
|
|
48 |
<script type="text/javascript">
|
49 |
//<![CDATA[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
var postnlConfigWizard = new PostnlConfigWizard({});
|
51 |
document.observe('dom:loaded', function() {
|
52 |
$('postnl_cif_labels_and_confirming_checkout_extension').observe('change', function() {
|
@@ -75,7 +114,7 @@
|
|
75 |
|
76 |
<?php if (!empty($_currentWizardStep)): ?>
|
77 |
if (window.location.hash.length < 1) {
|
78 |
-
var hash = '<?php echo $_currentWizardStep?>';
|
79 |
postnlConfigWizard.toHash(hash);
|
80 |
|
81 |
if(window.history.pushState) {
|
@@ -161,6 +200,13 @@
|
|
161 |
pattern : new RegExp("^([0-9]+_[0-9]+)$", "i")
|
162 |
});
|
163 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
164 |
var postnlWizardSaveAndContinue = function(nextStepRel, currentStepRel) {
|
165 |
var nextStepHash = '';
|
166 |
|
@@ -349,5 +395,24 @@
|
|
349 |
Fieldset.saveState(saveThroughAjax, {container: containerId, value: $(containerId + '-state').value});
|
350 |
}
|
351 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
352 |
//]]>
|
353 |
</script>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_Adminhtml_System_Config_Js $this
|
45 |
<?php $_website = Mage::app()->getRequest()->getParam('website'); ?>
|
46 |
<?php $_currentWizardStep = $this->getCurrentWizardStep(); ?>
|
47 |
<?php $_saveWizardStepUrl = $this->getSaveWizardStepUrl(); ?>
|
48 |
+
<?php $_hideNotificationUrl = $this->getHideNotificationUrl(); ?>
|
49 |
+
|
50 |
<script type="text/javascript">
|
51 |
//<![CDATA[
|
52 |
+
/**
|
53 |
+
*
|
54 |
+
*/
|
55 |
+
function openModalConfirm(title, text, callback, url) {
|
56 |
+
var confirm = Dialog.confirm(
|
57 |
+
text,
|
58 |
+
{
|
59 |
+
draggable: true,
|
60 |
+
resizable: true,
|
61 |
+
closable: true,
|
62 |
+
className:"magento",
|
63 |
+
windowClassName:"popup-window",
|
64 |
+
width: 500,
|
65 |
+
title: title,
|
66 |
+
okLabel: "<?php echo $_helper->__('Uninstall'); ?>",
|
67 |
+
cancelLabel: "<?php echo $_helper->__('Cancel'); ?>",
|
68 |
+
buttonClass: "myButtonClass",
|
69 |
+
id: "myDialogId",
|
70 |
+
cancel: function(win) { callback('cancel', url); },
|
71 |
+
ok: function(win) { callback('ok', url); return false; }
|
72 |
+
}
|
73 |
+
);
|
74 |
+
}
|
75 |
+
|
76 |
+
function handleConfirmUninstall(value, url) {
|
77 |
+
if (value === 'ok') {
|
78 |
+
var uninstallVerify = $('verify_uninstall').value;
|
79 |
+
if (uninstallVerify === 'uninstall') {
|
80 |
+
window.location.href = url;
|
81 |
+
return true;
|
82 |
+
}
|
83 |
+
alert('<?php echo $_helper->__('You did not enter the correct verification text. Try again.'); ?>');
|
84 |
+
}
|
85 |
+
console.log('redirect not');
|
86 |
+
return false;
|
87 |
+
}
|
88 |
+
|
89 |
var postnlConfigWizard = new PostnlConfigWizard({});
|
90 |
document.observe('dom:loaded', function() {
|
91 |
$('postnl_cif_labels_and_confirming_checkout_extension').observe('change', function() {
|
114 |
|
115 |
<?php if (!empty($_currentWizardStep)): ?>
|
116 |
if (window.location.hash.length < 1) {
|
117 |
+
var hash = '<?php echo $this->escapeHtml($_currentWizardStep); ?>';
|
118 |
postnlConfigWizard.toHash(hash);
|
119 |
|
120 |
if(window.history.pushState) {
|
200 |
pattern : new RegExp("^([0-9]+_[0-9]+)$", "i")
|
201 |
});
|
202 |
|
203 |
+
/**
|
204 |
+
* Add packing slip column header validation.
|
205 |
+
*/
|
206 |
+
Validation.add('validate-packing-slip-column-header', '<?php echo $_helper->__('Please use only letters (a-z A-Z), numbers (0-9) or one of the following characters: [( ) , . _ - #] in this field.') ?>', {
|
207 |
+
pattern : new RegExp("^[0-9a-zA-Z,.#\(\)-_]*$")
|
208 |
+
});
|
209 |
+
|
210 |
var postnlWizardSaveAndContinue = function(nextStepRel, currentStepRel) {
|
211 |
var nextStepHash = '';
|
212 |
|
395 |
Fieldset.saveState(saveThroughAjax, {container: containerId, value: $(containerId + '-state').value});
|
396 |
}
|
397 |
};
|
398 |
+
|
399 |
+
hideNotification = function(event) {
|
400 |
+
event.stop();
|
401 |
+
|
402 |
+
var element = Event.element(event);
|
403 |
+
var notificationCode = element.getAttribute('data-notification_code');
|
404 |
+
|
405 |
+
new Ajax.Request('<?php echo $_hideNotificationUrl; ?>', {
|
406 |
+
method : 'post',
|
407 |
+
parameters : {
|
408 |
+
notification_code : notificationCode
|
409 |
+
},
|
410 |
+
onSuccess : function() {
|
411 |
+
element.up('.module-message').fade();
|
412 |
+
}
|
413 |
+
});
|
414 |
+
};
|
415 |
+
|
416 |
+
$$('.postnl-hide-notification-link').invoke('observe', 'click', hideNotification.bindAsEventListener());
|
417 |
//]]>
|
418 |
</script>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_SplitAddressCheck $this
|
@@ -41,7 +41,8 @@
|
|
41 |
?>
|
42 |
<?php if(!$this->getIsAddressSplit()): ?>
|
43 |
<div class="module-message warning">
|
44 |
-
<h4>[POSTNL-0005] <?php echo $this->helper('postnl')->__('You currently do not use split street lines.'); ?> <a href="<?php echo Mage::helper('postnl')->getErrorUrl('POSTNL-0005'); ?>" target="blank"><?php echo $this->__('Click here for more information from the
|
45 |
<p><?php echo $this->__('Not using split street lines may cause errors in shipment processing as PostNL cannot support every possible address syntax. We strongly recommend using split street lines to avoid problems when using PostNL shipping. For more information, please contact PostNL support.')?></p>
|
|
|
46 |
</div>
|
47 |
<?php endif; ?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_SplitAddressCheck $this
|
41 |
?>
|
42 |
<?php if(!$this->getIsAddressSplit()): ?>
|
43 |
<div class="module-message warning">
|
44 |
+
<h4>[POSTNL-0005] <?php echo $this->helper('postnl')->__('You currently do not use split street lines.'); ?> <a href="<?php echo Mage::helper('postnl')->getErrorUrl('POSTNL-0005'); ?>" target="blank"><?php echo $this->__('Click here for more information from the TIG knowledgebase.') ?></a></h4>
|
45 |
<p><?php echo $this->__('Not using split street lines may cause errors in shipment processing as PostNL cannot support every possible address syntax. We strongly recommend using split street lines to avoid problems when using PostNL shipping. For more information, please contact PostNL support.')?></p>
|
46 |
+
<p><a class="postnl-hide-notification-link" data-notification_code="split_address_warning" href="#" title="<?php echo $this->__('Hide this warning.'); ?>"><?php echo $this->__('Hide this warning.'); ?></a></p>
|
47 |
</div>
|
48 |
<?php endif; ?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_SupportTab $this
|
@@ -73,6 +73,7 @@
|
|
73 |
</ul>
|
74 |
<ul>
|
75 |
<li><?php echo $this->__("Idev's OneStepCheckout version");?> v4.0 & v4.1</li>
|
|
|
76 |
</ul>
|
77 |
<ul>
|
78 |
<li><?php echo $this->__('We cannot guarantee compatibility with non supported extensions and versions of Magento.'); ?></li>
|
@@ -103,7 +104,7 @@
|
|
103 |
<ul class="manual-links">
|
104 |
<li><a target="_blank" href="<?php echo $_installationManualUrl; ?>" title="<?php echo $this->__('View the installation manual.');?>"><?php echo $this->__('Installation manual');?></a></li>
|
105 |
<li><a target="_blank" href="<?php echo $_userGuideUrl; ?>" title="<?php echo $this->__('View the user manual.');?>"><?php echo $this->__('User manual');?></a></li>
|
106 |
-
<li><a target="_blank" href="<?php echo $_changelogUrl; ?>" title="<?php echo $this->__('View the
|
107 |
<li><a target="_blank" href="<?php echo $_kbUrl; ?>" title="<?php echo $this->__('Frequently asked questions.');?>"><?php echo $this->__('FAQ');?></a></li>
|
108 |
</ul>
|
109 |
<h4><em><?php echo $this->__('Unable to find the answer you need using the links above?'); ?></em></h4>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_SupportTab $this
|
73 |
</ul>
|
74 |
<ul>
|
75 |
<li><?php echo $this->__("Idev's OneStepCheckout version");?> v4.0 & v4.1</li>
|
76 |
+
<li><?php echo $this->__("GoMage's Checkout version");?> v0.0.5.8</li>
|
77 |
</ul>
|
78 |
<ul>
|
79 |
<li><?php echo $this->__('We cannot guarantee compatibility with non supported extensions and versions of Magento.'); ?></li>
|
104 |
<ul class="manual-links">
|
105 |
<li><a target="_blank" href="<?php echo $_installationManualUrl; ?>" title="<?php echo $this->__('View the installation manual.');?>"><?php echo $this->__('Installation manual');?></a></li>
|
106 |
<li><a target="_blank" href="<?php echo $_userGuideUrl; ?>" title="<?php echo $this->__('View the user manual.');?>"><?php echo $this->__('User manual');?></a></li>
|
107 |
+
<li><a target="_blank" href="<?php echo $_changelogUrl; ?>" title="<?php echo $this->__('View the release notes of the extension.');?>"><?php echo $this->__('Release notes');?></a></li>
|
108 |
<li><a target="_blank" href="<?php echo $_kbUrl; ?>" title="<?php echo $this->__('Frequently asked questions.');?>"><?php echo $this->__('FAQ');?></a></li>
|
109 |
</ul>
|
110 |
<h4><em><?php echo $this->__('Unable to find the answer you need using the links above?'); ?></em></h4>
|
@@ -33,16 +33,20 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
|
|
|
|
38 |
*/
|
39 |
?>
|
40 |
-
<?php $_htmlId
|
|
|
41 |
<?php $_comment = $this->getElement()->getComment(); ?>
|
42 |
<tr id='row-<?php echo $_htmlId; ?>'>
|
43 |
-
<td colspan='
|
44 |
<div class="module-message warning">
|
45 |
-
<h4><?php echo $
|
|
|
46 |
</div>
|
47 |
</td>
|
48 |
</tr>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
+
*
|
39 |
+
* @var TIG_PostNL_Block_Adminhtml_System_Config_Form_Field_WarningBox $this
|
40 |
*/
|
41 |
?>
|
42 |
+
<?php $_htmlId = $this->getHtmlId(); ?>
|
43 |
+
<?php $_label = $this->getElement()->getLabel(); ?>
|
44 |
<?php $_comment = $this->getElement()->getComment(); ?>
|
45 |
<tr id='row-<?php echo $_htmlId; ?>'>
|
46 |
+
<td colspan='5'>
|
47 |
<div class="module-message warning">
|
48 |
+
<h4 id="<?php echo $_htmlId; ?>"><?php echo $_label; ?></h4>
|
49 |
+
<p id="<?php echo $_htmlId; ?>"><?php echo $_comment; ?></p>
|
50 |
</div>
|
51 |
</td>
|
52 |
</tr>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_Adminhtml_UpgradeNotification $this
|
@@ -48,7 +48,7 @@
|
|
48 |
<strong>[POSTNL-0198] <?php echo $this->__('The PostNL extension is currently being upgraded.'); ?></strong>
|
49 |
<?php echo $this->__('Depending on the number of products in your store, this could take several hours.'); ?>
|
50 |
<?php if ($_errorUrl): ?>
|
51 |
-
<a href="<?php echo $_errorUrl; ?>" target="blank"><?php echo $this->__('Click here for more information from the
|
52 |
<?php endif; ?>
|
53 |
</div>
|
54 |
<?php endif;?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_Adminhtml_UpgradeNotification $this
|
48 |
<strong>[POSTNL-0198] <?php echo $this->__('The PostNL extension is currently being upgraded.'); ?></strong>
|
49 |
<?php echo $this->__('Depending on the number of products in your store, this could take several hours.'); ?>
|
50 |
<?php if ($_errorUrl): ?>
|
51 |
+
<a href="<?php echo $_errorUrl; ?>" target="blank"><?php echo $this->__('Click here for more information from the TIG knowledgebase.') ?></a>
|
52 |
<?php endif; ?>
|
53 |
</div>
|
54 |
<?php endif;?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* Observer to edit the sales > shipments grid
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* Observer to edit the sales > shipments grid
|
@@ -34,7 +34,7 @@
|
|
34 |
* versions in the future. If you wish to customize this module for your
|
35 |
* needs please contact servicedesk@tig.nl for more information.
|
36 |
*
|
37 |
-
* @copyright Copyright (c)
|
38 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
39 |
*/
|
40 |
-->
|
@@ -252,9 +252,6 @@
|
|
252 |
<type>skin_css</type>
|
253 |
<file>css/TIG/PostNL/cart.css</file>
|
254 |
</action>
|
255 |
-
<action method="addCss">
|
256 |
-
<stylesheet>css/TIG/PostNL/rwd.css</stylesheet>
|
257 |
-
</action>
|
258 |
<action method="addItem">
|
259 |
<type>skin_js</type>
|
260 |
<file>js/TIG/PostNL/checkout.js</file>
|
@@ -308,9 +305,6 @@
|
|
308 |
<type>skin_css</type>
|
309 |
<file>css/TIG/PostNL/postcodecheck.css</file>
|
310 |
</action>
|
311 |
-
<action method="addCss">
|
312 |
-
<stylesheet>css/TIG/PostNL/rwd.css</stylesheet>
|
313 |
-
</action>
|
314 |
<block type="core/template" name="postnl_validation" template="TIG/PostNL/address_validation/validate.phtml"/>
|
315 |
</reference>
|
316 |
<reference name="customer_address_edit">
|
@@ -382,6 +376,7 @@
|
|
382 |
<block type="postnl_deliveryoptions/js" name="postnl_deliveryoptions_js" template="TIG/PostNL/delivery_options/js.phtml"/>
|
383 |
<block type="postnl_mijnpakket/js" name="postnl_mijnpakket_js" template="TIG/PostNL/mijnpakket/js.phtml"/>
|
384 |
<block type="postnl_mijnpakket/loginButton" name="postnl_mijnpakket_login" template="TIG/PostNL/mijnpakket/onepage/login_button.phtml"/>
|
|
|
385 |
</reference>
|
386 |
</checkout_onepage_index>
|
387 |
|
@@ -438,7 +433,6 @@
|
|
438 |
<action method="addCss"><stylesheet>css/TIG/PostNL/deliveryoptions/default.css</stylesheet></action>
|
439 |
<action method="addCss"><stylesheet>css/TIG/PostNL/deliveryoptions/onestepcheckout.css</stylesheet></action>
|
440 |
<action method="addCss"><stylesheet>css/TIG/PostNL/mijnpakket.css</stylesheet></action>
|
441 |
-
<action method="addCss"><stylesheet>css/TIG/PostNL/rwd_osc.css</stylesheet></action>
|
442 |
<action method="addItem"><type>skin_css</type><name>css/TIG/PostNL/deliveryoptions/ie8.css</name><params/><if>lt IE 9</if></action>
|
443 |
<action method="addCss"><stylesheet>css/TIG/PostNL/postcodecheck.css</stylesheet></action>
|
444 |
<action method="addItem"><type>skin_js</type><file>js/TIG/PostNL/ajax.js</file></action>
|
@@ -487,6 +481,55 @@
|
|
487 |
</reference>
|
488 |
</onestepcheckout_ajax_save_billing>
|
489 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
490 |
<!-- POSTNL COD FEE -->
|
491 |
|
492 |
<sales_order_print>
|
34 |
* versions in the future. If you wish to customize this module for your
|
35 |
* needs please contact servicedesk@tig.nl for more information.
|
36 |
*
|
37 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
38 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
39 |
*/
|
40 |
-->
|
252 |
<type>skin_css</type>
|
253 |
<file>css/TIG/PostNL/cart.css</file>
|
254 |
</action>
|
|
|
|
|
|
|
255 |
<action method="addItem">
|
256 |
<type>skin_js</type>
|
257 |
<file>js/TIG/PostNL/checkout.js</file>
|
305 |
<type>skin_css</type>
|
306 |
<file>css/TIG/PostNL/postcodecheck.css</file>
|
307 |
</action>
|
|
|
|
|
|
|
308 |
<block type="core/template" name="postnl_validation" template="TIG/PostNL/address_validation/validate.phtml"/>
|
309 |
</reference>
|
310 |
<reference name="customer_address_edit">
|
376 |
<block type="postnl_deliveryoptions/js" name="postnl_deliveryoptions_js" template="TIG/PostNL/delivery_options/js.phtml"/>
|
377 |
<block type="postnl_mijnpakket/js" name="postnl_mijnpakket_js" template="TIG/PostNL/mijnpakket/js.phtml"/>
|
378 |
<block type="postnl_mijnpakket/loginButton" name="postnl_mijnpakket_login" template="TIG/PostNL/mijnpakket/onepage/login_button.phtml"/>
|
379 |
+
<block type="postnl_deliveryoptions/pickupNotification" name="postnl_billing_pickup_notification" template="TIG/PostNL/delivery_options/onepage/pickup_notification.phtml"/>
|
380 |
</reference>
|
381 |
</checkout_onepage_index>
|
382 |
|
433 |
<action method="addCss"><stylesheet>css/TIG/PostNL/deliveryoptions/default.css</stylesheet></action>
|
434 |
<action method="addCss"><stylesheet>css/TIG/PostNL/deliveryoptions/onestepcheckout.css</stylesheet></action>
|
435 |
<action method="addCss"><stylesheet>css/TIG/PostNL/mijnpakket.css</stylesheet></action>
|
|
|
436 |
<action method="addItem"><type>skin_css</type><name>css/TIG/PostNL/deliveryoptions/ie8.css</name><params/><if>lt IE 9</if></action>
|
437 |
<action method="addCss"><stylesheet>css/TIG/PostNL/postcodecheck.css</stylesheet></action>
|
438 |
<action method="addItem"><type>skin_js</type><file>js/TIG/PostNL/ajax.js</file></action>
|
481 |
</reference>
|
482 |
</onestepcheckout_ajax_save_billing>
|
483 |
|
484 |
+
|
485 |
+
<gomage_checkout_onepage_index>
|
486 |
+
<reference name="head">
|
487 |
+
<action method="addCss"><stylesheet>css/TIG/PostNL/deliveryoptions/default.css</stylesheet></action>
|
488 |
+
<action method="addCss"><stylesheet>css/TIG/PostNL/deliveryoptions/gomage_checkout.css</stylesheet></action>
|
489 |
+
<action method="addCss"><stylesheet>css/TIG/PostNL/mijnpakket.css</stylesheet></action>
|
490 |
+
<action method="addItem"><type>skin_css</type><name>css/TIG/PostNL/deliveryoptions/ie8.css</name><params/><if>lt IE 9</if></action>
|
491 |
+
<action method="addCss"><stylesheet>css/TIG/PostNL/postcodecheck.css</stylesheet></action>
|
492 |
+
<action method="addItem"><type>skin_js</type><file>js/TIG/PostNL/ajax.js</file></action>
|
493 |
+
<action method="addItem"><type>skin_js</type><file>js/TIG/PostNL/postcodecheck.js</file></action>
|
494 |
+
<action method="addItem"><type>skin_js</type><file>js/TIG/PostNL/formPopulate.js</file></action>
|
495 |
+
<block type="core/template" name="postnl_validation" template="TIG/PostNL/address_validation/validate.phtml"/>
|
496 |
+
<block type="postnl_deliveryoptions/js" name="postnl_deliveryoptions_js" template="TIG/PostNL/delivery_options/js.phtml"/>
|
497 |
+
<block type="postnl_deliveryoptions/theme" name="postnl_deliveryoptions_theme" template="TIG/PostNL/delivery_options/theme.phtml">
|
498 |
+
<action method="setisGoMage">
|
499 |
+
<isGoMage>true</isGoMage>
|
500 |
+
</action>
|
501 |
+
</block>
|
502 |
+
</reference>
|
503 |
+
|
504 |
+
<reference name="checkout.onepage.address">
|
505 |
+
<block type="postnl_addressvalidation/goMage_lightCheckout_billing" name="checkout.onepage.address.billing" as="billing" template="TIG/PostNL/address_validation/gomage_checkout/billing.phtml">
|
506 |
+
<action method="setCountryIdTemplate"><template>gomage/checkout/html/address/field/country.phtml</template></action>
|
507 |
+
<action method="setRegionTemplate"><template>gomage/checkout/html/address/field/region.phtml</template></action>
|
508 |
+
<action method="setStreetTemplate"><template>gomage/checkout/html/address/field/street.phtml</template></action>
|
509 |
+
<block type="core/template" name="postnl_billing_postcodecheck" template="TIG/PostNL/address_validation/gomage_checkout/postcode_check.phtml"/>
|
510 |
+
</block>
|
511 |
+
<block type="postnl_addressvalidation/goMage_lightCheckout_shipping" name="checkout.onepage.address.shipping" as="shipping" template="TIG/PostNL/address_validation/gomage_checkout/shipping.phtml">
|
512 |
+
<action method="setCountryIdTemplate"><template>gomage/checkout/html/address/field/country.phtml</template></action>
|
513 |
+
<action method="setRegionTemplate"><template>gomage/checkout/html/address/field/region.phtml</template></action>
|
514 |
+
<action method="setStreetTemplate"><template>gomage/checkout/html/address/field/street.phtml</template></action>
|
515 |
+
<block type="core/template" name="postnl_shipping_postcodecheck" template="TIG/PostNL/address_validation/gomage_checkout/postcode_check.phtml"/>
|
516 |
+
</block>
|
517 |
+
</reference>
|
518 |
+
|
519 |
+
<reference name="checkout.onepage.shipping_method.available">
|
520 |
+
<block type="postnl_deliveryoptions/checkout_goMage_lightCheckout_deliveryOptions" name="postnl.gomage.delivery.options" template="TIG/PostNL/delivery_options/gomage_checkout/deliveryoptions.phtml">
|
521 |
+
<block type="core/template" name="postnl.gomage.add.location" template="TIG/PostNL/delivery_options/addlocation.phtml"/>
|
522 |
+
<block type="postnl_deliveryoptions/checkout_addPhoneNumber" name="postnl.add.phonenumber" template="TIG/PostNL/delivery_options/addphonenumber.phtml"/>
|
523 |
+
</block>
|
524 |
+
</reference>
|
525 |
+
|
526 |
+
<reference name="before_body_end">
|
527 |
+
<block type="core/template" name="postnl_validation" template="TIG/PostNL/address_validation/validate.phtml"/>
|
528 |
+
<block type="postnl_mijnpakket/js" name="postnl_mijnpakket_js" template="TIG/PostNL/mijnpakket/gomage_checkout/js.phtml"/>
|
529 |
+
<block type="postnl_mijnpakket/loginButton" name="postnl_mijnpakket_login" template="TIG/PostNL/mijnpakket/gomage_checkout/login_button.phtml"/>
|
530 |
+
</reference>
|
531 |
+
</gomage_checkout_onepage_index>
|
532 |
+
|
533 |
<!-- POSTNL COD FEE -->
|
534 |
|
535 |
<sales_order_print>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -0,0 +1,181 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* GoMage LightCheckout Extension
|
4 |
+
*
|
5 |
+
* @category Extension
|
6 |
+
* @copyright Copyright (c) 2010-2014 GoMage (http://www.gomage.com)
|
7 |
+
* @author GoMage
|
8 |
+
* @license http://www.gomage.com/license-agreement/ Single domain license
|
9 |
+
* @terms of use http://www.gomage.com/terms-of-use
|
10 |
+
* @version Release: 5.8
|
11 |
+
* @since Class available since Release 1.0
|
12 |
+
*/
|
13 |
+
?>
|
14 |
+
<div class="billing-address" id="gcheckout-billing-address">
|
15 |
+
<h2 class="glc-title"><span class="glc-number">1</span><strong><?php echo $this->__('Billing address');?></strong></h2>
|
16 |
+
<div class="glc-col">
|
17 |
+
<ul class="form-list">
|
18 |
+
|
19 |
+
<?php if ($this->customerHasAddresses()): ?>
|
20 |
+
<li class="wide">
|
21 |
+
<label for="billing-address-select"><?php echo $this->__('Select a billing address') ?></label>
|
22 |
+
<div class="input-box">
|
23 |
+
<?php echo $this->getAddressesHtmlSelect('billing') ?>
|
24 |
+
</div>
|
25 |
+
</li>
|
26 |
+
<?php endif; ?>
|
27 |
+
|
28 |
+
<li id="billing-new-address-form">
|
29 |
+
<fieldset>
|
30 |
+
<ul>
|
31 |
+
<li class="fields">
|
32 |
+
<?php echo $this->getLayout()->createBlock('gomage_checkout/onepage_name')->setObject($this->getAddress())->setFieldIdFormat('billing_%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
|
33 |
+
</li>
|
34 |
+
<?php if(!$this->isCustomerLoggedIn()): ?>
|
35 |
+
<li>
|
36 |
+
<label for="billing_email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
|
37 |
+
<div class="input-box">
|
38 |
+
<input type="text" name="billing[email]" id="billing_email" value="<?php echo $this->htmlEscape($this->getAddress()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text required-entry validate-email absolute-advice glc-exists-customer" />
|
39 |
+
</div>
|
40 |
+
</li>
|
41 |
+
<?php if (Mage::helper('gomage_checkout')->getConfigData('address_fields/email_confirmation')): ?>
|
42 |
+
<li>
|
43 |
+
<label for="billing_email_confirmation" class="required"><em>*</em><?php echo $this->__('Confirm Email Address') ?></label>
|
44 |
+
<div class="input-box">
|
45 |
+
<input type="text" name="billing[email_confirmation]" id="billing_email_confirmation" value="<?php echo $this->htmlEscape($this->getAddress()->getEmail()) ?>" title="<?php echo $this->__('Confirm Email Address') ?>" class="input-text required-entry validate-email absolute-advice glc-email-confirmation" data-parent-id="billing_email" />
|
46 |
+
</div>
|
47 |
+
</li>
|
48 |
+
<?php endif ?>
|
49 |
+
<?php endif ?>
|
50 |
+
|
51 |
+
<?php echo $this->getSortedFields();?>
|
52 |
+
|
53 |
+
<?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat')->setTemplate('gomage/checkout/html/taxvat.phtml') ?>
|
54 |
+
<?php if ($_taxvat->isEnabled()): ?>
|
55 |
+
<?php
|
56 |
+
|
57 |
+
$_taxvat->setIsValidVat($this->getAddress()->getIsValidVat());
|
58 |
+
|
59 |
+
$taxvat_value = '';
|
60 |
+
|
61 |
+
if ($this->getAddress()->getTaxvat()){
|
62 |
+
$taxvat_value = $this->getAddress()->getTaxvat();
|
63 |
+
} elseif ($this->getAddress()->getVatId()){
|
64 |
+
$taxvat_value = $this->getAddress()->getVatId();
|
65 |
+
} elseif ($this->getQuote()->getCustomerTaxvat()){
|
66 |
+
$taxvat_value = $this->getQuote()->getCustomerTaxvat();
|
67 |
+
}
|
68 |
+
|
69 |
+
?>
|
70 |
+
<li>
|
71 |
+
<?php echo $_taxvat->setTaxvat($taxvat_value)->setFieldIdFormat('billing_%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
|
72 |
+
</li>
|
73 |
+
<?php endif ?>
|
74 |
+
|
75 |
+
<?php
|
76 |
+
if(!Mage::helper('gomage_checkout')->getIsAnymoreVersion(1, 4, 0))
|
77 |
+
$_dob = $this->getLayout()->createBlock('customer/widget_dob')->setTemplate('gomage/checkout/html/dob13.phtml');
|
78 |
+
else
|
79 |
+
$_dob = $this->getLayout()->createBlock('customer/widget_dob')->setTemplate('gomage/checkout/html/dob.phtml');
|
80 |
+
?>
|
81 |
+
<?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
|
82 |
+
|
83 |
+
<?php
|
84 |
+
$_show_dob = !$this->isCustomerLoggedIn() || ($this->isCustomerLoggedIn() && !$this->getQuote()->getCustomerDob());
|
85 |
+
$_show_gender = !$this->isCustomerLoggedIn() || ($this->isCustomerLoggedIn() && !$this->getQuote()->getCustomerGender());
|
86 |
+
?>
|
87 |
+
|
88 |
+
<?php if (($_dob && $_dob->isEnabled() && $_show_dob) ||
|
89 |
+
($_gender && $_gender->isEnabled() && $_show_gender)): ?>
|
90 |
+
<li class="fields customer-dob <?php if ($_gender && $_gender->isEnabled() && $_show_gender): ?>customer-dob-gender<?php endif;?>">
|
91 |
+
<?php if ($_dob->isEnabled()): ?>
|
92 |
+
<div class="field">
|
93 |
+
<?php echo $_dob->setDate($this->getQuote()->getCustomerDob())->setFieldIdFormat('billing_%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
|
94 |
+
</div>
|
95 |
+
<?php endif; ?>
|
96 |
+
<?php if ($_gender && $_gender->isEnabled() && $_show_gender): ?>
|
97 |
+
<div class="field">
|
98 |
+
<?php echo $_gender->setGender($this->getQuote()->getCustomerGender())->setFieldIdFormat('billing_%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
|
99 |
+
</div>
|
100 |
+
<?php endif ?>
|
101 |
+
</li>
|
102 |
+
<?php endif ?>
|
103 |
+
|
104 |
+
<?php if ($_taxvat->isEnabled()): ?>
|
105 |
+
<?php if( in_array(Mage::helper('gomage_checkout')->getConfigData('vat/show_checkbox'), array(1, 2))):?>
|
106 |
+
<li>
|
107 |
+
<label class="vat-label">
|
108 |
+
<input id="buy_without_vat" type="checkbox" <?php if($this->getAddress()->getBuyWithoutVat()):?>checked="checked"<?php endif;?> value="1" onclick="$('buy_without_vat_value').value = $('buy_without_vat_value2').value = (this.checked*1);"/>
|
109 |
+
<span><?php echo Mage::helper('gomage_checkout')->__(Mage::helper('gomage_checkout')->getConfigData('vat/text_under'));?></span>
|
110 |
+
</label>
|
111 |
+
</li>
|
112 |
+
<?php endif;?>
|
113 |
+
<?php
|
114 |
+
if (Mage::helper('gomage_checkout')->getConfigData('vat/show_checkbox')==3){
|
115 |
+
$without_vat_value = 1;
|
116 |
+
}else{
|
117 |
+
if($this->getAddress()->getBuyWithoutVat()){
|
118 |
+
$without_vat_value = 1;
|
119 |
+
}else{
|
120 |
+
$without_vat_value = 0;
|
121 |
+
}
|
122 |
+
}
|
123 |
+
?>
|
124 |
+
<input id="buy_without_vat_value" type="hidden" value="<?php echo $without_vat_value; ?>" name="billing[buy_without_vat]"/>
|
125 |
+
<input id="buy_without_vat_value2" type="hidden" value="<?php echo $without_vat_value; ?>" name="shipping[buy_without_vat]"/>
|
126 |
+
<?php endif; ?>
|
127 |
+
|
128 |
+
|
129 |
+
<?php if(!$this->isCustomerLoggedIn() && !$this->getAutoRegistration()): ?>
|
130 |
+
<?php if(!$this->isCustomerLoggedIn() && in_array($this->getCheckoutMode(), array(0, 1))):?>
|
131 |
+
<?php if($this->getCheckoutMode() == 0):?>
|
132 |
+
<li class="control control-register">
|
133 |
+
<input class="radio" id="customer_account_create" onclick="if(this.checked){$('register-customer-password').style.display='block';}else{$('register-customer-password').style.display='none';}" type="checkbox" <?php if(Mage::getSingleton('customer/session')->getCreateAccount()):?>checked="checked"<?php endif;?> name="create_account" value="1" />
|
134 |
+
<label for="customer_account_create"><?php echo $this->__('Create an Account');?></label>
|
135 |
+
</li>
|
136 |
+
<?php endif;?>
|
137 |
+
<li class="fields" id="register-customer-password" <?php if(!Mage::getSingleton('customer/session')->getCreateAccount() && $this->getCheckoutMode() == 0):?>style="display:none;"<?php endif;?>>
|
138 |
+
<div class="field">
|
139 |
+
<label for="billing_customer_password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
|
140 |
+
<div class="input-box">
|
141 |
+
<input type="password" name="billing[customer_password]" id="billing_customer_password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
|
142 |
+
</div>
|
143 |
+
</div>
|
144 |
+
<div class="field">
|
145 |
+
<label for="billing_confirm_password" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
|
146 |
+
<div class="input-box">
|
147 |
+
<input type="password" name="billing[confirm_password]" title="<?php echo $this->__('Confirm Password') ?>" id="billing_confirm_password" class="input-text validate-cpassword" />
|
148 |
+
</div>
|
149 |
+
</div>
|
150 |
+
<?php if ($this->isReferralBlockShow()): ?>
|
151 |
+
<div class="input-box">
|
152 |
+
<label for="rewards_referral"><?php echo $this->getReferralLabel() ?></label>
|
153 |
+
<div class="input-box">
|
154 |
+
<input type="text" title="<?php echo $this->getReferralLabel() ?>" class="input-text" id="rewards_referral" name="billing[rewards_referral]" />
|
155 |
+
</div>
|
156 |
+
</div>
|
157 |
+
<?php endif; ?>
|
158 |
+
</li>
|
159 |
+
<?php endif; ?>
|
160 |
+
<?php endif; ?>
|
161 |
+
</ul>
|
162 |
+
</fieldset>
|
163 |
+
</li>
|
164 |
+
<?php if ($this->isCustomerLoggedIn()):?>
|
165 |
+
<li id="billing_address_book" class="control control-siab" style="display:none">
|
166 |
+
<input type="checkbox" name="billing[save_in_address_book]" id="billing_save_in_address_book" value="1" title="<?php echo $this->__('Save in address book') ?>" class="checkbox" />
|
167 |
+
<label for="billing_save_in_address_book"><?php echo $this->__('Save in address book') ?></label>
|
168 |
+
</li>
|
169 |
+
<?php endif; ?>
|
170 |
+
<?php if ($this->canShip()):?>
|
171 |
+
<li class="control control-stta">
|
172 |
+
<input type="checkbox" name="billing[use_for_shipping]" id="billing_use_for_shipping_yes" value="1" <?php if($this->shippingAsBilling()):?> checked="checked" <?php endif;?> title="<?php echo $this->__('Ship to this address') ?>" onclick="checkout.changeAddressMode(this.checked)" class="radio" />
|
173 |
+
<label for="billing_use_for_shipping_yes"><?php echo $this->__('Ship to this address') ?></label>
|
174 |
+
</li>
|
175 |
+
<?php endif; ?>
|
176 |
+
</ul>
|
177 |
+
<?php if (!$this->canShip()): ?>
|
178 |
+
<input type="hidden" name="billing[use_for_shipping]" value="1" />
|
179 |
+
<?php endif; ?>
|
180 |
+
</div>
|
181 |
+
</div>
|
@@ -0,0 +1,295 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ___________ __ __
|
4 |
+
* \__ ___/____ _/ |_ _____ | |
|
5 |
+
* | | / _ \\ __\\__ \ | |
|
6 |
+
* | | | |_| || | / __ \_| |__
|
7 |
+
* |____| \____/ |__| (____ /|____/
|
8 |
+
* \/
|
9 |
+
* ___ __ __
|
10 |
+
* | | ____ _/ |_ ____ _______ ____ ____ _/ |_
|
11 |
+
* | | / \\ __\_/ __ \\_ __ \ / \ _/ __ \\ __\
|
12 |
+
* | || | \| | \ ___/ | | \/| | \\ ___/ | |
|
13 |
+
* |___||___| /|__| \_____>|__| |___| / \_____>|__|
|
14 |
+
* \/ \/
|
15 |
+
* ________
|
16 |
+
* / _____/_______ ____ __ __ ______
|
17 |
+
* / \ ___\_ __ \ / _ \ | | \\____ \
|
18 |
+
* \ \_\ \| | \/| |_| || | /| |_| |
|
19 |
+
* \______ /|__| \____/ |____/ | __/
|
20 |
+
* \/ |__|
|
21 |
+
*
|
22 |
+
* NOTICE OF LICENSE
|
23 |
+
*
|
24 |
+
* This source file is subject to the Creative Commons License.
|
25 |
+
* It is available through the world-wide-web at this URL:
|
26 |
+
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
27 |
+
* If you are unable to obtain it through the world-wide-web, please send an email
|
28 |
+
* to servicedesk@tig.nl so we can send you a copy immediately.
|
29 |
+
*
|
30 |
+
* DISCLAIMER
|
31 |
+
*
|
32 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
33 |
+
* versions in the future. If you wish to customize this module for your
|
34 |
+
* needs please contact servicedesk@tig.nl for more information.
|
35 |
+
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
+
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
+
*/
|
39 |
+
?>
|
40 |
+
<?php $_readOnly = ''; ?>
|
41 |
+
<?php $_readOnlyClass = ''; ?>
|
42 |
+
<?php if ($this->getAddress()->getCountryId() == 'NL'): ?>
|
43 |
+
<?php $_readOnly = 'readonly=""'; ?>
|
44 |
+
<?php $_readOnlyClass = 'postnl-readonly'; ?>
|
45 |
+
<?php endif; ?>
|
46 |
+
|
47 |
+
<?php $_postnlHelper = Mage::helper('postnl/addressValidation'); ?>
|
48 |
+
|
49 |
+
<?php $_addressType = $this->hasAddressType() ? $this->getAddressType() : 'billing'; ?>
|
50 |
+
<?php $_streetValidationClass = $_postnlHelper->getAttributeValidationClass('street'); ?>
|
51 |
+
<?php $_streetValidationClassNotRequired = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
|
52 |
+
|
53 |
+
<?php $_timeoutDelay = $_postnlHelper->getPostcodeCheckTimeoutDelay(); ?>
|
54 |
+
<?php $_maxAttempts = $_postnlHelper->getPostcodeCheckMaxAttempts(); ?>
|
55 |
+
<li>
|
56 |
+
<label for="<?php echo $_addressType; ?>_country_id" class="required"><em>*</em><?php echo $_postnlHelper->__('Country'); ?></label>
|
57 |
+
<div class="input-box">
|
58 |
+
<?php echo $this->getCountryHtmlSelect() ?>
|
59 |
+
</div>
|
60 |
+
</li>
|
61 |
+
<li class="fields" id="gomage_postnl_ce">
|
62 |
+
<div class="field field-postcode">
|
63 |
+
<label for="<?php echo $_addressType; ?>_postcode" class="required"><em>*</em><?php echo $_postnlHelper->__('Zip/Postal Code') ?></label>
|
64 |
+
<div class="input-box">
|
65 |
+
<input type="text" title="<?php echo $_postnlHelper->__('Zip/Postal Code') ?>" name="<?php echo $_addressType; ?>[postcode]" id="<?php echo $_addressType; ?>_postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international <?php echo $this->helper('postnl/addressValidation')->getAttributeValidationClass('postcode') ?>" />
|
66 |
+
</div>
|
67 |
+
</div>
|
68 |
+
<div class="field field-housenumber">
|
69 |
+
<label for="<?php echo $_addressType; ?>_street2" class="required"><em>*</em><?php echo $_postnlHelper->__('Housenumber') ?></label>
|
70 |
+
<div class="input-box">
|
71 |
+
<input type="text" title="<?php echo $_postnlHelper->__('Housenumber') ?>" name="virtual_<?php echo $_addressType; ?>[street][]" id="virtual_<?php echo $_addressType; ?>_street2" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(2)) ?>" class="input-text <?php echo $_streetValidationClass ?>" />
|
72 |
+
</div>
|
73 |
+
</div>
|
74 |
+
<div class="field field-extension">
|
75 |
+
<label for="<?php echo $_addressType; ?>_street3"><?php echo $_postnlHelper->__('Extension') ?></label>
|
76 |
+
<div class="input-box">
|
77 |
+
<input type="text" title="<?php echo $_postnlHelper->__('Extension') ?>" name="virtual_<?php echo $_addressType; ?>[street][]" id="virtual_<?php echo $_addressType; ?>_street3" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(3)) ?>" class="input-text <?php echo $_streetValidationClassNotRequired ?>" />
|
78 |
+
</div>
|
79 |
+
</div>
|
80 |
+
<div id="postnl_postcodecheck_spinner_<?php echo $_addressType ?>" class="postnl-loading" style="display:none;">
|
81 |
+
<img src="<?php echo $this->getSkinUrl('images/TIG/PostNL/opc-ajax-loader.gif') ?>"/>
|
82 |
+
</div>
|
83 |
+
<div class="postnl postnl-validation-advice" style="display:none;" id="postnl_address_error_<?php echo $_addressType; ?>">
|
84 |
+
<?php echo $_postnlHelper->__('Your postcode/housenumber combination could not be found. Please enter your streetname and city manually.'); ?>
|
85 |
+
</div>
|
86 |
+
<div class="postnl postnl-validation-advice" style="display:none;" id="postnl_address_missing_<?php echo $_addressType; ?>">
|
87 |
+
<?php echo $_postnlHelper->__('Please enter a postcode and housenumber.'); ?>
|
88 |
+
</div>
|
89 |
+
<div class="postnl postnl-validation-advice" style="display:none;" id="postnl_address_invalid_<?php echo $_addressType; ?>">
|
90 |
+
<?php echo $_postnlHelper->__('Your postcode/housenumber combination could not be found. Please make sure you have entered a valid postcode and housenumber and try again.'); ?>
|
91 |
+
</div>
|
92 |
+
</li>
|
93 |
+
<li>
|
94 |
+
<label for="<?php echo $_addressType; ?>_street1" class="required"><em>*</em><?php echo $_postnlHelper->__('Street name') ?></label>
|
95 |
+
<div class="input-box">
|
96 |
+
<input type="text" title="<?php echo $_postnlHelper->__('Street name') ?>" name="virtual_<?php echo $_addressType; ?>[street][]" id="virtual_<?php echo $_addressType; ?>_street1" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" class="input-text <?php echo $_streetValidationClass ?> <?php echo $_readOnlyClass; ?>" <?php echo $_readOnly; ?>/>
|
97 |
+
</div>
|
98 |
+
</li>
|
99 |
+
<?php /* Only street lines 4+ will be used as expected. Street lines 1, 2 and 3 are used for the postcode check. */ ?>
|
100 |
+
<?php for ($_i = 4, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
|
101 |
+
<li class="add-field">
|
102 |
+
<div class="input-box">
|
103 |
+
<input type="text" title="<?php echo $_postnlHelper->__('Street Address %s', $_i) ?>" name="virtual_<?php echo $_addressType; ?>[street][]" id="virtual_<?php echo $_addressType; ?>_street<?php echo $_i ?>" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet($_i)) ?>" class="input-text <?php echo $_streetValidationClassNotRequired ?>" />
|
104 |
+
</div>
|
105 |
+
</li>
|
106 |
+
<?php endfor; ?>
|
107 |
+
<li class="fields">
|
108 |
+
<div class="field">
|
109 |
+
<label for="<?php echo $_addressType; ?>_city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
|
110 |
+
<div class="input-box">
|
111 |
+
<input type="text" title="<?php echo $_postnlHelper->__('City') ?>" name="<?php echo $_addressType; ?>[city]" value="<?php echo $this->escapeHtml($this->getAddress()->getCity()) ?>" class="input-text <?php echo $this->helper('postnl/addressValidation')->getAttributeValidationClass('city') ?> <?php echo $_readOnlyClass; ?>" id="<?php echo $_addressType; ?>_city" <?php echo $_readOnly; ?>/>
|
112 |
+
</div>
|
113 |
+
</div>
|
114 |
+
</li>
|
115 |
+
|
116 |
+
<!-- Hidden fields for all the street lines to force them in the proper order regardless of the order in which they are displayed. -->
|
117 |
+
<div style="display:none;">
|
118 |
+
<input type="hidden" name="<?php echo $_addressType; ?>[street][]" id="<?php echo $_addressType; ?>_street1"/>
|
119 |
+
<input type="hidden" name="<?php echo $_addressType; ?>[street][]" id="<?php echo $_addressType; ?>_street2"/>
|
120 |
+
<input type="hidden" name="<?php echo $_addressType; ?>[street][]" id="<?php echo $_addressType; ?>_street3"/>
|
121 |
+
<?php for ($_i = 4, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
|
122 |
+
<input type="hidden" name="<?php echo $_addressType; ?>[street][]" id="<?php echo $_addressType; ?>_street<?php echo $_i ?>"/>
|
123 |
+
<?php endfor; ?>
|
124 |
+
</div>
|
125 |
+
|
126 |
+
<script type="text/javascript">
|
127 |
+
//<![CDATA[
|
128 |
+
<?php for ($_i = 4, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
|
129 |
+
$('virtual_<?php echo $_addressType; ?>_street<?php echo $_i; ?>').observe('change', function(event) {
|
130 |
+
var element = Event.element(event);
|
131 |
+
var value = element.getValue();
|
132 |
+
|
133 |
+
$('<?php echo $_addressType; ?>_street<?php echo $_i; ?>').setValue(value);
|
134 |
+
});
|
135 |
+
$('virtual_<?php echo $_addressType; ?>_street<?php echo $_i; ?>').observe('change', function(event) {
|
136 |
+
var element = Event.element(event);
|
137 |
+
var value = element.getValue();
|
138 |
+
|
139 |
+
$('<?php echo $_addressType; ?>_street<?php echo $_i; ?>').setValue(value);
|
140 |
+
});
|
141 |
+
<?php endfor; ?>
|
142 |
+
|
143 |
+
initPostcodeCheck<?php echo $_addressType; ?> = function() {
|
144 |
+
$('<?php echo $_addressType; ?>_postcode').stopObserving('change');
|
145 |
+
$('virtual_<?php echo $_addressType; ?>_street2').stopObserving('change');
|
146 |
+
$('virtual_<?php echo $_addressType; ?>_street3').stopObserving('change');
|
147 |
+
|
148 |
+
var postcodeCheck<?php echo $_addressType; ?> = new PostnlPostcodecheck(
|
149 |
+
'<?php echo $this->getUrl('postnl/addressValidation/postcodeCheck', array('_secure' => true)); ?>',
|
150 |
+
'<?php echo $_addressType; ?>',
|
151 |
+
'<?php echo $_addressType; ?>_country_id',
|
152 |
+
'<?php echo $_addressType; ?>_postcode',
|
153 |
+
'<?php echo $_addressType; ?>_street1',
|
154 |
+
'<?php echo $_addressType; ?>_street2',
|
155 |
+
'<?php echo $_addressType; ?>_street3',
|
156 |
+
'<?php echo $_addressType; ?>_city',
|
157 |
+
'virtual_'
|
158 |
+
);
|
159 |
+
postcodeCheck<?php echo $_addressType; ?>.errorMax = <?php echo $_maxAttempts; ?>;
|
160 |
+
postcodeCheck<?php echo $_addressType; ?>.timeoutDelay = '<?php echo $_timeoutDelay; ?>';
|
161 |
+
postcodeCheck<?php echo $_addressType; ?>.init();
|
162 |
+
|
163 |
+
<?php if ($_addressType == 'shipping'): ?>
|
164 |
+
$('billing_country_id').observe('change', function() {
|
165 |
+
postcodeCheck<?php echo $_addressType; ?>.changePostcodeCheckDisabledFields($('billing_country_id').getValue());
|
166 |
+
});
|
167 |
+
<?php endif; ?>
|
168 |
+
};
|
169 |
+
|
170 |
+
if (!window.domLoaded) {
|
171 |
+
document.observe('dom:loaded', function () {
|
172 |
+
window.domLoaded = true;
|
173 |
+
initPostcodeCheck<?php echo $_addressType; ?>();
|
174 |
+
|
175 |
+
checkoutloginform.submit = function (params) {
|
176 |
+
|
177 |
+
if (typeof params != 'undefined' && params == 0) {
|
178 |
+
return true;
|
179 |
+
}
|
180 |
+
|
181 |
+
$$('#gcheckout-login-form .actions button')[0].style.display = 'none';
|
182 |
+
$$('#gcheckout-login-form .actions .loadinfo')[0].style.display = 'block';
|
183 |
+
|
184 |
+
var self = this;
|
185 |
+
|
186 |
+
var request = new Ajax.Request(this.url,
|
187 |
+
{
|
188 |
+
method: 'post',
|
189 |
+
parameters: {'login[username]': $$('#gcheckout-login-form #email')[0].value, 'login[password]': $$('#gcheckout-login-form #pass')[0].value},
|
190 |
+
onSuccess: function (transport) {
|
191 |
+
try {
|
192 |
+
eval('var response = ' + transport.responseText);
|
193 |
+
} catch (e) {
|
194 |
+
var response = new Object();
|
195 |
+
response.error = true;
|
196 |
+
response.message = 'Unknow error.';
|
197 |
+
}
|
198 |
+
if (!response.error) {
|
199 |
+
|
200 |
+
$$('.validation-advice').each(function (e) {
|
201 |
+
e.remove()
|
202 |
+
});
|
203 |
+
|
204 |
+
var form = $('gcheckout-onepage-form');
|
205 |
+
|
206 |
+
var content = response.content;
|
207 |
+
var js_scripts = content.extractScripts();
|
208 |
+
|
209 |
+
form.innerHTML = content.stripScripts();
|
210 |
+
|
211 |
+
if ($$('.header .links').length && response.links) {
|
212 |
+
var tempelement = document.createElement('div');
|
213 |
+
tempelement.innerHTML = response.links;
|
214 |
+
var links = $$('.header .links')[0];
|
215 |
+
links.parentNode.replaceChild(tempelement.firstChild, links);
|
216 |
+
}
|
217 |
+
|
218 |
+
if (response.header && $$('.header-container').length) {
|
219 |
+
// enterprise
|
220 |
+
var element = $$('.header-container')[0];
|
221 |
+
var js_header_scripts = response.header.extractScripts();
|
222 |
+
|
223 |
+
var tempelement = document.createElement('div');
|
224 |
+
tempelement.innerHTML = response.header.stripScripts();
|
225 |
+
|
226 |
+
element.parentNode.replaceChild(tempelement.firstChild, element);
|
227 |
+
|
228 |
+
for (var i = 0; i < js_header_scripts.length; i++) {
|
229 |
+
if (typeof(js_header_scripts[i]) != 'undefined') {
|
230 |
+
LightcheckoutglobalEval(js_header_scripts[i]);
|
231 |
+
}
|
232 |
+
}
|
233 |
+
}
|
234 |
+
|
235 |
+
if (!response.is_virtual) {
|
236 |
+
var wrap = $$('div.gcheckout-onepage-wrap')[0];
|
237 |
+
if (wrap && wrap.hasClassName('not_shipping_mode')) {
|
238 |
+
wrap.removeClassName('not_shipping_mode');
|
239 |
+
}
|
240 |
+
}
|
241 |
+
|
242 |
+
$('gcheckout-login-link').hide();
|
243 |
+
|
244 |
+
Event.stopObserving(document, "dom:loaded");
|
245 |
+
for (var i = 0; i < js_scripts.length; i++) {
|
246 |
+
if (typeof(js_scripts[i]) != 'undefined') {
|
247 |
+
LightcheckoutglobalEval(js_scripts[i]);
|
248 |
+
}
|
249 |
+
}
|
250 |
+
try {
|
251 |
+
Event.fire(document, "dom:loaded");
|
252 |
+
} catch (e) {
|
253 |
+
}
|
254 |
+
|
255 |
+
if (typeof response.verify_result != 'undefined') {
|
256 |
+
checkout.taxvat_verify_result = response.verify_result;
|
257 |
+
} else {
|
258 |
+
checkout.taxvat_verify_result = null;
|
259 |
+
}
|
260 |
+
|
261 |
+
checkout.hideLoginForm();
|
262 |
+
|
263 |
+
initAddresses();
|
264 |
+
checkout.initialize();
|
265 |
+
payment.init();
|
266 |
+
|
267 |
+
self.logged_in = true;
|
268 |
+
|
269 |
+
initPostcodeCheckbilling();
|
270 |
+
initPostcodeCheckshipping();
|
271 |
+
} else {
|
272 |
+
|
273 |
+
if ($$('#gcheckout-login-form div.error').length == 0) {
|
274 |
+
$('gcheckout-login-form').insert({'top': '<div class="error"></div>'});
|
275 |
+
}
|
276 |
+
$$('#gcheckout-login-form div.error')[0].innerHTML = '';
|
277 |
+
$$('#gcheckout-login-form div.error')[0].insert(response.message);
|
278 |
+
}
|
279 |
+
|
280 |
+
$$('#gcheckout-login-form .actions button')[0].style.display = 'block';
|
281 |
+
$$('#gcheckout-login-form .actions .loadinfo')[0].style.display = 'none';
|
282 |
+
|
283 |
+
}.bind(this),
|
284 |
+
onFailure: function () {
|
285 |
+
// ...
|
286 |
+
}
|
287 |
+
});
|
288 |
+
|
289 |
+
return false;
|
290 |
+
|
291 |
+
}.bind(checkoutloginform);
|
292 |
+
});
|
293 |
+
}
|
294 |
+
//]]>
|
295 |
+
</script>
|
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ___________ __ __
|
4 |
+
* \__ ___/____ _/ |_ _____ | |
|
5 |
+
* | | / _ \\ __\\__ \ | |
|
6 |
+
* | | | |_| || | / __ \_| |__
|
7 |
+
* |____| \____/ |__| (____ /|____/
|
8 |
+
* \/
|
9 |
+
* ___ __ __
|
10 |
+
* | | ____ _/ |_ ____ _______ ____ ____ _/ |_
|
11 |
+
* | | / \\ __\_/ __ \\_ __ \ / \ _/ __ \\ __\
|
12 |
+
* | || | \| | \ ___/ | | \/| | \\ ___/ | |
|
13 |
+
* |___||___| /|__| \_____>|__| |___| / \_____>|__|
|
14 |
+
* \/ \/
|
15 |
+
* ________
|
16 |
+
* / _____/_______ ____ __ __ ______
|
17 |
+
* / \ ___\_ __ \ / _ \ | | \\____ \
|
18 |
+
* \ \_\ \| | \/| |_| || | /| |_| |
|
19 |
+
* \______ /|__| \____/ |____/ | __/
|
20 |
+
* \/ |__|
|
21 |
+
*
|
22 |
+
* NOTICE OF LICENSE
|
23 |
+
*
|
24 |
+
* This source file is subject to the Creative Commons License.
|
25 |
+
* It is available through the world-wide-web at this URL:
|
26 |
+
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
27 |
+
* If you are unable to obtain it through the world-wide-web, please send an email
|
28 |
+
* to servicedesk@tig.nl so we can send you a copy immediately.
|
29 |
+
*
|
30 |
+
* DISCLAIMER
|
31 |
+
*
|
32 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
33 |
+
* versions in the future. If you wish to customize this module for your
|
34 |
+
* needs please contact servicedesk@tig.nl for more information.
|
35 |
+
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
+
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
+
*/
|
39 |
+
?>
|
40 |
+
|
41 |
+
<div class="shipping-address" id="gcheckout-shipping-address" <?php if($this->asBilling()):?>style="display:none;"<?php endif;?>>
|
42 |
+
|
43 |
+
<h2 class="glc-title"><span class="glc-number">2</span><strong><?php echo $this->__('Shipping address');?></strong></h2>
|
44 |
+
|
45 |
+
<div class="glc-col">
|
46 |
+
|
47 |
+
<ul class="form-list">
|
48 |
+
<?php if ($this->customerHasAddresses()): ?>
|
49 |
+
<li class="wide">
|
50 |
+
<label for="billing-address-select"><?php echo $this->__('Select a shipping address') ?></label>
|
51 |
+
<div class="input-box">
|
52 |
+
<?php echo $this->getAddressesHtmlSelect('shipping') ?>
|
53 |
+
</div>
|
54 |
+
</li>
|
55 |
+
<?php endif; ?>
|
56 |
+
<li id="shipping-new-address-form">
|
57 |
+
<fieldset>
|
58 |
+
<ul>
|
59 |
+
<li class="fields"><?php echo $this->getLayout()->createBlock('gomage_checkout/onepage_name')->setObject($this->getAddress())->setFieldIdFormat('shipping_%s')->setFieldNameFormat('shipping[%s]')->toHtml() ?></li>
|
60 |
+
<?php echo $this->getSortedFields();?>
|
61 |
+
|
62 |
+
<?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat')->setTemplate('gomage/checkout/html/taxvat.phtml') ?>
|
63 |
+
<?php if ($_taxvat->isEnabled()): ?>
|
64 |
+
<?php
|
65 |
+
|
66 |
+
$_taxvat->setIsValidVat($this->getAddress()->getIsValidVat());
|
67 |
+
|
68 |
+
$taxvat_value = '';
|
69 |
+
|
70 |
+
if ($this->getAddress()->getTaxvat()){
|
71 |
+
$taxvat_value = $this->getAddress()->getTaxvat();
|
72 |
+
} elseif ($this->getAddress()->getVatId()){
|
73 |
+
$taxvat_value = $this->getAddress()->getVatId();
|
74 |
+
} elseif ($this->getQuote()->getCustomerTaxvat()){
|
75 |
+
$taxvat_value = $this->getQuote()->getCustomerTaxvat();
|
76 |
+
}
|
77 |
+
|
78 |
+
?>
|
79 |
+
<li>
|
80 |
+
<?php echo $_taxvat->setTaxvat($taxvat_value)->setFieldIdFormat('shipping_%s')->setFieldNameFormat('shipping[%s]')->toHtml() ?>
|
81 |
+
</li>
|
82 |
+
<?php endif ?>
|
83 |
+
</ul>
|
84 |
+
</fieldset>
|
85 |
+
</li>
|
86 |
+
<?php if ($this->isCustomerLoggedIn()):?>
|
87 |
+
<li id="shipping_address_book" class="control" style="display:none">
|
88 |
+
<input type="checkbox" name="shipping[save_in_address_book]" id="shipping_save_in_address_book" value="1" title="<?php echo $this->__('Save in address book') ?>" class="checkbox" /><label for="shipping_save_in_address_book"><?php echo $this->__('Save in address book') ?></label>
|
89 |
+
</li>
|
90 |
+
<?php endif; ?>
|
91 |
+
</ul>
|
92 |
+
|
93 |
+
</div>
|
94 |
+
|
95 |
+
</div>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -32,7 +32,7 @@
|
|
32 |
* versions in the future. If you wish to customize this module for your
|
33 |
* needs please contact servicedesk@tig.nl for more information.
|
34 |
*
|
35 |
-
* @copyright Copyright (c)
|
36 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
37 |
*/
|
38 |
?>
|
32 |
* versions in the future. If you wish to customize this module for your
|
33 |
* needs please contact servicedesk@tig.nl for more information.
|
34 |
*
|
35 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
36 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
37 |
*/
|
38 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_Core_Order_Returns_Shipment_Items $this
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_Core_Order_Returns_Shipment_Items $this
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -41,7 +41,8 @@
|
|
41 |
<?php $_order = $this->getOrder(); ?>
|
42 |
<?php $_helper = Mage::helper('postnl/deliveryOptions'); ?>
|
43 |
<?php $_deliveryOptions = $_helper->getDeliveryOptionsInfo($_order, false); ?>
|
44 |
-
<?php
|
|
|
45 |
<br />
|
46 |
<?php echo $this->formatDate($_deliveryOptions['store_delivery_date']); ?>
|
47 |
<?php if ($_deliveryOptions['store_delivery_time_start'] && $_deliveryOptions['store_delivery_time_end'] && $_helper->canUseTimeframes(false)): ?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
41 |
<?php $_order = $this->getOrder(); ?>
|
42 |
<?php $_helper = Mage::helper('postnl/deliveryOptions'); ?>
|
43 |
<?php $_deliveryOptions = $_helper->getDeliveryOptionsInfo($_order, false); ?>
|
44 |
+
<?php $_filteredDeliveryOptions = array_filter($_deliveryOptions); ?>
|
45 |
+
<?php if (!empty($_filteredDeliveryOptions) && $_helper->canUseDeliveryDays(false)): ?>
|
46 |
<br />
|
47 |
<?php echo $this->formatDate($_deliveryOptions['store_delivery_date']); ?>
|
48 |
<?php if ($_deliveryOptions['store_delivery_time_start'] && $_deliveryOptions['store_delivery_time_end'] && $_helper->canUseTimeframes(false)): ?>
|
@@ -33,24 +33,25 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
40 |
<?php /** @var Mage_Sales_Model_Order $_order */ ?>
|
41 |
<?php $_order = $this->getOrder(); ?>
|
42 |
<?php $_helper = Mage::helper('postnl'); ?>
|
43 |
-
<?php $_pakjeGemakAddress =
|
44 |
<?php if ($_pakjeGemakAddress): ?>
|
45 |
<table cellspacing="0" cellpadding="0" border="0" width="650">
|
46 |
<thead>
|
47 |
<tr>
|
48 |
-
<th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;"><?php echo $
|
49 |
</tr>
|
50 |
</thead>
|
51 |
<tbody>
|
52 |
<tr>
|
53 |
<td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
|
|
|
54 |
<?php echo $_pakjeGemakAddress->format('html'); ?>
|
55 |
</td>
|
56 |
</tr>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
40 |
<?php /** @var Mage_Sales_Model_Order $_order */ ?>
|
41 |
<?php $_order = $this->getOrder(); ?>
|
42 |
<?php $_helper = Mage::helper('postnl'); ?>
|
43 |
+
<?php $_pakjeGemakAddress = $_helper->getPakjeGemakAddressForOrder($_order); ?>
|
44 |
<?php if ($_pakjeGemakAddress): ?>
|
45 |
<table cellspacing="0" cellpadding="0" border="0" width="650">
|
46 |
<thead>
|
47 |
<tr>
|
48 |
+
<th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;"><?php echo $_helper->__('Post office address:'); ?></th>
|
49 |
</tr>
|
50 |
</thead>
|
51 |
<tbody>
|
52 |
<tr>
|
53 |
<td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
|
54 |
+
<?php echo $_helper->__('You have chosen to pick up your address at the following post office location:') ?><br/><br/>
|
55 |
<?php echo $_pakjeGemakAddress->format('html'); ?>
|
56 |
</td>
|
57 |
</tr>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_Core_ShippingStatus $this
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_Core_ShippingStatus $this
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_DeliveryOptions_Checkout_AddPhoneNumber $this
|
@@ -79,20 +79,35 @@
|
|
79 |
event.stop();
|
80 |
|
81 |
var phoneInputField = $('add_phone_input');
|
|
|
82 |
|
83 |
-
if (typeof shippingMethod != 'undefined') {
|
84 |
-
|
|
|
|
|
85 |
window.deliveryOptions.setPaPhoneCheckPassed(true);
|
86 |
} else {
|
87 |
return;
|
88 |
}
|
89 |
|
90 |
shippingMethod.save();
|
91 |
-
} else if (Validation.validate(phoneInputField)) {
|
92 |
-
window.deliveryOptions.setPaPhoneCheckPassed(true);
|
93 |
-
window.deliveryOptions.saveOscOptions();
|
94 |
} else {
|
95 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
}
|
97 |
|
98 |
window.deliveryOptions.closeAddPhoneWindow();
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_DeliveryOptions_Checkout_AddPhoneNumber $this
|
79 |
event.stop();
|
80 |
|
81 |
var phoneInputField = $('add_phone_input');
|
82 |
+
var valid = false;
|
83 |
|
84 |
+
if (typeof shippingMethod != 'undefined' && typeof shippingMethod.validator != 'undefined') {
|
85 |
+
valid = shippingMethod.validator.validate();
|
86 |
+
|
87 |
+
if (valid) {
|
88 |
window.deliveryOptions.setPaPhoneCheckPassed(true);
|
89 |
} else {
|
90 |
return;
|
91 |
}
|
92 |
|
93 |
shippingMethod.save();
|
|
|
|
|
|
|
94 |
} else {
|
95 |
+
valid = Validation.validate(phoneInputField);
|
96 |
+
|
97 |
+
if (phoneInputField.advices) {
|
98 |
+
phoneInputField.advices.each(function (pair) {
|
99 |
+
if (pair.value) {
|
100 |
+
pair.value.remove();
|
101 |
+
}
|
102 |
+
}.bind(this));
|
103 |
+
}
|
104 |
+
|
105 |
+
if (valid) {
|
106 |
+
window.deliveryOptions.setPaPhoneCheckPassed(true);
|
107 |
+
window.deliveryOptions.saveOscOptions();
|
108 |
+
} else {
|
109 |
+
return;
|
110 |
+
}
|
111 |
}
|
112 |
|
113 |
window.deliveryOptions.closeAddPhoneWindow();
|
@@ -0,0 +1,159 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ___________ __ __
|
4 |
+
* \__ ___/____ _/ |_ _____ | |
|
5 |
+
* | | / _ \\ __\\__ \ | |
|
6 |
+
* | | | |_| || | / __ \_| |__
|
7 |
+
* |____| \____/ |__| (____ /|____/
|
8 |
+
* \/
|
9 |
+
* ___ __ __
|
10 |
+
* | | ____ _/ |_ ____ _______ ____ ____ _/ |_
|
11 |
+
* | | / \\ __\_/ __ \\_ __ \ / \ _/ __ \\ __\
|
12 |
+
* | || | \| | \ ___/ | | \/| | \\ ___/ | |
|
13 |
+
* |___||___| /|__| \_____>|__| |___| / \_____>|__|
|
14 |
+
* \/ \/
|
15 |
+
* ________
|
16 |
+
* / _____/_______ ____ __ __ ______
|
17 |
+
* / \ ___\_ __ \ / _ \ | | \\____ \
|
18 |
+
* \ \_\ \| | \/| |_| || | /| |_| |
|
19 |
+
* \______ /|__| \____/ |____/ | __/
|
20 |
+
* \/ |__|
|
21 |
+
*
|
22 |
+
* NOTICE OF LICENSE
|
23 |
+
*
|
24 |
+
* This source file is subject to the Creative Commons License.
|
25 |
+
* It is available through the world-wide-web at this URL:
|
26 |
+
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
27 |
+
* If you are unable to obtain it through the world-wide-web, please send an email
|
28 |
+
* to servicedesk@tig.nl so we can send you a copy immediately.
|
29 |
+
*
|
30 |
+
* DISCLAIMER
|
31 |
+
*
|
32 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
33 |
+
* versions in the future. If you wish to customize this module for your
|
34 |
+
* needs please contact servicedesk@tig.nl for more information.
|
35 |
+
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
+
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
+
*/
|
39 |
+
?>
|
40 |
+
<?php /** @var $this Mage_Checkout_Block_Onepage_Shipping_Method_Available */ ?>
|
41 |
+
<?php $_shippingRateGroups = $this->getShippingRates(); ?>
|
42 |
+
|
43 |
+
<script type="text/javascript">
|
44 |
+
//<![CDATA[
|
45 |
+
if (window.deliveryOptions) {
|
46 |
+
window.deliveryOptions.reset();
|
47 |
+
window.deliveryOptions = false;
|
48 |
+
}
|
49 |
+
//]]>
|
50 |
+
</script>
|
51 |
+
<?php if (!$_shippingRateGroups): ?>
|
52 |
+
<p><?php echo $this->__('Sorry, no quotes are available for this order at this time.') ?></p>
|
53 |
+
<?php else: ?>
|
54 |
+
<dl class="sp-methods">
|
55 |
+
<?php $shippingCodePrice = array(); ?>
|
56 |
+
<?php $_store = $this->getQuote()->getStore(); ?>
|
57 |
+
<?php $_deliveryOptionsShown = false; ?>
|
58 |
+
<?php $_sole = count($_shippingRateGroups) == 1; ?>
|
59 |
+
<?php $_carrierHelper = Mage::helper('postnl/carrier'); ?>
|
60 |
+
<?php $_deliveryOptionsHelper = Mage::helper('postnl/deliveryOptions'); ?>
|
61 |
+
<?php foreach ($_shippingRateGroups as $code => $_rates): ?>
|
62 |
+
<?php $_isPostnl = false; ?>
|
63 |
+
<?php if (!$_deliveryOptionsShown
|
64 |
+
&& $_canUseDeliveryOptions
|
65 |
+
&& $_carrierHelper->isPostnlShippingMethod($_rate->getCode())): ?>
|
66 |
+
<?php $_isPostnl = true; ?>
|
67 |
+
<?php endif; ?>
|
68 |
+
|
69 |
+
<dt <?php if($_isPostnl): ?>id="carrier_postnl"<?php endif; ?> style="margin-bottom: 5px;">
|
70 |
+
<?php echo $this->escapeHtml($this->getCarrierName($code)) ?>
|
71 |
+
</dt>
|
72 |
+
<dd>
|
73 |
+
<ul>
|
74 |
+
<?php $_sole = $_sole && count($_rates) == 1; ?>
|
75 |
+
<?php /** @var Mage_Sales_Model_Quote_Address_Rate $_rate */?>
|
76 |
+
<?php foreach ($_rates as $_rate): ?>
|
77 |
+
<?php $shippingCodePrice[] = "'".$_rate->getCode()."':".(float)$_rate->getPrice(); ?>
|
78 |
+
<li>
|
79 |
+
<?php if ($_rate->getErrorMessage()): ?>
|
80 |
+
<ul class="messages"><li class="error-msg"><ul><li><?php echo $this->escapeHtml($_rate->getErrorMessage()) ?></li></ul></li></ul>
|
81 |
+
<?php else: ?>
|
82 |
+
<?php if ($_sole) : ?>
|
83 |
+
<span class="no-display"><input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>" checked="checked" /></span>
|
84 |
+
<?php else: ?>
|
85 |
+
<input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio"/>
|
86 |
+
|
87 |
+
<?php if ($_rate->getCode() === $this->getAddressShippingMethod()): ?>
|
88 |
+
<script type="text/javascript">
|
89 |
+
//<![CDATA[
|
90 |
+
lastPrice = <?php echo (float)$_rate->getPrice(); ?>;
|
91 |
+
//]]>
|
92 |
+
</script>
|
93 |
+
<?php endif; ?>
|
94 |
+
|
95 |
+
<?php endif; ?>
|
96 |
+
<?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
|
97 |
+
<?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
|
98 |
+
|
99 |
+
<?php $_priceExcl = $_store->convertPrice(Mage::helper('tax')->getShippingPrice($_rate->getPrice(), false, $this->getAddress())); ?>
|
100 |
+
<?php $_priceIncl = $_store->convertPrice(Mage::helper('tax')->getShippingPrice($_rate->getPrice(), true, $this->getAddress())); ?>
|
101 |
+
<label data-price="<?php echo $_priceExcl; ?>" data-price-incl="<?php echo $_priceIncl; ?>" for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $this->escapeHtml($_rate->getMethodTitle()) ?>
|
102 |
+
<?php echo $_excl; ?>
|
103 |
+
<?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
|
104 |
+
(<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
|
105 |
+
<?php endif; ?>
|
106 |
+
</label>
|
107 |
+
<?php endif ?>
|
108 |
+
|
109 |
+
<?php if (!$_deliveryOptionsShown): ?>
|
110 |
+
<?php $_canUseDeliveryOptions = false; ?>
|
111 |
+
<?php if (Mage::helper('postnl/deliveryOptions')->canUseDeliveryOptions($this->getQuote()) && Mage::helper('postnl/deliveryOptions')->canUseDeliveryOptionsForCountry($this->getQuote())): ?>
|
112 |
+
<?php $_canUseDeliveryOptions = true; ?>
|
113 |
+
<?php endif; ?>
|
114 |
+
|
115 |
+
<?php if ($_canUseDeliveryOptions
|
116 |
+
&& $_carrierHelper->isPostnlShippingMethod($_rate->getCode())
|
117 |
+
&& $this->getChild('postnl.gomage.delivery.options')
|
118 |
+
): ?>
|
119 |
+
<div class="postnl-container" id="postnl_container" style="display:none;">
|
120 |
+
<?php echo $this->getChild('postnl.gomage.delivery.options')->setRate($_rate)->toHtml(); ?>
|
121 |
+
</div>
|
122 |
+
<?php $_deliveryOptionsShown = true; ?>
|
123 |
+
<?php endif; ?>
|
124 |
+
<?php endif; ?>
|
125 |
+
</li>
|
126 |
+
<?php endforeach; ?>
|
127 |
+
</ul>
|
128 |
+
</dd>
|
129 |
+
<?php endforeach; ?>
|
130 |
+
</dl>
|
131 |
+
<script type="text/javascript">
|
132 |
+
//<![CDATA[
|
133 |
+
<?php if (!empty($shippingCodePrice)): ?>
|
134 |
+
var shippingCodePrice = {<?php echo implode(',',$shippingCodePrice); ?>};
|
135 |
+
<?php endif; ?>
|
136 |
+
|
137 |
+
$$('input[type="radio"][name="shipping_method"]').each(function(el){
|
138 |
+
Event.observe(el, 'click', function(){
|
139 |
+
if (el.checked == true) {
|
140 |
+
var getShippingCode = el.getValue();
|
141 |
+
<?php if (!empty($shippingCodePrice)): ?>
|
142 |
+
var newPrice = shippingCodePrice[getShippingCode];
|
143 |
+
if (!lastPrice) {
|
144 |
+
lastPrice = newPrice;
|
145 |
+
quoteBaseGrandTotal += newPrice;
|
146 |
+
}
|
147 |
+
if (newPrice != lastPrice) {
|
148 |
+
quoteBaseGrandTotal += (newPrice-lastPrice);
|
149 |
+
lastPrice = newPrice;
|
150 |
+
}
|
151 |
+
<?php endif; ?>
|
152 |
+
checkQuoteBaseGrandTotal = quoteBaseGrandTotal;
|
153 |
+
return false;
|
154 |
+
}
|
155 |
+
});
|
156 |
+
});
|
157 |
+
//]]>
|
158 |
+
</script>
|
159 |
+
<?php endif; ?>
|
@@ -0,0 +1,963 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ___________ __ __
|
4 |
+
* \__ ___/____ _/ |_ _____ | |
|
5 |
+
* | | / _ \\ __\\__ \ | |
|
6 |
+
* | | | |_| || | / __ \_| |__
|
7 |
+
* |____| \____/ |__| (____ /|____/
|
8 |
+
* \/
|
9 |
+
* ___ __ __
|
10 |
+
* | | ____ _/ |_ ____ _______ ____ ____ _/ |_
|
11 |
+
* | | / \\ __\_/ __ \\_ __ \ / \ _/ __ \\ __\
|
12 |
+
* | || | \| | \ ___/ | | \/| | \\ ___/ | |
|
13 |
+
* |___||___| /|__| \_____>|__| |___| / \_____>|__|
|
14 |
+
* \/ \/
|
15 |
+
* ________
|
16 |
+
* / _____/_______ ____ __ __ ______
|
17 |
+
* / \ ___\_ __ \ / _ \ | | \\____ \
|
18 |
+
* \ \_\ \| | \/| |_| || | /| |_| |
|
19 |
+
* \______ /|__| \____/ |____/ | __/
|
20 |
+
* \/ |__|
|
21 |
+
*
|
22 |
+
* NOTICE OF LICENSE
|
23 |
+
*
|
24 |
+
* This source file is subject to the Creative Commons License.
|
25 |
+
* It is available through the world-wide-web at this URL:
|
26 |
+
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
27 |
+
* If you are unable to obtain it through the world-wide-web, please send an email
|
28 |
+
* to servicedesk@tig.nl so we can send you a copy immediately.
|
29 |
+
*
|
30 |
+
* DISCLAIMER
|
31 |
+
*
|
32 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
33 |
+
* versions in the future. If you wish to customize this module for your
|
34 |
+
* needs please contact servicedesk@tig.nl for more information.
|
35 |
+
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
+
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
+
*/
|
39 |
+
?>
|
40 |
+
<?php
|
41 |
+
/**
|
42 |
+
* @var TIG_PostNL_Block_DeliveryOptions_Checkout_GoMage_LightCheckout_DeliveryOptions $this
|
43 |
+
* @var Mage_Sales_Model_Quote_Address $_address
|
44 |
+
*/
|
45 |
+
?>
|
46 |
+
<?php $_store = Mage::app()->getStore(); ?>
|
47 |
+
<?php $_address = $this->getShippingAddress(); ?>
|
48 |
+
<?php $_postcode = $this->getPostcode(); ?>
|
49 |
+
<?php $_deliveryDate = $this->getDeliveryDate(); ?>
|
50 |
+
<?php $_streetData = $this->getStreetData(); ?>
|
51 |
+
<?php $_housenumber = $_streetData['housenumber']; ?>
|
52 |
+
|
53 |
+
<?php $_canUseResponsive = Mage::helper('postnl/deliveryOptions')->canUseResponsive(); ?>
|
54 |
+
|
55 |
+
<?php $_canShowSeparateRates = $this->canShowSeparateRates(); ?>
|
56 |
+
|
57 |
+
|
58 |
+
<?php $_canUsePakjeGemak = $this->canUsePakjeGemak(); ?>
|
59 |
+
<?php $_canUsePakjeGemakExpress = false; ?>
|
60 |
+
<?php if ($_canUsePakjeGemak): ?>
|
61 |
+
<?php $_canUsePakjeGemakExpress = $this->canUsePakjeGemakExpress(); ?>
|
62 |
+
<?php endif; ?>
|
63 |
+
|
64 |
+
<?php $_canUsePakketAutomaat = $this->canUsePakketAutomaat(); ?>
|
65 |
+
|
66 |
+
<?php $_canAddLocation = true; ?>
|
67 |
+
<?php if (!$_canUsePakjeGemak && !$_canUsePakjeGemakExpress && !$_canUsePakketAutomaat): ?>
|
68 |
+
<?php $_canAddLocation = false; ?>
|
69 |
+
<?php endif; ?>
|
70 |
+
|
71 |
+
<?php $_canShowStatedAddressOnlyOption = Mage::helper('postnl/deliveryOptions')->canShowOnlyStatedAddressOption(); ?>
|
72 |
+
|
73 |
+
<?php $_eveningFeeIncl = $this->getFee('evening', true); ?>
|
74 |
+
<?php $_eveningFeeExcl = $this->getFee('evening', false); ?>
|
75 |
+
<?php $_expressFeeIncl = $this->getFee('express', true); ?>
|
76 |
+
<?php $_expressFeeExcl = $this->getFee('express', false); ?>
|
77 |
+
<?php $_pakjeGemakFeeIncl = $this->getFee('pakje_gemak', true); ?>
|
78 |
+
<?php $_pakjeGemakFeeExcl = $this->getFee('pakje_gemak', false); ?>
|
79 |
+
|
80 |
+
<?php $_methodName = $this->getMethodName(); ?>
|
81 |
+
<?php $_methodRate = $this->getMethodRate(); ?>
|
82 |
+
|
83 |
+
<?php $_pakjeGemakRate = $_methodRate + $this->getFee('pakje_gemak', $this->helper('tax')->shippingPriceIncludesTax()); ?>
|
84 |
+
<div id="osc_initial_loader"><?php echo $this->__('Loading...'); ?></div>
|
85 |
+
<div id="postnl_add_moment" style="display:none;">
|
86 |
+
<ul class="option-list">
|
87 |
+
<li class="location">
|
88 |
+
<div class="bkg">
|
89 |
+
<div class="bkg">
|
90 |
+
<div class="content">
|
91 |
+
<strong class="location-name overflow-protect"><?php echo $_address->getStreetFull(); ?></strong>
|
92 |
+
</div>
|
93 |
+
</div>
|
94 |
+
</div>
|
95 |
+
</li>
|
96 |
+
</ul>
|
97 |
+
<ul class="option-list">
|
98 |
+
<li class="add-moment">
|
99 |
+
<a id="add_moment_link" href="#" ><?php echo $this->__('more delivery times and pick-up locations'); ?></a>
|
100 |
+
</li>
|
101 |
+
</ul>
|
102 |
+
</div>
|
103 |
+
|
104 |
+
<div id="postnl_delivery_options" style="display:none;">
|
105 |
+
<div class="popup-overlay">
|
106 |
+
<div class="popup-window">
|
107 |
+
<div class="popup-header title">
|
108 |
+
<h2><?php echo $this->__('Delivery Options'); ?></h2>
|
109 |
+
<a title="<?php echo $this->__('Close'); ?>" id="close_options_popup" class="btn-close"><?php echo $this->__('Close'); ?></a>
|
110 |
+
</div>
|
111 |
+
<div id="initial_loader"><?php echo $this->__('Loading...'); ?></div>
|
112 |
+
<div id="osc_scrollbar_container" style="display:none;">
|
113 |
+
<div id="osc_scrollbar_track">
|
114 |
+
<div id="osc_scrollbar_handle"></div>
|
115 |
+
</div>
|
116 |
+
|
117 |
+
<div id="responsive_switch" class="responsive-switch-wrapper<?php if ($_canShowSeparateRates): ?> show-rates<?php endif; ?>">
|
118 |
+
<div class="title">
|
119 |
+
<a href="#" id="postnl_back_link" style="display:none;"><?php echo $this->__('Back'); ?></a>
|
120 |
+
<h2><?php echo $this->__('Delivery Options'); ?></h2>
|
121 |
+
</div>
|
122 |
+
<ul <?php if(!$_canAddLocation): ?>style="display:none;"<?php endif; ?>>
|
123 |
+
<li><a id="postnl_switch_pickup" class="active"><?php echo $this->__('Delivery'); ?></a></li>
|
124 |
+
<li><a id="postnl_switch_delivery"><?php echo $this->__('Pickup'); ?></a></li>
|
125 |
+
</ul>
|
126 |
+
</div>
|
127 |
+
<div class="responsive-protector">
|
128 |
+
<div id="osc_scrollbar_content" class="popup-content col2-set">
|
129 |
+
<div id="postnl_delivery" class="col-1">
|
130 |
+
<?php if ($_canShowSeparateRates): ?>
|
131 |
+
<p class="rate"><?php echo $this->__('Have your order delivered %s', $_store->formatPrice($_methodRate, false)); ?></p>
|
132 |
+
<?php endif; ?>
|
133 |
+
<h3 class="sub-title"><?php echo $this->__('Delivery'); ?><?php if ($_canShowSeparateRates): ?> <span class="rate"><?php echo $_store->formatPrice($_methodRate, false); ?></span><?php endif; ?></h3>
|
134 |
+
<ul class="option-list" id="timeframes">
|
135 |
+
<li class="location">
|
136 |
+
<div class="bkg">
|
137 |
+
<div class="bkg">
|
138 |
+
<div class="content">
|
139 |
+
<strong class="location-name"><?php echo $_address->getStreetFull(); ?></strong>
|
140 |
+
</div>
|
141 |
+
</div>
|
142 |
+
</div>
|
143 |
+
</li>
|
144 |
+
</ul>
|
145 |
+
<?php if ($_canShowStatedAddressOnlyOption): ?>
|
146 |
+
<ul class="option-list extras">
|
147 |
+
<li class="location">
|
148 |
+
<div class="bkg">
|
149 |
+
<div class="bkg">
|
150 |
+
<div class="content">
|
151 |
+
<strong class="location-name"><?php echo $this->__('Extra\'s'); ?></strong>
|
152 |
+
</div>
|
153 |
+
</div>
|
154 |
+
</div>
|
155 |
+
</li>
|
156 |
+
<li class="option" id="<?php echo $_methodName; ?>_only_stated_address_option">
|
157 |
+
<div class="bkg">
|
158 |
+
<div class="bkg">
|
159 |
+
<div class="content">
|
160 |
+
<input type="checkbox" name="<?php echo $_methodName; ?>[postnl][only_stated_address]" id="<?php echo $_methodName; ?>_only_stated_address" value="1" class="checkbox" <?php if ($this->isOnlyStatedAddressOptionChecked()):?>checked="checked"<?php endif; ?>>
|
161 |
+
<label for="<?php echo $_methodName; ?>_only_stated_address">
|
162 |
+
<?php echo $this->__('do not deliver to neighbours'); ?>
|
163 |
+
<?php if ($this->hasOptionFee('only_stated_address')):?>
|
164 |
+
<span class="price">+ <?php echo $this->getOptionFee('only_stated_address', true, true); ?></span>
|
165 |
+
<?php endif; ?>
|
166 |
+
</label>
|
167 |
+
</div>
|
168 |
+
</div>
|
169 |
+
</div>
|
170 |
+
</li>
|
171 |
+
</ul>
|
172 |
+
<?php endif; ?>
|
173 |
+
</div>
|
174 |
+
<div id="postnl_pickup" class="col-2" <?php if(!$_canAddLocation): ?>style="display:none;"<?php endif; ?>>
|
175 |
+
<?php if ($_canShowSeparateRates): ?>
|
176 |
+
<p class="rate"><?php echo $this->__('Pickup your order %s', $_store->formatPrice($_pakjeGemakRate, false)); ?></p>
|
177 |
+
<?php endif; ?>
|
178 |
+
<h3 class="sub-title"><?php echo $this->__('or Pickup'); ?><?php if ($_canShowSeparateRates): ?> <span class="rate"><?php echo $_store->formatPrice($_pakjeGemakRate, false); ?></span><?php endif; ?></h3>
|
179 |
+
<ul class="option-list" id="pgelocation"></ul>
|
180 |
+
<ul class="option-list" id="pglocation"></ul>
|
181 |
+
<ul class="option-list" id="palocation"></ul>
|
182 |
+
<ul class="option-list" id="customlocation"></ul>
|
183 |
+
<ul class="option-list" id="add_location">
|
184 |
+
<li class="add-location">
|
185 |
+
<a id="add_location_link" href="#" ><?php echo $this->__('choose a different pickup location'); ?></a>
|
186 |
+
</li>
|
187 |
+
</ul>
|
188 |
+
</div>
|
189 |
+
</div>
|
190 |
+
</div>
|
191 |
+
</div>
|
192 |
+
<div class="button-set">
|
193 |
+
<button type="button" class="button btn-save next" id="close_options_popup_btn">
|
194 |
+
<span>
|
195 |
+
<span><?php echo $this->__('Save'); ?></span>
|
196 |
+
</span>
|
197 |
+
</button>
|
198 |
+
</div>
|
199 |
+
</div>
|
200 |
+
<script type="text/javascript">
|
201 |
+
//<![CDATA[
|
202 |
+
var recalculateOscScrollbar = function() {
|
203 |
+
if (!window.oscScrollbar) {
|
204 |
+
return;
|
205 |
+
}
|
206 |
+
|
207 |
+
window.oscScrollbar.recalculateLayout();
|
208 |
+
window.oscScrollbar.scrollBy(0);
|
209 |
+
};
|
210 |
+
|
211 |
+
window.oscScrollbar = false;
|
212 |
+
window.oscScrollbar = new Control.ScrollBar(
|
213 |
+
'osc_scrollbar_content',
|
214 |
+
'osc_scrollbar_track',
|
215 |
+
{
|
216 |
+
fixed_scroll_distance : 50
|
217 |
+
}
|
218 |
+
);
|
219 |
+
|
220 |
+
document.stopObserving('postnl:domModified', recalculateOscScrollbar);
|
221 |
+
document.observe('postnl:domModified', recalculateOscScrollbar);
|
222 |
+
//]]>
|
223 |
+
</script>
|
224 |
+
</div>
|
225 |
+
</div>
|
226 |
+
<?php echo $this->getChildHtml('postnl.gomage.add.location') ?>
|
227 |
+
<?php echo $this->getChildHtml('postnl.add.phonenumber') ?>
|
228 |
+
<script type="text/javascript">
|
229 |
+
//<![CDATA[
|
230 |
+
window.saveBillingRequest = false;
|
231 |
+
var deliveryOptions;
|
232 |
+
var searchField = $('search_field');
|
233 |
+
|
234 |
+
var baseUrl = '<?php echo $this->getSkinUrl('images/TIG/PostNL/deliveryoptions/locations'); ?>';
|
235 |
+
var images = [
|
236 |
+
'albertheijn', 'bruna', 'c1000', 'coop', 'default', 'emte', 'jumbo', 'plus', 'primera', 'readshop', 'spar',
|
237 |
+
'staples', 'gamma', 'karwei'
|
238 |
+
];
|
239 |
+
|
240 |
+
var streetnameField = '<?php echo $this->getStreetnameField(); ?>';
|
241 |
+
var housenumberField = '<?php echo $this->getHousenumberField(); ?>';
|
242 |
+
|
243 |
+
var postcode;
|
244 |
+
var housenumber;
|
245 |
+
var fullAddress = "<?php echo implode(' ', $_address->getStreet()) . ', ' . $_address->getCity() . ', ' . $_address->getPostcode() . ', ' . $_address->getCountry(); ?>";
|
246 |
+
|
247 |
+
/**
|
248 |
+
* Register OSC specific observers.
|
249 |
+
*/
|
250 |
+
registerGoMageObservers();
|
251 |
+
|
252 |
+
try {
|
253 |
+
initDeliveryOptions();
|
254 |
+
} catch(e) {
|
255 |
+
console.error(e);
|
256 |
+
}
|
257 |
+
|
258 |
+
function initDeliveryOptions() {
|
259 |
+
var billingOrShipping;
|
260 |
+
var billingOrShippingCheckbox = $('billing_use_for_shipping_yes');
|
261 |
+
if (!billingOrShippingCheckbox
|
262 |
+
|| billingOrShippingCheckbox.type == 'hidden'
|
263 |
+
|| billingOrShippingCheckbox.checked
|
264 |
+
) {
|
265 |
+
billingOrShipping = 'billing';
|
266 |
+
} else {
|
267 |
+
billingOrShipping = 'shipping';
|
268 |
+
}
|
269 |
+
|
270 |
+
postcode = getPostnlPostcode(billingOrShipping);
|
271 |
+
housenumber = getPostnlHousenumber(billingOrShipping);
|
272 |
+
|
273 |
+
/**
|
274 |
+
* If we don't have a postcode or house number, we cant retrieve the available time frames and locations.
|
275 |
+
*/
|
276 |
+
if (!postcode || !housenumber) {
|
277 |
+
return;
|
278 |
+
}
|
279 |
+
|
280 |
+
$('postnl_container').show();
|
281 |
+
|
282 |
+
/**
|
283 |
+
* Pre-load an array of images.
|
284 |
+
*/
|
285 |
+
preloadImages(images);
|
286 |
+
|
287 |
+
|
288 |
+
/**
|
289 |
+
* Start the delivery options script.
|
290 |
+
*/
|
291 |
+
startDeliveryOptions(postcode, housenumber, fullAddress);
|
292 |
+
}
|
293 |
+
|
294 |
+
/**
|
295 |
+
* Start the delivery options script.
|
296 |
+
*
|
297 |
+
* @param {string} postcode
|
298 |
+
* @param {int} housenumber
|
299 |
+
* @param {string} fullAddress
|
300 |
+
*/
|
301 |
+
function startDeliveryOptions(postcode, housenumber, fullAddress) {
|
302 |
+
var options;
|
303 |
+
var params;
|
304 |
+
var postnlDebugMode = <?php echo $this->isDebugEnabled() ? 'true' : 'false'; ?>;
|
305 |
+
|
306 |
+
params = {
|
307 |
+
saveUrl : '<?php echo $this->getUrl('postnl/deliveryOptions/saveSelectedOption', array('_secure' => true)) ?>',
|
308 |
+
timeframesUrl : '<?php echo $this->getUrl('postnl/deliveryOptions/getDeliveryTimeframes', array('_secure' => true)) ?>',
|
309 |
+
locationsUrl : '<?php echo $this->getUrl('postnl/deliveryOptions/getNearestLocations', array('_secure' => true)) ?>',
|
310 |
+
locationsInAreaUrl : '<?php echo $this->getUrl('postnl/deliveryOptions/getLocationsInArea', array('_secure' => true)) ?>',
|
311 |
+
postcode : postcode,
|
312 |
+
housenumber : housenumber,
|
313 |
+
deliveryDate : '<?php echo $_deliveryDate; ?>',
|
314 |
+
imageBaseUrl : baseUrl,
|
315 |
+
fullAddress : fullAddress
|
316 |
+
};
|
317 |
+
|
318 |
+
options = {
|
319 |
+
isOsc : true,
|
320 |
+
oscSaveButton : 'close_options_popup_btn',
|
321 |
+
oscOptionsPopup : 'postnl_delivery_options',
|
322 |
+
taxDisplayType : <?php echo $this->getTaxDisplayType() ?>,
|
323 |
+
eveningFeeIncl : <?php echo $_eveningFeeIncl; ?>,
|
324 |
+
eveningFeeExcl : <?php echo $_eveningFeeExcl; ?>,
|
325 |
+
expressFeeIncl : <?php echo $_expressFeeIncl; ?>,
|
326 |
+
expressFeeExcl : <?php echo $_expressFeeExcl; ?>,
|
327 |
+
pakjeGemakFeeIncl : <?php echo $_pakjeGemakFeeIncl; ?>,
|
328 |
+
pakjeGemakFeeExcl : <?php echo $_pakjeGemakFeeExcl; ?>,
|
329 |
+
eveningFeeText : '<?php echo $this->getFeeText('evening', $this->helper('tax')->displayShippingPriceIncludingTax()); ?>',
|
330 |
+
expressFeeText : '<?php echo $this->getFeeText('express', $this->helper('tax')->displayShippingPriceIncludingTax()); ?>',
|
331 |
+
pakjeGemakFeeText : '<?php echo $this->getFeeText('pakje_gemak', $this->helper('tax')->displayShippingPriceIncludingTax()); ?>',
|
332 |
+
allowPg : <?php echo $_canUsePakjeGemak ? 'true' : 'false'; ?>,
|
333 |
+
allowPge : <?php echo $_canUsePakjeGemakExpress ? 'true' : 'false'; ?>,
|
334 |
+
allowPa : <?php echo $_canUsePakketAutomaat ? 'true' : 'false'; ?>,
|
335 |
+
allowDeliveryDays : <?php echo $this->canUseDeliveryDays() ? 'true' : 'false'; ?>,
|
336 |
+
allowTimeframes : <?php echo $this->canUseTimeframes() ? 'true' : 'false'; ?>,
|
337 |
+
allowEveningTimeframes : <?php echo $this->canUseEveningTimeframes() ? 'true' : 'false'; ?>,
|
338 |
+
allowStreetview : <?php echo $this->canUseStreetview() ? 'true' : 'false'; ?>,
|
339 |
+
disableCufon : <?php echo $this->getUseCufon() ? 'false' : 'true'; ?>,
|
340 |
+
isBuspakje : <?php echo $this->getIsBuspakje() ? 'true' : 'false'; ?>,
|
341 |
+
shippingMethodName : '<?php echo $_methodName ? $_methodName : 's_method_postnl_flatrate'; ?>',
|
342 |
+
<?php if ($_canShowStatedAddressOnlyOption): ?>
|
343 |
+
extraOptions : {
|
344 |
+
only_stated_address : {
|
345 |
+
element : $('<?php echo $_methodName; ?>_only_stated_address'),
|
346 |
+
allowedTypes : [
|
347 |
+
'Avond',
|
348 |
+
'Overdag'
|
349 |
+
]
|
350 |
+
}
|
351 |
+
},
|
352 |
+
<?php endif; ?>
|
353 |
+
optionsContainer : 'osc_scrollbar_container'
|
354 |
+
};
|
355 |
+
|
356 |
+
try {
|
357 |
+
deliveryOptions = new PostnlDeliveryOptions(params, options, postnlDebugMode);
|
358 |
+
window.deliveryOptions = deliveryOptions;
|
359 |
+
} catch(e) {
|
360 |
+
console.error(e);
|
361 |
+
}
|
362 |
+
|
363 |
+
if (typeof deliveryOptions != 'undefined') {
|
364 |
+
try {
|
365 |
+
deliveryOptions.showOptions();
|
366 |
+
|
367 |
+
<?php if($_canShowSeparateRates): ?>
|
368 |
+
/**
|
369 |
+
* Hide the default price label as this will be replaced by separate prices for delivery and pick up options.
|
370 |
+
*/
|
371 |
+
var methodLabel = $$('label[for="<?php echo $_methodName; ?>"]')[0];
|
372 |
+
if (methodLabel) {
|
373 |
+
methodLabel.update('<?php echo $this->escapeHtml($this->getRate()->getMethodTitle()); ?>');
|
374 |
+
}
|
375 |
+
<?php endif; ?>
|
376 |
+
} catch(e) {
|
377 |
+
console.error(e);
|
378 |
+
$('initial_loader').hide();
|
379 |
+
$('osc_scrollbar_container').show();
|
380 |
+
$('postnl_pickup').hide();
|
381 |
+
$('add_moment_link').hide();
|
382 |
+
$('osc_initial_loader').hide();
|
383 |
+
}
|
384 |
+
} else {
|
385 |
+
$('initial_loader').hide();
|
386 |
+
$('osc_scrollbar_container').show();
|
387 |
+
$('postnl_pickup').hide();
|
388 |
+
$('add_moment_link').hide();
|
389 |
+
$('osc_initial_loader').hide();
|
390 |
+
}
|
391 |
+
|
392 |
+
if (typeof initCufon != 'undefined' && !options.disableCufon) {
|
393 |
+
initCufon();
|
394 |
+
}
|
395 |
+
}
|
396 |
+
|
397 |
+
/**
|
398 |
+
* Preload images.
|
399 |
+
*
|
400 |
+
* @param {Array} images
|
401 |
+
*/
|
402 |
+
function preloadImages(images) {
|
403 |
+
var loadedImages = [];
|
404 |
+
|
405 |
+
for (var i = 0, o = images.length; i < images.length; i++, o++) {
|
406 |
+
loadedImages[i] = new Image();
|
407 |
+
loadedImages[i].src = baseUrl + '/drp_' + images[i] + '.png';
|
408 |
+
|
409 |
+
loadedImages[o] = new Image();
|
410 |
+
loadedImages[o].src = baseUrl + '/crc_' + images[i] + '.png';
|
411 |
+
}
|
412 |
+
}
|
413 |
+
|
414 |
+
/**
|
415 |
+
* @param {string} billingOrShipping
|
416 |
+
*
|
417 |
+
* @returns {string}
|
418 |
+
*/
|
419 |
+
function getPostnlPostcode(billingOrShipping) {
|
420 |
+
var postcode = '<?php echo $_postcode; ?>';
|
421 |
+
var addressSelectField;
|
422 |
+
|
423 |
+
if (billingOrShipping == 'billing') {
|
424 |
+
addressSelectField = $('billing-address-select');
|
425 |
+
} else {
|
426 |
+
addressSelectField = $('shipping-address-select');
|
427 |
+
}
|
428 |
+
|
429 |
+
/**
|
430 |
+
* If we don't have a postcode and no preset address is chosen, get the postcode from the postcode address
|
431 |
+
* field.
|
432 |
+
*/
|
433 |
+
if (!postcode
|
434 |
+
|| (
|
435 |
+
(!addressSelectField || addressSelectField.getValue() == '')
|
436 |
+
&& postcode != $(billingOrShipping + '_postcode').getValue()
|
437 |
+
)
|
438 |
+
) {
|
439 |
+
var postcodeFieldValue = $(billingOrShipping + '_postcode').getValue();
|
440 |
+
|
441 |
+
if (postcodeFieldValue) {
|
442 |
+
postcode = postcodeFieldValue;
|
443 |
+
}
|
444 |
+
}
|
445 |
+
|
446 |
+
return postcode;
|
447 |
+
}
|
448 |
+
|
449 |
+
/**
|
450 |
+
* @param {string} billingOrShipping
|
451 |
+
*
|
452 |
+
* @returns {string|int}
|
453 |
+
*/
|
454 |
+
function getPostnlHousenumber(billingOrShipping) {
|
455 |
+
var housenumber = '<?php echo $_housenumber; ?>';
|
456 |
+
var addressSelectField;
|
457 |
+
|
458 |
+
if (billingOrShipping == 'billing') {
|
459 |
+
addressSelectField = $('billing-address-select');
|
460 |
+
} else {
|
461 |
+
addressSelectField = $('shipping-address-select');
|
462 |
+
}
|
463 |
+
|
464 |
+
/**
|
465 |
+
* If we don't have a house number and no preset address is chosen, get the house number from the house number
|
466 |
+
* address field.
|
467 |
+
*/
|
468 |
+
if (!housenumber
|
469 |
+
|| (
|
470 |
+
(!addressSelectField || addressSelectField.getValue() == '')
|
471 |
+
&& housenumber != $(billingOrShipping + '_street' + housenumberField).getValue()
|
472 |
+
)
|
473 |
+
) {
|
474 |
+
var housenumberFieldValue = $(billingOrShipping + '_street' + housenumberField).getValue();
|
475 |
+
|
476 |
+
if (housenumberFieldValue) {
|
477 |
+
housenumber = housenumberFieldValue;
|
478 |
+
}
|
479 |
+
}
|
480 |
+
|
481 |
+
/**
|
482 |
+
* If we still don't have a housenumber, get it from the streetname field.
|
483 |
+
*/
|
484 |
+
if (!housenumber) {
|
485 |
+
var streetname = $(billingOrShipping + '_street' + streetnameField).getValue();
|
486 |
+
var housenumberRegex = /([0-9]+)/;
|
487 |
+
|
488 |
+
var housenumberArray = streetname.match(housenumberRegex);
|
489 |
+
if (!housenumberArray || housenumberArray.length < 1) {
|
490 |
+
throw "Unable to parse housenumber";
|
491 |
+
}
|
492 |
+
|
493 |
+
housenumber = housenumberArray[0];
|
494 |
+
}
|
495 |
+
|
496 |
+
return housenumber;
|
497 |
+
}
|
498 |
+
|
499 |
+
/**
|
500 |
+
* Register a bunch of OSC specific observers
|
501 |
+
*/
|
502 |
+
function registerGoMageObservers() {
|
503 |
+
var addMomentLink = $('add_moment_link');
|
504 |
+
var closeOptionsPopup = $('close_options_popup');
|
505 |
+
var postnlDeliveryOptionsDiv = $('postnl_delivery_options');
|
506 |
+
|
507 |
+
/**
|
508 |
+
* Open the delivery options popup.
|
509 |
+
*/
|
510 |
+
if (addMomentLink && postnlDeliveryOptionsDiv) {
|
511 |
+
addMomentLink.observe('click', function(event) {
|
512 |
+
event.stop();
|
513 |
+
|
514 |
+
var body = $$('body')[0];
|
515 |
+
if (!body.hasClassName('responsive-noscroll')) {
|
516 |
+
body.addClassName('responsive-noscroll');
|
517 |
+
}
|
518 |
+
postnlDeliveryOptionsDiv.show();
|
519 |
+
|
520 |
+
recalculateOscScrollbar();
|
521 |
+
});
|
522 |
+
}
|
523 |
+
|
524 |
+
/**
|
525 |
+
* Close the delivery options popup.
|
526 |
+
*/
|
527 |
+
if (closeOptionsPopup && postnlDeliveryOptionsDiv) {
|
528 |
+
closeOptionsPopup.observe('click', function(event) {
|
529 |
+
event.stop();
|
530 |
+
|
531 |
+
var body = $$('body')[0];
|
532 |
+
if (body.hasClassName('responsive-noscroll')) {
|
533 |
+
body.removeClassName('responsive-noscroll');
|
534 |
+
}
|
535 |
+
postnlDeliveryOptionsDiv.hide();
|
536 |
+
});
|
537 |
+
}
|
538 |
+
/**
|
539 |
+
* These fields' values are used to determine available delivery options.
|
540 |
+
*/
|
541 |
+
if (!$('virtual_billing_street' + streetnameField) && !$('virtual_shipping_street' + streetnameField)) {
|
542 |
+
var fieldsToObserve = [
|
543 |
+
'billing_street' + streetnameField,
|
544 |
+
'shipping_street' + streetnameField,
|
545 |
+
'billing_postcode',
|
546 |
+
'shipping_postcode'
|
547 |
+
];
|
548 |
+
|
549 |
+
if (streetnameField != housenumberField) {
|
550 |
+
fieldsToObserve = fieldsToObserve.concat([
|
551 |
+
'billing_street' + housenumberField,
|
552 |
+
'shipping_street' + housenumberField
|
553 |
+
]);
|
554 |
+
}
|
555 |
+
|
556 |
+
<?php if (!$this->isPostcodeAjaxEnabled()): ?>
|
557 |
+
fieldsToObserve = fieldsToObserve.concat([
|
558 |
+
'billing_postcode',
|
559 |
+
'shipping_postcode'
|
560 |
+
]);
|
561 |
+
<?php endif; ?>
|
562 |
+
|
563 |
+
/**
|
564 |
+
* Reload available delivery options with new address data.
|
565 |
+
*/
|
566 |
+
fieldsToObserve.each(function(field) {
|
567 |
+
var element = $(field);
|
568 |
+
if (!element) {
|
569 |
+
return;
|
570 |
+
}
|
571 |
+
|
572 |
+
element.stopObserving('change');
|
573 |
+
element.observe('change', function() {
|
574 |
+
if (deliveryOptions && deliveryOptions.timeframeRequest) {
|
575 |
+
deliveryOptions.timeframeRequest.transport.abort();
|
576 |
+
}
|
577 |
+
|
578 |
+
checkout.submit(checkout.getFormData(), 'get_methods');
|
579 |
+
});
|
580 |
+
});
|
581 |
+
}
|
582 |
+
|
583 |
+
/**
|
584 |
+
* After delivery options have loaded, show the default option.
|
585 |
+
*/
|
586 |
+
document.stopObserving('postnl:loadingFinished');
|
587 |
+
document.observe('postnl:loadingFinished', function() {
|
588 |
+
$('osc_initial_loader').hide();
|
589 |
+
$('postnl_add_moment').show();
|
590 |
+
});
|
591 |
+
|
592 |
+
/**
|
593 |
+
* Show the OSC spinner whilst a delivery option is being saved.
|
594 |
+
*/
|
595 |
+
document.stopObserving('postnl:selectOptionSaveStart');
|
596 |
+
document.observe('postnl:selectOptionSaveStart', function() {
|
597 |
+
checkout.showLoadinfo();
|
598 |
+
});
|
599 |
+
|
600 |
+
/**
|
601 |
+
* Reload shipping costs after a delivery option has been saved.
|
602 |
+
*/
|
603 |
+
document.stopObserving('postnl:selectOptionSaved');
|
604 |
+
document.observe('postnl:selectOptionSaved', function() {
|
605 |
+
checkout.hideLoadinfo();
|
606 |
+
checkout.shippingmethodsSubmit(checkout.getFormData(), 'get_totals');
|
607 |
+
});
|
608 |
+
|
609 |
+
/**
|
610 |
+
* After postcode check has found an address, show the new delivery options.
|
611 |
+
*/
|
612 |
+
document.stopObserving('postnl:postcodeCheckSuccess');
|
613 |
+
document.observe('postnl:postcodeCheckSuccess', function() {
|
614 |
+
if (deliveryOptions && deliveryOptions.timeframeRequest) {
|
615 |
+
deliveryOptions.timeframeRequest.transport.abort();
|
616 |
+
}
|
617 |
+
|
618 |
+
checkout.submit(checkout.getFormData(), 'get_methods');
|
619 |
+
});
|
620 |
+
|
621 |
+
<?php if ($_canShowStatedAddressOnlyOption): ?>
|
622 |
+
var onlyStatedAddressCheckbox = $('<?php echo $_methodName; ?>_only_stated_address');
|
623 |
+
var onlyStatedAddressContainer = $('<?php echo $_methodName; ?>_only_stated_address_option');
|
624 |
+
|
625 |
+
onlyStatedAddressContainer.stopObserving();
|
626 |
+
onlyStatedAddressContainer.observe('click', function(event) {
|
627 |
+
var clickedElement = Event.findElement(event);
|
628 |
+
if (clickedElement.tagName.toUpperCase() == 'INPUT' || clickedElement.tagName.toUpperCase() == 'LABEL') {
|
629 |
+
return;
|
630 |
+
}
|
631 |
+
|
632 |
+
if (onlyStatedAddressCheckbox.disabled) {
|
633 |
+
return;
|
634 |
+
}
|
635 |
+
|
636 |
+
onlyStatedAddressCheckbox.checked = !onlyStatedAddressCheckbox.checked;
|
637 |
+
onlyStatedAddressCheckbox.focus();
|
638 |
+
});
|
639 |
+
<?php endif; ?>
|
640 |
+
}
|
641 |
+
|
642 |
+
<?php if ($_canUseResponsive): ?>
|
643 |
+
/**
|
644 |
+
* Delivery and Pickup switch for Responsive purposes
|
645 |
+
*/
|
646 |
+
window.siteWidth = $$(".shipping-method")[0].offsetWidth - 32;
|
647 |
+
|
648 |
+
window.setSiteWidth = function() {
|
649 |
+
if (window.innerWidth < 954) {
|
650 |
+
$("osc_scrollbar_container").setStyle({
|
651 |
+
"width" : siteWidth + "px"
|
652 |
+
});
|
653 |
+
$("postnl_pickup").setStyle({
|
654 |
+
width : siteWidth + "px",
|
655 |
+
maxWidth : siteWidth + "px"
|
656 |
+
});
|
657 |
+
$("postnl_delivery").setStyle({
|
658 |
+
width : siteWidth + "px",
|
659 |
+
maxWidth : siteWidth + "px"
|
660 |
+
});
|
661 |
+
} else {
|
662 |
+
$("osc_scrollbar_container").setStyle({
|
663 |
+
"width" : ''
|
664 |
+
});
|
665 |
+
$("postnl_pickup").setStyle({
|
666 |
+
width : '',
|
667 |
+
maxWidth : ''
|
668 |
+
});
|
669 |
+
$("postnl_delivery").setStyle({
|
670 |
+
width : '',
|
671 |
+
maxWidth : ''
|
672 |
+
});
|
673 |
+
}
|
674 |
+
};
|
675 |
+
|
676 |
+
var switchDelivery = function() {
|
677 |
+
$("osc_scrollbar_content").setStyle({
|
678 |
+
"-webkit-transform" : "translateX(-" + (siteWidth+32) + "px)",
|
679 |
+
"-ms-transform" : "translateX(-" + (siteWidth+32) + "px)",
|
680 |
+
"-o-transform" : "translateX(-" + (siteWidth+32) + "px)",
|
681 |
+
"transform" : "translateX(-" + (siteWidth+32) + "px)"
|
682 |
+
});
|
683 |
+
|
684 |
+
$("postnl_switch_pickup").removeClassName('active');
|
685 |
+
$("postnl_switch_delivery").addClassName('active');
|
686 |
+
};
|
687 |
+
|
688 |
+
var switchPickup = function() {
|
689 |
+
$("osc_scrollbar_content").setStyle({
|
690 |
+
"-webkit-transform" : "translateX(0)",
|
691 |
+
"-ms-transform" : "translateX(0)",
|
692 |
+
"-o-transform" : "translateX(0)",
|
693 |
+
"transform" : "translateX(0)"
|
694 |
+
});
|
695 |
+
|
696 |
+
$("postnl_switch_delivery").removeClassName('active');
|
697 |
+
$("postnl_switch_pickup").addClassName('active');
|
698 |
+
};
|
699 |
+
|
700 |
+
document.observe('postnl:loadingFinished', function() {
|
701 |
+
window.siteWidth = $$(".shipping-method")[0].offsetWidth - 32;
|
702 |
+
setSiteWidth();
|
703 |
+
});
|
704 |
+
|
705 |
+
Event.observe(window, "resize", function() {
|
706 |
+
window.siteWidth = $$(".shipping-method")[0].offsetWidth - 32;
|
707 |
+
setSiteWidth();
|
708 |
+
|
709 |
+
if ($("postnl_switch_delivery").hasClassName('active') && window.innerWidth < 952) {
|
710 |
+
switchDelivery();
|
711 |
+
} else {
|
712 |
+
switchPickup();
|
713 |
+
}
|
714 |
+
});
|
715 |
+
|
716 |
+
var switchDeliveryBtn = $("postnl_switch_delivery");
|
717 |
+
switchDeliveryBtn.stopObserving('click');
|
718 |
+
switchDeliveryBtn.observe("click", switchDelivery);
|
719 |
+
|
720 |
+
var switchPickupBtn = $("postnl_switch_pickup");
|
721 |
+
switchPickupBtn.stopObserving('click');
|
722 |
+
switchPickupBtn.observe("click", switchPickup);
|
723 |
+
|
724 |
+
document.stopObserving('postnl:selectDeliveryOption');
|
725 |
+
document.observe('postnl:selectDeliveryOption', function() {
|
726 |
+
if (getComputedStyle($('responsive_switch')).display != 'none') {
|
727 |
+
deliveryOptions.saveOscOptions();
|
728 |
+
}
|
729 |
+
});
|
730 |
+
<?php endif; ?>
|
731 |
+
|
732 |
+
var modifyCheckoutJs = function() {
|
733 |
+
if (!checkout.shippingmethodsSubmit) {
|
734 |
+
checkout.shippingmethodsSubmit = function (params, action) {
|
735 |
+
|
736 |
+
this.showLoadinfo();
|
737 |
+
|
738 |
+
params.action = action;
|
739 |
+
|
740 |
+
var request = new Ajax.Request(checkout.url,
|
741 |
+
{
|
742 |
+
method : 'post',
|
743 |
+
parameters : params,
|
744 |
+
onSuccess : function (transport) {
|
745 |
+
|
746 |
+
eval('var response = ' + transport.responseText);
|
747 |
+
|
748 |
+
if (response.messages_block) {
|
749 |
+
var gcheckout_onepage_wrap = $$('div.gcheckout-onepage-wrap')[0];
|
750 |
+
if (gcheckout_onepage_wrap) {
|
751 |
+
new Insertion.Before(gcheckout_onepage_wrap, response.messages_block);
|
752 |
+
}
|
753 |
+
}
|
754 |
+
|
755 |
+
if (response.url) {
|
756 |
+
|
757 |
+
checkout.existsreview = false;
|
758 |
+
setLocation(response.url);
|
759 |
+
|
760 |
+
} else {
|
761 |
+
|
762 |
+
if (response.error) {
|
763 |
+
if (response.message) {
|
764 |
+
alert(response.message);
|
765 |
+
}
|
766 |
+
checkout.existsreview = false;
|
767 |
+
checkout.hideLoadinfo();
|
768 |
+
} else {
|
769 |
+
|
770 |
+
var process_save_order = false;
|
771 |
+
|
772 |
+
if (response.methods) {
|
773 |
+
// Quote isVirtual
|
774 |
+
this.innerHTMLwithScripts($('gcheckout-onepage-methods'), response.methods);
|
775 |
+
var wrap = $$('div.gcheckout-onepage-wrap')[0];
|
776 |
+
if (wrap && !wrap.hasClassName('not_shipping_mode')) {
|
777 |
+
wrap.addClassName('not_shipping_mode');
|
778 |
+
}
|
779 |
+
if ($('billing_use_for_shipping_yes') && $('billing_use_for_shipping_yes').up('li.control')) {
|
780 |
+
$('billing_use_for_shipping_yes').up('li.control').remove();
|
781 |
+
}
|
782 |
+
if ($('gcheckout-shipping-address')) {
|
783 |
+
$('gcheckout-shipping-address').remove();
|
784 |
+
}
|
785 |
+
payment.init();
|
786 |
+
checkout.observeMethods();
|
787 |
+
}
|
788 |
+
|
789 |
+
if (response.payments) {
|
790 |
+
checkout.innerHTMLwithScripts($('gcheckout-payment-methods-available'), response.payments);
|
791 |
+
payment.init();
|
792 |
+
checkout.observePaymentMethods();
|
793 |
+
}
|
794 |
+
|
795 |
+
if (response.gift_message) {
|
796 |
+
if (giftmessage_block = $('gomage-lightcheckout-giftmessage')) {
|
797 |
+
checkout.innerHTMLwithScripts(giftmessage_block, response.gift_message);
|
798 |
+
}
|
799 |
+
}
|
800 |
+
|
801 |
+
if (response.toplinks) {
|
802 |
+
checkout.replaceTopLinks(response.toplinks);
|
803 |
+
}
|
804 |
+
|
805 |
+
if (response.minicart) {
|
806 |
+
checkout.replaceMiniCart(response);
|
807 |
+
}
|
808 |
+
|
809 |
+
if (response.cart_sidebar && typeof(GomageProcartConfig) != 'undefined') {
|
810 |
+
GomageProcartConfig._replaceEnterpriseTopCart(response.cart_sidebar, ($('topCartContent') && $('topCartContent').visible()));
|
811 |
+
}
|
812 |
+
|
813 |
+
if (response.review) {
|
814 |
+
checkout.innerHTMLwithScripts($$('#gcheckout-onepage-review div.totals')[0], response.review);
|
815 |
+
}
|
816 |
+
|
817 |
+
if (response.content_billing) {
|
818 |
+
var div_billing = document.createElement('div');
|
819 |
+
div_billing.innerHTML = response.content_billing;
|
820 |
+
$('gcheckout-onepage-address').replaceChild(div_billing.firstChild, $('gcheckout-billing-address'));
|
821 |
+
}
|
822 |
+
|
823 |
+
if (response.content_shipping && $('gcheckout-shipping-address')) {
|
824 |
+
var div_shipping = document.createElement('div');
|
825 |
+
div_shipping.innerHTML = response.content_shipping;
|
826 |
+
$('gcheckout-onepage-address').replaceChild(div_shipping.firstChild, $('gcheckout-shipping-address'));
|
827 |
+
}
|
828 |
+
|
829 |
+
if (response.content_billing || response.content_shipping) {
|
830 |
+
checkout.observeAddresses();
|
831 |
+
initAddresses();
|
832 |
+
}
|
833 |
+
|
834 |
+
if (response.section == 'varify_taxvat') {
|
835 |
+
|
836 |
+
if ($('billing_taxvat_verified')) {
|
837 |
+
$('billing_taxvat_verified').remove();
|
838 |
+
}
|
839 |
+
|
840 |
+
if ($('shipping_taxvat_verified')) {
|
841 |
+
$('shipping_taxvat_verified').remove();
|
842 |
+
}
|
843 |
+
|
844 |
+
checkout.taxvat_verify_result = response.verify_result;
|
845 |
+
|
846 |
+
if ($('billing_taxvat') && $('billing_taxvat').value) {
|
847 |
+
if (response.verify_result.billing) {
|
848 |
+
if (label = $('billing_taxvat').parentNode.parentNode.getElementsByTagName('label')[0]) {
|
849 |
+
label.innerHTML += '<strong id="billing_taxvat_verified" style="margin-left:5px;">(<span style="color:green;">Verified</span>)</strong>';
|
850 |
+
$('billing_taxvat').removeClassName('validation-failed');
|
851 |
+
}
|
852 |
+
} else if ($('billing_taxvat').value) {
|
853 |
+
if (label = $('billing_taxvat').parentNode.parentNode.getElementsByTagName('label')[0]) {
|
854 |
+
label.innerHTML += '<strong id="billing_taxvat_verified" style="margin-left:5px;">(<span style="color:red;">Not Verified</span>)</strong>';
|
855 |
+
}
|
856 |
+
}
|
857 |
+
}
|
858 |
+
|
859 |
+
if ($('shipping_taxvat') && $('shipping_taxvat').value) {
|
860 |
+
if (response.verify_result.shipping) {
|
861 |
+
if (label = $('shipping_taxvat').parentNode.parentNode.getElementsByTagName('label')[0]) {
|
862 |
+
label.innerHTML += '<strong id="shipping_taxvat_verified" style="margin-left:5px;">(<span style="color:green;">Verified</span>)</strong>';
|
863 |
+
$('shipping_taxvat').removeClassName('validation-failed');
|
864 |
+
}
|
865 |
+
} else if ($('shipping_taxvat').value) {
|
866 |
+
if (label = $('shipping_taxvat').parentNode.parentNode.getElementsByTagName('label')[0]) {
|
867 |
+
label.innerHTML += '<strong id="shipping_taxvat_verified" style="margin-left:5px;">(<span style="color:red;">Not Verified</span>)</strong>';
|
868 |
+
}
|
869 |
+
}
|
870 |
+
}
|
871 |
+
|
872 |
+
}
|
873 |
+
|
874 |
+
if (response.section == 'centinel') {
|
875 |
+
|
876 |
+
if (response.centinel) {
|
877 |
+
checkout.showCentinel(response.centinel);
|
878 |
+
} else {
|
879 |
+
process_save_order = true;
|
880 |
+
if ((payment.currentMethod == 'authorizenet_directpost') && ((typeof directPostModel != 'undefined'))) {
|
881 |
+
directPostModel.saveOnepageOrder();
|
882 |
+
} else {
|
883 |
+
checkout.saveorder();
|
884 |
+
}
|
885 |
+
}
|
886 |
+
}
|
887 |
+
|
888 |
+
checkout.setBlocksNumber();
|
889 |
+
|
890 |
+
if (checkout.existsreview) {
|
891 |
+
checkout.existsreview = false;
|
892 |
+
review.save();
|
893 |
+
}
|
894 |
+
else {
|
895 |
+
if (!process_save_order) {
|
896 |
+
checkout.hideLoadinfo();
|
897 |
+
}
|
898 |
+
}
|
899 |
+
|
900 |
+
}
|
901 |
+
|
902 |
+
}
|
903 |
+
|
904 |
+
}.bind(checkout),
|
905 |
+
onFailure : function () {
|
906 |
+
checkout.existsreview = false;
|
907 |
+
}
|
908 |
+
}
|
909 |
+
);
|
910 |
+
};
|
911 |
+
}
|
912 |
+
|
913 |
+
checkout.observeShippingMethods = function () {
|
914 |
+
$$('#gcheckout-shipping-method-available input').each(function (e) {
|
915 |
+
e.onchange = null;
|
916 |
+
Event.stopObserving(e, 'click');
|
917 |
+
e.observe('click', function (e) {
|
918 |
+
if (this.elem.checked) {
|
919 |
+
this.obj.prepareDeliveryDate();
|
920 |
+
this.obj.shippingmethodsSubmit(this.obj.getFormData(), 'get_totals');
|
921 |
+
}
|
922 |
+
}.bind({elem: e, obj: checkout}));
|
923 |
+
}.bind(checkout));
|
924 |
+
|
925 |
+
$$('#gcheckout-onepage-form input[name=shipping_method]').each(function (e) {
|
926 |
+
e.addClassName('validate-one-required-by-name');
|
927 |
+
throw $break;
|
928 |
+
});
|
929 |
+
|
930 |
+
checkout.prepareDeliveryDate();
|
931 |
+
};
|
932 |
+
|
933 |
+
checkout.applyDisocunt = function (flag) {
|
934 |
+
if (flag) {
|
935 |
+
$('remove_coupone').value = 1;
|
936 |
+
checkout.shippingmethodsSubmit({coupon_code: GlcUrl.encode($('coupon_code').value),
|
937 |
+
remove: $('remove_coupone').value}, 'discount');
|
938 |
+
} else {
|
939 |
+
$('remove_coupone').value = 0;
|
940 |
+
checkout.shippingmethodsSubmit({coupon_code: GlcUrl.encode($('coupon_code').value),
|
941 |
+
remove: $('remove_coupone').value}, 'discount');
|
942 |
+
}
|
943 |
+
};
|
944 |
+
|
945 |
+
$$('#gcheckout-shipping-method-available input').each(function (e) {
|
946 |
+
e.onchange = null;
|
947 |
+
Event.stopObserving(e, 'click');
|
948 |
+
e.observe('click', function (e) {
|
949 |
+
if (this.elem.checked) {
|
950 |
+
this.obj.prepareDeliveryDate();
|
951 |
+
this.obj.shippingmethodsSubmit(this.obj.getFormData(), 'get_totals');
|
952 |
+
}
|
953 |
+
}.bind({elem : e, obj : checkout}));
|
954 |
+
}.bind(checkout));
|
955 |
+
};
|
956 |
+
|
957 |
+
if (typeof checkout == 'undefined') {
|
958 |
+
document.observe('dom:loaded', modifyCheckoutJs);
|
959 |
+
} else {
|
960 |
+
modifyCheckoutJs();
|
961 |
+
}
|
962 |
+
//]]>
|
963 |
+
</script>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -45,4 +45,4 @@
|
|
45 |
<script src="<?php echo $this->getSkinUrl('js/TIG/PostNL/deliveryoptions/cufon-yui.js'); ?>" type="text/javascript"></script>
|
46 |
<script src="<?php echo $this->getSkinUrl('js/TIG/PostNL/deliveryoptions/cufon-fonts.js'); ?>" type="text/javascript"></script>
|
47 |
<script src="<?php echo $this->getSkinUrl('js/TIG/PostNL/deliveryoptions/cufon-settings.js'); ?>" type="text/javascript"></script>
|
48 |
-
<script src="https://maps.googleapis.com/maps/api/js?key=<?php echo $this->getApiKey(); ?>&sensor=false&libraries=places&v=3.
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
45 |
<script src="<?php echo $this->getSkinUrl('js/TIG/PostNL/deliveryoptions/cufon-yui.js'); ?>" type="text/javascript"></script>
|
46 |
<script src="<?php echo $this->getSkinUrl('js/TIG/PostNL/deliveryoptions/cufon-fonts.js'); ?>" type="text/javascript"></script>
|
47 |
<script src="<?php echo $this->getSkinUrl('js/TIG/PostNL/deliveryoptions/cufon-settings.js'); ?>" type="text/javascript"></script>
|
48 |
+
<script src="https://maps.googleapis.com/maps/api/js?key=<?php echo $this->getApiKey(); ?>&sensor=false&libraries=places&v=3.19" type="text/javascript"></script>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -270,6 +270,16 @@
|
|
270 |
document.observe('postnl:selectOptionSaved', function() {
|
271 |
checkout.reloadProgressBlock('shipping_method');
|
272 |
checkout.reloadProgressBlock('postnl_deliveryoptions');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
273 |
});
|
274 |
|
275 |
/**
|
@@ -289,54 +299,56 @@
|
|
289 |
}
|
290 |
}
|
291 |
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
if (
|
300 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
301 |
}
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
|
|
306 |
}
|
307 |
-
continueWithSave = true;
|
308 |
-
}
|
309 |
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
console.info('Saving the shipping method is not allowed.');
|
320 |
-
}
|
321 |
|
322 |
-
|
323 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
324 |
}
|
325 |
-
|
326 |
-
checkout.setLoadWaiting('shipping-method');
|
327 |
-
new Ajax.Request(
|
328 |
-
this.saveUrl,
|
329 |
-
{
|
330 |
-
method:'post',
|
331 |
-
onComplete: this.onComplete,
|
332 |
-
onSuccess: this.onSave,
|
333 |
-
onFailure: checkout.ajaxFailure.bind(checkout),
|
334 |
-
parameters: Form.serialize(this.form)
|
335 |
-
}
|
336 |
-
);
|
337 |
}
|
338 |
-
}
|
339 |
-
}
|
340 |
|
341 |
<?php if ($_canUseResponsive): ?>
|
342 |
/**
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
270 |
document.observe('postnl:selectOptionSaved', function() {
|
271 |
checkout.reloadProgressBlock('shipping_method');
|
272 |
checkout.reloadProgressBlock('postnl_deliveryoptions');
|
273 |
+
|
274 |
+
var shippingProgressElements = $$('#shipping-progress-opcheckout dt,#shipping-progress-opcheckout dd');
|
275 |
+
if (deliveryOptions.selectedType == 'PG'
|
276 |
+
|| deliveryOptions.selectedType == 'PGE'
|
277 |
+
|| deliveryOptions.selectedType == 'PA'
|
278 |
+
) {
|
279 |
+
shippingProgressElements.invoke('hide');
|
280 |
+
} else {
|
281 |
+
shippingProgressElements.invoke('show');
|
282 |
+
}
|
283 |
});
|
284 |
|
285 |
/**
|
299 |
}
|
300 |
}
|
301 |
|
302 |
+
if (typeof deliveryOptions != 'undefined') {
|
303 |
+
Object.extend(shippingMethod, {
|
304 |
+
save : function () {
|
305 |
+
if (checkout.loadWaiting != false) return;
|
306 |
+
if (this.validate()) {
|
307 |
+
var continueWithSave;
|
308 |
+
var selectedShippingMethod = $$('#co-shipping-method-form input:checked[name="shipping_method"]')[0];
|
309 |
+
if (selectedShippingMethod.identify() == '<?php echo $_methodName ? $_methodName : 's_method_postnl_flatrate'; ?>') {
|
310 |
+
if (postnlDebugMode) {
|
311 |
+
console.info('Selected shipping method is linked to PostNL delivery options.');
|
312 |
+
}
|
313 |
+
continueWithSave = false;
|
314 |
+
} else {
|
315 |
+
if (postnlDebugMode) {
|
316 |
+
console.info('Selected shipping method is not linked to PostNL delivery options.');
|
317 |
+
}
|
318 |
+
continueWithSave = true;
|
319 |
}
|
320 |
+
|
321 |
+
if (typeof deliveryOptions != 'undefined' && deliveryOptions && !continueWithSave) {
|
322 |
+
continueWithSave = deliveryOptions.saveSelectedOption();
|
323 |
+
} else {
|
324 |
+
continueWithSave = true;
|
325 |
}
|
|
|
|
|
326 |
|
327 |
+
if (continueWithSave && postnlDebugMode) {
|
328 |
+
console.info('Saving the shipping method is allowed.');
|
329 |
+
} else if (postnlDebugMode) {
|
330 |
+
console.info('Saving the shipping method is not allowed.');
|
331 |
+
}
|
332 |
|
333 |
+
if (!continueWithSave) {
|
334 |
+
return;
|
335 |
+
}
|
|
|
|
|
336 |
|
337 |
+
checkout.setLoadWaiting('shipping-method');
|
338 |
+
new Ajax.Request(
|
339 |
+
this.saveUrl,
|
340 |
+
{
|
341 |
+
method : 'post',
|
342 |
+
onComplete : this.onComplete,
|
343 |
+
onSuccess : this.onSave,
|
344 |
+
onFailure : checkout.ajaxFailure.bind(checkout),
|
345 |
+
parameters : Form.serialize(this.form)
|
346 |
+
}
|
347 |
+
);
|
348 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
349 |
}
|
350 |
+
});
|
351 |
+
}
|
352 |
|
353 |
<?php if ($_canUseResponsive): ?>
|
354 |
/**
|
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ___________ __ __
|
4 |
+
* \__ ___/____ _/ |_ _____ | |
|
5 |
+
* | | / _ \\ __\\__ \ | |
|
6 |
+
* | | | |_| || | / __ \_| |__
|
7 |
+
* |____| \____/ |__| (____ /|____/
|
8 |
+
* \/
|
9 |
+
* ___ __ __
|
10 |
+
* | | ____ _/ |_ ____ _______ ____ ____ _/ |_
|
11 |
+
* | | / \\ __\_/ __ \\_ __ \ / \ _/ __ \\ __\
|
12 |
+
* | || | \| | \ ___/ | | \/| | \\ ___/ | |
|
13 |
+
* |___||___| /|__| \_____>|__| |___| / \_____>|__|
|
14 |
+
* \/ \/
|
15 |
+
* ________
|
16 |
+
* / _____/_______ ____ __ __ ______
|
17 |
+
* / \ ___\_ __ \ / _ \ | | \\____ \
|
18 |
+
* \ \_\ \| | \/| |_| || | /| |_| |
|
19 |
+
* \______ /|__| \____/ |____/ | __/
|
20 |
+
* \/ |__|
|
21 |
+
*
|
22 |
+
* NOTICE OF LICENSE
|
23 |
+
*
|
24 |
+
* This source file is subject to the Creative Commons License.
|
25 |
+
* It is available through the world-wide-web at this URL:
|
26 |
+
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
27 |
+
* If you are unable to obtain it through the world-wide-web, please send an email
|
28 |
+
* to servicedesk@tig.nl so we can send you a copy immediately.
|
29 |
+
*
|
30 |
+
* DISCLAIMER
|
31 |
+
*
|
32 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
33 |
+
* versions in the future. If you wish to customize this module for your
|
34 |
+
* needs please contact servicedesk@tig.nl for more information.
|
35 |
+
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
+
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
+
*/
|
39 |
+
?>
|
40 |
+
<?php $_helper = Mage::helper('postnl/deliveryOptions'); ?>
|
41 |
+
<?php if ($_helper->canUsePakjeGemak(false, true) || $_helper->canUsePakketAutomaat(true)): ?>
|
42 |
+
<li id="postnl_billing_pickup_notification" style="display:none;">
|
43 |
+
<em><?php echo $this->__('You can select a pick up location later on. The address you select here will be used to determine which pick up locations are nearby.'); ?></em>
|
44 |
+
</li>
|
45 |
+
<li id="postnl_shipping_pickup_notification">
|
46 |
+
<em><?php echo $this->__('You can select a pick up location later on. The address you select here will be used to determine which pick up locations are nearby.'); ?></em>
|
47 |
+
</li>
|
48 |
+
|
49 |
+
<script type="text/javascript">
|
50 |
+
//<![CDATA[
|
51 |
+
try {
|
52 |
+
var billingNotification = $('postnl_billing_pickup_notification');
|
53 |
+
var shippingNotification = $('postnl_shipping_pickup_notification');
|
54 |
+
|
55 |
+
$$('#co-billing-form ul')[0].insert({
|
56 |
+
bottom : billingNotification
|
57 |
+
});
|
58 |
+
$$('#co-shipping-form ul')[0].insert({
|
59 |
+
bottom : shippingNotification
|
60 |
+
});
|
61 |
+
|
62 |
+
var toggleBillingNotification = function () {
|
63 |
+
if ($$('input[name="billing[use_for_shipping]"]:checked')[0].getValue() == 1) {
|
64 |
+
billingNotification.show();
|
65 |
+
} else {
|
66 |
+
billingNotification.hide();
|
67 |
+
}
|
68 |
+
};
|
69 |
+
$$('#co-billing-form .control').invoke('observe', 'change', toggleBillingNotification);
|
70 |
+
toggleBillingNotification();
|
71 |
+
} catch(e) {
|
72 |
+
console.error(e);
|
73 |
+
}
|
74 |
+
//]]>
|
75 |
+
</script>
|
76 |
+
<?php endif; ?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_DeliveryOptions_Checkout_Progress $this
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_DeliveryOptions_Checkout_Progress $this
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var Mage_Checkout_Block_Onepage_Shipping_Method_Available $this
|
@@ -157,7 +157,7 @@
|
|
157 |
function get_separate_save_methods_function(url, update_payments)
|
158 |
{
|
159 |
if(typeof update_payments == 'undefined') {
|
160 |
-
|
161 |
}
|
162 |
|
163 |
return function(e) {
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var Mage_Checkout_Block_Onepage_Shipping_Method_Available $this
|
157 |
function get_separate_save_methods_function(url, update_payments)
|
158 |
{
|
159 |
if(typeof update_payments == 'undefined') {
|
160 |
+
update_payments = false;
|
161 |
}
|
162 |
|
163 |
return function(e) {
|
@@ -0,0 +1,260 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ___________ __ __
|
4 |
+
* \__ ___/____ _/ |_ _____ | |
|
5 |
+
* | | / _ \\ __\\__ \ | |
|
6 |
+
* | | | |_| || | / __ \_| |__
|
7 |
+
* |____| \____/ |__| (____ /|____/
|
8 |
+
* \/
|
9 |
+
* ___ __ __
|
10 |
+
* | | ____ _/ |_ ____ _______ ____ ____ _/ |_
|
11 |
+
* | | / \\ __\_/ __ \\_ __ \ / \ _/ __ \\ __\
|
12 |
+
* | || | \| | \ ___/ | | \/| | \\ ___/ | |
|
13 |
+
* |___||___| /|__| \_____>|__| |___| / \_____>|__|
|
14 |
+
* \/ \/
|
15 |
+
* ________
|
16 |
+
* / _____/_______ ____ __ __ ______
|
17 |
+
* / \ ___\_ __ \ / _ \ | | \\____ \
|
18 |
+
* \ \_\ \| | \/| |_| || | /| |_| |
|
19 |
+
* \______ /|__| \____/ |____/ | __/
|
20 |
+
* \/ |__|
|
21 |
+
*
|
22 |
+
* NOTICE OF LICENSE
|
23 |
+
*
|
24 |
+
* This source file is subject to the Creative Commons License.
|
25 |
+
* It is available through the world-wide-web at this URL:
|
26 |
+
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
27 |
+
* If you are unable to obtain it through the world-wide-web, please send an email
|
28 |
+
* to servicedesk@tig.nl so we can send you a copy immediately.
|
29 |
+
*
|
30 |
+
* DISCLAIMER
|
31 |
+
*
|
32 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
33 |
+
* versions in the future. If you wish to customize this module for your
|
34 |
+
* needs please contact servicedesk@tig.nl for more information.
|
35 |
+
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
+
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
+
*
|
39 |
+
* @var Mage_Checkout_Block_Onepage_Shipping_Method_Available $this
|
40 |
+
*/
|
41 |
+
?>
|
42 |
+
<script type="text/javascript">
|
43 |
+
//<![CDATA[
|
44 |
+
if (window.deliveryOptions) {
|
45 |
+
window.deliveryOptions.reset();
|
46 |
+
window.deliveryOptions = false;
|
47 |
+
}
|
48 |
+
//]]>
|
49 |
+
</script>
|
50 |
+
<?php $_methodName = ''; ?>
|
51 |
+
<?php if (!($_shippingRateGroups = $this->getShippingRates())): ?>
|
52 |
+
<strong><?php echo $this->__('Sorry, no quotes are available for this order at this time.') ?></strong>
|
53 |
+
<?php else: ?>
|
54 |
+
<?php $_deliveryOptionsShown = false; ?>
|
55 |
+
<?php $_canUseDeliveryOptions = false; ?>
|
56 |
+
<?php $_store = $this->getQuote()->getStore(); ?>
|
57 |
+
<?php $_carrierHelper = Mage::helper('postnl/carrier'); ?>
|
58 |
+
<?php $_deliveryOptionsHelper = Mage::helper('postnl/deliveryOptions'); ?>
|
59 |
+
|
60 |
+
<?php if ($_deliveryOptionsHelper->canUseDeliveryOptions($this->getQuote())
|
61 |
+
&& $_deliveryOptionsHelper->canUseDeliveryOptionsForCountry($this->getQuote())): ?>
|
62 |
+
<?php $_canUseDeliveryOptions = true; ?>
|
63 |
+
<?php endif; ?>
|
64 |
+
<?php if (count($_shippingRateGroups)=='1' && Mage::getStoreConfig('onestepcheckout/general/hide_shipping_method')):?>
|
65 |
+
<dl class="shipment-methods" style="display: none">
|
66 |
+
|
67 |
+
<?php foreach ($_shippingRateGroups as $code => $_rates): ?>
|
68 |
+
<dd><?php echo $this->getCarrierName($code) ?></dd>
|
69 |
+
<?php foreach ($_rates as $_rate): ?>
|
70 |
+
<?php $_isPostnl = false; ?>
|
71 |
+
<?php if (!$_deliveryOptionsShown
|
72 |
+
&& $_canUseDeliveryOptions
|
73 |
+
&& $_carrierHelper->isPostnlShippingMethod($_rate->getCode())): ?>
|
74 |
+
<?php $_isPostnl = true; ?>
|
75 |
+
<?php endif; ?>
|
76 |
+
|
77 |
+
<dt <?php if($_isPostnl): ?>id="carrier_postnl"<?php endif; ?> style="margin-bottom: 5px;">
|
78 |
+
|
79 |
+
<?php if ($_rate->getErrorMessage()): ?>
|
80 |
+
<ul class="messages"><li class="error-msg"><ul><li><?php echo $_rate->getErrorMessage() ?></li></ul></li></ul>
|
81 |
+
<?php else: ?>
|
82 |
+
<?php $_priceExcl = $_store->convertPrice(Mage::helper('tax')->getShippingPrice($_rate->getPrice(), false, $this->getAddress())); ?>
|
83 |
+
<?php $_priceIncl = $_store->convertPrice(Mage::helper('tax')->getShippingPrice($_rate->getPrice(), true, $this->getAddress())); ?>
|
84 |
+
<input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>" checked="checked" />
|
85 |
+
<label data-price="<?php echo $_priceExcl; ?>" data-price-incl="<?php echo $_priceIncl; ?>" for="s_method_<?php echo $_rate->getCode() ?>"><!--<b><?php echo $this->getCarrierName($code) ?>:</b>--> <?php echo $_rate->getMethodTitle() ?>
|
86 |
+
<strong>
|
87 |
+
<?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
|
88 |
+
<?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
|
89 |
+
<?php echo $_excl; ?>
|
90 |
+
<?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
|
91 |
+
(<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
|
92 |
+
<?php endif; ?>
|
93 |
+
</strong>
|
94 |
+
</label>
|
95 |
+
|
96 |
+
<?php if ($_isPostnl && $this->getChild('postnl.osc.delivery.options')): ?>
|
97 |
+
<div class="postnl-container" id="postnl_container" style="display:none;">
|
98 |
+
<?php echo $this->getChild('postnl.osc.delivery.options')->setMethodName('s_method_' . $_rate->getCode())->toHtml(); ?>
|
99 |
+
</div>
|
100 |
+
<?php $_deliveryOptionsShown = true; ?>
|
101 |
+
<?php endif; ?>
|
102 |
+
<?php endif ?>
|
103 |
+
</dt>
|
104 |
+
<?php endforeach; ?>
|
105 |
+
<?php endforeach; ?>
|
106 |
+
</dl>
|
107 |
+
<?php else: ?>
|
108 |
+
<dl class="shipment-methods">
|
109 |
+
<?php foreach ($_shippingRateGroups as $code => $_rates): ?>
|
110 |
+
<dd><?php echo $this->getCarrierName($code) ?></dd>
|
111 |
+
<?php foreach ($_rates as $_rate): ?>
|
112 |
+
<?php $_isPostnl = false; ?>
|
113 |
+
<?php if (!$_deliveryOptionsShown
|
114 |
+
&& $_canUseDeliveryOptions
|
115 |
+
&& $_carrierHelper->isPostnlShippingMethod($_rate->getCode())): ?>
|
116 |
+
<?php $_isPostnl = true; ?>
|
117 |
+
<?php endif; ?>
|
118 |
+
|
119 |
+
<dt <?php if($_isPostnl): ?>id="carrier_postnl"<?php endif; ?> style="margin-bottom: 5px;" class="<?php echo $code ?>">
|
120 |
+
|
121 |
+
<?php if ($_rate->getErrorMessage()): ?>
|
122 |
+
<ul class="messages"><li class="error-msg"><ul><li><?php echo $_rate->getErrorMessage() ?></li></ul></li></ul>
|
123 |
+
<?php else: ?>
|
124 |
+
<?php $_priceExcl = $_store->convertPrice(Mage::helper('tax')->getShippingPrice($_rate->getPrice(), false, $this->getAddress())); ?>
|
125 |
+
<?php $_priceIncl = $_store->convertPrice(Mage::helper('tax')->getShippingPrice($_rate->getPrice(), true, $this->getAddress())); ?>
|
126 |
+
|
127 |
+
<input name="shipping_method" type="radio" class="validate-one-required-by-name" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> />
|
128 |
+
<label data-price="<?php echo $_priceExcl; ?>" data-price-incl="<?php echo $_priceIncl; ?>" for="s_method_<?php echo $_rate->getCode() ?>"><!--<b><?php echo $this->getCarrierName($code) ?>:</b>--> <?php echo $_rate->getMethodTitle() ?>
|
129 |
+
<strong>
|
130 |
+
<?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
|
131 |
+
<?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
|
132 |
+
|
133 |
+
<?php echo $_excl; ?>
|
134 |
+
<?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
|
135 |
+
(<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
|
136 |
+
<?php endif; ?>
|
137 |
+
</strong>
|
138 |
+
</label>
|
139 |
+
|
140 |
+
<?php if ($_isPostnl && $this->getChild('postnl.osc.delivery.options')): ?>
|
141 |
+
<div class="postnl-container" id="postnl_container" style="display:none;">
|
142 |
+
<?php echo $this->getChild('postnl.osc.delivery.options')->setRate($_rate)->toHtml(); ?>
|
143 |
+
</div>
|
144 |
+
<?php $_deliveryOptionsShown = true; ?>
|
145 |
+
<?php $_methodName = 's_method_' . $_rate->getCode(); ?>
|
146 |
+
<?php endif; ?>
|
147 |
+
|
148 |
+
<?php endif ?>
|
149 |
+
</dt>
|
150 |
+
<?php endforeach; ?>
|
151 |
+
<?php endforeach; ?>
|
152 |
+
</dl>
|
153 |
+
<?php endif; ?>
|
154 |
+
<?php endif; ?>
|
155 |
+
<script type="text/javascript">
|
156 |
+
//<![CDATA[
|
157 |
+
function get_separate_save_methods_function(url, update_payments)
|
158 |
+
{
|
159 |
+
if(typeof update_payments == 'undefined') {
|
160 |
+
var update_payments = false;
|
161 |
+
}
|
162 |
+
|
163 |
+
return function(e) {
|
164 |
+
if(typeof e != 'undefined') {
|
165 |
+
var element = e.element();
|
166 |
+
|
167 |
+
if(element.name != 'shipping_method') {
|
168 |
+
update_payments = false;
|
169 |
+
}
|
170 |
+
}
|
171 |
+
|
172 |
+
var form = $('onestepcheckout-form');
|
173 |
+
var shipping_method = $RF(form, 'shipping_method');
|
174 |
+
var payment_method = $RF(form, 'payment[method]');
|
175 |
+
var totals = get_totals_element();
|
176 |
+
|
177 |
+
var freeMethod = $('p_method_free');
|
178 |
+
if(freeMethod){
|
179 |
+
payment.reloadcallback = true;
|
180 |
+
payment.countreload = 1;
|
181 |
+
}
|
182 |
+
|
183 |
+
totals.update('<div class="loading-ajax"> </div>');
|
184 |
+
|
185 |
+
if(update_payments) {
|
186 |
+
var payment_methods = $$('div.payment-methods')[0];
|
187 |
+
payment_methods.update('<div class="loading-ajax"> </div>');
|
188 |
+
}
|
189 |
+
|
190 |
+
var parameters = {
|
191 |
+
shipping_method: shipping_method,
|
192 |
+
payment_method: payment_method
|
193 |
+
};
|
194 |
+
|
195 |
+
var onlyStatedAddressOption = $$('#<?php echo $_methodName; ?>_only_stated_address_option input')[0];
|
196 |
+
if (onlyStatedAddressOption) {
|
197 |
+
parameters[onlyStatedAddressOption.name] = onlyStatedAddressOption.getValue();
|
198 |
+
}
|
199 |
+
|
200 |
+
/* Find payment parameters and include */
|
201 |
+
var items = $$('input[name^=payment]').concat($$('select[name^=payment]'));
|
202 |
+
var names = items.pluck('name');
|
203 |
+
var values = items.pluck('value');
|
204 |
+
|
205 |
+
for(var x=0; x < names.length; x++) {
|
206 |
+
if(names[x] != 'payment[method]') {
|
207 |
+
parameters[names[x]] = values[x];
|
208 |
+
}
|
209 |
+
}
|
210 |
+
|
211 |
+
new Ajax.Request(url, {
|
212 |
+
method: 'post',
|
213 |
+
onSuccess: function(transport) {
|
214 |
+
if(transport.status == 200) {
|
215 |
+
var data = transport.responseText.evalJSON();
|
216 |
+
var form = $('onestepcheckout-form');
|
217 |
+
|
218 |
+
totals.update(data.summary);
|
219 |
+
|
220 |
+
if(update_payments) {
|
221 |
+
|
222 |
+
payment_methods.replace(data.payment_method);
|
223 |
+
|
224 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', get_separate_save_methods_function(url));
|
225 |
+
$$('div.payment-methods input[name="payment\[method\]"]').invoke('observe', 'click', function() {
|
226 |
+
$$('div.onestepcheckout-payment-method-error').each(function(item) {
|
227 |
+
new Effect.Fade(item);
|
228 |
+
});
|
229 |
+
});
|
230 |
+
|
231 |
+
if($RF($('onestepcheckout-form'), 'payment[method]') != null) {
|
232 |
+
try {
|
233 |
+
var payment_method = $RF(form, 'payment[method]');
|
234 |
+
$('container_payment_method_' + payment_method).show();
|
235 |
+
$('payment_form_' + payment_method).show();
|
236 |
+
} catch(err) {
|
237 |
+
|
238 |
+
}
|
239 |
+
}
|
240 |
+
}
|
241 |
+
}
|
242 |
+
},
|
243 |
+
parameters: parameters
|
244 |
+
});
|
245 |
+
}
|
246 |
+
}
|
247 |
+
|
248 |
+
document.observe('dom:loaded', function() {
|
249 |
+
shm.show = function() {
|
250 |
+
$('bpost-radio-btn').checked = true;
|
251 |
+
startformUrl = shm.startformUrl;
|
252 |
+
setTimeout(function() {
|
253 |
+
if (!$('GB_window')) {
|
254 |
+
GB_show('bpost', startformUrl, 522, 800);
|
255 |
+
}
|
256 |
+
}, 500);
|
257 |
+
};
|
258 |
+
});
|
259 |
+
//]]>
|
260 |
+
</script>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -547,6 +547,7 @@
|
|
547 |
return;
|
548 |
}
|
549 |
|
|
|
550 |
element.observe('change', function() {
|
551 |
if (deliveryOptions && deliveryOptions.timeframeRequest) {
|
552 |
deliveryOptions.timeframeRequest.transport.abort();
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
547 |
return;
|
548 |
}
|
549 |
|
550 |
+
element.stopObserving('change');
|
551 |
element.observe('change', function() {
|
552 |
if (deliveryOptions && deliveryOptions.timeframeRequest) {
|
553 |
deliveryOptions.timeframeRequest.transport.abort();
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_DeliveryOptions_Checkout_Progress $this
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_DeliveryOptions_Checkout_Progress $this
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_DeliveryOptions_Theme $this
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_DeliveryOptions_Theme $this
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ___________ __ __
|
4 |
+
* \__ ___/____ _/ |_ _____ | |
|
5 |
+
* | | / _ \\ __\\__ \ | |
|
6 |
+
* | | | |_| || | / __ \_| |__
|
7 |
+
* |____| \____/ |__| (____ /|____/
|
8 |
+
* \/
|
9 |
+
* ___ __ __
|
10 |
+
* | | ____ _/ |_ ____ _______ ____ ____ _/ |_
|
11 |
+
* | | / \\ __\_/ __ \\_ __ \ / \ _/ __ \\ __\
|
12 |
+
* | || | \| | \ ___/ | | \/| | \\ ___/ | |
|
13 |
+
* |___||___| /|__| \_____>|__| |___| / \_____>|__|
|
14 |
+
* \/ \/
|
15 |
+
* ________
|
16 |
+
* / _____/_______ ____ __ __ ______
|
17 |
+
* / \ ___\_ __ \ / _ \ | | \\____ \
|
18 |
+
* \ \_\ \| | \/| |_| || | /| |_| |
|
19 |
+
* \______ /|__| \____/ |____/ | __/
|
20 |
+
* \/ |__|
|
21 |
+
*
|
22 |
+
* NOTICE OF LICENSE
|
23 |
+
*
|
24 |
+
* This source file is subject to the Creative Commons License.
|
25 |
+
* It is available through the world-wide-web at this URL:
|
26 |
+
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
27 |
+
* If you are unable to obtain it through the world-wide-web, please send an email
|
28 |
+
* to servicedesk@tig.nl so we can send you a copy immediately.
|
29 |
+
*
|
30 |
+
* DISCLAIMER
|
31 |
+
*
|
32 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
33 |
+
* versions in the future. If you wish to customize this module for your
|
34 |
+
* needs please contact servicedesk@tig.nl for more information.
|
35 |
+
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
+
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
+
*
|
39 |
+
* @var TIG_PostNL_Block_Mijnpakket_Js $this
|
40 |
+
*/
|
41 |
+
?>
|
42 |
+
<script src="<?php echo $this->getLoginJsUrl() ?>" type="text/javascript"></script>
|
43 |
+
<script src="<?php echo $this->getSkinUrl('js/TIG/PostNL/gomage_checkout/mijnpakketLogin.js'); ?>" type="text/javascript"></script>
|
44 |
+
<script src="<?php echo $this->getCheckoutPremiumJsUrl(); ?>" type="text/javascript"></script>
|
@@ -0,0 +1,181 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ___________ __ __
|
4 |
+
* \__ ___/____ _/ |_ _____ | |
|
5 |
+
* | | / _ \\ __\\__ \ | |
|
6 |
+
* | | | |_| || | / __ \_| |__
|
7 |
+
* |____| \____/ |__| (____ /|____/
|
8 |
+
* \/
|
9 |
+
* ___ __ __
|
10 |
+
* | | ____ _/ |_ ____ _______ ____ ____ _/ |_
|
11 |
+
* | | / \\ __\_/ __ \\_ __ \ / \ _/ __ \\ __\
|
12 |
+
* | || | \| | \ ___/ | | \/| | \\ ___/ | |
|
13 |
+
* |___||___| /|__| \_____>|__| |___| / \_____>|__|
|
14 |
+
* \/ \/
|
15 |
+
* ________
|
16 |
+
* / _____/_______ ____ __ __ ______
|
17 |
+
* / \ ___\_ __ \ / _ \ | | \\____ \
|
18 |
+
* \ \_\ \| | \/| |_| || | /| |_| |
|
19 |
+
* \______ /|__| \____/ |____/ | __/
|
20 |
+
* \/ |__|
|
21 |
+
*
|
22 |
+
* NOTICE OF LICENSE
|
23 |
+
*
|
24 |
+
* This source file is subject to the Creative Commons License.
|
25 |
+
* It is available through the world-wide-web at this URL:
|
26 |
+
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
27 |
+
* If you are unable to obtain it through the world-wide-web, please send an email
|
28 |
+
* to servicedesk@tig.nl so we can send you a copy immediately.
|
29 |
+
*
|
30 |
+
* DISCLAIMER
|
31 |
+
*
|
32 |
+
* Do not edit or add to this file if you wish to upgrade this module to newer
|
33 |
+
* versions in the future. If you wish to customize this module for your
|
34 |
+
* needs please contact servicedesk@tig.nl for more information.
|
35 |
+
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
+
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
+
*/
|
39 |
+
?>
|
40 |
+
<?php $_savedData = $this->getSavedMijnpakketData(); ?>
|
41 |
+
<div id="postnl_mijnpakket" style="display:none;">
|
42 |
+
<div class="clearfix">
|
43 |
+
<div id="mijnpakket_text">
|
44 |
+
<h3><?php echo $this->__('Checkout using MijnPakket') ?></h3>
|
45 |
+
<div id="postnl_mijnpakket_tooltip" class="postnl-tooltip">
|
46 |
+
<div><?php echo $this->__('If you have a MijnPakket account you can use the button below to log in to your account. When you log in to your MijnPakket account the webshop will read your preferred address and select it as your billing and shipping address. You can change this address in the forms below.'); ?></div>
|
47 |
+
</div>
|
48 |
+
<p><?php echo $this->__('Log in with your MijnPakket account to automatically use your preferred address.') ?></p>
|
49 |
+
</div>
|
50 |
+
<div id="mijnpakket_buttons">
|
51 |
+
<div id="postnl_mijnpakket_login_button" style="display: none;">
|
52 |
+
<span>
|
53 |
+
<img src="<?php echo $this->getButtonUrl(); ?>" title="PostNL - MijnPakket" alt="PostNL - MijnPakket"/>
|
54 |
+
</span>
|
55 |
+
</div>
|
56 |
+
<div id="postnl_mijnpakket_login_button_refresh" style="display: none;">
|
57 |
+
<span>
|
58 |
+
<img src="<?php echo $this->getButtonUrl(); ?>" title="PostNL - MijnPakket" alt="PostNL - MijnPakket"/>
|
59 |
+
</span>
|
60 |
+
</div>
|
61 |
+
<div id="postnl_mijnpakket_login_button_disabled" style="display: none;">
|
62 |
+
<span>
|
63 |
+
<img src="<?php echo $this->getDisabledButtonUrl(); ?>" title="PostNL - MijnPakket" alt="PostNL - MijnPakket"/>
|
64 |
+
</span>
|
65 |
+
</div>
|
66 |
+
</div>
|
67 |
+
<div id="login-buttons-container">
|
68 |
+
<span class="please-wait" id="login-please-wait" style="display:none;">
|
69 |
+
<img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading MijnPakket data...') ?>" title="<?php echo $this->__('Loading MijnPakket data...') ?>" class="v-middle" /> <?php echo $this->__('Loading MijnPakket data...') ?>
|
70 |
+
</span>
|
71 |
+
</div>
|
72 |
+
</div>
|
73 |
+
</div>
|
74 |
+
<div id="postnl_placeholder" style="display:none;"></div>
|
75 |
+
<script type="text/javascript">
|
76 |
+
//<![CDATA[
|
77 |
+
document.observe('dom:loaded', function() {
|
78 |
+
var publicWebshopId = '<?php echo $this->getPublicWebshopId(); ?>';
|
79 |
+
var profileAccessUrl = '<?php echo $this->getUrl('postnl/mijnpakket/getProfileAccess', array('_secure' => true)); ?>';
|
80 |
+
var debug = <?php echo $this->isDebugEnabled() ? 'true' : 'false'; ?>;
|
81 |
+
|
82 |
+
// Initialize formPopulate and configure it
|
83 |
+
var formPopulate = new FormPopulate();
|
84 |
+
|
85 |
+
var formPopulateData = {
|
86 |
+
'billing': {
|
87 |
+
firstname : 'billing_firstname',
|
88 |
+
middlename : 'billing_middlename',
|
89 |
+
lastname : 'billing_lastname',
|
90 |
+
email : 'billing_email',
|
91 |
+
region : 'billing_region',
|
92 |
+
country_id : 'billing_country_id',
|
93 |
+
postcode : 'billing_postcode',
|
94 |
+
street : [
|
95 |
+
['billing_street1', 'virtual_billing_street1'],
|
96 |
+
['billing_street2', 'virtual_billing_street2'],
|
97 |
+
['billing_street3', 'virtual_billing_street3']
|
98 |
+
],
|
99 |
+
city : 'billing_city',
|
100 |
+
telephone : 'billing_telephone',
|
101 |
+
fax : 'billing_fax'
|
102 |
+
},
|
103 |
+
'shipping': {
|
104 |
+
firstname : 'shipping_firstname',
|
105 |
+
middlename : 'shipping_middlename',
|
106 |
+
lastname : 'shipping_lastname',
|
107 |
+
email : 'shipping_email',
|
108 |
+
region : 'shipping_region',
|
109 |
+
country_id : 'shipping_country_id',
|
110 |
+
postcode : 'shipping_postcode',
|
111 |
+
street : [
|
112 |
+
['shipping_street1', 'virtual_shipping_street1'],
|
113 |
+
['shipping_street2', 'virtual_shipping_street2'],
|
114 |
+
['shipping_street3', 'virtual_shipping_street3']
|
115 |
+
],
|
116 |
+
city : 'shipping_city',
|
117 |
+
telephone : 'shipping_telephone',
|
118 |
+
fax : 'shipping_fax'
|
119 |
+
}
|
120 |
+
};
|
121 |
+
|
122 |
+
formPopulate.setMapper(formPopulateData);
|
123 |
+
|
124 |
+
// Initialize mijnpakketLogin and configure it
|
125 |
+
var mijnpakketLogin = new MijnpakketLogin(publicWebshopId, profileAccessUrl, false);
|
126 |
+
window.mijnpakketLogin = mijnpakketLogin;
|
127 |
+
|
128 |
+
mijnpakketLogin.setCheckout(checkout)
|
129 |
+
.setFormPopulate(formPopulate)
|
130 |
+
.setFailureUrl('<?php echo $this->getUrl('checkout/cart'); ?>');
|
131 |
+
|
132 |
+
<?php if ($_savedData): ?>
|
133 |
+
var mijnpakketData = '<?php echo Mage::helper('core')->jsonEncode($_savedData); ?>';
|
134 |
+
mijnpakketLogin.setMijnpakketDataJson(mijnpakketData);
|
135 |
+
<?php endif; ?>
|
136 |
+
|
137 |
+
var updateLoggedIn = function(data) {
|
138 |
+
if (debug) {
|
139 |
+
console.log('Logged-in status:', data);
|
140 |
+
}
|
141 |
+
if (!data.Ok) {
|
142 |
+
return;
|
143 |
+
}
|
144 |
+
|
145 |
+
$('postnl_mijnpakket').show();
|
146 |
+
mijnpakketLogin.init('mijnpakket_buttons', debug);
|
147 |
+
};
|
148 |
+
|
149 |
+
var mijnpakketLoginCheck = PostNL.Checkout.init({
|
150 |
+
userLoggedin : updateLoggedIn,
|
151 |
+
detectPopupState : function() {},
|
152 |
+
elementId : 'postnl_placeholder',
|
153 |
+
pId : publicWebshopId
|
154 |
+
});
|
155 |
+
|
156 |
+
var loginContainerArray = $$('#gcheckout-step-login .col2-set');
|
157 |
+
var billingContainer = $$('#gcheckout-billing-address .glc-col')[0];
|
158 |
+
var mijnpakketContainer = $('postnl_mijnpakket');
|
159 |
+
|
160 |
+
if (billingContainer) {
|
161 |
+
billingContainer.insert({
|
162 |
+
top: mijnpakketContainer
|
163 |
+
});
|
164 |
+
|
165 |
+
mijnpakketLoginCheck.checkLogin();
|
166 |
+
registerObservers();
|
167 |
+
}
|
168 |
+
|
169 |
+
function registerObservers() {
|
170 |
+
document.observe('postnl:getProfileDataStart', function() {
|
171 |
+
$('login-please-wait').show();
|
172 |
+
$('mijnpakket_buttons').hide();
|
173 |
+
});
|
174 |
+
document.observe('postnl:getProfileDataRequestEnd', function() {
|
175 |
+
$('login-please-wait').hide();
|
176 |
+
$('mijnpakket_buttons').show();
|
177 |
+
});
|
178 |
+
}
|
179 |
+
});
|
180 |
+
//]]>
|
181 |
+
</script>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_Mijnpakket_Js $this
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*
|
39 |
* @var TIG_PostNL_Block_Mijnpakket_Js $this
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -82,7 +82,7 @@
|
|
82 |
var postnlCodPaymentMethod = $('p_method_<?php echo $_methodCode; ?>');
|
83 |
var postnlCodPaymentForm = $('payment_form_<?php echo $_methodCode; ?>');
|
84 |
|
85 |
-
if (postnlCodPaymentMethod && deliveryOptions) {
|
86 |
if (deliveryOptions.selectedType == 'PA') {
|
87 |
postnlCodPaymentMethod.disabled = true;
|
88 |
postnlCodPaymentMethod.up().hide();
|
@@ -106,7 +106,7 @@
|
|
106 |
}
|
107 |
);
|
108 |
|
109 |
-
if (deliveryOptions && deliveryOptions.options.isOsc) {
|
110 |
|
111 |
if (typeof togglePostnlCod != 'undefined') {
|
112 |
document.stopObserving('postnl:selectTimeframe', togglePostnlCod);
|
82 |
var postnlCodPaymentMethod = $('p_method_<?php echo $_methodCode; ?>');
|
83 |
var postnlCodPaymentForm = $('payment_form_<?php echo $_methodCode; ?>');
|
84 |
|
85 |
+
if (postnlCodPaymentMethod && typeof deliveryOptions != 'undefined') {
|
86 |
if (deliveryOptions.selectedType == 'PA') {
|
87 |
postnlCodPaymentMethod.disabled = true;
|
88 |
postnlCodPaymentMethod.up().hide();
|
106 |
}
|
107 |
);
|
108 |
|
109 |
+
if (typeof deliveryOptions != 'undefined' && deliveryOptions.options.isOsc) {
|
110 |
|
111 |
if (typeof togglePostnlCod != 'undefined') {
|
112 |
document.stopObserving('postnl:selectTimeframe', togglePostnlCod);
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -386,6 +386,7 @@
|
|
386 |
<block type="postnl_deliveryoptions/js" name="postnl_deliveryoptions_js" template="TIG/PostNL/delivery_options/js.phtml"/>
|
387 |
<block type="postnl_mijnpakket/js" name="postnl_mijnpakket_js" template="TIG/PostNL/mijnpakket/js.phtml"/>
|
388 |
<block type="postnl_mijnpakket/loginButton" name="postnl_mijnpakket_login" template="TIG/PostNL/mijnpakket/onepage/login_button.phtml"/>
|
|
|
389 |
</reference>
|
390 |
</checkout_onepage_index>
|
391 |
|
@@ -480,6 +481,55 @@
|
|
480 |
</reference>
|
481 |
</onestepcheckout_index_index>
|
482 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
483 |
<!-- DELIVERY OPTIONS -->
|
484 |
|
485 |
<onestepcheckout_ajax_save_billing>
|
386 |
<block type="postnl_deliveryoptions/js" name="postnl_deliveryoptions_js" template="TIG/PostNL/delivery_options/js.phtml"/>
|
387 |
<block type="postnl_mijnpakket/js" name="postnl_mijnpakket_js" template="TIG/PostNL/mijnpakket/js.phtml"/>
|
388 |
<block type="postnl_mijnpakket/loginButton" name="postnl_mijnpakket_login" template="TIG/PostNL/mijnpakket/onepage/login_button.phtml"/>
|
389 |
+
<block type="postnl_deliveryoptions/pickupNotification" name="postnl_billing_pickup_notification" template="TIG/PostNL/delivery_options/onepage/pickup_notification.phtml"/>
|
390 |
</reference>
|
391 |
</checkout_onepage_index>
|
392 |
|
481 |
</reference>
|
482 |
</onestepcheckout_index_index>
|
483 |
|
484 |
+
<gomage_checkout_onepage_index>
|
485 |
+
<reference name="head">
|
486 |
+
<action method="addCss"><stylesheet>css/TIG/PostNL/deliveryoptions/default.css</stylesheet></action>
|
487 |
+
<action method="addCss"><stylesheet>css/TIG/PostNL/deliveryoptions/gomage_checkout.css</stylesheet></action>
|
488 |
+
<action method="addCss"><stylesheet>css/TIG/PostNL/mijnpakket.css</stylesheet></action>
|
489 |
+
<action method="addCss"><stylesheet>css/TIG/PostNL/rwd_osc.css</stylesheet></action>
|
490 |
+
<action method="addItem"><type>skin_css</type><name>css/TIG/PostNL/deliveryoptions/ie8.css</name><params/><if>lt IE 9</if></action>
|
491 |
+
<action method="addCss"><stylesheet>css/TIG/PostNL/postcodecheck.css</stylesheet></action>
|
492 |
+
<action method="addItem"><type>skin_js</type><file>js/TIG/PostNL/ajax.js</file></action>
|
493 |
+
<action method="addItem"><type>skin_js</type><file>js/TIG/PostNL/formPopulate.js</file></action>
|
494 |
+
<action method="addItem"><type>skin_js</type><file>js/TIG/PostNL/postcodecheck.js</file></action>
|
495 |
+
<block type="core/template" name="postnl_validation" template="TIG/PostNL/address_validation/validate.phtml"/>
|
496 |
+
<block type="postnl_deliveryoptions/js" name="postnl_deliveryoptions_js" template="TIG/PostNL/delivery_options/js.phtml"/>
|
497 |
+
<block type="postnl_deliveryoptions/theme" name="postnl_deliveryoptions_theme" template="TIG/PostNL/delivery_options/theme.phtml">
|
498 |
+
<action method="setisGoMage">
|
499 |
+
<isGoMage>true</isGoMage>
|
500 |
+
</action>
|
501 |
+
</block>
|
502 |
+
</reference>
|
503 |
+
|
504 |
+
<reference name="checkout.onepage.address">
|
505 |
+
<block type="postnl_addressvalidation/goMage_lightCheckout_billing" name="checkout.onepage.address.billing" as="billing" template="TIG/PostNL/address_validation/gomage_checkout/billing.phtml">
|
506 |
+
<action method="setCountryIdTemplate"><template>gomage/checkout/html/address/field/country.phtml</template></action>
|
507 |
+
<action method="setRegionTemplate"><template>gomage/checkout/html/address/field/region.phtml</template></action>
|
508 |
+
<action method="setStreetTemplate"><template>gomage/checkout/html/address/field/street.phtml</template></action>
|
509 |
+
<block type="core/template" name="postnl_billing_postcodecheck" template="TIG/PostNL/address_validation/gomage_checkout/postcode_check.phtml"/>
|
510 |
+
</block>
|
511 |
+
<block type="postnl_addressvalidation/goMage_lightCheckout_shipping" name="checkout.onepage.address.shipping" as="shipping" template="TIG/PostNL/address_validation/gomage_checkout/shipping.phtml">
|
512 |
+
<action method="setCountryIdTemplate"><template>gomage/checkout/html/address/field/country.phtml</template></action>
|
513 |
+
<action method="setRegionTemplate"><template>gomage/checkout/html/address/field/region.phtml</template></action>
|
514 |
+
<action method="setStreetTemplate"><template>gomage/checkout/html/address/field/street.phtml</template></action>
|
515 |
+
<block type="core/template" name="postnl_shipping_postcodecheck" template="TIG/PostNL/address_validation/gomage_checkout/postcode_check.phtml"/>
|
516 |
+
</block>
|
517 |
+
</reference>
|
518 |
+
|
519 |
+
<reference name="checkout.onepage.shipping_method.available">
|
520 |
+
<block type="postnl_deliveryoptions/checkout_goMage_lightCheckout_deliveryOptions" name="postnl.gomage.delivery.options" template="TIG/PostNL/delivery_options/gomage_checkout/deliveryoptions.phtml">
|
521 |
+
<block type="core/template" name="postnl.gomage.add.location" template="TIG/PostNL/delivery_options/addlocation.phtml"/>
|
522 |
+
<block type="postnl_deliveryoptions/checkout_addPhoneNumber" name="postnl.add.phonenumber" template="TIG/PostNL/delivery_options/addphonenumber.phtml"/>
|
523 |
+
</block>
|
524 |
+
</reference>
|
525 |
+
|
526 |
+
<reference name="before_body_end">
|
527 |
+
<block type="core/template" name="postnl_validation" template="TIG/PostNL/address_validation/validate.phtml"/>
|
528 |
+
<block type="postnl_mijnpakket/js" name="postnl_mijnpakket_js" template="TIG/PostNL/mijnpakket/gomage_checkout/js.phtml"/>
|
529 |
+
<block type="postnl_mijnpakket/loginButton" name="postnl_mijnpakket_login" template="TIG/PostNL/mijnpakket/gomage_checkout/login_button.phtml"/>
|
530 |
+
</reference>
|
531 |
+
</gomage_checkout_onepage_index>
|
532 |
+
|
533 |
<!-- DELIVERY OPTIONS -->
|
534 |
|
535 |
<onestepcheckout_ajax_save_billing>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
?>
|
@@ -34,7 +34,7 @@
|
|
34 |
* versions in the future. If you wish to customize this module for your
|
35 |
* needs please contact servicedesk@tig.nl for more information.
|
36 |
*
|
37 |
-
* @copyright Copyright (c)
|
38 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
39 |
*/
|
40 |
-->
|
34 |
* versions in the future. If you wish to customize this module for your
|
35 |
* needs please contact servicedesk@tig.nl for more information.
|
36 |
*
|
37 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
38 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
39 |
*/
|
40 |
-->
|
@@ -370,12 +370,12 @@ TIG_PostNL::The shop's base currency code must be set to EUR for PostNL to funct
|
|
370 |
TIG_PostNL::The extension has not been activated.,The extension has not been activated.
|
371 |
TIG_PostNL::Product code %s is not allowed for this shipment.,Product code %s is not allowed for this shipment.
|
372 |
TIG_PostNL::PostNL Checkout is not available due to the following reasons:,PostNL Checkout is not available due to the following reasons:
|
373 |
-
TIG_PostNL::Click here for more information from the
|
374 |
"TIG_PostNL::This action is not available for shipment #%s, because it was not shipped using PostNL.","This action is not available for shipment #%s, because it was not shipped using PostNL."
|
375 |
TIG_PostNL::Shipment #%s cannot be confirmed at this time.,Shipment #%s cannot be confirmed at this time.
|
376 |
"TIG_PostNL::Shipment #%s could not be confirmed, because for EU shipments you may only confirm a shipment after it's labels have been printed.","Shipment #%s could not be confirmed, because for EU shipments you may only confirm a shipment after it's labels have been printed."
|
377 |
TIG_PostNL::Show error details in the frontend,Show error details in the frontend
|
378 |
-
"TIG_PostNL::If set to 'yes', error details will be shown in the frontend when an error occurs. Error details include the error code as well as a link to the
|
379 |
TIG_PostNL::The PostNL extension is not compatible with your Magento version!,The PostNL extension is not compatible with your Magento version!
|
380 |
TIG_PostNL::Invalid Magento edition detected: %s,Invalid Magento edition detected: %s
|
381 |
TIG_PostNL::Invalid rate type requested: %s,Invalid rate type requested: %s
|
@@ -426,7 +426,7 @@ TIG_PostNL::Invalid confirmShipment response: %s,Invalid confirmShipment respons
|
|
426 |
"TIG_PostNL::The extension has been registered. Click <a href=""#"" onclick=""%s"">here</a> to be able to register the extension under a different name.","The extension has been registered. Click <a href=""#"" onclick=""%s"">here</a> to be able to register the extension under a different name."
|
427 |
"TIG_PostNL::Please fill in the fields below to finish the extension registration procedure. Click <a href=""#"" onclick=""%s"">here</a> to reset the registration procedure.","Please fill in the fields below to finish the extension registration procedure. Click <a href=""#"" onclick=""%s"">here</a> to reset the registration procedure."
|
428 |
TIG_PostNL::The quote's total weight is below the miniumum required to use PostNL Checkout.,The quote's total weight is below the miniumum required to use PostNL Checkout.
|
429 |
-
TIG_PostNL::
|
430 |
TIG_PostNL::Shipping event history,Shipping event history
|
431 |
TIG_PostNL::PostNL version %s,PostNL version %s
|
432 |
TIG_PostNL::Status Code,Status Code
|
@@ -453,8 +453,8 @@ TIG_PostNL::For questions about installing and configuring the extension please
|
|
453 |
TIG_PostNL::A list of documents regarding the extension.,A list of documents regarding the extension.
|
454 |
TIG_PostNL::View the installation manual.,View the installation manual.
|
455 |
TIG_PostNL::Installation manual,Installation manual
|
456 |
-
TIG_PostNL::View the
|
457 |
-
TIG_PostNL::
|
458 |
TIG_PostNL::PostNL Checkout has been disabled,PostNL Checkout has been disabled
|
459 |
TIG_PostNL::The quote is virtual.,The quote is virtual.
|
460 |
TIG_PostNL::The quote's grand total is below the minimum amount required.,The quote's grand total is below the minimum amount required.
|
@@ -574,7 +574,6 @@ TIG_PostNL::early delivery,early delivery
|
|
574 |
TIG_PostNL::available,available
|
575 |
TIG_PostNL::evening,evening
|
576 |
TIG_PostNL::Post Office,Post Office
|
577 |
-
TIG_PostNL::Package Dispenser,Package Dispenser
|
578 |
TIG_PostNL::Delivery Options,Delivery Options
|
579 |
TIG_PostNL::Delivery,Delivery
|
580 |
TIG_PostNL::or Pickup,or Pickup
|
@@ -746,7 +745,7 @@ TIG_PostNL::Create Parcelware export,Create Parcelware export
|
|
746 |
TIG_PostNL::You can use the rates you have entered for Magento's Table Rates shipping method or you can choose to enter table rates specific for the PostNL shipping method.,You can use the rates you have entered for Magento's Table Rates shipping method or you can choose to enter table rates specific for the PostNL shipping method.
|
747 |
TIG_PostNL::Rate Source,Rate Source
|
748 |
TIG_PostNL::Use Magento's Table Rates,Use Magento's Table Rates
|
749 |
-
TIG_PostNL::Use
|
750 |
TIG_PostNL::Export Rates,Export Rates
|
751 |
TIG_PostNL::Import Rates,Import Rates
|
752 |
TIG_PostNL::You can import and export rates on the website scope. You can change your current scope with the dropdown at the top left of this page.,You can import and export rates on the website scope. You can change your current scope with the dropdown at the top left of this page.
|
@@ -838,9 +837,9 @@ TIG_PostNL::Allow for non-PostNL orders,Allow for non-PostNL orders
|
|
838 |
TIG_PostNL::Sort order,Sort order
|
839 |
TIG_PostNL::Set this option to 'yes' to allow orders placed using a different shipping method than PostNL to use this payment method.,Set this option to 'yes' to allow orders placed using a different shipping method than PostNL to use this payment method.
|
840 |
TIG_PostNL::Send a copy of the track & trace email,Send a copy of the track & trace email
|
841 |
-
"TIG_PostNL::If enabled, you may enter
|
842 |
TIG_PostNL::Send track & trace email copy to,Send track & trace email copy to
|
843 |
-
TIG_PostNL::You can enter multiple email addresses
|
844 |
TIG_PostNL::Track & trace email copy method,Track & trace email copy method
|
845 |
PostNL configuration.,PostNL configuration.
|
846 |
TIG_PostNL::A required configuration value is missing: %s.,A required configuration value is missing: %s.
|
@@ -894,7 +893,7 @@ TIG_PostNL::Comment type,Comment type
|
|
894 |
"TIG_PostNL::You can choose to show a static, pre-configured message or you can show the last visible comment added to the shipment on the shipment detail page.","You can choose to show a static, pre-configured message or you can show the last visible comment added to the shipment on the shipment detail page."
|
895 |
TIG_PostNL::Comment text,Comment text
|
896 |
TIG_PostNL::Show shipping label,Show shipping label
|
897 |
-
"TIG_PostNL::If
|
898 |
TIG_PostNL::Pre-configured message,Pre-configured message
|
899 |
TIG_PostNL::Last shipment comment (as shown on the shipment detail page),Last shipment comment (as shown on the shipment detail page)
|
900 |
TIG_PostNL::None of the orders you have selected have any associated shipments. Please choose at least one order that has a shipment.,None of the orders you have selected have any associated shipments. Please choose at least one order that has a shipment.
|
@@ -973,7 +972,7 @@ TIG_PostNL::We recommend you disable logging and remove these log files.,We reco
|
|
973 |
"TIG_PostNL::Create shipments, print labels and confirm","Create shipments, print labels and confirm"
|
974 |
TIG_PostNL::The PostNL extension requires at least %.0fMB to function properly. Using the PostNL extension on servers with less memory than this may cause unexpected errors.,The PostNL extension requires at least %.0fMB to function properly. Using the PostNL extension on servers with less memory than this may cause unexpected errors.
|
975 |
TIG_PostNL::This may cause unexpected behaviour. You may use the PostNL extension on unsupported versions of Magento at your own risk.,This may cause unexpected behaviour. You may use the PostNL extension on unsupported versions of Magento at your own risk.
|
976 |
-
"TIG_PostNL::You can read the
|
977 |
TIG_PostNL::hour,hour
|
978 |
TIG_PostNL::minutes,minutes
|
979 |
TIG_PostNL::Delivery date:,Delivery date:
|
@@ -1132,7 +1131,7 @@ TIG_PostNL::Idev's OneStepCheckout,Idev's OneStepCheckout
|
|
1132 |
TIG_PostNL::Other,Other
|
1133 |
TIG_PostNL::Checkout extension,Checkout extension
|
1134 |
TIG_PostNL::Checkout settings,Checkout settings
|
1135 |
-
TIG_PostNL::PostNL delivery options are only available for Magento's One Page Checkout
|
1136 |
TIG_PostNL::Specify checkout extension,Specify checkout extension
|
1137 |
TIG_PostNL::Checkout Settings,Checkout Settings
|
1138 |
TIG_PostNL::As soon as possible,As soon as possible
|
@@ -1231,4 +1230,57 @@ TIG_PostNL::parcel dispenser,parcel dispenser
|
|
1231 |
TIG_PostNL::Select this checkbox to only show parcel dispensers.,Select this checkbox to only show parcel dispensers.
|
1232 |
TIG_PostNL::Choose date,Choose date
|
1233 |
"TIG_PostNL::You are currently using fewer than 2 address lines. In order to guarantee proper address processing, the PostNL extension requires at least 2 address lines. You can read more on how to configure split address lines <a href=""http://kb.tig.nl/topic/55961916"" target=""_blank"">here</a>.","You are currently using fewer than 2 address lines. In order to guarantee proper address processing, the PostNL extension requires at least 2 address lines. You can read more on how to configure split address lines <a href=""http://kb.tig.nl/topic/55961916"" target=""_blank"">here</a>."
|
1234 |
-
TIG_PostNL::Hide this warning.,Hide this warning.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
370 |
TIG_PostNL::The extension has not been activated.,The extension has not been activated.
|
371 |
TIG_PostNL::Product code %s is not allowed for this shipment.,Product code %s is not allowed for this shipment.
|
372 |
TIG_PostNL::PostNL Checkout is not available due to the following reasons:,PostNL Checkout is not available due to the following reasons:
|
373 |
+
TIG_PostNL::Click here for more information from the TIG knowledgebase.,Click here for more information from the TIG knowledgebase.
|
374 |
"TIG_PostNL::This action is not available for shipment #%s, because it was not shipped using PostNL.","This action is not available for shipment #%s, because it was not shipped using PostNL."
|
375 |
TIG_PostNL::Shipment #%s cannot be confirmed at this time.,Shipment #%s cannot be confirmed at this time.
|
376 |
"TIG_PostNL::Shipment #%s could not be confirmed, because for EU shipments you may only confirm a shipment after it's labels have been printed.","Shipment #%s could not be confirmed, because for EU shipments you may only confirm a shipment after it's labels have been printed."
|
377 |
TIG_PostNL::Show error details in the frontend,Show error details in the frontend
|
378 |
+
"TIG_PostNL::If set to 'yes', error details will be shown in the frontend when an error occurs. Error details include the error code as well as a link to the TIG knowledgebase article concerning the error. This is useful for debugging purposes, but should be disabled in a production environment.","If set to 'yes', error details will be shown in the frontend when an error occurs. Error details include the error code as well as a link to the TIG knowledgebase article concerning the error. This is useful for debugging purposes, but should be disabled in a production environment."
|
379 |
TIG_PostNL::The PostNL extension is not compatible with your Magento version!,The PostNL extension is not compatible with your Magento version!
|
380 |
TIG_PostNL::Invalid Magento edition detected: %s,Invalid Magento edition detected: %s
|
381 |
TIG_PostNL::Invalid rate type requested: %s,Invalid rate type requested: %s
|
426 |
"TIG_PostNL::The extension has been registered. Click <a href=""#"" onclick=""%s"">here</a> to be able to register the extension under a different name.","The extension has been registered. Click <a href=""#"" onclick=""%s"">here</a> to be able to register the extension under a different name."
|
427 |
"TIG_PostNL::Please fill in the fields below to finish the extension registration procedure. Click <a href=""#"" onclick=""%s"">here</a> to reset the registration procedure.","Please fill in the fields below to finish the extension registration procedure. Click <a href=""#"" onclick=""%s"">here</a> to reset the registration procedure."
|
428 |
TIG_PostNL::The quote's total weight is below the miniumum required to use PostNL Checkout.,The quote's total weight is below the miniumum required to use PostNL Checkout.
|
429 |
+
TIG_PostNL::Delivery options are not allowed for one or more items in the cart based on the configured stock options.,Delivery options are not allowed for one or more items in the cart based on the configured stock options.
|
430 |
TIG_PostNL::Shipping event history,Shipping event history
|
431 |
TIG_PostNL::PostNL version %s,PostNL version %s
|
432 |
TIG_PostNL::Status Code,Status Code
|
453 |
TIG_PostNL::A list of documents regarding the extension.,A list of documents regarding the extension.
|
454 |
TIG_PostNL::View the installation manual.,View the installation manual.
|
455 |
TIG_PostNL::Installation manual,Installation manual
|
456 |
+
TIG_PostNL::View the release notes of the extension.,View the release notes of the extension.
|
457 |
+
TIG_PostNL::Release notes,Release notes
|
458 |
TIG_PostNL::PostNL Checkout has been disabled,PostNL Checkout has been disabled
|
459 |
TIG_PostNL::The quote is virtual.,The quote is virtual.
|
460 |
TIG_PostNL::The quote's grand total is below the minimum amount required.,The quote's grand total is below the minimum amount required.
|
574 |
TIG_PostNL::available,available
|
575 |
TIG_PostNL::evening,evening
|
576 |
TIG_PostNL::Post Office,Post Office
|
|
|
577 |
TIG_PostNL::Delivery Options,Delivery Options
|
578 |
TIG_PostNL::Delivery,Delivery
|
579 |
TIG_PostNL::or Pickup,or Pickup
|
745 |
TIG_PostNL::You can use the rates you have entered for Magento's Table Rates shipping method or you can choose to enter table rates specific for the PostNL shipping method.,You can use the rates you have entered for Magento's Table Rates shipping method or you can choose to enter table rates specific for the PostNL shipping method.
|
746 |
TIG_PostNL::Rate Source,Rate Source
|
747 |
TIG_PostNL::Use Magento's Table Rates,Use Magento's Table Rates
|
748 |
+
TIG_PostNL::Use separate table rates for PostNL,Use separate table rates for PostNL
|
749 |
TIG_PostNL::Export Rates,Export Rates
|
750 |
TIG_PostNL::Import Rates,Import Rates
|
751 |
TIG_PostNL::You can import and export rates on the website scope. You can change your current scope with the dropdown at the top left of this page.,You can import and export rates on the website scope. You can change your current scope with the dropdown at the top left of this page.
|
837 |
TIG_PostNL::Sort order,Sort order
|
838 |
TIG_PostNL::Set this option to 'yes' to allow orders placed using a different shipping method than PostNL to use this payment method.,Set this option to 'yes' to allow orders placed using a different shipping method than PostNL to use this payment method.
|
839 |
TIG_PostNL::Send a copy of the track & trace email,Send a copy of the track & trace email
|
840 |
+
"TIG_PostNL::If enabled, you may enter separate email addresses to which the track & trace email will be sent in addition to the customer.","If enabled, you may enter separate email addresses to which the track & trace email will be sent in addition to the customer."
|
841 |
TIG_PostNL::Send track & trace email copy to,Send track & trace email copy to
|
842 |
+
TIG_PostNL::You can enter multiple email addresses separated by commas.,You can enter multiple email addresses separated by commas.
|
843 |
TIG_PostNL::Track & trace email copy method,Track & trace email copy method
|
844 |
PostNL configuration.,PostNL configuration.
|
845 |
TIG_PostNL::A required configuration value is missing: %s.,A required configuration value is missing: %s.
|
893 |
"TIG_PostNL::You can choose to show a static, pre-configured message or you can show the last visible comment added to the shipment on the shipment detail page.","You can choose to show a static, pre-configured message or you can show the last visible comment added to the shipment on the shipment detail page."
|
894 |
TIG_PostNL::Comment text,Comment text
|
895 |
TIG_PostNL::Show shipping label,Show shipping label
|
896 |
+
"TIG_PostNL::If you select 'on the same page' in some cases the shipping label may not fit. In this case, the shipping label will be printed on a separate page instead.","If you select 'on the same page' in some cases the shipping label may not fit. In this case, the shipping label will be printed on a separate page instead."
|
897 |
TIG_PostNL::Pre-configured message,Pre-configured message
|
898 |
TIG_PostNL::Last shipment comment (as shown on the shipment detail page),Last shipment comment (as shown on the shipment detail page)
|
899 |
TIG_PostNL::None of the orders you have selected have any associated shipments. Please choose at least one order that has a shipment.,None of the orders you have selected have any associated shipments. Please choose at least one order that has a shipment.
|
972 |
"TIG_PostNL::Create shipments, print labels and confirm","Create shipments, print labels and confirm"
|
973 |
TIG_PostNL::The PostNL extension requires at least %.0fMB to function properly. Using the PostNL extension on servers with less memory than this may cause unexpected errors.,The PostNL extension requires at least %.0fMB to function properly. Using the PostNL extension on servers with less memory than this may cause unexpected errors.
|
974 |
TIG_PostNL::This may cause unexpected behaviour. You may use the PostNL extension on unsupported versions of Magento at your own risk.,This may cause unexpected behaviour. You may use the PostNL extension on unsupported versions of Magento at your own risk.
|
975 |
+
"TIG_PostNL::You can read the release notes in the <a href=""%s"" target=""_blank"" title=""TIG knowledgebase"">TIG knowledgebase</a>.","You can read the release notes in the <a href=""%s"" target=""_blank"" title=""TIG knowledgebase"">TIG knowledgebase</a>."
|
976 |
TIG_PostNL::hour,hour
|
977 |
TIG_PostNL::minutes,minutes
|
978 |
TIG_PostNL::Delivery date:,Delivery date:
|
1131 |
TIG_PostNL::Other,Other
|
1132 |
TIG_PostNL::Checkout extension,Checkout extension
|
1133 |
TIG_PostNL::Checkout settings,Checkout settings
|
1134 |
+
"TIG_PostNL::PostNL delivery options are only available for Magento's One Page Checkout, Idev's OneStepCheckout and the GoMage LightCheckout extensions.","PostNL delivery options are only available for Magento's One Page Checkout, Idev's OneStepCheckout and the GoMage LightCheckout extensions."
|
1135 |
TIG_PostNL::Specify checkout extension,Specify checkout extension
|
1136 |
TIG_PostNL::Checkout Settings,Checkout Settings
|
1137 |
TIG_PostNL::As soon as possible,As soon as possible
|
1230 |
TIG_PostNL::Select this checkbox to only show parcel dispensers.,Select this checkbox to only show parcel dispensers.
|
1231 |
TIG_PostNL::Choose date,Choose date
|
1232 |
"TIG_PostNL::You are currently using fewer than 2 address lines. In order to guarantee proper address processing, the PostNL extension requires at least 2 address lines. You can read more on how to configure split address lines <a href=""http://kb.tig.nl/topic/55961916"" target=""_blank"">here</a>.","You are currently using fewer than 2 address lines. In order to guarantee proper address processing, the PostNL extension requires at least 2 address lines. You can read more on how to configure split address lines <a href=""http://kb.tig.nl/topic/55961916"" target=""_blank"">here</a>."
|
1233 |
+
TIG_PostNL::Hide this warning.,Hide this warning.
|
1234 |
+
TIG_PostNL::You are currently using the Postcode.nl extension. This extension conflicts with the PostNL extension's built-in postcode validator. We recommend you disable the Postcode.nl extension if you wish to use the PostNL extensions' postcode validator.,You are currently using the Postcode.nl extension. This extension conflicts with the PostNL extension's built-in postcode validator. We recommend you disable the Postcode.nl extension if you wish to use the PostNL extensions' postcode validator.
|
1235 |
+
"TIG_PostNL::Please use only letters (a-z A-Z), numbers (0-9) or one of the following characters: [( ) , . _ - #] in this field.","Please use only letters (a-z A-Z), numbers (0-9) or one of the following characters: [( ) , . _ - #] in this field."
|
1236 |
+
TIG_PostNL::One or more items in the cart are backordered or out of stock.,One or more items in the cart are backordered or out of stock.
|
1237 |
+
TIG_PostNL::Stock options,Stock options
|
1238 |
+
TIG_PostNL::Select for which products PostNL delivery options should be available.,Select for which products PostNL delivery options should be available.
|
1239 |
+
TIG_PostNL::In stock products only,In stock products only
|
1240 |
+
TIG_PostNL::In stock and backordered products,In stock and backordered products
|
1241 |
+
"TIG_PostNL::In stock, backordered and out of stock products","In stock, backordered and out of stock products"
|
1242 |
+
TIG_PostNL::Product option '%s' (%s) is not allowed for this shipment.,Product option '%s' (%s) is not allowed for this shipment.
|
1243 |
+
TIG_PostNL::You have chosen to pick up your address at the following post office location:,You have chosen to pick up your address at the following post office location:
|
1244 |
+
TIG_PostNL::You can select a pick up location later on. The address you select here will be used to determine which pick up locations are nearby.,You can select a pick up location later on. The address you select here will be used to determine which pick up locations are nearby.
|
1245 |
+
TIG_PostNL::The PostNL extension has been successfully uninstalled.,The PostNL extension has been successfully uninstalled.
|
1246 |
+
TIG_PostNL::PostNL uninstall failed on removing product attribute: %s,PostNL uninstall failed on removing product attribute: %s
|
1247 |
+
TIG_PostNL::PostNL uninstall found but could not write to XML file: %s,PostNL uninstall found but could not write to XML file: %s
|
1248 |
+
TIG_PostNL::PostNL uninstall could not find or XML file: %s,PostNL uninstall could not find or XML file: %s
|
1249 |
+
TIG_PostNL::GoMage LightCheckout,GoMage LightCheckout
|
1250 |
+
TIG_PostNL::Warning: this action cannot be undone!,Warning: this action cannot be undone!
|
1251 |
+
TIG_PostNL::The following changes will be made:,The following changes will be made:
|
1252 |
+
TIG_PostNL::The extension will be disabled in the app/etc/modules/TIG_PostNL.xml file,The extension will be disabled in the app/etc/modules/TIG_PostNL.xml file
|
1253 |
+
TIG_PostNL::The PostNL product attributes will be removed from the webshop,The PostNL product attributes will be removed from the webshop
|
1254 |
+
TIG_PostNL::The following will be preserved:,The following will be preserved:
|
1255 |
+
TIG_PostNL::All data pertaining to existing orders and shipments,All data pertaining to existing orders and shipments
|
1256 |
+
TIG_PostNL::All PostNL configuration settings,All PostNL configuration settings
|
1257 |
+
TIG_PostNL::All PostNL code files.,All PostNL code files.
|
1258 |
+
"TIG_PostNL::For questions regarding this process and how to re-install the PostNL extension, please contact the TIG servicedesk.","For questions regarding this process and how to re-install the PostNL extension, please contact the TIG servicedesk."
|
1259 |
+
TIG_PostNL::Type `uninstall` in the box to proceed,Type `uninstall` in the box to proceed
|
1260 |
+
TIG_PostNL::Uninstall,Uninstall
|
1261 |
+
TIG_PostNL::Warning: this action cannot be undone!,Warning: this action cannot be undone!
|
1262 |
+
TIG_PostNL::You did not enter the correct verification text. Try again.,You did not enter the correct verification text. Try again.
|
1263 |
+
"TIG_PostNL::If you are using the Gomage Lightcheckout extension in combination with the PostNL Postcode check;<br/>Please know that the street-settings from the Gomage Lightcheckout extension will be ignored.<br/> Read more about the settings <a href=""http://kb.tig.nl/topic/93469278"" target=""_blank"">here</a>.","If you are using the Gomage Lightcheckout extension in combination with the PostNL Postcode check;<br/>Please know that the street-settings from the Gomage Lightcheckout extension will be ignored.<br/> Read more about the settings <a href=""http://kb.tig.nl/topic/93469278"" target=""_blank"">here</a>."
|
1264 |
+
TIG_PostNL::You have enabled PostNL delivery options and GoMage LightCheckout's Delivery Date functionality for the same shipping methods. Unfortunately these two functionalities conflict. Please disable one of these features.,You have enabled PostNL delivery options and GoMage LightCheckout's Delivery Date functionality for the same shipping methods. Unfortunately these two functionalities conflict. Please disable one of these features.
|
1265 |
+
"TIG_PostNL::[POSTNL-0222] Warning: possible PostNL and GoMage LightCheckout conflict. <a href=""http://kb.tig.nl/topic/"" target=""blank"">Click here for more information from the TIG knowledgebase.</a>","[POSTNL-0222] Warning: possible PostNL and GoMage LightCheckout conflict. <a href=""http://kb.tig.nl/topic/"" target=""blank"">Click here for more information from the TIG knowledgebase.</a>"
|
1266 |
+
"TIG_PostNL::Are you sure you wish to disable the PostNL extension?\n\nWarning: this action cannot be undone!\n\nThe following changes will be made:\n- the extension will be disabled in the app/etc/modules/TIG_PostNL.xml file\n- the PostNL product attributes will be removed from the webshop\n\nThe following will be preserved: \n- All data pertaining to existing orders and shipments\n- All PostNL configuration settings\n- All PostNL code files.\n\nFor questions regarding this process and how to re-install the PostNL extension, please contact the TIG servicedesk.","Are you sure you wish to disable the PostNL extension?\n\nWarning: this action cannot be undone!\n\nThe following changes will be made:\n- the extension will be disabled in the app/etc/modules/TIG_PostNL.xml file\n- the PostNL product attributes will be removed from the webshop\n\nThe following will be preserved: \n- All data pertaining to existing orders and shipments\n- All PostNL configuration settings\n- All PostNL code files.\n\nFor questions regarding this process and how to re-install the PostNL extension, please contact the TIG servicedesk."
|
1267 |
+
TIG_PostNL::The PostNL extension has been successfully uninstalled.,The PostNL extension has been successfully uninstalled.
|
1268 |
+
TIG_PostNL::PostNL uninstall failed on removing product attribute: %s,PostNL uninstall failed on removing product attribute: %s
|
1269 |
+
TIG_PostNL::PostNL uninstall found but could not write to XML file: %s,PostNL uninstall found but could not write to XML file: %s
|
1270 |
+
TIG_PostNL::PostNL uninstall could not find or XML file: %s,PostNL uninstall could not find or XML file: %s
|
1271 |
+
"TIG_PostNL::An error occurred while saving this step of the configuration wizard. Please use the regular ""Save Config"" button instead.","An error occurred while saving this step of the configuration wizard. Please use the regular ""Save Config"" button instead."
|
1272 |
+
TIG_PostNL::Permanently disable the PostNL extension,Permanently disable the PostNL extension
|
1273 |
+
TIG_PostNL::Uninstall PostNL Extension,Uninstall PostNL Extension
|
1274 |
+
TIG_PostNL::Uninstall the PostNL extension,Uninstall the PostNL extension
|
1275 |
+
"TIG_PostNL::Click <a href=""https://kb.tig.nl/topic/94842766"" target=""_blank"">here</a> for more information about the uninstall process.","Click <a href=""https://kb.tig.nl/topic/94842766"" target=""_blank"">here</a> for more information about the uninstall process."
|
1276 |
+
TIG_PostNL::No PostNL Shipment found for shipment ID #%s.,No PostNL Shipment found for shipment ID #%s.
|
1277 |
+
TIG_PostNL::Only A4 or A6 are valid values for the 'labelSize' parameter.,Only A4 or A6 are valid values for the 'labelSize' parameter.
|
1278 |
+
TIG_PostNL::The 'labelStartPosition' parameter must contain an integer value between 1 and 4.,The 'labelStartPosition' parameter must contain an integer value between 1 and 4.
|
1279 |
+
TIG_PostNL::The 'orderIds' parameter must contain a non-empty array of order IDs.,The 'orderIds' parameter must contain a non-empty array of order IDs.
|
1280 |
+
TIG_PostNL::The 'shipmentIds' parameter must contain a non-empty array of shipment IDs.,The 'shipmentIds' parameter must contain a non-empty array of shipment IDs.
|
1281 |
+
TIG_PostNL::Could not create or find a shipment for order #%s.,Could not create or find a shipment for order #%s.
|
1282 |
+
TIG_PostNL::GoMage's Checkout version,GoMage's Checkout version
|
1283 |
+
TIG_PostNL::Print the shipping label on the same page as the packing slip,Print the shipping label on the same page as the packing slip
|
1284 |
+
TIG_PostNL::Print the shipping label on a separate page,Print the shipping label on a separate page
|
1285 |
+
TIG_PostNL::Don't print the shipping label,Don't print the shipping label
|
1286 |
+
TIG_PostNL::Loading available delivery options for your shipping address...,Loading available delivery options for your shipping address...
|
@@ -370,12 +370,12 @@ TIG_PostNL::The shop's base currency code must be set to EUR for PostNL to funct
|
|
370 |
TIG_PostNL::The extension has not been activated.,De extensie is nog niet geactiveerd.
|
371 |
TIG_PostNL::Product code %s is not allowed for this shipment.,Product code %s is niet toegestaan voor deze zending.
|
372 |
TIG_PostNL::PostNL Checkout is not available due to the following reasons:,PostNL Checkout is niet beschikbaar om de volgende redenen:
|
373 |
-
TIG_PostNL::Click here for more information from the
|
374 |
"TIG_PostNL::This action is not available for shipment #%s, because it was not shipped using PostNL.","Deze actie is niet beschikbaar voor zending #%s, omdat deze niet verzonden is met PostNL."
|
375 |
TIG_PostNL::Shipment #%s cannot be confirmed at this time.,Zending #%s kan momenteel niet voorgemeld worden.
|
376 |
"TIG_PostNL::Shipment #%s could not be confirmed, because for EU shipments you may only confirm a shipment after it's labels have been printed.","Zending #%s kan niet voorgemeld worden, omdat Europese zendingen pas voorgemeld mogen worden nadat de labels geprint zijn."
|
377 |
TIG_PostNL::Show error details in the frontend,Toon error details in de frontend
|
378 |
-
"TIG_PostNL::If set to 'yes', error details will be shown in the frontend when an error occurs. Error details include the error code as well as a link to the
|
379 |
TIG_PostNL::The PostNL extension is not compatible with your Magento version!,De PostNL extensie is niet compatibel met uw Magento versie!
|
380 |
TIG_PostNL::Invalid Magento edition detected: %s,Ongeldige Magento editie gedetecteerd: %s
|
381 |
TIG_PostNL::Invalid rate type requested: %s,Ongeldige tarief optie gevraagd: %s
|
@@ -426,7 +426,7 @@ TIG_PostNL::Invalid confirmShipment response: %s,Ongeldige voormeldbevestigings
|
|
426 |
"TIG_PostNL::The extension has been registered. Click <a href=""#"" onclick=""%s"">here</a> to be able to register the extension under a different name.","De extensie is geregistreerd. Klik <a href=""#"" onclick=""%s"">hier</a> om de extensie opnieuw te registreren onder een andere naam."
|
427 |
"TIG_PostNL::Please fill in the fields below to finish the extension registration procedure. Click <a href=""#"" onclick=""%s"">here</a> to reset the registration procedure.","Vul s.v.p. de onderstaande velden in om de registratieprocedure af te ronden. Klik <a href=""#"" onclick=""%s"">hier</a> om de registratieprocedure te resetten."
|
428 |
TIG_PostNL::The quote's total weight is below the miniumum required to use PostNL Checkout.,Het totale gewicht van de bestelling is beneden het minimum om gebruik te kunnen maken van PostNL Checkout.
|
429 |
-
TIG_PostNL::
|
430 |
TIG_PostNL::Shipping event history,Zending statusgeschiedenis
|
431 |
TIG_PostNL::PostNL version %s,PostNL versie %s
|
432 |
TIG_PostNL::Status Code,Status Code
|
@@ -453,8 +453,8 @@ TIG_PostNL::For questions about installing and configuring the extension please
|
|
453 |
TIG_PostNL::A list of documents regarding the extension.,Een lijst van documenten met betrekking tot de extensie.
|
454 |
TIG_PostNL::View the installation manual.,Bekijk de installatiehandleiding.
|
455 |
TIG_PostNL::Installation manual,Installatiehandleiding
|
456 |
-
TIG_PostNL::View the
|
457 |
-
TIG_PostNL::
|
458 |
TIG_PostNL::PostNL Checkout has been disabled,PostNL Checkout is uitgeschakeld
|
459 |
TIG_PostNL::The quote is virtual.,De winkelwagen bevat enkel virtuele producten
|
460 |
TIG_PostNL::The quote's grand total is below the minimum amount required.,Het totaalbedrag van de winkelwagen is beneden het minimum.
|
@@ -576,7 +576,6 @@ TIG_PostNL::early delivery,extra vroeg
|
|
576 |
TIG_PostNL::available,beschikbaar
|
577 |
TIG_PostNL::evening,avond
|
578 |
TIG_PostNL::Post Office,Postkantoor
|
579 |
-
TIG_PostNL::Package Dispenser,Pakketautomaat
|
580 |
TIG_PostNL::Delivery Options,Bezorgopties
|
581 |
TIG_PostNL::Delivery,Bezorgen
|
582 |
TIG_PostNL::or Pickup,of Ophalen
|
@@ -612,7 +611,7 @@ TIG_PostNL::After this number of seconds a customer will be prompted to fill in
|
|
612 |
TIG_PostNL::Show PostNL Checkout exclusively to MijnPakket users,Toon PostNL Checkout exclusief aan Mijnpakket gebruikers
|
613 |
TIG_PostNL::Activate the PostNL Checkout only for customers with a MijnPakket account. Please note: The Delivery Options must be activated.,Activeer om de PostNL Checkout enkel te tonen aan uw klanten die beschikken over een MijnPakket account. Let op: de bezorgopties moeten geactiveerd zijn.
|
614 |
TIG_PostNL::Delivery Options,Bezorgopties
|
615 |
-
"TIG_PostNL::Your customers choose when, where and how they would like to receive their orders with PostNL's delivery options. Let your customers pick a day and the extension will show the estimated time of delivery. On Tuesdays and Wednesdays PostNL also delivers in the evening. Maybe your customers prefer to pick up their orders from one of the 2000 Post offices? No problem, a growing number of locations even have the orders ready for pickup early in the morning.","Met de PostNL bezorgopties kunnen uw klanten kiezen waar, wanneer en hoe zij hun bestelling willen ontvangen. Zo kunnen uw klanten de dag van ontvangst kiezen en wordt er direct aangegeven op welk moment ze het pakket kunnen verwachten. Op dinsdag en donderdag bezorgt PostNL zelfs ‘s avonds. Halen uw klanten het pakket liever af op één van de 2000 PostNL pakketpunten? Dit kan vanaf
|
616 |
TIG_PostNL::Enable PostNL delivery options,Activeer PostNL bezorgopties
|
617 |
TIG_PostNL::You can disable PostNL delivery options in case the order has products that are not in stock or if the order weighs less than 2 kg.,U kunt PostNL bezorgopties deactiveren indien de bestelling een product bevat dat niet op voorraad is of indien de gehele bestelling minder weegt dan 2 kg.
|
618 |
TIG_PostNL::Activate the PostNL Checkout for orders containing out of stock products,Activeer PostNL bezorgopties voor bestellingen van minder dan 2 kg
|
@@ -639,7 +638,7 @@ TIG_PostNL::Additional costs for evening timeframes in the store's base currency
|
|
639 |
TIG_PostNL::Enable post office locations,Activeer postkantoor locaties
|
640 |
TIG_PostNL::Whether or not customers may choose to have their order delivered to a nearby post office.,Deze instelling bepaalt of klanten ervoor kunnen kiezen om hun bestelling te laten bezorgen op een postkantoor locatie.
|
641 |
TIG_PostNL::Enable early delivery locations,Activeer extra vroeg postkantoor locaties
|
642 |
-
TIG_PostNL::Some locations allow package pick-ups early in the morning. The extension will automatically check if this option is available for locations in the area submitted by your customer. You cannot use Premium Sorting or Sunday Sorting for these shipments. ,Op sommige pakketpunten kunnen uw klanten een pakket na 8:30 ophalen in plaats van na
|
643 |
TIG_PostNL::Early delivery fee,Extra vroege bezorging toeslag
|
644 |
TIG_PostNL::Additional costs for early delivery locations in the store's base currency. This fee will be added to the shipping costs. This value must be between 0.00 and 2.00 EUR incl. VAT. Leave this field empty to charge no extra fee for early delivery locations.,"Additionele kosten voor het gebruik van extra vroege bezorging in de basis valuta van de storeview. Deze kosten zullen opgeteld worden bij de verzendkosten. Deze kosten moeten tussen de 0,00 en 2,00 EUR liggen incl. BTW. Laat dit veld leeg om geen extra kosten in rekening te brengen voor het gebruik van extra vroege bezorging."
|
645 |
TIG_PostNL::Enable package dispenser locations,Activeer pakketautomaat locaties
|
@@ -748,7 +747,7 @@ TIG_PostNL::Create Parcelware export,Parcelware export aanmaken
|
|
748 |
TIG_PostNL::You can use the rates you have entered for Magento's Table Rates shipping method or you can choose to enter table rates specific for the PostNL shipping method.,U kunt gebruik maken van de tarieven die u heeft ingevuld voor Magento's Tabel Tarieven betaalmethode of u kunt aparte tarieven invullen specifiek voor de PostNL verzendmethode.
|
749 |
TIG_PostNL::Rate Source,Tarieven bron
|
750 |
TIG_PostNL::Use Magento's Table Rates,Gebruik Magento's Tabel Tarieven
|
751 |
-
TIG_PostNL::Use
|
752 |
TIG_PostNL::Export Rates,Exporteer Tarieven
|
753 |
TIG_PostNL::Import Rates,Importeer Tarieven
|
754 |
TIG_PostNL::You can import and export rates on the website scope. You can change your current scope with the dropdown at the top left of this page.,U kunt tarieven importeren en exporteren op website niveau. U kunt het huidige niveau van de configuratie aanpassen met het selectieveld links bovenaan deze pagina.
|
@@ -840,9 +839,9 @@ TIG_PostNL::Allow for non-PostNL orders,Toestaan voor niet-PostNL bestellingen
|
|
840 |
TIG_PostNL::Sort order,Sorteervolgorde
|
841 |
TIG_PostNL::Set this option to 'yes' to allow orders placed using a different shipping method than PostNL to use this payment method.,Zet deze optie op 'ja' om deze betaalmethode ook aan te bieden voor bestellingen die geen gebruik maken van de PostNL verzendmethode.
|
842 |
TIG_PostNL::Send a copy of the track & trace email,Verstuur een kopie van de Track & Trace e-mail
|
843 |
-
"TIG_PostNL::If enabled, you may enter
|
844 |
TIG_PostNL::Send track & trace email copy to,Verstuur Track & Trace e-mail kopie naar
|
845 |
-
TIG_PostNL::You can enter multiple email addresses
|
846 |
TIG_PostNL::Track & trace email copy method,Track & Trace e-mail kopie method
|
847 |
PostNL configuration.,PostNL configuratie.
|
848 |
TIG_PostNL::A required configuration value is missing: %s.,Een verplichte configuratie waarde mist: %s.
|
@@ -896,7 +895,7 @@ TIG_PostNL::Comment type,Opmerking type
|
|
896 |
"TIG_PostNL::You can choose to show a static, pre-configured message or you can show the last visible comment added to the shipment on the shipment detail page.","U kunt kiezen om een statisch, voor geconfigureerd bericht te tonen of om de laatste toegevoegde, zichtbare opmerking van de zending te tonen."
|
897 |
TIG_PostNL::Comment text,Opmerking tekst
|
898 |
TIG_PostNL::Show shipping label,Toon verzendlabel
|
899 |
-
"TIG_PostNL::If
|
900 |
TIG_PostNL::Pre-configured message,Voorgeconfigureerd bericht
|
901 |
TIG_PostNL::Last shipment comment (as shown on the shipment detail page),Laatste zending opmerking (zoals getoond op de zendingdetail pagina)
|
902 |
TIG_PostNL::None of the orders you have selected have any associated shipments. Please choose at least one order that has a shipment.,"Geen van de bestellingen die u heeft geselecteerd, bevat een zending. Kies s.v.p. tenminste één bestelling die een zending bevat."
|
@@ -927,7 +926,7 @@ TIG_PostNL::Send date,Verzenddatum
|
|
927 |
TIG_PostNL::Optional order grid columns,Optionele kolommen voor besteloverzicht
|
928 |
TIG_PostNL::Selecting too many columns may cause the order grid to no longer fit on your monitor.,"Indien u teveel kolommen selecteert, kan dit er toe leiden dat het overzicht niet langer op uw beeldscherm past."
|
929 |
TIG_PostNL::Delivery option,Gekozen bezorgoptie
|
930 |
-
TIG_PostNL::Requested delivery date,
|
931 |
TIG_PostNL::Shipping phase,Verzendfase
|
932 |
TIG_PostNL::No order found for PostNL shipment #%d.,Geen bestelling gevonden voor PostNL zending #%d.
|
933 |
TIG_PostNL::Select a default option for the order grid mass action.,Selecteer een standaard waarde voor de massa actie voor het bestellingsoverzicht.
|
@@ -969,14 +968,14 @@ TIG_PostNL::It appears the PostNL username and/or password you have entered is i
|
|
969 |
TIG_PostNL::Your PostNL account is unfortunately not allowed to perform this action. Please contact PostNL.,Uw PostNL account heeft helaas niet de benodigde rechten om deze actie uit te voeren. Neem s.v.p. contact op met PostNL.
|
970 |
"TIG_PostNL::Unfortunately you have exceeded the maximum amount of PostNL requests you may send each minute. Please wait a few minutes and try again. If this problem persists, please contact PostNL.","U heeft helaas het maximale aantal PostNL acties per minuut overschreden. Wacht s.v.p. enkele minuten en probeer het dan opnieuw. Indien dit probleem zich blijft voordoen, neem dan contact op met PostNL."
|
971 |
TIG_PostNL::This PostNL service is currently disabled. Please contact PostNL.,Deze PostNL dienst is momenteel uitgeschakeld. Neem s.v.p. contact op met PostNL.
|
972 |
-
"TIG_PostNL::There was a problem connecting to PostNL's services. This may be due to a timeout. Please wait a few minutes and try again. If this problem persists, please contact PostNL.","Er is een probleem opgetreden met de
|
973 |
TIG_PostNL::Your PostNL customer code appears to be incorrect. Please make sure you have entered the correct code.,Uw PostNL klantcode is niet correct. Controleer s.v.p. of u uw klantcode correct heeft ingevuld.
|
974 |
TIG_PostNL::The total size of all PostNL logs exceeds %.0fMB!,De totale bestandsgrootte van alle PostNL log bestanden is meer dan %.0fMB!
|
975 |
TIG_PostNL::We recommend you disable logging and remove these log files.,Wij raden aan dat u loggen uitzet en deze log bestanden verwijdert.
|
976 |
"TIG_PostNL::Create shipments, print labels and confirm","Maak zendingen aan, print verzendlabels en meld voor"
|
977 |
TIG_PostNL::The PostNL extension requires at least %.0fMB to function properly. Using the PostNL extension on servers with less memory than this may cause unexpected errors., De PostNL extensie vereist minimaal %.0fMB geheugen om correct te functioneren. Gebruik maken van de PostNL extensie op servers met minder geheugen kan leiden tot onverwachte foutmeldingen.
|
978 |
TIG_PostNL::This may cause unexpected behaviour. You may use the PostNL extension on unsupported versions of Magento at your own risk.,Dit kan onverwachte problemen veroorzaken. Het gebruik van de PostNL extensie op niet ondersteunde versies van Magento is op eigen risico.
|
979 |
-
"TIG_PostNL::You can read the
|
980 |
TIG_PostNL::hour,uur
|
981 |
TIG_PostNL::minutes,minuten
|
982 |
TIG_PostNL::Delivery date:,Bezorgdatum:
|
@@ -1135,7 +1134,7 @@ TIG_PostNL::Idev's OneStepCheckout,Idev's OneStepCheckout
|
|
1135 |
TIG_PostNL::Other,Anders
|
1136 |
TIG_PostNL::Checkout extension,Checkout extensie
|
1137 |
TIG_PostNL::Checkout settings,Checkout instellingen
|
1138 |
-
TIG_PostNL::PostNL delivery options are only available for Magento's One Page Checkout
|
1139 |
TIG_PostNL::Specify checkout extension,Specificeer checkout extensie
|
1140 |
TIG_PostNL::Checkout Settings,Checkout instellingen
|
1141 |
TIG_PostNL::As soon as possible,Eerst volgende mogelijkheid
|
@@ -1234,4 +1233,56 @@ TIG_PostNL::parcel dispenser,pakketautomaat
|
|
1234 |
TIG_PostNL::Select this checkbox to only show parcel dispensers.,Activeer deze filter om enkel pakketautomaten te tonen.
|
1235 |
TIG_PostNL::Choose date,Datum kiezen
|
1236 |
"TIG_PostNL::You are currently using fewer than 2 address lines. In order to guarantee proper address processing, the PostNL extension requires at least 2 address lines. You can read more on how to configure split address lines <a href=""http://kb.tig.nl/topic/55961916"" target=""_blank"">here</a>.","U gebruikt momenteel minder dan 2 adresregels op uw checkout pagina. De PostNL extensie heeft minimaal 2 adresregels nodig om correcte adresverwerking te garanderen. U kunt <a href=""http://kb.tig.nl/topic/55961916"" target=""_blank"">hier</a> meer lezen over het correct configureren van gesplitste adresregels."
|
1237 |
-
TIG_PostNL::Hide this warning.,Verberg deze waarschuwing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
370 |
TIG_PostNL::The extension has not been activated.,De extensie is nog niet geactiveerd.
|
371 |
TIG_PostNL::Product code %s is not allowed for this shipment.,Product code %s is niet toegestaan voor deze zending.
|
372 |
TIG_PostNL::PostNL Checkout is not available due to the following reasons:,PostNL Checkout is niet beschikbaar om de volgende redenen:
|
373 |
+
TIG_PostNL::Click here for more information from the TIG knowledgebase.,Klik hier voor meer informatie in de TIG knowledgebase.
|
374 |
"TIG_PostNL::This action is not available for shipment #%s, because it was not shipped using PostNL.","Deze actie is niet beschikbaar voor zending #%s, omdat deze niet verzonden is met PostNL."
|
375 |
TIG_PostNL::Shipment #%s cannot be confirmed at this time.,Zending #%s kan momenteel niet voorgemeld worden.
|
376 |
"TIG_PostNL::Shipment #%s could not be confirmed, because for EU shipments you may only confirm a shipment after it's labels have been printed.","Zending #%s kan niet voorgemeld worden, omdat Europese zendingen pas voorgemeld mogen worden nadat de labels geprint zijn."
|
377 |
TIG_PostNL::Show error details in the frontend,Toon error details in de frontend
|
378 |
+
"TIG_PostNL::If set to 'yes', error details will be shown in the frontend when an error occurs. Error details include the error code as well as a link to the TIG knowledgebase article concerning the error. This is useful for debugging purposes, but should be disabled in a production environment.","Indien deze instelling op 'ja' staat, zullen ook in de frontend bij de meeste errors een foutcode en link naar de TIG knowledgebase getoond worden. Dit is nuttig wanneer u de extensie moet debuggen, echter zou nooit aan mogen staan in een productie omgeving."
|
379 |
TIG_PostNL::The PostNL extension is not compatible with your Magento version!,De PostNL extensie is niet compatibel met uw Magento versie!
|
380 |
TIG_PostNL::Invalid Magento edition detected: %s,Ongeldige Magento editie gedetecteerd: %s
|
381 |
TIG_PostNL::Invalid rate type requested: %s,Ongeldige tarief optie gevraagd: %s
|
426 |
"TIG_PostNL::The extension has been registered. Click <a href=""#"" onclick=""%s"">here</a> to be able to register the extension under a different name.","De extensie is geregistreerd. Klik <a href=""#"" onclick=""%s"">hier</a> om de extensie opnieuw te registreren onder een andere naam."
|
427 |
"TIG_PostNL::Please fill in the fields below to finish the extension registration procedure. Click <a href=""#"" onclick=""%s"">here</a> to reset the registration procedure.","Vul s.v.p. de onderstaande velden in om de registratieprocedure af te ronden. Klik <a href=""#"" onclick=""%s"">hier</a> om de registratieprocedure te resetten."
|
428 |
TIG_PostNL::The quote's total weight is below the miniumum required to use PostNL Checkout.,Het totale gewicht van de bestelling is beneden het minimum om gebruik te kunnen maken van PostNL Checkout.
|
429 |
+
TIG_PostNL::Delivery options are not allowed for one or more items in the cart based on the configured stock options.,Bezorgopties zijn niet toegestaan voor één of meerdere producten in de winkelwagen wegens de geconfigureerde voorraad opties.
|
430 |
TIG_PostNL::Shipping event history,Zending statusgeschiedenis
|
431 |
TIG_PostNL::PostNL version %s,PostNL versie %s
|
432 |
TIG_PostNL::Status Code,Status Code
|
453 |
TIG_PostNL::A list of documents regarding the extension.,Een lijst van documenten met betrekking tot de extensie.
|
454 |
TIG_PostNL::View the installation manual.,Bekijk de installatiehandleiding.
|
455 |
TIG_PostNL::Installation manual,Installatiehandleiding
|
456 |
+
TIG_PostNL::View the release notes of the extension.,Bekijk de release notes van de extensie.
|
457 |
+
TIG_PostNL::Release notes,Release notes
|
458 |
TIG_PostNL::PostNL Checkout has been disabled,PostNL Checkout is uitgeschakeld
|
459 |
TIG_PostNL::The quote is virtual.,De winkelwagen bevat enkel virtuele producten
|
460 |
TIG_PostNL::The quote's grand total is below the minimum amount required.,Het totaalbedrag van de winkelwagen is beneden het minimum.
|
576 |
TIG_PostNL::available,beschikbaar
|
577 |
TIG_PostNL::evening,avond
|
578 |
TIG_PostNL::Post Office,Postkantoor
|
|
|
579 |
TIG_PostNL::Delivery Options,Bezorgopties
|
580 |
TIG_PostNL::Delivery,Bezorgen
|
581 |
TIG_PostNL::or Pickup,of Ophalen
|
611 |
TIG_PostNL::Show PostNL Checkout exclusively to MijnPakket users,Toon PostNL Checkout exclusief aan Mijnpakket gebruikers
|
612 |
TIG_PostNL::Activate the PostNL Checkout only for customers with a MijnPakket account. Please note: The Delivery Options must be activated.,Activeer om de PostNL Checkout enkel te tonen aan uw klanten die beschikken over een MijnPakket account. Let op: de bezorgopties moeten geactiveerd zijn.
|
613 |
TIG_PostNL::Delivery Options,Bezorgopties
|
614 |
+
"TIG_PostNL::Your customers choose when, where and how they would like to receive their orders with PostNL's delivery options. Let your customers pick a day and the extension will show the estimated time of delivery. On Tuesdays and Wednesdays PostNL also delivers in the evening. Maybe your customers prefer to pick up their orders from one of the 2000 Post offices? No problem, a growing number of locations even have the orders ready for pickup early in the morning.","Met de PostNL bezorgopties kunnen uw klanten kiezen waar, wanneer en hoe zij hun bestelling willen ontvangen. Zo kunnen uw klanten de dag van ontvangst kiezen en wordt er direct aangegeven op welk moment ze het pakket kunnen verwachten. Op dinsdag en donderdag bezorgt PostNL zelfs ‘s avonds. Halen uw klanten het pakket liever af op één van de 2000 PostNL pakketpunten? Dit kan vanaf 15:00 uur en op sommige locaties zelfs vanaf 8:30 uur."
|
615 |
TIG_PostNL::Enable PostNL delivery options,Activeer PostNL bezorgopties
|
616 |
TIG_PostNL::You can disable PostNL delivery options in case the order has products that are not in stock or if the order weighs less than 2 kg.,U kunt PostNL bezorgopties deactiveren indien de bestelling een product bevat dat niet op voorraad is of indien de gehele bestelling minder weegt dan 2 kg.
|
617 |
TIG_PostNL::Activate the PostNL Checkout for orders containing out of stock products,Activeer PostNL bezorgopties voor bestellingen van minder dan 2 kg
|
638 |
TIG_PostNL::Enable post office locations,Activeer postkantoor locaties
|
639 |
TIG_PostNL::Whether or not customers may choose to have their order delivered to a nearby post office.,Deze instelling bepaalt of klanten ervoor kunnen kiezen om hun bestelling te laten bezorgen op een postkantoor locatie.
|
640 |
TIG_PostNL::Enable early delivery locations,Activeer extra vroeg postkantoor locaties
|
641 |
+
TIG_PostNL::Some locations allow package pick-ups early in the morning. The extension will automatically check if this option is available for locations in the area submitted by your customer. You cannot use Premium Sorting or Sunday Sorting for these shipments. ,Op sommige pakketpunten kunnen uw klanten een pakket na 8:30 ophalen in plaats van na 15:00. De extensie bepaalt automatisch of deze optie beschikbaar is in de regio van uw klant. Deze pakketten kunnen niet meegeleverd worden in de Premium Sortering en zondagsortering.
|
642 |
TIG_PostNL::Early delivery fee,Extra vroege bezorging toeslag
|
643 |
TIG_PostNL::Additional costs for early delivery locations in the store's base currency. This fee will be added to the shipping costs. This value must be between 0.00 and 2.00 EUR incl. VAT. Leave this field empty to charge no extra fee for early delivery locations.,"Additionele kosten voor het gebruik van extra vroege bezorging in de basis valuta van de storeview. Deze kosten zullen opgeteld worden bij de verzendkosten. Deze kosten moeten tussen de 0,00 en 2,00 EUR liggen incl. BTW. Laat dit veld leeg om geen extra kosten in rekening te brengen voor het gebruik van extra vroege bezorging."
|
644 |
TIG_PostNL::Enable package dispenser locations,Activeer pakketautomaat locaties
|
747 |
TIG_PostNL::You can use the rates you have entered for Magento's Table Rates shipping method or you can choose to enter table rates specific for the PostNL shipping method.,U kunt gebruik maken van de tarieven die u heeft ingevuld voor Magento's Tabel Tarieven betaalmethode of u kunt aparte tarieven invullen specifiek voor de PostNL verzendmethode.
|
748 |
TIG_PostNL::Rate Source,Tarieven bron
|
749 |
TIG_PostNL::Use Magento's Table Rates,Gebruik Magento's Tabel Tarieven
|
750 |
+
TIG_PostNL::Use separate table rates for PostNL,Gebruik specifieke tarieven voor PostNL
|
751 |
TIG_PostNL::Export Rates,Exporteer Tarieven
|
752 |
TIG_PostNL::Import Rates,Importeer Tarieven
|
753 |
TIG_PostNL::You can import and export rates on the website scope. You can change your current scope with the dropdown at the top left of this page.,U kunt tarieven importeren en exporteren op website niveau. U kunt het huidige niveau van de configuratie aanpassen met het selectieveld links bovenaan deze pagina.
|
839 |
TIG_PostNL::Sort order,Sorteervolgorde
|
840 |
TIG_PostNL::Set this option to 'yes' to allow orders placed using a different shipping method than PostNL to use this payment method.,Zet deze optie op 'ja' om deze betaalmethode ook aan te bieden voor bestellingen die geen gebruik maken van de PostNL verzendmethode.
|
841 |
TIG_PostNL::Send a copy of the track & trace email,Verstuur een kopie van de Track & Trace e-mail
|
842 |
+
"TIG_PostNL::If enabled, you may enter separate email addresses to which the track & trace email will be sent in addition to the customer.","Indien u deze optie aan zet, zal er een kopie van de Track & Trace e-mail worden verstuurd naar de opgegeven e-mail adressen."
|
843 |
TIG_PostNL::Send track & trace email copy to,Verstuur Track & Trace e-mail kopie naar
|
844 |
+
TIG_PostNL::You can enter multiple email addresses separated by commas.,U kunt meerdere e-mailaddressen invullen gescheiden door komma's
|
845 |
TIG_PostNL::Track & trace email copy method,Track & Trace e-mail kopie method
|
846 |
PostNL configuration.,PostNL configuratie.
|
847 |
TIG_PostNL::A required configuration value is missing: %s.,Een verplichte configuratie waarde mist: %s.
|
895 |
"TIG_PostNL::You can choose to show a static, pre-configured message or you can show the last visible comment added to the shipment on the shipment detail page.","U kunt kiezen om een statisch, voor geconfigureerd bericht te tonen of om de laatste toegevoegde, zichtbare opmerking van de zending te tonen."
|
896 |
TIG_PostNL::Comment text,Opmerking tekst
|
897 |
TIG_PostNL::Show shipping label,Toon verzendlabel
|
898 |
+
"TIG_PostNL::If you select 'on the same page' in some cases the shipping label may not fit. In this case, the shipping label will be printed on a separate page instead.",Indien u kiest voor 'op dezelfde pagina' kan het voorkomen dat het verzendlabel niet past. In dit geval zal het verzendlabel alsnog op een aparte pagina geprint worden.
|
899 |
TIG_PostNL::Pre-configured message,Voorgeconfigureerd bericht
|
900 |
TIG_PostNL::Last shipment comment (as shown on the shipment detail page),Laatste zending opmerking (zoals getoond op de zendingdetail pagina)
|
901 |
TIG_PostNL::None of the orders you have selected have any associated shipments. Please choose at least one order that has a shipment.,"Geen van de bestellingen die u heeft geselecteerd, bevat een zending. Kies s.v.p. tenminste één bestelling die een zending bevat."
|
926 |
TIG_PostNL::Optional order grid columns,Optionele kolommen voor besteloverzicht
|
927 |
TIG_PostNL::Selecting too many columns may cause the order grid to no longer fit on your monitor.,"Indien u teveel kolommen selecteert, kan dit er toe leiden dat het overzicht niet langer op uw beeldscherm past."
|
928 |
TIG_PostNL::Delivery option,Gekozen bezorgoptie
|
929 |
+
TIG_PostNL::Requested delivery date,Indicatie bezorgdag
|
930 |
TIG_PostNL::Shipping phase,Verzendfase
|
931 |
TIG_PostNL::No order found for PostNL shipment #%d.,Geen bestelling gevonden voor PostNL zending #%d.
|
932 |
TIG_PostNL::Select a default option for the order grid mass action.,Selecteer een standaard waarde voor de massa actie voor het bestellingsoverzicht.
|
968 |
TIG_PostNL::Your PostNL account is unfortunately not allowed to perform this action. Please contact PostNL.,Uw PostNL account heeft helaas niet de benodigde rechten om deze actie uit te voeren. Neem s.v.p. contact op met PostNL.
|
969 |
"TIG_PostNL::Unfortunately you have exceeded the maximum amount of PostNL requests you may send each minute. Please wait a few minutes and try again. If this problem persists, please contact PostNL.","U heeft helaas het maximale aantal PostNL acties per minuut overschreden. Wacht s.v.p. enkele minuten en probeer het dan opnieuw. Indien dit probleem zich blijft voordoen, neem dan contact op met PostNL."
|
970 |
TIG_PostNL::This PostNL service is currently disabled. Please contact PostNL.,Deze PostNL dienst is momenteel uitgeschakeld. Neem s.v.p. contact op met PostNL.
|
971 |
+
"TIG_PostNL::There was a problem connecting to PostNL's services. This may be due to a timeout. Please wait a few minutes and try again. If this problem persists, please contact PostNL.","Er is een probleem opgetreden met de verbinding met PostNL. Dit kan komen door een time-out in de verbinding. Wacht enkele minuten en probeer het dan opnieuw. Indien dit probleem zich blijft voordoen, neem dan contact op met PostNL."
|
972 |
TIG_PostNL::Your PostNL customer code appears to be incorrect. Please make sure you have entered the correct code.,Uw PostNL klantcode is niet correct. Controleer s.v.p. of u uw klantcode correct heeft ingevuld.
|
973 |
TIG_PostNL::The total size of all PostNL logs exceeds %.0fMB!,De totale bestandsgrootte van alle PostNL log bestanden is meer dan %.0fMB!
|
974 |
TIG_PostNL::We recommend you disable logging and remove these log files.,Wij raden aan dat u loggen uitzet en deze log bestanden verwijdert.
|
975 |
"TIG_PostNL::Create shipments, print labels and confirm","Maak zendingen aan, print verzendlabels en meld voor"
|
976 |
TIG_PostNL::The PostNL extension requires at least %.0fMB to function properly. Using the PostNL extension on servers with less memory than this may cause unexpected errors., De PostNL extensie vereist minimaal %.0fMB geheugen om correct te functioneren. Gebruik maken van de PostNL extensie op servers met minder geheugen kan leiden tot onverwachte foutmeldingen.
|
977 |
TIG_PostNL::This may cause unexpected behaviour. You may use the PostNL extension on unsupported versions of Magento at your own risk.,Dit kan onverwachte problemen veroorzaken. Het gebruik van de PostNL extensie op niet ondersteunde versies van Magento is op eigen risico.
|
978 |
+
"TIG_PostNL::You can read the release notes in the <a href=""%s"" target=""_blank"" title=""TIG knowledgebase"">TIG knowledgebase</a>.","U kunt de release notes nalezen in de <a href=""%s"" target=""_blank"" title=""TIG knowledgebase"">TIG knowledgebase</a>."
|
979 |
TIG_PostNL::hour,uur
|
980 |
TIG_PostNL::minutes,minuten
|
981 |
TIG_PostNL::Delivery date:,Bezorgdatum:
|
1134 |
TIG_PostNL::Other,Anders
|
1135 |
TIG_PostNL::Checkout extension,Checkout extensie
|
1136 |
TIG_PostNL::Checkout settings,Checkout instellingen
|
1137 |
+
"TIG_PostNL::PostNL delivery options are only available for Magento's One Page Checkout, Idev's OneStepCheckout and the GoMage LightCheckout extensions.","PostNL bezorgopties zijn enkel beschikbaar voor Magento's One Page Checkout, Idev's OneStepCheckout en de GoMage LightCheckout extensies."
|
1138 |
TIG_PostNL::Specify checkout extension,Specificeer checkout extensie
|
1139 |
TIG_PostNL::Checkout Settings,Checkout instellingen
|
1140 |
TIG_PostNL::As soon as possible,Eerst volgende mogelijkheid
|
1233 |
TIG_PostNL::Select this checkbox to only show parcel dispensers.,Activeer deze filter om enkel pakketautomaten te tonen.
|
1234 |
TIG_PostNL::Choose date,Datum kiezen
|
1235 |
"TIG_PostNL::You are currently using fewer than 2 address lines. In order to guarantee proper address processing, the PostNL extension requires at least 2 address lines. You can read more on how to configure split address lines <a href=""http://kb.tig.nl/topic/55961916"" target=""_blank"">here</a>.","U gebruikt momenteel minder dan 2 adresregels op uw checkout pagina. De PostNL extensie heeft minimaal 2 adresregels nodig om correcte adresverwerking te garanderen. U kunt <a href=""http://kb.tig.nl/topic/55961916"" target=""_blank"">hier</a> meer lezen over het correct configureren van gesplitste adresregels."
|
1236 |
+
TIG_PostNL::Hide this warning.,Verberg deze waarschuwing.
|
1237 |
+
TIG_PostNL::You are currently using the Postcode.nl extension. This extension conflicts with the PostNL extension's built-in postcode validator. We recommend you disable the Postcode.nl extension if you wish to use the PostNL extensions' postcode validator.,U gebruikt momenteel de Postcode.nl extensie. Deze extensie conflicteert met de ingebouwde postcode validatie van de PostNL extensie. Wij raden u aan de Postcode.nl extensie te deactiveren indien u gebruik wilt maken van de postcode check functionaliteit van de PostNL extensie.
|
1238 |
+
"TIG_PostNL::Please use only letters (a-z A-Z), numbers (0-9) or one of the following characters: [( ) , . _ - #] in this field.","Gebruik s.v.p. enkel letters (a-z A-Z), getallen (0-9) of de volgende tekens: [() , . _ - #] in dit veld."
|
1239 |
+
TIG_PostNL::One or more items in the cart are backordered or out of stock.,Één of meer producten in de winkelwagen zijn niet op voorraad of zijn in nabestelling.
|
1240 |
+
TIG_PostNL::Stock options,Voorraad opties
|
1241 |
+
TIG_PostNL::Select for which products PostNL delivery options should be available.,Selecteer voor welke producten PostNL bezorgopties beschikbaar moeten zijn.
|
1242 |
+
TIG_PostNL::In stock products only,Enkel producten die op voorraad zijn
|
1243 |
+
TIG_PostNL::In stock and backordered products,Op voorraad en in nabestelling.
|
1244 |
+
"TIG_PostNL::In stock, backordered and out of stock products","Op voorraad, in nabestelling en niet op voorraad."
|
1245 |
+
TIG_PostNL::Product option '%s' (%s) is not allowed for this shipment.,Productoptie '%s' (%s) is niet toegestaan voor deze zending.
|
1246 |
+
TIG_PostNL::You have chosen to pick up your address at the following post office location:,U heeft gekozen om uw bestelling op de volgende postkantoor locatie op te halen:
|
1247 |
+
TIG_PostNL::You can select a pick up location later on. The address you select here will be used to determine which pick up locations are nearby.,U kunt verderop kiezen voor een afhaallocatie. Het adres dat u hier opgeeft zal gebruikt worden om de dichtstbijzijnde afhaallocaties te berekenen.
|
1248 |
+
TIG_PostNL::The PostNL extension has been successfully uninstalled.,De PostNL extensie is succesvol gedeïnstalleerd.
|
1249 |
+
TIG_PostNL::PostNL uninstall failed on removing product attribute: %s,PostNL deïnstallatie is vastgelopen op het verwijderen van attribuut: %s
|
1250 |
+
TIG_PostNL::PostNL uninstall found but could not write to XML file: %s,PostNL deïnstallatie kon niet schrijven naar het XML bestand: %s
|
1251 |
+
TIG_PostNL::PostNL uninstall could not find or XML file: %s,PostNL deïnstallatie kon het XML bestand niet vinden: %s
|
1252 |
+
TIG_PostNL::GoMage LightCheckout,GoMage LightCheckout
|
1253 |
+
TIG_PostNL::Warning: this action cannot be undone!,Waarschuwing: deze handeling kan niet ongedaan gemaakt worden!
|
1254 |
+
TIG_PostNL::The following changes will be made:,De volgende wijzigingen zullen worden gemaakt:
|
1255 |
+
TIG_PostNL::The extension will be disabled in the app/etc/modules/TIG_PostNL.xml file,De extensie zal worden uitgeschakeld in het app/etc/modules/TIG_PostNL.xml bestand
|
1256 |
+
TIG_PostNL::The PostNL product attributes will be removed from the webshop,De PostNL productattributen zullen worden verwijderd uit de webshop
|
1257 |
+
TIG_PostNL::The following will be preserved:,Het volgende zal worden bewaard:
|
1258 |
+
TIG_PostNL::All data pertaining to existing orders and shipments,Alle data betreffende bestaande bestellingen en verzendingen
|
1259 |
+
TIG_PostNL::All PostNL configuration settings,Alle PostNL configuratie-instellingen
|
1260 |
+
TIG_PostNL::All PostNL code files.,Alle PostNL code bestanden
|
1261 |
+
"TIG_PostNL::For questions regarding this process and how to re-install the PostNL extension, please contact the TIG servicedesk.","Voor vragen over dit proces en hoe de PostNL extensie te herinstalleren, neem contact op met de TIG servicedesk."
|
1262 |
+
TIG_PostNL::Type `uninstall` in the box to proceed,Type `uninstall` in het veld om verder te gaan
|
1263 |
+
TIG_PostNL::Uninstall,Deïnstalleer
|
1264 |
+
TIG_PostNL::Warning: this action cannot be undone!,Let op: deze handeling kan niet ongedaan gemaakt worden!
|
1265 |
+
TIG_PostNL::You did not enter the correct verification text. Try again.,U heeft niet de correcte verificatie-tekst ingevoerd. Probeer het opnieuw.
|
1266 |
+
"TIG_PostNL::If you are using the Gomage Lightcheckout extension in combination with the PostNL Postcode check;<br/>Please know that the street-settings from the Gomage Lightcheckout extension will be ignored.<br/> Read more about the settings <a href=""http://kb.tig.nl/topic/93469278"" target=""_blank"">here</a>.","Als u de Gomage Lightcheckout extensie gebruikt in combinatie met de Postcodecheck van PostNL, worden de straat-instellingen van de Gomage Lightcheckout extensie worden genegeerd.<br/>U kunt <a href=""http://kb.tig.nl/topic/93469278"" target=""_blank"">hier</a> meer informatie vinden over de instellingen."
|
1267 |
+
TIG_PostNL::You have enabled PostNL delivery options and GoMage LightCheckout's Delivery Date functionality for the same shipping methods. Unfortunately these two functionalities conflict. Please disable one of these features.,U heeft zowel de PostNL bezorgopties als de GoMage LightCheckout Leveringsdatum functionaliteit geactiveerd. Deze twee functionaliteiten kunnen helaas niet samenwerken. Schakel s.v.p. één van deze functionaliteiten uit.
|
1268 |
+
"TIG_PostNL::[POSTNL-0222] Warning: possible PostNL and GoMage LightCheckout conflict. <a href=""http://kb.tig.nl/topic/"" target=""blank"">Click here for more information from the TIG knowledgebase.</a>","[POSTNL-0222] Waarschuwing: mogelijk conflict tussen PostNL en GoMage LightCheckout. <a href=""http://kb.tig.nl/topic/"" target=""blank"">Klik hier voor meer informatie in de TIG knowledgebase.</a>"
|
1269 |
+
"TIG_PostNL::Are you sure you wish to disable the PostNL extension?\n\nWarning: this action cannot be undone!\n\nThe following changes will be made:\n- the extension will be disabled in the app/etc/modules/TIG_PostNL.xml file\n- the PostNL product attributes will be removed from the webshop\n\nThe following will be preserved: \n- All data pertaining to existing orders and shipments\n- All PostNL configuration settings\n- All PostNL code files.\n\nFor questions regarding this process and how to re-install the PostNL extension, please contact the TIG servicedesk.",Weet u zeker dat u de PostNL extensie wilt uitschakelen?\n\nWaarschuwing: dit kan niet ongedaan gemaakt worden!\n\nDe volgende veranderingen zullen gemaakt worden:\n- de extensie zal worden uitgeschakeld in het app/etc/modules/TIG_PostNL.xml bestand\n- de PostNL product attributen zullen worden verwijderd van de webshop\n\nHet volgende zal worden bewaard: \n- Alle data betreffende bestaande orders en verzendingen\n- Alle PostNL configuratie instellingen\n- Alle PostNL code bestanden\n\nVoor vragen betreffende dit proces en het herinstalleren van de PostNL extensie kunt u contact opnemen met de TIG servicedesk.
|
1270 |
+
TIG_PostNL::The PostNL extension has been successfully uninstalled.,De PostNL extensie is succesvol gedeïnstalleerd.
|
1271 |
+
TIG_PostNL::PostNL uninstall failed on removing product attribute: %s,PostNL deïnstallatie is vastgelopen op het verwijderen van attribuut: %s
|
1272 |
+
TIG_PostNL::PostNL uninstall found but could not write to XML file: %s,PostNL deïnstallatie kon niet schrijven naar het XML bestand: %s
|
1273 |
+
TIG_PostNL::PostNL uninstall could not find or XML file: %s,PostNL deïnstallatie kon het XML bestand niet vinden: %s
|
1274 |
+
"TIG_PostNL::An error occurred while saving this step of the configuration wizard. Please use the regular ""Save Config"" button instead.","Er is een fout opgetreden bij het opslaan van de configuratie stap. Gebruik s.v.p. de reguliere ""Configuratie Opslaan"" knop."
|
1275 |
+
TIG_PostNL::Permanently disable the PostNL extension,De PostNL extensie permanent deactiveren
|
1276 |
+
TIG_PostNL::Uninstall PostNL Extension,PostNL extensie deïnstalleren
|
1277 |
+
TIG_PostNL::Uninstall the PostNL extension,De PostNL extensie deïnstalleren
|
1278 |
+
"TIG_PostNL::Click <a href=""https://kb.tig.nl/topic/94842766"" target=""_blank"">here</a> for more information about the uninstall process.","Klik <a href=""https://kb.tig.nl/topic/94842766"" target=""_blank"">hier</a> voor meer informatie over de deïnstallatie procedure."
|
1279 |
+
TIG_PostNL::No PostNL Shipment found for shipment ID #%s.,Geen PostNL zending gevonden voor zending ID #%s.
|
1280 |
+
TIG_PostNL::Only A4 or A6 are valid values for the 'labelSize' parameter.,Enkel A4 en A6 zijn toegestane waardes voor de 'labelSize' parameter.
|
1281 |
+
TIG_PostNL::The 'labelStartPosition' parameter must contain an integer value between 1 and 4.,De 'labelStartPosition' parameter moet een integer waarde bevatten tussen 1 en 4.
|
1282 |
+
TIG_PostNL::The 'orderIds' parameter must contain a non-empty array of order IDs.,De 'orderIds' parameter moet een gevuld array van order IDs bevatten.
|
1283 |
+
TIG_PostNL::The 'shipmentIds' parameter must contain a non-empty array of shipment IDs.,De 'shipmentIds' parameter moet een gevuld array van shipment IDs bevatten.
|
1284 |
+
TIG_PostNL::Could not create or find a shipment for order #%s.,"Er kon geen zendingen aangemaakt worden, of gevonden worden voor order #%s."
|
1285 |
+
TIG_PostNL::GoMage's Checkout version,GoMage's Checkout versie
|
1286 |
+
TIG_PostNL::Print the shipping label on the same page as the packing slip,Print het verzendlabel op dezelfde pagina als de pakbon
|
1287 |
+
TIG_PostNL::Print the shipping label on a separate page,Print het verzendlabel op een aparte pagina
|
1288 |
+
TIG_PostNL::Don't print the shipping label,Print het verzendlabel niet
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
$includePath = '';
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
$includePath = '';
|
@@ -33,7 +33,7 @@
|
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
-
* @copyright Copyright (c)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
@@ -78,10 +78,6 @@ class TIG_PostNL_Fpdi extends FPDI
|
|
78 |
$this->AddPage($orientation, $format); // create landscape
|
79 |
|
80 |
$this->increasePageCount();
|
81 |
-
if($orientation == 'L')
|
82 |
-
{
|
83 |
-
$this->rotatedPage[$this->getPageCount()] = -90; // set to portrait before output
|
84 |
-
}
|
85 |
|
86 |
return $this;
|
87 |
}
|
33 |
* versions in the future. If you wish to customize this module for your
|
34 |
* needs please contact servicedesk@tig.nl for more information.
|
35 |
*
|
36 |
+
* @copyright Copyright (c) 2015 Total Internet Group B.V. (http://www.tig.nl)
|
37 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
|
38 |
*/
|
39 |
|
78 |
$this->AddPage($orientation, $format); // create landscape
|
79 |
|
80 |
$this->increasePageCount();
|
|
|
|
|
|
|
|
|
81 |
|
82 |
return $this;
|
83 |
}
|
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>tig_postnl</name>
|
4 |
-
<version>1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US">Creative Commons License</license>
|
7 |
<channel>community</channel>
|
@@ -20,7 +20,92 @@ Services included:
|
|
20 |
- Viewing detailed shipping status information
|
21 |
- PostNL Checkout
|
22 |
- Emailing customers track & trace information, allowing them to track their shipment from the moment you confirm it to the moment it arrives at their doorstep</description>
|
23 |
-
<notes>==== v1.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
- Added a parcel dispenser filter to the delivery options location picker.
|
25 |

|
26 |
==== Improvements ====
|
@@ -305,9 +390,9 @@ Services included:
|
|
305 |

|
306 |
This is the initial beta release of the extension. If you have any questions, please contact the Total Internet Group Servicedesk</notes>
|
307 |
<authors><author><name>TiG</name><user>supporttotal</user><email>servicedesk@totalinternetgroup.nl</email></author></authors>
|
308 |
-
<date>2015-
|
309 |
-
<time>
|
310 |
-
<contents><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="TIG"><file name="postnl.xml" hash="30a82b67ec4e50a15665e4d87f71cafc"/></dir></dir><dir name="template"><dir name="TIG"><dir name="PostNL"><dir name="address_validation"><dir name="checkout"><dir name="onepage"><file name="billing.phtml" hash="84043c1d8561402926445b4d364842e0"/><file name="postcode_check.phtml" hash="7c6acd718b77b449a4ede176d50a5b8e"/><file name="shipping.phtml" hash="ff44bbec353adcc3800f37cfd2970610"/></dir></dir><dir name="customer"><dir name="address"><file name="edit.phtml" hash="4327dd68d223063f4c0404900d9088a8"/><file name="postcode_check.phtml" hash="a73a6146daf8ed666758e53943233e17"/></dir></dir><dir name="onestepcheckout"><file name="billing_fields.phtml" hash="953919dc3e4879491cea1d0cd6fb9409"/><file name="postcode_check.phtml" hash="8cb2a6224ea6d9793c4e95b6fc2d33a6"/><file name="shipping_fields.phtml" hash="6beb31124864fa60b153967fd28e9045"/></dir><file name="validate.phtml" hash="a9518118b2e4e86d353fbebe5b59cb4d"/></dir><dir name="checkout"><dir name="cart"><file name="js.phtml" hash="ca1f64c96af24529cb7fae25649dd6ff"/><file name="link.phtml" hash="c664d663030ae0e1cd536d6634a2fc31"/><file name="spinner.phtml" hash="ef19ba5e8dc2a543e4a2db9360c9527a"/></dir><file name="summary.phtml" hash="d1892b51b7572c3c62fd63e1e0f566a5"/></dir><dir name="core"><dir name="order"><dir name="returns"><file name="info.phtml" hash="0a87220b8c30ee692e0281d92f7b7022"/><dir name="shipment"><file name="items.phtml" hash="095e421a88cf6e8e5a3f8bd741533598"/></dir></dir></dir><dir name="page"><dir name="html"><file name="js_translate.phtml" hash="b8acdcccee13c6e043a465031687224f"/></dir></dir><dir name="sales"><dir name="order"><dir name="email"><file name="delivery_options.phtml" hash="8ca9cd00da21ab0843b61f631e8e262f"/><file name="pakjegemak_address.phtml" hash="7d9370689d4c6d051b4f834fe175243f"/></dir><file name="pakje_gemak_address.phtml" hash="8049c0a142ba44f7be19522af429c294"/><dir name="shipment"><file name="shipping_status.phtml" hash="1d873f33eb6328a1b93eabbb4c703413"/></dir></dir></dir></dir><dir name="delivery_options"><file name="addlocation.phtml" hash="3d3e970cc6067c8213411f48f8066aaf"/><file name="addphonenumber.phtml" hash="bbbb9dfb5016f3440071fe06646beae6"/><file name="js.phtml" hash="999c0651e6db7f76144bd00a2e9cda13"/><dir name="onepage"><file name="available.phtml" hash="3102abf23ecf1b6b6f33dbf958887b05"/><file name="deliveryoptions.phtml" hash="a4d5637a42e85337cf8f9ed0640ede05"/><dir name="progress"><file name="pakje_gemak.phtml" hash="e1912498e50d8d06f5c0948f360d46f6"/><file name="shipping_method.phtml" hash="18af739c3aa844ffceaf0303dd4bd102"/></dir></dir><dir name="onestepcheckout"><file name="available.phtml" hash="0bbc7fbba443275f585d645db17e845a"/><file name="deliveryoptions.phtml" hash="0505c72305469ac096d486a18c2d6e5d"/></dir><file name="progress.phtml" hash="2bda26c05d53a0d34ab7424e0f9252cd"/><dir name="sales"><dir name="order"><file name="delivery_options_info.phtml" hash="ef7216d6a46e047dc0e1bac8f5efdbfc"/></dir></dir><file name="theme.phtml" hash="ae7cccad119f87a974243823797359b8"/></dir><dir name="mijnpakket"><file name="account_notification.phtml" hash="e6354525e0bce99bdcf4935d240a5192"/><file name="js.phtml" hash="18b8883f828796373bb1783dfaae8690"/><dir name="onepage"><file name="login_button.phtml" hash="bd0f7103b3a5abcd83e0d0db9d7dfc94"/></dir><dir name="onestepcheckout"><file name="login_button.phtml" hash="b6f7f1161be2f3364f9df112d131b01b"/></dir><file name="order_success_js.phtml" hash="ac96ac95e7cd40a3b2c5cb12432fd1b2"/></dir><dir name="payment"><dir name="checkout"><dir name="form"><file name="cod.phtml" hash="f1ab6e0226fe607a049aaa4b5402fefe"/></dir><dir name="total"><file name="cod_fee.phtml" hash="9273dca9058bc1e782ad6750be468d96"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="enterprise"><dir name="default"><dir name="template"><dir name="TIG"><dir name="PostNL"><dir name="address_validation"><dir name="checkout"><dir name="onepage"><file name="billing.phtml" hash="7c480af158d0e2503258c23418b28ea2"/><file name="postcode_check.phtml" hash="56ada1c322b86a1dac6139f22d9f674c"/><file name="shipping.phtml" hash="b0ba0336cb931eb8e6a0248de6f673ff"/></dir></dir><dir name="customer"><dir name="address"><file name="edit.phtml" hash="1cd43fabe60ed292d6674b2b0e7e66c2"/><file name="postcode_check.phtml" hash="c220d994561b6552d1e622a22a2e0982"/></dir></dir></dir><dir name="core"><dir name="sales"><dir name="order"><file name="pakje_gemak_address.phtml" hash="2329ff2eff3bba12b4a3aafc54c492ba"/></dir></dir></dir><dir name="mijnpakket"><dir name="onepage"><file name="login_button.phtml" hash="af0c9754a77b7cab5a4fb70ef2150df8"/></dir></dir></dir></dir></dir></dir></dir><dir name="rwd"><dir name="default"><dir name="layout"><dir name="TIG"><file name="postnl.xml" hash="5213399d727c0f81439c777a4ad2032f"/></dir></dir><dir name="template"><dir name="TIG"><dir name="PostNL"><dir><dir name="address_validation"><dir name="checkout"><dir name="onepage"><file name="postcode_check.phtml" hash="01539053fdc5269593452c69918a9e7b"/></dir></dir><dir name="customer"><dir name="address"><file name="postcode_check.phtml" hash="63a7067037a0aeb8499ed162bdc01a63"/></dir></dir></dir><dir name="checkout"><dir name="cart"><file name="link.phtml" hash="0fc6bdcc0a37dabece55462219621375"/></dir></dir><dir name="mijnpakket"><dir name="onepage"><file name="login_button.phtml" hash="31fc55787f6f64e63657b62617ec1260"/></dir></dir></dir></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="TIG"><file name="postnl.xml" hash="e10c3de8077bd5b61c33051cfeb83cac"/></dir></dir><dir name="template"><dir name="TIG"><dir name="PostNL"><file name="cron_notification.phtml" hash="68cf7bedd4b330a057ec5ced06c252f1"/><file name="integrity_notification.phtml" hash="a416c1dd905c2af75a53e50dcdbc62e5"/><file name="log_notification.phtml" hash="87b4ab095c8d2740b7f621b2c574fd91"/><dir name="payment"><dir name="checkout"><dir name="form"><file name="cod.phtml" hash="145ff33fea020e3e3148c641c9b98bc6"/></dir></dir></dir><dir name="sales"><dir name="items"><dir name="column"><file name="qty.phtml" hash="aef5915e5d811811d7128e6d50fe94d6"/></dir></dir><dir name="order"><dir name="address"><dir name="form"><file name="container.phtml" hash="87a67abbc194820b7592e759d21976dc"/></dir></dir><dir name="create"><file name="js.phtml" hash="2e41aaae2407a1f56739197d8a5fc10e"/><dir name="totals"><file name="cod_fee.phtml" hash="024424c5e3b8f23e8f424fa015ba23b6"/></dir></dir><dir name="creditmemo"><dir name="create"><dir name="totals"><file name="cod_fee.phtml" hash="e2ce7c3302b7f53f1fcc34f0c24e954d"/></dir></dir></dir><file name="filter_massaction.phtml" hash="4b574a37f32983fed3726c69825098bd"/><file name="js.phtml" hash="06a619a67d236aaa9a301462b1f8b978"/><file name="product_options.phtml" hash="cef99b2d28c7d385200fc351b7c4d5f2"/><dir name="shipment"><dir name="create"><file name="shipment_options.phtml" hash="e6b0d60b7deb85a2d2114e2e534442df"/></dir><file name="filter_massaction.phtml" hash="c108ecf1e488111a1367b9193315d546"/><dir name="view"><file name="delivery_options.phtml" hash="f589a1481601ee380b3e07941b4d16e6"/><file name="pakje_gemak_address.phtml" hash="52f2105d4e4772bb6653ddcf440e9e58"/><file name="shipping_status.phtml" hash="25bec612c31f5010e5bdf320a3f0360d"/><dir name="tab"><file name="status_history.phtml" hash="964540928c7ba7ef3ad66c5fb0d33791"/></dir></dir><file name="view.phtml" hash="6e999fb2d3838748be573873aada22f2"/></dir><dir name="totals"><file name="tax.phtml" hash="ab09fbdc3a7673ca587d8c6de4c02ffd"/></dir><dir name="view"><file name="delivery_options.phtml" hash="28fb50f8a86804b1500ab43847d4dbea"/><file name="pakje_gemak_address.phtml" hash="444ad530e9ebb95b19ecb95fae891e72"/></dir><file name="windows_theme.phtml" hash="b39af59a65373a52d7e2c3c0aa69e7b8"/></dir><dir name="shipment"><file name="customize_link.phtml" hash="a031386b81552f2c0ec02cbce6c503c4"/><file name="js.phtml" hash="44e257f8f231b817566742f569c4b452"/><file name="testmode_warning.phtml" hash="c265436ea309fe174cc436de9aaf67a2"/></dir></dir><dir name="system"><dir name="config"><file name="edit.phtml" hash="4f073927211c81a65263953cfbe87170"/><dir name="form"><dir name="field"><file name="array.phtml" hash="6bb1f404b24129b198c9c95a28c1bd66"/><file name="config_check.phtml" hash="11640be7731cf2a8e93964ab1bfbdf46"/><file name="field_header.phtml" hash="ab35d6667e3feadaf7c61735c1b30622"/><file name="info_box.phtml" hash="8479c68af9a865c17bdbea93dab39a65"/><file name="js.phtml" hash="03bb9136424511a5b83e394682ab99fe"/><file name="split_address_check.phtml" hash="9bd9a3edd07d859a117f00c3acdb2390"/><file name="support_tab.phtml" hash="b5749bdd254457c2629e7ae6d7076e05"/><file name="warning_box.phtml" hash="a5dfa40b5246147d5f64547f5990cf98"/></dir></dir></dir></dir><file name="upgrade_notification.phtml" hash="8cbd0f916da857bee9d28120f342ef08"/><dir name="widget"><dir name="grid"><dir name="massaction"><file name="label_start_pos.phtml" hash="602de274a2d446bdf6e1c2859f13500e"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="TIG_PostNL.xml" hash="78c34bc4e8acdcaf4ccedf930517a14d"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="TIG"><dir name="PostNL"><file name="cart.css" hash="d51ab6c200da5c54eb8e672c9325dbf5"/><file name="default.css" hash="7f05bf3ebd09bc4cf13d2582afe04980"/><dir name="deliveryoptions"><file name="default.css" hash="571855c5e1ee8c0465c1fbd86334f253"/><file name="ie8.css" hash="1f0e04ca6c7be6572defb3adadafd28a"/><file name="mediaqueries.css" hash="e6356d2f85ca4fc3894911bf396cccdb"/><file name="neutral.css" hash="4b3b09545e3395f302e1efd487bf2739"/><file name="onestepcheckout.css" hash="fd7d786cc66c34b81555111e34c062eb"/><file name="onestepcheckout_mediaqueries.css" hash="2eb1086de2c12f7b728794fdf5ae431c"/><file name="onestepcheckout_neutral.css" hash="cb2cc910a3e96ed3fc9b23d20a6f34eb"/></dir><file name="messages.css" hash="19d03101c862b45535bc08344c12716a"/><file name="mijnpakket.css" hash="23e980e096acc95a740f5136cc38d377"/><file name="postcodecheck.css" hash="84a497060c26440c6e387d2f7a26e0fd"/><file name="returns.css" hash="23a6cb90aa662d2f866459e8ddf9a38a"/><file name="shipping_status.css" hash="fcb3fe311d50ee93176dc29ef2d5a0b9"/></dir></dir></dir><dir name="images"><dir name="TIG"><dir name="PostNL"><file name="bkg_progress_small.png" hash="fc6c9f28b6a6aae6f0096d504c0952df"/><file name="bkg_tooltip.png" hash="56cfed3ed8a65b19f8de88946d1a0a01"/><dir name="deliveryoptions"><file name="bkg_add-location.png" hash="a30d4aea73b094df5f434f9856dc626b"/><file name="bkg_add-phonenumber_input.gif" hash="25fa933b55e69a552f7d1cf704a8d6f9"/><file name="bkg_back_link.png" hash="b7bd79383aa89243980329e07b55a300"/><file name="bkg_btn-close.png" hash="5438c768cd63b2476cf14418acb28709"/><file name="bkg_button.png" hash="a1bf9f994f90033e143b7e2023c0e4fb"/><file name="bkg_checkbox.png" hash="71628b28d876482b600755e577132fee"/><file name="bkg_extras.gif" hash="6b374d9759f894962259eb995a3d59f9"/><file name="bkg_info_link.png" hash="0bf3dd9b4d23c7da406fa81ccb38799e"/><file name="bkg_location-search_input.gif" hash="fcee91af0d97e50fcf698eb7485327a8"/><file name="bkg_location-selected.png" hash="efe72719a889f94f4aa24e6f6d6db8df"/><file name="bkg_location.gif" hash="937e1a367cafdcc0d4f62afb572879a1"/><file name="bkg_more-info.png" hash="3681dc9b54011dae7c81d6c4b2e74a2b"/><file name="bkg_option.gif" hash="a3b9a292d28540147bfb034060731cb3"/><file name="bkg_phonenumber_failed.png" hash="8d1a0503bfe7cdfc2e35365bba2a8f7d"/><file name="bkg_phonenumber_verify.png" hash="28f90e0364778463144004ff289d70a7"/><file name="bkg_postnl-logo.png" hash="a34b5d938234a7360e5566df9fb4273f"/><file name="bkg_postnl.png" hash="46c5f6c65f66da09b39496c7cef94e89"/><file name="bkg_radio.png" hash="3cc3ecb77e5ce62511385d59e037b398"/><file name="bkg_rwd_rate-line.png" hash="d7cc800714e0372f2bc991bc50a99ca2"/><file name="bkg_tooltip.png" hash="cbd753cc9cb873468d1bba07e70f0d2f"/><file name="bkg_tooltip_close.png" hash="6b568d6430e21e974f360f4961db9102"/><file name="ie8_bkg_transparent-white.png" hash="a603671f51cb11ed9370bcd3181741c7"/><file name="loader_default.gif" hash="9fec99d885ad6bc45aee40d1c171ca4b"/><file name="loader_mini.gif" hash="f244ab6581d4329e3dbb7e289d47dfb2"/><dir name="locations"><file name="crc_albertheijn.png" hash="57af250f9d59b9074132446e0109ee93"/><file name="crc_automaat.png" hash="e9e94287380f27f6752d89f995b1b7f4"/><file name="crc_bruna.png" hash="326912294c49e8c896a34a28a7c03127"/><file name="crc_c1000.png" hash="8628f2e6328805a84e8eac28511b6857"/><file name="crc_coop.png" hash="0250717148ab776d156371a3e0912b9e"/><file name="crc_default.png" hash="777edf1aa124f6cb13258bb510db809b"/><file name="crc_emte.png" hash="ba7841f22a08d379f1ddabbe708ffa41"/><file name="crc_gamma.png" hash="6dc0ff8b36892af40ce80a36355d311a"/><file name="crc_jumbo.png" hash="061ae156e55e3aee6130cd1beb8d1b9a"/><file name="crc_karwei.png" hash="a7b8ee695b996cb757fd5c1a98e888e4"/><file name="crc_plus.png" hash="e67e871870c87723d835db23af18d4e9"/><file name="crc_primera.png" hash="e367c1e5b3fb4e25303aff57dc1a1259"/><file name="crc_readshop.png" hash="eeef9a98c0cd68f4351154d174bfdda9"/><file name="crc_spar.png" hash="4939d469045e6c7d7e65f172d97e30b1"/><file name="crc_staples.png" hash="94136b2a8d00dfdadcad6c7088920409"/><file name="drp_albertheijn.png" hash="944b90f36d5f225fcc74d360d368e628"/><file name="drp_automaat.png" hash="ce0bd13abc5e6c647c2ac8bc0fb5c150"/><file name="drp_bruna.png" hash="feb3ea92e3d32e98edf04aa22604afe6"/><file name="drp_c1000.png" hash="9e89a865b72d182135226fc72a98e03a"/><file name="drp_coop.png" hash="ddd34926b0a306cb0b28f385a78bd972"/><file name="drp_default.png" hash="d97f2e415e54b5d9fa19893210cedbc0"/><file name="drp_emte.png" hash="34e526c095a080cf92ccf15318a56ba3"/><file name="drp_gamma.png" hash="56da28b8c2e0ad6087eb0c4408f9904c"/><file name="drp_jumbo.png" hash="f191ec9c01b807d32811d9a4f0c3ad19"/><file name="drp_karwei.png" hash="d3da2d8b7f65ddecdf13091094a8fbea"/><file name="drp_plus.png" hash="9bf96ded99d0e47b34256cdc78310754"/><file name="drp_primera.png" hash="095b1ced03087b390b96ee3d525dce7e"/><file name="drp_readshop.png" hash="d2884c0bdd81103e9319469727bc9855"/><file name="drp_spar.png" hash="9ff6bb1fc489ba714d3249c35fb01c77"/><file name="drp_staples.png" hash="2196de7813fa6db34f8b0abb1aedecd5"/><file name="tmb_albertheijn.png" hash="58ae464ff7bb420f075e53cd35d9852f"/><file name="tmb_bruna.png" hash="ff523c258b47be502b335a7e8cc5032c"/><file name="tmb_c1000.png" hash="f96136426d2a2af40ef7b76953ec58b5"/><file name="tmb_coop.png" hash="b1e41c613b1876c787e9d4d5b30ba1a5"/><file name="tmb_default.png" hash="ed65f2da1032b355422db7c86a126668"/><file name="tmb_emte.png" hash="d0e9dc8f785b8db0da8bd233a0d09a11"/><file name="tmb_gamma.png" hash="55ef36ad8aa803469e28f368b7eac536"/><file name="tmb_jumbo.png" hash="3bae16290854122b2b3439de2402c5a1"/><file name="tmb_karwei.png" hash="84e1aaceb9c0ff3864b2b7aead52e033"/><file name="tmb_plus.png" hash="fd3bf32ffb591f79935bb906249ca59e"/><file name="tmb_primera.png" hash="fb32942772b4ca57a45ee0e08406c3bc"/><file name="tmb_readshop.png" hash="6a6826139698fa20e0fd4210d17b50e2"/><file name="tmb_spar.png" hash="89694e10f073619fd944d8c2c7b9e357"/><file name="tmb_staples.png" hash="115af373105f6494c74186657ddca6a6"/></dir><file name="osc_bkg_postnl-logo.png" hash="c23e987598dcd439e54f9d48e9e4777a"/><dir name="unbranded"><file name="bkg_back_link.png" hash="5797c608687a704a935b0ff03b8d3982"/><file name="bkg_checkbox.png" hash="232ad0ec83b32af770481bb1cdd1520e"/><file name="bkg_more-info.png" hash="96a0b80b2907a28489d8d87f845d8a5f"/><file name="bkg_radio.png" hash="430bea179fc0e6570c1cca905b46454e"/><file name="bkg_tooltip_close.png" hash="eac7d71f0cb14f165b6f7af55a6c4c26"/><file name="button_action.png" hash="c297cbc6aa5c44272308b660038b363f"/><file name="button_next.png" hash="768365d31d95bb5c8b1ccebb62920a95"/><file name="loader_default.gif" hash="1645395ddefeab89f51f59b2dbcbd7c0"/><file name="loader_mini.gif" hash="2fd11016727f350b98af17fc76b3a0d3"/></dir></dir><file name="icon-tooltip.png" hash="5767601cd66b23d0b6fe8defc10dd48d"/><dir name="mijnpakket"><file name="app_buttons.png" hash="74f3a4d80dafe1a0979ce7ad0bd70824"/><file name="app_logo.png" hash="e5426bac3d0b4e28ef1f3628503c2365"/><file name="logo.png" hash="6fa95b3a5e83b6887848b5feb7369bf1"/><file name="logo_small.png" hash="c23e987598dcd439e54f9d48e9e4777a"/></dir><file name="opc-ajax-loader.gif" hash="e805ea7eca1f34c75ba0f93780d32d38"/><file name="overlay.png" hash="f08feb852288bea420ba3af68ae34a1f"/><file name="postnl_email_logo.png" hash="8bd358b514e04e7ceca03efb38f8fded"/><file name="postnl_spinner.gif" hash="cef321b68ab934932ee317986823db67"/></dir></dir></dir><dir name="js"><dir name="TIG"><dir name="PostNL"><file name="ajax.js" hash="70e95fb34c21b4bdaa0c6dbf746cc6bc"/><file name="checkout.js" hash="12cdd910e633ded6e8a45b2c70168efe"/><file name="deliveryOptions.js" hash="1fc224efcf08ff7f6a6fdadb419b0ad1"/><dir name="deliveryoptions"><file name="cufon-fonts.js" hash="7605bb17619f1a55e3521a700dfe7b1a"/><file name="cufon-settings.js" hash="9bb0303049c178db309438c26f7def2c"/><file name="cufon-yui.js" hash="2d0f7f2a050cc1a9c9456d97d29f5eda"/></dir><file name="livepipe.js" hash="b9f5e38a94ce3f4f6f6ebcabca23d8c3"/><file name="mijnpakketLogin.js" hash="897b60e83cee04e31763236b9fce9dae"/><file name="placeholder.min.js" hash="c2824272a822d3fb8429a239e7d20c24"/><file name="postcodecheck.js" hash="864882d849033b308b29181dea7ce09c"/><file name="scrollbar.js" hash="b6780bb325e0ac78bc37e7b9d1bac863"/><file name="slider.js" hash="1679e9ff9a8d3784387040fc7cef9203"/></dir></dir></dir></dir></dir><dir name="enterprise"><dir name="default"><dir name="images"><dir name="TIG"><dir name="PostNL"><dir name="deliveryoptions"><dir name="locations"><file name="crc_albertheijn.png" hash="57af250f9d59b9074132446e0109ee93"/><file name="crc_automaat.png" hash="e9e94287380f27f6752d89f995b1b7f4"/><file name="crc_bruna.png" hash="326912294c49e8c896a34a28a7c03127"/><file name="crc_c1000.png" hash="8628f2e6328805a84e8eac28511b6857"/><file name="crc_coop.png" hash="0250717148ab776d156371a3e0912b9e"/><file name="crc_default.png" hash="777edf1aa124f6cb13258bb510db809b"/><file name="crc_emte.png" hash="ba7841f22a08d379f1ddabbe708ffa41"/><file name="crc_gamma.png" hash="6dc0ff8b36892af40ce80a36355d311a"/><file name="crc_jumbo.png" hash="061ae156e55e3aee6130cd1beb8d1b9a"/><file name="crc_karwei.png" hash="a7b8ee695b996cb757fd5c1a98e888e4"/><file name="crc_plus.png" hash="e67e871870c87723d835db23af18d4e9"/><file name="crc_primera.png" hash="e367c1e5b3fb4e25303aff57dc1a1259"/><file name="crc_readshop.png" hash="eeef9a98c0cd68f4351154d174bfdda9"/><file name="crc_spar.png" hash="4939d469045e6c7d7e65f172d97e30b1"/><file name="crc_staples.png" hash="94136b2a8d00dfdadcad6c7088920409"/><file name="drp_albertheijn.png" hash="944b90f36d5f225fcc74d360d368e628"/><file name="drp_automaat.png" hash="ce0bd13abc5e6c647c2ac8bc0fb5c150"/><file name="drp_bruna.png" hash="feb3ea92e3d32e98edf04aa22604afe6"/><file name="drp_c1000.png" hash="9e89a865b72d182135226fc72a98e03a"/><file name="drp_coop.png" hash="ddd34926b0a306cb0b28f385a78bd972"/><file name="drp_default.png" hash="d97f2e415e54b5d9fa19893210cedbc0"/><file name="drp_emte.png" hash="34e526c095a080cf92ccf15318a56ba3"/><file name="drp_gamma.png" hash="56da28b8c2e0ad6087eb0c4408f9904c"/><file name="drp_jumbo.png" hash="f191ec9c01b807d32811d9a4f0c3ad19"/><file name="drp_karwei.png" hash="d3da2d8b7f65ddecdf13091094a8fbea"/><file name="drp_plus.png" hash="9bf96ded99d0e47b34256cdc78310754"/><file name="drp_primera.png" hash="095b1ced03087b390b96ee3d525dce7e"/><file name="drp_readshop.png" hash="d2884c0bdd81103e9319469727bc9855"/><file name="drp_spar.png" hash="9ff6bb1fc489ba714d3249c35fb01c77"/><file name="drp_staples.png" hash="2196de7813fa6db34f8b0abb1aedecd5"/><file name="tmb_albertheijn.png" hash="58ae464ff7bb420f075e53cd35d9852f"/><file name="tmb_bruna.png" hash="ff523c258b47be502b335a7e8cc5032c"/><file name="tmb_c1000.png" hash="f96136426d2a2af40ef7b76953ec58b5"/><file name="tmb_coop.png" hash="b1e41c613b1876c787e9d4d5b30ba1a5"/><file name="tmb_default.png" hash="ed65f2da1032b355422db7c86a126668"/><file name="tmb_emte.png" hash="d0e9dc8f785b8db0da8bd233a0d09a11"/><file name="tmb_gamma.png" hash="55ef36ad8aa803469e28f368b7eac536"/><file name="tmb_jumbo.png" hash="3bae16290854122b2b3439de2402c5a1"/><file name="tmb_karwei.png" hash="84e1aaceb9c0ff3864b2b7aead52e033"/><file name="tmb_plus.png" hash="fd3bf32ffb591f79935bb906249ca59e"/><file name="tmb_primera.png" hash="fb32942772b4ca57a45ee0e08406c3bc"/><file name="tmb_readshop.png" hash="6a6826139698fa20e0fd4210d17b50e2"/><file name="tmb_spar.png" hash="89694e10f073619fd944d8c2c7b9e357"/><file name="tmb_staples.png" hash="115af373105f6494c74186657ddca6a6"/><file name="tmp_maps.jpg" hash="c8d8e93fe427b236489b2904e276e124"/></dir></dir><file name="opc-ajax-loader.gif" hash="e805ea7eca1f34c75ba0f93780d32d38"/><file name="overlay.png" hash="f08feb852288bea420ba3af68ae34a1f"/><file name="postnl_spinner.gif" hash="c97d0bd9ccc8fa0b460c07caeb63c293"/></dir></dir></dir><dir name="css"><dir name="TIG"><dir name="PostNL"><file name="cart.css" hash="4f8b417defed03e6ae8c4ec292b2e2c3"/><file name="postcodecheck.css" hash="dcc017ca8f6b882c8dd8127ab5eea42a"/></dir></dir></dir></dir></dir><dir name="rwd"><dir name="default"><dir name="css"><dir name="TIG"><dir name="PostNL"><file name="rwd.css" hash="4d14fe3ff05c4bf41a5161b113b15767"/><file name="rwd_osc.css" hash="d3b7cc449980f3dba097db6127a45f0c"/></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="css"><dir name="TIG"><dir name="PostNL"><file name="shipping_status.css" hash="d70f88078aa443807d249b3bf51320bf"/><file name="styles.css" hash="99c3298ef947a3e2d4a8aec7c88248cd"/><file name="system_config_edit.css" hash="103eaeae2d9e2a4a43b48a83ea7f2dad"/><file name="system_config_edit_postnl.css" hash="d25851e44a1d5c9beff046c2c0450ad0"/><file name="system_config_edit_postnl_magento16.css" hash="f9a8479639e2fe8d0da9cf602b1607c3"/></dir></dir></dir><dir name="images"><dir name="TIG"><dir name="PostNL"><file name="bkg_progress_grey.png" hash="8d4d5144292b98a23475367ede717b17"/><file name="bkg_progress_grey_begin.png" hash="6815c9264e78f8f9d2805c595f8800c4"/><file name="bkg_progress_grey_end.png" hash="dae90fdb38adf65e6ccc209b6a80372c"/><file name="bkg_progress_grey_seperator.png" hash="10178e12fd14fb783b4ae0fbd55a4a81"/><file name="bkg_progress_orange.png" hash="8a59f76e36ee0492f5341b8e5e7ee79b"/><file name="bkg_progress_orange_begin.png" hash="ecc84d5252e397f4a783ee7e0c426d63"/><file name="bkg_progress_orange_end.png" hash="d0a81dfea1a3eddc699482a62af01fc9"/><file name="bkg_progress_orange_grey_seperator.png" hash="ab558953ec4c40ef44653ab481084345"/><file name="bkg_progress_orange_seperator.png" hash="a774eb89763d95f2e60d03f8702fba86"/><file name="bkg_progress_sprite.png" hash="3230379a4544f85062a6ba91fa8083e2"/><file name="bkg_progress_sprite_reverse.png" hash="c27c9ac49dd3c82f6351307d7b63f36a"/><file name="bkg_tooltip.png" hash="56cfed3ed8a65b19f8de88946d1a0a01"/><file name="btn_download_icon.png" hash="142d5ebbe43ad09dde97cd32e1ef4303"/><file name="glyph_error.gif" hash="a138b803d772f552aa2e49e1c506edbd"/><file name="glyph_go.png" hash="343996189e35c6685b90993b43059ecd"/><file name="glyph_info.gif" hash="40f72d28be63ecf2b6ef44c7ea730104"/><file name="glyph_manual.png" hash="771db63b6ffc9de1c06da564796adc6e"/><file name="glyph_pdf.png" hash="a5ea929f4014a88d7320d0293913ace3"/><file name="glyph_success.gif" hash="465a056a3ba3d94367f51c3c0b751391"/><file name="glyph_warning.gif" hash="fa817cb6d49efb9855942ef2b739fc6c"/><file name="icon-tooltip.png" hash="5767601cd66b23d0b6fe8defc10dd48d"/><file name="legend.gif" hash="d8fb0642901868d489d31b426f3e3406"/><file name="loader_default.gif" hash="9fec99d885ad6bc45aee40d1c171ca4b"/><file name="logo_postnl.png" hash="10b9ae4ad2c5365312c257dcdac1fc64"/><file name="tig_logo_medium.gif" hash="3e1071908cfdb7b472438482c3331ac7"/></dir></dir></dir><dir name="js"><dir name="TIG"><dir name="PostNL"><file name="configuration.js" hash="aeb62627c57f62eb7cbc80cd79ff00b6"/><file name="form.js" hash="319106ff0367204958686e496ab27682"/><file name="mass_action_filter.js" hash="7daee0fd9088b90618aae7b63b16567c"/><file name="validate.js" hash="0db7b6629c718490f57a071121dfb108"/></dir></dir></dir></dir></dir></dir></target><target name="magelib"><dir name="TIG"><dir name="PostNL"><dir name="Fpdf"><dir name="font"><file name="courier.php" hash="ca6fb483549604fb4a675f9e28a73b02"/><file name="courierb.php" hash="a58d7dadf3cf564ca5d5138cea76a3a9"/><file name="courierbi.php" hash="c0e416771dc56cb2397390978d112dc2"/><file name="courieri.php" hash="419961dbeeb20f08da780dccb427dec8"/><file name="helvetica.php" hash="fc53162b924ddd522bd6cfe86fab48f4"/><file name="helveticab.php" hash="4e9ffda682a131fef2e04ccd94aa342d"/><file name="helveticabi.php" hash="6db8943bd91bf13514b82872cf160d45"/><file name="helveticai.php" hash="13b795df0c33eb93c48621792f2ea12d"/><file name="symbol.php" hash="fbd9250c21af99f6398d6f817511f91f"/><file name="times.php" hash="82bc100f1f3bd8b2d9b7fb5ee8f44b3a"/><file name="timesb.php" hash="3a241a1658bf9ea2062e63f464166c31"/><file name="timesbi.php" hash="bfdd0235a71793becefff778c2b16243"/><file name="timesi.php" hash="17fd69f176915a2113fe28057b43a75e"/><file name="zapfdingbats.php" hash="2848ab2daf3128f310b5cf713ca4acee"/></dir><file name="fpdf.css" hash="84befac49464a9aac54aa511bc1fd754"/><file name="fpdf.php" hash="4ebda2283504bfd34b85753433d7e098"/><file name="helvetica.php" hash="fc53162b924ddd522bd6cfe86fab48f4"/><file name="license.txt" hash="fb784726cfe3615da38bc23a3cac445b"/></dir><file name="Fpdf.php" hash="663a4148360bdd4b4bdb58f53079597d"/><dir name="Fpdi"><dir name="filters"><file name="FilterASCII85.php" hash="c6b756ac5874cc6f6f986349b605af64"/><file name="FilterASCII85_FPDI.php" hash="1240e0c64602864401f886546e09fe7b"/><file name="FilterLZW.php" hash="fcba53a4dd3a1f78e62c7aeac726c7b5"/><file name="FilterLZW_FPDI.php" hash="b11c50e66e20744ad20f176cae4af284"/></dir><file name="fpdf_tpl.php" hash="3966b13c398c94509e2fb6199593b104"/><file name="fpdi.php" hash="abb524d17a2cbdd3c3b7e89184aad443"/><file name="fpdi2tcpdf_bridge.php" hash="bcc317cbcfdd3faeae4a1eb480bded0f"/><file name="fpdi_pdf_parser.php" hash="d7a3bf0153ae9ad57976afb0be5d195d"/><file name="pdf_context.php" hash="0b69a25dbb830f3b68c054c2e43b876e"/><file name="pdf_parser.php" hash="5ff22a8c1ce5b1eee82c8017311a797e"/></dir><file name="Fpdi.php" hash="45a966fd0dc62d3a8399ad119e2b1222"/></dir></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><dir name="TIG"><dir name="PostNL"><file name="return_label.html" hash="dd2ad306d092b7dd481a0a972733f8bb"/><file name="track_and_trace.html" hash="b77871334fc82d5811954024b3f8058d"/></dir></dir></dir></dir><file name="TIG_PostNL.csv" hash="028fbaa7e2adb3f73200a41865caafc3"/></dir><dir name="nl_NL"><dir name="template"><dir name="email"><dir name="TIG"><dir name="PostNL"><file name="return_label.html" hash="cd54d668b8e1958cb50aa7abf1bc280b"/><file name="track_and_trace.html" hash="cd179f991f38cd735c834abdaa40e1a8"/></dir></dir></dir></dir><file name="TIG_PostNL.csv" hash="e29c685868af7675fd0dfba3132bf428"/></dir></target><target name="magecommunity"><dir name="TIG"><dir name="PostNL"><dir name="Block"><dir name="Adminhtml"><dir name="Carrier"><dir name="Postnl"><dir name="Matrixrate"><file name="Grid.php" hash="0bb3eac6dd6c3837bf14bf50060d3f4b"/></dir><dir name="Tablerate"><file name="Grid.php" hash="f943fe7faa915d54409309663e056cdf"/></dir></dir></dir><file name="CronNotification.php" hash="8d9d7d1bdde0371cde713fd419ea8856"/><file name="IntegrityNotification.php" hash="c517659ba1b61d7b00bc95fa0ffdc33c"/><file name="LogNotification.php" hash="220b897112bf5f0e5a8d95e90e221cf8"/><dir name="Sales"><dir name="Items"><dir name="Column"><file name="Qty.php" hash="2cdbd9c2fb1f43f58ede71ab01a1fa2e"/></dir></dir><dir name="Order"><dir name="Create"><dir name="Totals"><file name="CodFee.php" hash="60fc38a411fc0e0cc76d97617876dc6a"/></dir></dir><dir name="Creditmemo"><dir name="Create"><file name="CodFee.php" hash="0efae3e6baa6b22e393df7dba77d615e"/></dir><dir name="Totals"><file name="CodFee.php" hash="6c71fc777e634298ba5d934786fd2835"/></dir></dir><dir name="Invoice"><dir name="Totals"><file name="CodFee.php" hash="71ea3fd7327c533101d437c774757b9a"/></dir></dir><file name="ProductOptions.php" hash="5e5d86afaee335f2756d640dff4ba9bd"/><dir name="Shipment"><dir name="Create"><file name="ShipmentOptions.php" hash="8db4f7c59b0efdcf66ffa9a282a3675b"/></dir><dir name="View"><file name="DeliveryOptions.php" hash="b3e8881b565e1b48915235ac8a6744ae"/><file name="ShippingStatus.php" hash="97f9cad6432e2ac12924539048b7d0ba"/><dir name="Tab"><file name="StatusHistory.php" hash="6dd5cd70e509fb164b17585efbce7d2f"/></dir><file name="Tabs.php" hash="b30393596097cc28b153f3bea608daa4"/></dir></dir><dir name="Totals"><file name="CodFee.php" hash="97a9a7a257b77c84982248725d508082"/></dir><dir name="View"><file name="DeliveryOptions.php" hash="921c6ca54e49e84f473a2590af68e3a9"/></dir></dir><dir name="Returns"><file name="Grid.php" hash="26d384aa33d8462147810ed39ec60f8e"/></dir><file name="Returns.php" hash="4bac3a7614c8b3f2a52c2877551ab49e"/></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="ActivateButton.php" hash="33e9b80d19073164a2e365b0d8d356b2"/><file name="ActivatedFieldHeader.php" hash="1e186108515469f4fb39389dc452f0f5"/><file name="AddressLines.php" hash="75cde5b91d30e50a2898239439bd9f6e"/><file name="Anchor.php" hash="f127dc0f0e26cd75f59327d25df1aa5f"/><file name="Checkbox.php" hash="ab2bd5412fade8ec687921b9497fe0f8"/><file name="ConfigCheck.php" hash="dbabeeb4655f867a91729ff18fc05d57"/><file name="HourMinute.php" hash="4d75dceadf75cb2d21e55521816cf11a"/><file name="InfoBox.php" hash="11a95769c25e485b9b4b949c46e90719"/><file name="MatrixrateExport.php" hash="c7bcb8da6fb432cf44e7d384a912a9be"/><file name="MatrixrateImport.php" hash="bff71a9704881bc8d0065f7e08761bd6"/><file name="Obscure.php" hash="76e85a70650159c77d041bc6f76406b5"/><file name="PackingSlipItemColumns.php" hash="a2bd2453d5af9ef28a9166db8bc25e25"/><file name="Radios.php" hash="b0fd87974970d84936f437d36dbe4ee9"/><file name="SplitAddressCheck.php" hash="794d55152b458682723a3b5fc4c5817d"/><file name="SupportTab.php" hash="81740bbec0e2d9e1d86987478aef7e4c"/><file name="TablerateExport.php" hash="c1b20095899026e0db2673fbc2e9fe25"/><file name="TablerateImport.php" hash="28a5a7d00aa8e930cbfde05c28496bb5"/><dir name="TextBox"><file name="Abstract.php" hash="e06fd34b79e5dcd990f801dc84969513"/></dir><dir name="Tooltip"><file name="HourMinute.php" hash="036220bfec18f65be691383155d9ba8d"/></dir><file name="ValidateButton.php" hash="15df40ad054f16d000916cdbe2562e4a"/><file name="WarningBox.php" hash="94f6480b7e65591f3ca1847d1c9a56b1"/><file name="WizardSaveButton.php" hash="fc34edbab4fe63466f32de41986e17d8"/></dir><file name="Fieldset.php" hash="c8b49c29b9ac4446d5fe1a3b9f4a5047"/></dir><file name="Form.php" hash="fb36f7aceeb2d8f24841be0f00ce854a"/><file name="Js.php" hash="fd5b8fbc4a36cb8a71f42e67867323e6"/></dir></dir><file name="Template.php" hash="d6ce29ba17d19e41766d2cc6aca6f07a"/><file name="UpgradeNotification.php" hash="e47f682df3628237dbd4c793caeb35f9"/><dir name="Widget"><dir name="Form"><dir name="Element"><file name="Dependence.php" hash="136f45c0012a6443730fc081a3d60887"/></dir></dir><dir name="Grid"><dir name="Column"><dir name="Filter"><file name="ConfirmDate.php" hash="c3a25e3a16ef03b92ff3dc7a18466c2b"/></dir><dir name="Renderer"><file name="Action.php" hash="1ac9ddf57b36b3c1386bb615497825c5"/><file name="Barcode.php" hash="69920c80dea7b13030b1d65870c925ca"/><file name="ConfirmDate.php" hash="c2a451a240a3ebba3f1bacc90d34c5ac"/><file name="ConfirmStatus.php" hash="7f1ec5831bb43169d6dfeeae447d6de9"/><file name="CountryArray.php" hash="db7d69073eaaa4316968faff1f0388da"/><file name="DeliveryDate.php" hash="1f199a2a305ffeffdb47ae49289fbfa5"/><file name="OrderConfirmDate.php" hash="46acb6b1fed0e07cb5fc0e6bc12532bd"/><file name="OrderConfirmStatus.php" hash="71838dfb638b95c9bd86a717153a43a4"/><file name="OrderType.php" hash="033f58f32b0b9afa44e7305cd68c4a72"/><file name="ShipmentType.php" hash="77909f55313d7ff70c40aaef6cb64fe6"/><file name="ShippingDescription.php" hash="45bd32a5cae72f8cb39495cd063ebb2d"/><file name="ShippingPhase.php" hash="86e3b289d913c5cb4d61602adb735991"/><file name="Time.php" hash="763e60df40cc7ffd0a74dd1627e9407a"/><file name="Translate.php" hash="d52bfd19d268ccd534e14d81bd180602"/><dir name="Type"><file name="Abstract.php" hash="a3065b1b3b5b821f0d712fbfc091e0d7"/></dir><file name="YesNo.php" hash="e70fffd3ebe45e8228e3e56a44e4a1ad"/></dir></dir><dir name="Massaction"><dir name="Item"><dir name="Additional"><file name="LabelStartPos.php" hash="8d7689be432c7d03202326fd65dacf61"/><file name="ProductOptions.php" hash="6ae961fa45f61571cf9a03e9d1b5cdeb"/></dir></dir></dir></dir></dir><file name="WindowsTheme.php" hash="3edb76809f4c80ffc2d881973cd38600"/></dir><dir name="Checkout"><dir name="Cart"><file name="CheckoutLink.php" hash="b4e3201509a6d4cab10c25773ff64af8"/><file name="Js.php" hash="df28c4e6ba211d2253c323f0a8cc0451"/></dir><file name="Summary.php" hash="304b58343765950a1c0e7c9d845be9c4"/></dir><dir name="Core"><file name="JsTranslate.php" hash="9149ad01a91abd529964a6cc87417a1e"/><dir name="Order"><dir name="Returns"><file name="Info.php" hash="77bb5b78ce6091bc9fbb2bef12e6ca8b"/><dir name="Shipment"><file name="Items.php" hash="32830c84fdc977e05c668d665a85aa70"/></dir></dir></dir><file name="ShippingStatus.php" hash="3d83bb7365f3fa884b244034dec1d7de"/><file name="Template.php" hash="e0c1bd6a855a39b35a69816724d28798"/></dir><dir name="DeliveryOptions"><dir name="Checkout"><file name="AddPhoneNumber.php" hash="ba4c84bcb13afd3ac45727384888f2cf"/><file name="DeliveryOptions.php" hash="737c39fa9a836e6c8eb9415cfdc538e2"/><file name="Progress.php" hash="3262dc937d55fdf466963cd18257c539"/></dir><file name="Js.php" hash="7a9eb3d08d47fe7ec1b7b0bac478e40e"/><file name="Template.php" hash="d0789924a9a8daecec789228532196d4"/><file name="Theme.php" hash="c6584155f29b7223c2f65691b172f603"/></dir><dir name="Mijnpakket"><file name="AccountNotification.php" hash="ddaf89c4ad231155a9d1a517cb87f9a3"/><file name="Js.php" hash="44b03d17d02ab6f81d6a0e208c0d6f70"/><file name="LoginButton.php" hash="8f91459a72b8b0c2559b6f1a3c94d452"/><file name="OrderSuccessJs.php" hash="47cb89ad5dbcd00e2fc11197ef0aad3b"/></dir><dir name="Payment"><dir name="Checkout"><dir name="Total"><file name="CodFee.php" hash="5a85a42e98d9862cc9ae93aa38cbdf0d"/></dir></dir><dir name="Form"><file name="Cod.php" hash="a9e8baf6862d03301f52aab14464b1b0"/></dir><file name="Info.php" hash="d48ea6ffc7bf5b1e5ba006ad851aa244"/><dir name="Sales"><dir name="Order"><dir name="Creditmemo"><dir name="Totals"><file name="CodFee.php" hash="c7af4f2619d3dc94e202e3f421aeb76a"/></dir></dir><dir name="Invoice"><dir name="Totals"><file name="CodFee.php" hash="ad655d6a1ed32f27862399efa5b92da3"/></dir></dir><dir name="Totals"><file name="CodFee.php" hash="9ae886d28d5b06f796081b898169443d"/></dir></dir></dir></dir></dir><dir name="controllers"><file name="AddressValidationController.php" hash="43d0df21d62477bc4bb81d151f04d721"/><dir name="Adminhtml"><file name="ConfigController.php" hash="db8176c86cd3df2020e43f3f3e052557"/><file name="ExtensionControlController.php" hash="6a0ba1a1a7f6fa8b4e943ebb22a4560b"/><file name="ReturnsController.php" hash="e5bbe1843b7309763b50db1d6f083536"/><file name="ShipmentController.php" hash="ff91facbc4d9726b209da27dab04fe3c"/></dir><file name="CheckoutController.php" hash="1f2dd7a16caa9a0598829ca550198d07"/><file name="DeliveryOptionsController.php" hash="a133264803897d6758b2504e361939b4"/><file name="GuestController.php" hash="3d45907a9fa20ac6bc0ae896ecad8965"/><file name="MijnpakketController.php" hash="bddbca0069c32c23a59405d46fe2dde3"/><file name="OrderController.php" hash="f453ab0d907cc5da2ba06450f9e23722"/></dir><dir name="data"><dir name="postnl_setup"><file name="data-install-1.0.0.php" hash="4e1416ef10c0d845292e96cf1136e8cd"/><file name="data-install-1.0.3.php" hash="1513327dc5814083fc94d40ca0119980"/><file name="data-install-1.1.4.php" hash="f9b0335de97ca3d6aa204ed4737c5ad0"/><file name="data-install-1.3.0.php" hash="0fe0a6cb8d6ffac3d639cd18c794f45c"/><file name="data-install-1.4.0.php" hash="7fa08e2d5507910abad5f8304c4dce67"/><file name="data-install-1.4.1.php" hash="7fa08e2d5507910abad5f8304c4dce67"/><file name="data-upgrade-1.1.5-1.2.0.php" hash="da29d32919d5a08ec521c2e1cd1874aa"/><file name="data-upgrade-1.2.2-1.3.0.php" hash="2bbf0c4405be253a875f8f59c1442821"/><file name="data-upgrade-1.2.2-1.4.0.php" hash="594ef7e9206d640d526f5e1442d84f2a"/><file name="data-upgrade-1.3.1-1.4.0.php" hash="eff43da4dc9a0a352bb266025ee3a885"/><file name="data-upgrade-1.4.0-1.4.1.php" hash="73b0c09cde478f9e6d7108c83d55058f"/><file name="data-upgrade-1.4.1-1.5.0.php" hash="e284b78cbeb1fb5c340e30679215c5e8"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="fef4eb6b01497c7f6d1a4ad5b47e5c6c"/><file name="config.xml" hash="634d5931cbc9aa7a886e4dd936813ef7"/><file name="jstranslator.xml" hash="2dc873aaf53943d0a4c1d18b752e1c0e"/><file name="logging.xml" hash="245a6833e6099eb66cf3307714267760"/><file name="system.xml" hash="ceda77ef45be1660d2347ded80f9c912"/></dir><dir name="Helper"><file name="AddressValidation.php" hash="74cb844b29c499a0a4b1abdc5bbab23c"/><file name="Carrier.php" hash="f94f284ac65bd4dce016fe9c28ea6c57"/><file name="Checkout.php" hash="23d54a63440207f6d7d11a1118df4532"/><file name="Cif.php" hash="0734a810a51ae9e40d2e20404c63a468"/><file name="Data.php" hash="2d760475327b01526b18135c4d517e09"/><file name="DeliveryOptions.php" hash="3861d4d68c88862d35a7578fc3d7fe76"/><file name="Mijnpakket.php" hash="dddb6611c326fe07d073db9f3d050b4d"/><file name="Parcelware.php" hash="9fe3d50fec782d977a8e932ee1d2f2ae"/><file name="Payment.php" hash="7e49c4aa3080904631d314196fa4c74e"/><file name="Webservices.php" hash="17e69184adb2e7d332f34b9ecda73427"/></dir><dir name="Model"><dir name="AddressValidation"><dir name="Cendris"><file name="Abstract.php" hash="93dac29ee69b1d65c602a5ede48e6c8e"/></dir><file name="Cendris.php" hash="4224a8ad05077b7897073ece6e0c4b23"/><dir name="Observer"><file name="AddressBook.php" hash="38fb2c6e676e91c5d3695d0a11fcc701"/><file name="OneStepCheckout.php" hash="0fc1a9059277fb18554e29450bbf0d95"/><file name="Onepage.php" hash="34a91f37d0cddbf98bc717f2c130cfea"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="ValidateAccount.php" hash="5ac53c664167847599c6ae4c7114e525"/></dir></dir></dir></dir><dir name="Admin"><file name="Inbox.php" hash="0d037d1d0c8ae1fd1fefa1b624ffa19d"/><dir name="Logging"><dir name="Handler"><file name="Postnl.php" hash="d15b8932a3b02bdc0cc4efbaff15e009"/></dir><file name="Observer.php" hash="1c3aaf2c953327c9399a717810a39c2e"/></dir></dir><dir name="Adminhtml"><dir name="Form"><dir name="Element"><file name="Checkbox.php" hash="8253510969012a3a830ad5b0bfded46b"/></dir></dir><dir name="Observer"><file name="OrderGrid.php" hash="66ab6e6ae4c4bfaff52a9d4aa0fcc49c"/><file name="ShipmentGrid.php" hash="8f53beccfa175c79f11e6909590b5968"/><file name="ShipmentView.php" hash="ed9b413e38b48e6390b93c614a990db9"/><file name="SystemConfig.php" hash="4862b191cd4c19115c7cc43805a21759"/></dir><dir name="Support"><file name="Logs.php" hash="fe0c03278b20ef4e019e150ac2933b27"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="OrderGridColumns.php" hash="3818b302b7507e39e9002b40b667cf59"/><file name="OrderGridMassaction.php" hash="0fda13f03b2dc8663e64664fbba4c0cf"/><file name="ShipmentGridColumns.php" hash="248a75d2c60fa0b46e0436560eb7c300"/><file name="ShipmentGridMassaction.php" hash="cc9ff2b62d4394aa1f2bade6172dfe21"/></dir></dir></dir></dir><dir name="Carrier"><file name="Matrixrate.php" hash="19046713336a5e4532b41dd3be5f8763"/><file name="Postnl.php" hash="de84ca33c776d3a544a17a24ac8dae9d"/><dir name="Quote"><dir name="Address"><dir name="Total"><file name="Shipping.php" hash="d63b56b522e13e9778e681d187a84852"/></dir></dir></dir><dir name="Resource"><dir name="Matrixrate"><file name="Collection.php" hash="404b6a72976e304953dccdeeb5c2443d"/></dir><file name="Matrixrate.php" hash="c3e038928829325eb4f4476a02d16040"/><dir name="Tablerate"><file name="Collection.php" hash="a4d4c9efac4dacfce2c206fa7b49a2e9"/></dir><file name="Tablerate.php" hash="8ec130f89f3376218a9c5b1d48445fbd"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="Matrixrate.php" hash="3f81a596f0ea00895056af484dd3344c"/><file name="Tablerate.php" hash="92c6db2347344e9700b1e73bb4b1e942"/></dir><dir name="Source"><file name="RateType.php" hash="0f232b95f4fa39ec73bf0af7f9b6629d"/><file name="TablerateSource.php" hash="95e0c803ca2499870b14389c344d4e53"/></dir></dir></dir><file name="Tablerate.php" hash="8ce6ea57fbfd9036d2b29bed7c8eff37"/></dir><dir name="Checkout"><file name="Cif.php" hash="2424f4afac606ef2f8f53027fe0645c7"/><dir name="Observer"><file name="Order.php" hash="50f6b00c183d20d15fe7861ce9b0a360"/><file name="Shipment.php" hash="66ab0f71742fc0763628f76e1fcd7246"/></dir><file name="Order.php" hash="73e3daf62a7ea46c347d0529046377cb"/><file name="Service.php" hash="087ebf2c45fabc469f6cb10a99ba2fba"/><dir name="System"><dir name="Config"><dir name="Source"><file name="ActivePaymentMethods.php" hash="ec6d8b61904454f08e02bc623a560c96"/><file name="CmsPage.php" hash="efef30fccf6f01d143885bf7abf7579d"/></dir></dir></dir></dir><dir name="Core"><file name="Cache.php" hash="f986c088a0754208840c123f0eb06b21"/><dir name="Cif"><file name="Abstract.php" hash="138dae936778d09eee32017ea97cc3c4"/><file name="Exception.php" hash="a260a4ee2bd7535e2e7c83587c408666"/></dir><file name="Cif.php" hash="d90fc4bba36eb50f21b27a05d7ec1b23"/><file name="Label.php" hash="d917b56fd388b329b9ba78b931988bcc"/><dir name="Observer"><file name="Barcode.php" hash="b3b90729949538f7485ca30de9b1d65c"/><file name="Cache.php" hash="2050c7f64f9f80e1d9128afe2211c690"/><file name="Cron.php" hash="eb270498b88cd07a5251ad6bf70a5a34"/><file name="Returns.php" hash="44653ff37f7cf3aabf12cf8a56e6a310"/><file name="SaveShipment.php" hash="dd6f2abea49ad9f7f55b4587bae3df81"/></dir><file name="Order.php" hash="f967e8846482752d71ea875f273a8a42"/><file name="PackingSlip.php" hash="a7c07818cecb474e08c73010adc33ffd"/><dir name="Packingslip"><dir name="Pdf"><dir name="Items"><dir name="Invoice"><file name="Default.php" hash="e2561de6907ab70e12c2c863b9e91519"/></dir></dir></dir></dir><dir name="Resource"><dir name="Integrity"><file name="Collection.php" hash="540de0e07435d3e9b015d1cdb4826ba8"/></dir><file name="Integrity.php" hash="919c166146701e3a63ef6a0262b9b4f3"/><dir name="Order"><file name="Collection.php" hash="27f753a23bec9e1f4cf172bc2af27e81"/></dir><file name="Order.php" hash="18b235e5ff33e16572f0cea3e3d5733d"/><dir name="Shipment"><dir name="Barcode"><file name="Collection.php" hash="9f4e6a430f88dfae411e16e10fa66ba7"/></dir><file name="Barcode.php" hash="185cd4e124fba3f4119acbd79e564c71"/><file name="Collection.php" hash="d5592876800dad736cf245754e14a6bc"/><dir name="Label"><file name="Collection.php" hash="1d9d238804a610859cb33a448730ce2c"/></dir><file name="Label.php" hash="5e4fd390edf90cd016376458471f10e6"/><dir name="Status"><dir name="History"><file name="Collection.php" hash="fb0cf3a36d15b265823df5702ef7dab7"/></dir><file name="History.php" hash="4a3a9df70ba8e234a08301e6d9c83226"/></dir></dir><file name="Shipment.php" hash="dcf064a2011a49e935137e3358562772"/></dir><dir name="Service"><file name="IntegrityCheck.php" hash="3abbf58a3fca6d479ce0c44442c7d747"/><file name="InvoiceDummy.php" hash="344735e07fda436f2104d38781ef2eb1"/><file name="OrderDummy.php" hash="ecc86dead87bc875de9da25dbd526726"/><file name="PaymentDummy.php" hash="ac4188658dcef27445ca3bae8f1b3607"/><file name="PaymentMethodDummy.php" hash="b61ae0196d8e4d5261b19e39fa42ad07"/></dir><file name="Service.php" hash="16d733fc5ccf3cd4acb3584a22e50b6a"/><dir name="Shipment"><file name="Barcode.php" hash="c6a935c3939d9dd4231f8f8d470aa481"/><file name="Label.php" hash="aebc6b0839115c159c4312aded20a1a4"/><file name="Process.php" hash="d89ca9b6fa028c3004eb722a1d23f90d"/><dir name="Status"><file name="History.php" hash="0ec7ec0a695b10fffb3c3d3614474e78"/></dir></dir><file name="Shipment.php" hash="8945e91c38b5438c66f710f7cb73215d"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="HourMinute.php" hash="b1371a9b156178516a2b8a3d6a6fbc95"/><dir name="Image"><file name="Pdf.php" hash="3bde0a9e0b6971c278bff0ddab4d752e"/></dir><file name="ValidateDefaultOption.php" hash="9342572e615f83b48536c409c5106dd1"/></dir><dir name="Source"><file name="AllProductOptions.php" hash="175b584e2d510167e7fec866ed05c086"/><file name="Attributes.php" hash="c2954f4d6fda0f571259045001ef793f"/><file name="BuspakjeProductOptions.php" hash="c3783682c0f70c53ad1c7ce5df9444f9"/><file name="CheckoutExtensions.php" hash="ff7450fc76386d19fab7a4918cf3a8d1"/><file name="CommentType.php" hash="be9b0760241f17cd56dcddf2a3b5d462"/><file name="CutOffTime.php" hash="69be9922cdfd52b6be7357d5eced4e00"/><file name="DebugMode.php" hash="5049c8e87605139ff9191e2a985e86ba"/><file name="Direction.php" hash="e889a99644f2c65594fb7a42c40baca8"/><file name="EuProductOptions.php" hash="d165cfb8a457205bfaa098e8d27b7627"/><file name="GlobalProductOptions.php" hash="cf9986b69eab032c0723345bbe7a0486"/><file name="GlobalpackShipmentType.php" hash="6dcc55b6dfc837cb90ab76eb4de99075"/><file name="HourMinute.php" hash="0a1fd22a4722a2fbdf1d19c476dcaa5a"/><file name="LabelSize.php" hash="d2ca669ee577787ee53889f91675883b"/><file name="ManualAutomatic.php" hash="c91fa25d279900be653f36c6115df8b3"/><file name="PackingSlipItemFields.php" hash="407f7c52218c487301104487e595f2a0"/><file name="PakjeGemakProductOptions.php" hash="44fb7f004a98757eaf26fa9b94eeb50c"/><file name="PakketautomaatProductOptions.php" hash="54f8f5765875d2fd59b96e040c87010a"/><dir name="ProductOptions"><file name="Abstract.php" hash="79605898f197357114a1a57e562b93b0"/></dir><file name="ReferenceType.php" hash="c5d36804fab3e6029aac855973de0c0a"/><file name="ShippingDays.php" hash="9a6e02ebbf394cb4e3a38c34153ee74c"/><file name="ShippingDuration.php" hash="14fd5eb486136c82f1b050b487bfebff"/><file name="ShippingMethods.php" hash="664c94c4661a3a3203bd0532f7807cc7"/><file name="StandardProductOptions.php" hash="0e0ad50ba2be0e18f4fb70edda7c535c"/><file name="StaticBlocks.php" hash="518e9cd78f5d5074ddd83e0fd1bbf7c8"/><file name="StreetField.php" hash="0898af8ea2a5358fdce9494d78406f7d"/><file name="StreetFieldWithDefault.php" hash="68d1a08ce9261108ad46954c213a56a2"/><file name="WeightUnit.php" hash="f87db80b4ed016f12091b897ef3876a4"/></dir></dir></dir></dir><dir name="DeliveryOptions"><file name="Cif.php" hash="233d335e7b3186a3c6205e1a45bef7d9"/><dir name="Observer"><file name="ShippingMethodAvailable.php" hash="5dde5bf6be6b1cfc6600d56f3f681b8e"/><file name="UpdatePostnlOrder.php" hash="fabef6a2e029b9fa387579eb4d584367"/></dir><dir name="Product"><dir name="Attribute"><dir name="Source"><file name="ShippingDuration.php" hash="310975088d003ed149fbaec627cfc1aa"/></dir></dir></dir><file name="Service.php" hash="ecaff03df04c7923a8ac33bd0c218c19"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="ValidateFee.php" hash="4f0b114f151c283b877bff3eec115f93"/></dir><dir name="Source"><file name="DeliveryDaysNumber.php" hash="f6d4d2635deae45d7da9ffe4dbda3b0c"/><file name="Themes.php" hash="cfdc49c7d90b66f42b57abb7724085ab"/></dir></dir></dir></dir><dir name="ExtensionControl"><file name="Config.php" hash="4952952a3b3ae5cfd9606c6e35e3a757"/><file name="Feed.php" hash="8dd0a4e12b76420f578faaa0f0aa0550"/><dir name="Observer"><file name="Cron.php" hash="e7aa63be6ac3689c535e2d239f0cf627"/></dir><dir name="Webservices"><file name="Abstract.php" hash="023fd15659e73abee4292dda2c85173e"/></dir><file name="Webservices.php" hash="05454f45903f2f9829a1c11d2c05bd37"/></dir><file name="Inbox.php" hash="ee448dbce949ba1617dae12bf3c19bee"/><dir name="Mijnpakket"><file name="Cif.php" hash="8b11581aed9412ce4d4584406d220c1f"/><file name="Service.php" hash="69d2d16472f9483f3b8b9060da0747dd"/></dir><dir name="Parcelware"><file name="Export.php" hash="59db7cc5a878983d004caf7c31c68cfc"/></dir><dir name="Payment"><file name="Cod.php" hash="ad81b6820d12448aefcd18f2c4373478"/><dir name="Observer"><file name="Cod.php" hash="886dcba29c9d0624ef5e140a6736bacb"/></dir><dir name="Order"><dir name="Creditmemo"><dir name="Total"><dir name="CodFee"><file name="Abstract.php" hash="837596f4123051513513642ad293a134"/></dir><file name="CodFee.php" hash="408441b1cd61fe3e951307e590763721"/><file name="CodFeeTax.php" hash="06bedba27001f95893e9e5bd26aab4a7"/></dir></dir><dir name="Invoice"><dir name="Total"><file name="CodFee.php" hash="1345e1506b8cb44734b572f98e09f2ed"/><file name="CodFeeTax.php" hash="0ecb4c12a78a9fce875d675b142dc86d"/><file name="Subtotal.php" hash="cb5d753adf6c64965d9795c128d39adc"/></dir></dir><dir name="Pdf"><dir name="Total"><file name="CodFee.php" hash="318019eca0b1d998947b85ed820a6417"/><file name="Grandtotal.php" hash="531d76807d06b8f3ea824b378cede384"/><file name="Tax.php" hash="4f64ea0f29048b9e4f7140633595d8e9"/></dir></dir></dir><dir name="Quote"><dir name="Address"><dir name="Total"><dir name="CodFee"><file name="Abstract.php" hash="c75c2d60c9d677901fcbc3e024db5ccc"/></dir><file name="CodFee.php" hash="48c19ac6f4a480d908c88a3df6f2a9d4"/><file name="CodFeeTax.php" hash="d9697548b173663c83717428f8511322"/></dir></dir></dir><file name="Service.php" hash="03aae700a5c2ad22c2d814903cd2c447"/><dir name="System"><dir name="Config"><dir name="Source"><file name="CodFeeTaxClass.php" hash="eb6496506ef59702f4bad91045c5057f"/></dir></dir></dir></dir><dir name="Resource"><dir name="Catalog"><file name="Product.php" hash="4e3be14b3a02e60621d1f7ea884b25ab"/></dir><dir name="Db"><file name="Abstract.php" hash="71aadf67293622844145f2b612683f45"/><dir name="Collection"><file name="Postnl.php" hash="dac9729cc2c08f7ee58a9d76dab75895"/></dir></dir><dir name="Order"><dir name="Grid"><file name="Collection.php" hash="acffdb84d3eb6f011bb3937b40134146"/></dir><dir name="Shipment"><dir name="Grid"><file name="Collection.php" hash="8ae806ead56458285892a45650cbfa95"/></dir></dir><file name="Shipment.php" hash="b46ad0f74b111408bc58a63a05d73eca"/></dir><file name="Setup.php" hash="ebebe9a24131049cf07ad59a9a8fb2b5"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="Checkbox.php" hash="b618fc97a1e03f04d2a72981c1696702"/></dir><dir name="Source"><file name="Testlive.php" hash="fd7cc1d769033796b9bd3ca881e65ca8"/><file name="Yesno.php" hash="43a6af0cd42ab949e114849a71682a88"/></dir></dir></dir></dir><dir name="sql"><dir name="postnl_setup"><file name="install-1.0.0.php" hash="0d46454bd70fbcd965b82b2ba8c6c241"/><file name="upgrade-1.1.5-1.2.0.php" hash="b0927fba2c4062f3235d1f6717c63ff9"/><file name="upgrade-1.2.2-1.3.0.php" hash="a55e174766cefceed7906e82a3b19a50"/><file name="upgrade-1.3.1-1.4.0.php" hash="89783d42eb8be33502c4c469c7aa3d0c"/><file name="upgrade-1.4.1-1.5.0.php" hash="8cefe4cbe234ed19eb3fd082b6260ff0"/></dir></dir><file name="Exception.php" hash="2b01ad1111201ece698fb7a336b02150"/><dir name="Controller"><dir name="Adminhtml"><file name="Config.php" hash="9a93641ee31eff0994cac065106123df"/><file name="Shipment.php" hash="51f27daea9829253ac40f0f6d89425e1"/></dir><file name="Sales.php" hash="b77ac98167f0e56bafb32bb9ccfdfaa4"/></dir></dir></dir></target></contents>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>tig_postnl</name>
|
4 |
+
<version>1.6.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US">Creative Commons License</license>
|
7 |
<channel>community</channel>
|
20 |
- Viewing detailed shipping status information
|
21 |
- PostNL Checkout
|
22 |
- Emailing customers track & trace information, allowing them to track their shipment from the moment you confirm it to the moment it arrives at their doorstep</description>
|
23 |
+
<notes>==== v1.6.0 ====
|
24 |
+
==== New Features ====
|
25 |
+
- PostNL delivery options are now compatible with GoMage LightCheckout.
|
26 |
+
- PostNL MijnPakket login and Postcode check are now compatible with GoMage LightCheckout.
|
27 |
+
- It is now possible to use Magento's Soap API to confirm PostNL shipments, print shipping labels, get Track&Trace information and more!
|
28 |
+
- Added the option to not print a PostNL shipping label when printing the PostNL packing slip.
|
29 |
+
- Added a new uninstall button to safely uninstall the PostNL extension.
|
30 |
+

|
31 |
+
==== Improvements ====
|
32 |
+
- Updated the Google Maps integration to v3.19.
|
33 |
+
- Optimized error handling for certain CIF errors.
|
34 |
+
- Reverted the PostNL extension's Zend_Soap implementation to native PHP SoapClient for improved compatibility with HHVM.
|
35 |
+
- Improved the out-of-stock check used in PostNL delivery options to better match merchant expectations.
|
36 |
+
- Improved performance when printing packing slips or shipping labels.
|
37 |
+
- Malta is now considered an EPS destination.
|
38 |
+
- Added compatibility with Magento's SUPEE-6285 patch.
|
39 |
+
- Improved the address-splitting regular expression to better split house numbers from street names.
|
40 |
+

|
41 |
+
==== Bug Fixes ====
|
42 |
+
- Fixed an incorrect variable name in the upgradeNotification block.
|
43 |
+
- Fixed an issue where the mobile phone number popup would not appear when selecting a parcel dispenser location in onestepcheckout after a coupon had been added.
|
44 |
+
- Fixed a conflict with OneStepCheckout, where selecting a delivery date in the popup and then closing the popup (not by saving, but by using the 'x' icon), PostNL would be selected as delivery option but not the date, leaving the shipment with no shipping information.
|
45 |
+
- Fixed an issue where products on the PostNL packing slip would sometimes show 0 tax amount.
|
46 |
+
- The shipping date is now also shown on the packing slip when the show shipping method option is disabled.
|
47 |
+
- Fixed a javascript issue with PostNL COD when Delivery Options are disabled .
|
48 |
+
- Fixed several problems relating to a server's time zone configuration.
|
49 |
+
- Fixed an issue in the date renderers in Magento's backend where an unnecessary timezone correction resulted in incorrect dates being displayed.
|
50 |
+
- Fixed an issue where the attribute update cron would not be removed automatically when all products were updated.
|
51 |
+
- Fixed a problem with the temporary update crons when config cache is active.
|
52 |
+
- Fixed a problem where re-activating a quote after the order had been placed could lead to missing PostNL data.
|
53 |
+
- Fixed an issue where orders could incorrectly have an expected delivery date when no delivery option was selected.
|
54 |
+
- Fixed compatibility with payment extensions (e.g. Sisow) to prevent crashing when printing packing slip.
|
55 |
+

|
56 |
+
==== v1.5.3 ====
|
57 |
+
==== Bug Fixes ====
|
58 |
+
- Fixed an issue where in certain situations the delivery date may be equal to the shipping date for orders where no delivery date was chosen during checkout.
|
59 |
+
- Fixed an issue where all orders would be considered to be placed past the cut off time when the shipping duration was configured to be more than 1 day.
|
60 |
+

|
61 |
+
==== v1.5.2 ====
|
62 |
+
==== New Features ====
|
63 |
+
- Added compatibility with the Bpost Shipping Manager extension.
|
64 |
+
- Added the option to hide often shown warnings for the current admin user.
|
65 |
+

|
66 |
+
==== Improvements ====
|
67 |
+
- Added a warning to the configuration page when using the Postcode.NL extension as this extension may conflict with the PostNL extension/
|
68 |
+
- The PostNL postcode check functionality is now automatically disabled when using the Postcode.NL extension.
|
69 |
+
- Improved error handling when changes were made directly to the Magento database.
|
70 |
+
- The expected shipping and delivery dates are now also saved when no delivery option was selected during checkout.
|
71 |
+
- Several additional characters are now allowed in the packing slip item columns.
|
72 |
+
- Modified the way delivery options determine whether products are in stock in order to better match merchant expectations.
|
73 |
+
- Modified interface element for stock options for delivery options to better match merchant expectations.
|
74 |
+
- Modified code to prevent errors when the default cut-off time is missing.
|
75 |
+
- Improved error handling when changing a package shipment to a letter box shipment and the default letter box product option is unavailable.
|
76 |
+
- Added caching to the store time zones in the PostNL data helper.
|
77 |
+
- Added additional checks to prevent no extra cover amount from being sent for extra cover shipments.
|
78 |
+
- Fixed an incorrect English name for parcel dispensers.
|
79 |
+
- Removed the parcel dispenser label from the delivery options interface.
|
80 |
+
- Added a new notification to the order email to make it more clear that the customer has chosen to have their order delivered at a pick up location.
|
81 |
+
- Added a new notification to the billing and shipping address templated in OPC to make it more clear that the customer can select a pick up location in the shipping method step.
|
82 |
+
- The shipping address is now hidden in the progress bar on OPC when a post office address is selected.
|
83 |
+

|
84 |
+
==== Bug Fixes ====
|
85 |
+
- Fixed the split address lines detection on the PostNL config page. This should prevent incorrect warnings about split address lines from being shown.
|
86 |
+
- Fixed a bug where the chosen product option was not saved when using the create shipments mass action.
|
87 |
+
- Fixed the order confirm date renderer for orders that were placed late at night.
|
88 |
+
- A PostNL order is now also created for orders that do not have an associated delivery option. This prevents unexpected behaviour in the order grid when filtering on the confirm date column.
|
89 |
+
- Shipping labels are now oriented horizontally to prevent errors when printing directly from Chrome.
|
90 |
+
- Fixed an issue where the extra cover amount option was shown on the create shipment page when the 'is_buspakje' checkbox was checked by default and an extra product option was selected as default.
|
91 |
+
- Fixed an issue where buspakje was available for avond shipments.
|
92 |
+
- Fixed issue with not selecting delivery option in OSC would cause order date to be show as delivery date.
|
93 |
+
- Fixed an issue where the delivery and confirm dates were calculated using the server's time zone, rather than the UTC time zone.
|
94 |
+
- Fixed a possible notice due to a missing default value in the 'hour-minute' field renderer.
|
95 |
+
- Fixed an issue where filtering on the order type column would cause errors due to an incorrect join alias.
|
96 |
+
- Removed regex-based validation for delivery location names to prevent valid names from being blocked. Instead all tags are stripped from the name and the name is additionally escaped before processing.
|
97 |
+
- Fixed an issue which caused the Magento table rates title to be displayed for PostNL.
|
98 |
+
- Fixed an issue which caused the default letter box parcel option configuration setting to not be visible.
|
99 |
+
- Fixed an issue which could cause JS errors when there was an error while loading delivery options.
|
100 |
+
- Dots are now allowed in street addresses..
|
101 |
+
- Fixed a small typo in certain error messages.
|
102 |
+
- Fixed a small layout problem in the delivery options on small desktop screens.
|
103 |
+
- Fixed a bug where delivery options are not available when purchasing the same configurable product twice with different options.
|
104 |
+
- Fixed a warning message in the update attributes cron due to an undefined index.
|
105 |
+
- Fixed an issue where only come delivery options are available when the product attribute cron is still running.
|
106 |
+

|
107 |
+
==== v1.5.1 ====
|
108 |
+
==== New Features ====
|
109 |
- Added a parcel dispenser filter to the delivery options location picker.
|
110 |

|
111 |
==== Improvements ====
|
390 |

|
391 |
This is the initial beta release of the extension. If you have any questions, please contact the Total Internet Group Servicedesk</notes>
|
392 |
<authors><author><name>TiG</name><user>supporttotal</user><email>servicedesk@totalinternetgroup.nl</email></author></authors>
|
393 |
+
<date>2015-08-10</date>
|
394 |
+
<time>09:04:32</time>
|
395 |
+
<contents><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="TIG"><file name="postnl.xml" hash="9e82023fd46f786583dba4afd3b2da48"/></dir></dir><dir name="template"><dir name="TIG"><dir name="PostNL"><dir name="address_validation"><dir name="checkout"><dir name="onepage"><file name="billing.phtml" hash="0cb781955d33fae46da09d62bd6fdaf3"/><file name="postcode_check.phtml" hash="bb41cb9863f2a6a85cf1110c2cab8160"/><file name="shipping.phtml" hash="202f4808d3658d510175c6b975991da5"/></dir></dir><dir name="customer"><dir name="address"><file name="edit.phtml" hash="eb3f3f53d153c42165cf70085e026b60"/><file name="postcode_check.phtml" hash="cbb8bfd76db65041cafacf976312ceb7"/></dir></dir><dir name="gomage_checkout"><file name="billing.phtml" hash="e185cac738b3e9808fb41131e257f2a6"/><file name="postcode_check.phtml" hash="7212456a0406763b4e6a002b00bce841"/><file name="shipping.phtml" hash="13ce6e8d74a737ca25f2e57bcb237b9a"/></dir><dir name="onestepcheckout"><file name="billing_fields.phtml" hash="1e04cda4539618f3738fea300682e8e9"/><file name="postcode_check.phtml" hash="9dd6f336942b9cfcfc1a8b26c283b143"/><file name="shipping_fields.phtml" hash="ed8e95313ca98b83f7acbe94ea39876b"/></dir><file name="validate.phtml" hash="75438f5484ae966f288b7bde7e225b0a"/></dir><dir name="checkout"><dir name="cart"><file name="js.phtml" hash="a9718e822a674ae768bc6a532bbb0e13"/><file name="link.phtml" hash="ecd5c96cb1a46f51270c3784232a5c47"/><file name="spinner.phtml" hash="26b8da7f12ef206b9768b325ad547c1b"/></dir><file name="summary.phtml" hash="0b5ba3d2ef1b1d17eca3c3bc603c265f"/></dir><dir name="core"><dir name="order"><dir name="returns"><file name="info.phtml" hash="1eb800d518ea4ac848c42850c6983b66"/><dir name="shipment"><file name="items.phtml" hash="a6b56265412c3e0f24e4cfc6b44e145d"/></dir></dir></dir><dir name="page"><dir name="html"><file name="js_translate.phtml" hash="3a12ce7789322fd513435101b5763811"/></dir></dir><dir name="sales"><dir name="order"><dir name="email"><file name="delivery_options.phtml" hash="a4bd8b76ba57b12bd56ab29e95f7c332"/><file name="pakjegemak_address.phtml" hash="4d66bc2a22d6916c8fe5388cf12b734a"/></dir><file name="pakje_gemak_address.phtml" hash="9c3f945dc11c6e7ab11c2a801c15617d"/><dir name="shipment"><file name="shipping_status.phtml" hash="e20200a32d1f40f661260e58ded904b9"/></dir></dir></dir></dir><dir name="delivery_options"><file name="addlocation.phtml" hash="8c44b58eb6e2df3909bfe0c460a28e7d"/><file name="addphonenumber.phtml" hash="9d7f5b6f1c25b753c39b9d9a75bf8809"/><dir name="gomage_checkout"><file name="available.phtml" hash="b506f7c4d9c40dfc70f5af2426f2e443"/><file name="deliveryoptions.phtml" hash="b19d0f51aa22ecad2cc8afcad53b32e7"/></dir><file name="js.phtml" hash="1090c61caf8925a6961ce55460246294"/><dir name="onepage"><file name="available.phtml" hash="100e509f0c2cb82e22de0735a4afc144"/><file name="deliveryoptions.phtml" hash="4263a1f9d25d60d485ca866625cc0e5e"/><file name="pickup_notification.phtml" hash="8a2262e00a82aac73f565fbf6ef160c3"/><dir name="progress"><file name="pakje_gemak.phtml" hash="07646cfd17ba8ddb1889ae0c01554440"/><file name="shipping_method.phtml" hash="cc7a33fa2411b444d1a23a053e313d66"/></dir></dir><dir name="onestepcheckout"><file name="available.phtml" hash="0b286aa4c191af9fe3c1cfda510aac71"/><dir name="bpost"><file name="available.phtml" hash="379d301a12d598d164b5afb0fac126b1"/></dir><file name="deliveryoptions.phtml" hash="74c4fa09cb253de0dea4aa58ecf93db3"/></dir><file name="progress.phtml" hash="4e17a7cc24bda609244091b767817cf1"/><dir name="sales"><dir name="order"><file name="delivery_options_info.phtml" hash="263147e3762bbfd2cba230a2d7ec21b5"/></dir></dir><file name="theme.phtml" hash="ae93d3471327a0525388264af2575382"/></dir><dir name="mijnpakket"><file name="account_notification.phtml" hash="0b291ada004cbdae82b41b457601dc59"/><dir name="gomage_checkout"><file name="js.phtml" hash="1c57ff5b07a2c7123c5cc01a41e6853e"/><file name="login_button.phtml" hash="f9ce5669bcc5526d254b294c29976ab6"/></dir><file name="js.phtml" hash="66014d70ce25f90fa651a33537335817"/><dir name="onepage"><file name="login_button.phtml" hash="5cca2265505f598d90d999d521a0e156"/></dir><dir name="onestepcheckout"><file name="login_button.phtml" hash="2df3da89991433c33ee203f14ca86b78"/></dir><file name="order_success_js.phtml" hash="165cf4aa0837bfb5c1034846e58bd17d"/></dir><dir name="payment"><dir name="checkout"><dir name="form"><file name="cod.phtml" hash="9ad838767e13e9babe44d29e5ae10463"/></dir><dir name="total"><file name="cod_fee.phtml" hash="9273dca9058bc1e782ad6750be468d96"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="enterprise"><dir name="default"><dir name="template"><dir name="TIG"><dir name="PostNL"><dir name="address_validation"><dir name="checkout"><dir name="onepage"><file name="billing.phtml" hash="4a824fb5cc38843fd9a49ec5b147dfd5"/><file name="postcode_check.phtml" hash="3ab00fd57d987610bc05474a1f356bbf"/><file name="shipping.phtml" hash="67b03b9c8fdb37831abe43b1885e9ca4"/></dir></dir><dir name="customer"><dir name="address"><file name="edit.phtml" hash="65c1acf828b35df172c819a742599431"/><file name="postcode_check.phtml" hash="8adb18f5b9788f1485d9bcab2d4fc450"/></dir></dir></dir><dir name="core"><dir name="sales"><dir name="order"><file name="pakje_gemak_address.phtml" hash="d0e64d20f8847cb5d622d3e7ca4ac296"/></dir></dir></dir><dir name="mijnpakket"><dir name="onepage"><file name="login_button.phtml" hash="febc3557ee3228244681f06a74f11e4d"/></dir></dir></dir></dir></dir></dir></dir><dir name="rwd"><dir name="default"><dir name="layout"><dir name="TIG"><file name="postnl.xml" hash="88bc2129c1be42f128e0b081712765ea"/></dir></dir><dir name="template"><dir name="TIG"><dir name="PostNL"><dir><dir name="address_validation"><dir name="checkout"><dir name="onepage"><file name="postcode_check.phtml" hash="db2c4471a2a72231e9e48846827d3af6"/></dir></dir><dir name="customer"><dir name="address"><file name="postcode_check.phtml" hash="9d52ad0c9e9879dbdd9a456bbc26c6b3"/></dir></dir></dir><dir name="checkout"><dir name="cart"><file name="link.phtml" hash="9421d86c9999726b5f4fbeb2bd444ae8"/></dir></dir><dir name="mijnpakket"><dir name="onepage"><file name="login_button.phtml" hash="bfaf1bf82634b1f23dcce616a905f017"/></dir></dir></dir></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="TIG"><file name="postnl.xml" hash="dbda62719b1b37fd2a93084bf0a987f5"/></dir></dir><dir name="template"><dir name="TIG"><dir name="PostNL"><file name="cron_notification.phtml" hash="67bbd1d6737e958906d0378f4b246387"/><file name="integrity_notification.phtml" hash="f8bb74b367cd4c1d65b203571db5af70"/><file name="log_notification.phtml" hash="b823242d8db7e1f1ccfb603c653922f0"/><dir name="payment"><dir name="checkout"><dir name="form"><file name="cod.phtml" hash="145ff33fea020e3e3148c641c9b98bc6"/></dir></dir></dir><dir name="sales"><dir name="items"><dir name="column"><file name="qty.phtml" hash="ee6a8f8fa3515ae96daa5ab5931b50be"/></dir></dir><dir name="order"><dir name="address"><dir name="form"><file name="container.phtml" hash="c70f2fca642dd867f51c265f5bd24421"/></dir></dir><dir name="create"><file name="js.phtml" hash="45ece3a5af2b5b720158f6f9910ede7c"/><dir name="totals"><file name="cod_fee.phtml" hash="024424c5e3b8f23e8f424fa015ba23b6"/></dir></dir><dir name="creditmemo"><dir name="create"><dir name="totals"><file name="cod_fee.phtml" hash="a35bb3ed9e43e09a5c966c3621566cd9"/></dir></dir></dir><file name="filter_massaction.phtml" hash="5767fd53a9eed4d361332dddd97a12ac"/><file name="js.phtml" hash="18ec1303ae3a85e40107c070c7547461"/><file name="product_options.phtml" hash="fac95293486e5a81d5981b3b717aaa4a"/><dir name="shipment"><dir name="create"><file name="shipment_options.phtml" hash="c7f7cf9ef925b01faddcdac608e5519e"/></dir><file name="filter_massaction.phtml" hash="d4e0379e6a96a5fd92ace380715549b9"/><dir name="view"><file name="delivery_options.phtml" hash="ef96fd7eb13a2ec8a75d9a52d4120cb8"/><file name="pakje_gemak_address.phtml" hash="d9dbf8a4ae4d2c3efccf8696d64b580a"/><file name="shipping_status.phtml" hash="2f7b0378604f69b0da2a4a2b7a642b72"/><dir name="tab"><file name="status_history.phtml" hash="2ffe0b40dea1e06af41498702a066cea"/></dir></dir><file name="view.phtml" hash="00087383abc14dd8400ba17e3aeda003"/></dir><dir name="totals"><file name="tax.phtml" hash="ab09fbdc3a7673ca587d8c6de4c02ffd"/></dir><dir name="view"><file name="delivery_options.phtml" hash="e3bc1515159593c8a5f5545db2ae0789"/><file name="pakje_gemak_address.phtml" hash="dc87c6cfce56eb69ea5e2a86d522212c"/></dir><file name="windows_theme.phtml" hash="55103508fe6bb75628ef0c5901c08666"/></dir><dir name="shipment"><file name="customize_link.phtml" hash="efe9c3208669fe44b15725f86ce22c63"/><file name="js.phtml" hash="6afc95d8ff7da355a4d54a9872d1b672"/><file name="testmode_warning.phtml" hash="def163c3796aae431b07351f03cd6ed0"/></dir></dir><dir name="system"><dir name="config"><file name="edit.phtml" hash="4f073927211c81a65263953cfbe87170"/><dir name="form"><dir name="field"><file name="array.phtml" hash="6bb1f404b24129b198c9c95a28c1bd66"/><file name="config_check.phtml" hash="cf8ab0445473583fcdcc997e30d58164"/><file name="field_header.phtml" hash="5ca62f4d7b2b0817e3416a4c6089e145"/><file name="info_box.phtml" hash="f387052ae039703f04a76ae255aa2508"/><file name="js.phtml" hash="10fabeabced110585d130f53b6cc8224"/><file name="split_address_check.phtml" hash="f23ca53d46419f7438fbd1c5ba164f2e"/><file name="support_tab.phtml" hash="9c60cad3057f18aabe7159314a8af6ac"/><file name="warning_box.phtml" hash="9841c9270a4ec7049ee6a46cc6bcb6e3"/></dir></dir></dir></dir><file name="upgrade_notification.phtml" hash="9e9f1a1331b432c56889cfa4df06f8a7"/><dir name="widget"><dir name="grid"><dir name="massaction"><file name="label_start_pos.phtml" hash="244c60efd2281a12206987dca2f5a73c"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="TIG_PostNL.xml" hash="bc88adf886505eac7c8fd420b5a775a2"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="TIG"><dir name="PostNL"><file name="cart.css" hash="d51ab6c200da5c54eb8e672c9325dbf5"/><file name="default.css" hash="46f2e8f1748e604457cc1b237a0950f5"/><dir name="deliveryoptions"><file name="default.css" hash="e82b48626cd9640e6130e84dcb22a186"/><file name="gomage_checkout.css" hash="5a06cdff83cf7129aefe4bd4614c07b0"/><file name="gomage_checkout_mediaqueries.css" hash="1059ae216e39968ce3122e1485ee0458"/><file name="gomage_checkout_neutral.css" hash="cb2cc910a3e96ed3fc9b23d20a6f34eb"/><file name="ie8.css" hash="1f0e04ca6c7be6572defb3adadafd28a"/><file name="mediaqueries.css" hash="3e8b87e8f0f30cbbe83686fa59bfd482"/><file name="neutral.css" hash="4b3b09545e3395f302e1efd487bf2739"/><file name="onestepcheckout.css" hash="fd7d786cc66c34b81555111e34c062eb"/><file name="onestepcheckout_mediaqueries.css" hash="2eb1086de2c12f7b728794fdf5ae431c"/><file name="onestepcheckout_neutral.css" hash="cb2cc910a3e96ed3fc9b23d20a6f34eb"/></dir><file name="messages.css" hash="19d03101c862b45535bc08344c12716a"/><file name="mijnpakket.css" hash="609c7c1218890f38bb9c4732ee5a0e2c"/><file name="postcodecheck.css" hash="af2e0297ed311d11b7bff818ec7b6d61"/><file name="returns.css" hash="23a6cb90aa662d2f866459e8ddf9a38a"/><file name="shipping_status.css" hash="fcb3fe311d50ee93176dc29ef2d5a0b9"/></dir></dir></dir><dir name="images"><dir name="TIG"><dir name="PostNL"><file name="bkg_progress_small.png" hash="fc6c9f28b6a6aae6f0096d504c0952df"/><file name="bkg_tooltip.png" hash="56cfed3ed8a65b19f8de88946d1a0a01"/><dir name="deliveryoptions"><file name="bkg_add-location.png" hash="a30d4aea73b094df5f434f9856dc626b"/><file name="bkg_add-phonenumber_input.gif" hash="25fa933b55e69a552f7d1cf704a8d6f9"/><file name="bkg_back_link.png" hash="b7bd79383aa89243980329e07b55a300"/><file name="bkg_btn-close.png" hash="5438c768cd63b2476cf14418acb28709"/><file name="bkg_button.png" hash="a1bf9f994f90033e143b7e2023c0e4fb"/><file name="bkg_checkbox.png" hash="71628b28d876482b600755e577132fee"/><file name="bkg_extras.gif" hash="6b374d9759f894962259eb995a3d59f9"/><file name="bkg_info_link.png" hash="0bf3dd9b4d23c7da406fa81ccb38799e"/><file name="bkg_location-search_input.gif" hash="fcee91af0d97e50fcf698eb7485327a8"/><file name="bkg_location-selected.png" hash="efe72719a889f94f4aa24e6f6d6db8df"/><file name="bkg_location.gif" hash="937e1a367cafdcc0d4f62afb572879a1"/><file name="bkg_more-info.png" hash="3681dc9b54011dae7c81d6c4b2e74a2b"/><file name="bkg_option.gif" hash="a3b9a292d28540147bfb034060731cb3"/><file name="bkg_phonenumber_failed.png" hash="8d1a0503bfe7cdfc2e35365bba2a8f7d"/><file name="bkg_phonenumber_verify.png" hash="28f90e0364778463144004ff289d70a7"/><file name="bkg_postnl-logo.png" hash="a34b5d938234a7360e5566df9fb4273f"/><file name="bkg_postnl.png" hash="46c5f6c65f66da09b39496c7cef94e89"/><file name="bkg_radio.png" hash="3cc3ecb77e5ce62511385d59e037b398"/><file name="bkg_rwd_rate-line.png" hash="d7cc800714e0372f2bc991bc50a99ca2"/><file name="bkg_tooltip.png" hash="cbd753cc9cb873468d1bba07e70f0d2f"/><file name="bkg_tooltip_close.png" hash="6b568d6430e21e974f360f4961db9102"/><file name="ie8_bkg_transparent-white.png" hash="a603671f51cb11ed9370bcd3181741c7"/><file name="loader_default.gif" hash="9fec99d885ad6bc45aee40d1c171ca4b"/><file name="loader_mini.gif" hash="f244ab6581d4329e3dbb7e289d47dfb2"/><dir name="locations"><file name="crc_albertheijn.png" hash="57af250f9d59b9074132446e0109ee93"/><file name="crc_automaat.png" hash="e9e94287380f27f6752d89f995b1b7f4"/><file name="crc_bruna.png" hash="326912294c49e8c896a34a28a7c03127"/><file name="crc_c1000.png" hash="8628f2e6328805a84e8eac28511b6857"/><file name="crc_coop.png" hash="0250717148ab776d156371a3e0912b9e"/><file name="crc_default.png" hash="777edf1aa124f6cb13258bb510db809b"/><file name="crc_emte.png" hash="ba7841f22a08d379f1ddabbe708ffa41"/><file name="crc_gamma.png" hash="6dc0ff8b36892af40ce80a36355d311a"/><file name="crc_jumbo.png" hash="061ae156e55e3aee6130cd1beb8d1b9a"/><file name="crc_karwei.png" hash="a7b8ee695b996cb757fd5c1a98e888e4"/><file name="crc_plus.png" hash="e67e871870c87723d835db23af18d4e9"/><file name="crc_primera.png" hash="e367c1e5b3fb4e25303aff57dc1a1259"/><file name="crc_readshop.png" hash="eeef9a98c0cd68f4351154d174bfdda9"/><file name="crc_spar.png" hash="4939d469045e6c7d7e65f172d97e30b1"/><file name="crc_staples.png" hash="94136b2a8d00dfdadcad6c7088920409"/><file name="drp_albertheijn.png" hash="944b90f36d5f225fcc74d360d368e628"/><file name="drp_automaat.png" hash="ce0bd13abc5e6c647c2ac8bc0fb5c150"/><file name="drp_bruna.png" hash="feb3ea92e3d32e98edf04aa22604afe6"/><file name="drp_c1000.png" hash="9e89a865b72d182135226fc72a98e03a"/><file name="drp_coop.png" hash="ddd34926b0a306cb0b28f385a78bd972"/><file name="drp_default.png" hash="d97f2e415e54b5d9fa19893210cedbc0"/><file name="drp_emte.png" hash="34e526c095a080cf92ccf15318a56ba3"/><file name="drp_gamma.png" hash="56da28b8c2e0ad6087eb0c4408f9904c"/><file name="drp_jumbo.png" hash="f191ec9c01b807d32811d9a4f0c3ad19"/><file name="drp_karwei.png" hash="d3da2d8b7f65ddecdf13091094a8fbea"/><file name="drp_plus.png" hash="9bf96ded99d0e47b34256cdc78310754"/><file name="drp_primera.png" hash="095b1ced03087b390b96ee3d525dce7e"/><file name="drp_readshop.png" hash="d2884c0bdd81103e9319469727bc9855"/><file name="drp_spar.png" hash="9ff6bb1fc489ba714d3249c35fb01c77"/><file name="drp_staples.png" hash="2196de7813fa6db34f8b0abb1aedecd5"/><file name="tmb_albertheijn.png" hash="58ae464ff7bb420f075e53cd35d9852f"/><file name="tmb_bruna.png" hash="ff523c258b47be502b335a7e8cc5032c"/><file name="tmb_c1000.png" hash="f96136426d2a2af40ef7b76953ec58b5"/><file name="tmb_coop.png" hash="b1e41c613b1876c787e9d4d5b30ba1a5"/><file name="tmb_default.png" hash="ed65f2da1032b355422db7c86a126668"/><file name="tmb_emte.png" hash="d0e9dc8f785b8db0da8bd233a0d09a11"/><file name="tmb_gamma.png" hash="55ef36ad8aa803469e28f368b7eac536"/><file name="tmb_jumbo.png" hash="3bae16290854122b2b3439de2402c5a1"/><file name="tmb_karwei.png" hash="84e1aaceb9c0ff3864b2b7aead52e033"/><file name="tmb_plus.png" hash="fd3bf32ffb591f79935bb906249ca59e"/><file name="tmb_primera.png" hash="fb32942772b4ca57a45ee0e08406c3bc"/><file name="tmb_readshop.png" hash="6a6826139698fa20e0fd4210d17b50e2"/><file name="tmb_spar.png" hash="89694e10f073619fd944d8c2c7b9e357"/><file name="tmb_staples.png" hash="115af373105f6494c74186657ddca6a6"/></dir><file name="osc_bkg_postnl-logo.png" hash="c23e987598dcd439e54f9d48e9e4777a"/><dir name="unbranded"><file name="bkg_back_link.png" hash="5797c608687a704a935b0ff03b8d3982"/><file name="bkg_checkbox.png" hash="232ad0ec83b32af770481bb1cdd1520e"/><file name="bkg_more-info.png" hash="96a0b80b2907a28489d8d87f845d8a5f"/><file name="bkg_radio.png" hash="430bea179fc0e6570c1cca905b46454e"/><file name="bkg_tooltip_close.png" hash="eac7d71f0cb14f165b6f7af55a6c4c26"/><file name="button_action.png" hash="c297cbc6aa5c44272308b660038b363f"/><file name="button_next.png" hash="768365d31d95bb5c8b1ccebb62920a95"/><file name="loader_default.gif" hash="1645395ddefeab89f51f59b2dbcbd7c0"/><file name="loader_mini.gif" hash="2fd11016727f350b98af17fc76b3a0d3"/></dir></dir><file name="icon-tooltip.png" hash="5767601cd66b23d0b6fe8defc10dd48d"/><dir name="mijnpakket"><file name="app_buttons.png" hash="74f3a4d80dafe1a0979ce7ad0bd70824"/><file name="app_logo.png" hash="e5426bac3d0b4e28ef1f3628503c2365"/><file name="logo.png" hash="6fa95b3a5e83b6887848b5feb7369bf1"/><file name="logo_small.png" hash="c23e987598dcd439e54f9d48e9e4777a"/></dir><file name="opc-ajax-loader.gif" hash="e805ea7eca1f34c75ba0f93780d32d38"/><file name="overlay.png" hash="f08feb852288bea420ba3af68ae34a1f"/><file name="postnl_email_logo.png" hash="8bd358b514e04e7ceca03efb38f8fded"/><file name="postnl_spinner.gif" hash="cef321b68ab934932ee317986823db67"/></dir></dir></dir><dir name="js"><dir name="TIG"><dir name="PostNL"><file name="ajax.js" hash="ac8120be1ff0e421e80b14ad2617d4c1"/><file name="checkout.js" hash="e64437f55f7ccafb205a1d6f55995537"/><file name="deliveryOptions.js" hash="c96ee601cebff3606785aa7d9078daa8"/><dir name="deliveryoptions"><file name="cufon-fonts.js" hash="7605bb176
|