Skip to content
This repository has been archived by the owner on Nov 8, 2018. It is now read-only.

Commit

Permalink
Merge pull request #12 from buba-kiki/master
Browse files Browse the repository at this point in the history
Fix - IssueId: 5
  • Loading branch information
oscarvitores committed May 30, 2016
2 parents 61c2276 + 7b54903 commit c174411
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Magento2/Model/Observer.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ private function getAddressFromObject($addressData)
private function getDataShipment($additionalData, $total, $itemName, $packages, $adrFrom, $adrTo)
{
$shipmentData = new Data\Shipment();
$shipmentData->source = 'Magento (' . AppInterface::VERSION . ')';
$shipmentData->source = 'module_magento';
$shipmentData->insurance = new Data\Insurance();
$shipmentData->additionalData = $additionalData;
$shipmentData->contentValue = $total;
Expand Down
5 changes: 3 additions & 2 deletions Magento2/bin/test_shipment.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@
$shipmentId = 6;

$shipment = $objectManager->get('Magento\Sales\Model\Order\Shipment')->load($shipmentId);

$objectManager->get('Packlink\Magento2\Model\Observer')->sendOrderToPacklink($shipment);
$om = \Magento\Framework\App\ObjectManager::getInstance();
$manager = $om->get('Magento\Framework\Event\ManagerInterface');
$manager->dispatch('sales_order_shipment_save_after', array('shipment' => $shipment));

0 comments on commit c174411

Please sign in to comment.