Skip to content

Commit

Permalink
0.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Sep 26, 2019
1 parent e810fee commit 376ead0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions Helper/GeneralHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ function convertToXml(O $o) {
$this->addXmlChild($d, $eData, 'payment_method', $o->getPayment()->getMethod());
$this->addXmlChild($d, $eData, 'seller_shipping_cost', '0');
$this->addXmlChild($d, $eData, 'reference', $o->getIncrementId());
$this->addXmlChild($d, $eData, 'client_id', $o->getCustomerId() ?: '');
// 2019-09-26 "`client_id` should always have a value": https://github.com/julio-com/order/issues/2
$this->addXmlChild($d, $eData, 'client_id', $o->getCustomerId() ?: $o->getCustomerEmail());
$billing = $o->getBillingAddress();
$eBA = $d->createElement('invoice_address'); /** @var DE $eBA */
$orderEl->appendChild($eBA);
Expand Down Expand Up @@ -135,7 +136,10 @@ function convertToXml(O $o) {
foreach ($o->getAllVisibleItems() as $i) {/** @var OI $i */
$itemEl = $d->createElement('item');
$itemsEl->appendChild($itemEl);
$this->addXmlChild($d, $itemEl, 'item_id', $i->getId());
// 2019-09-26
// "`item_id` should be filled with the product's SKU":
// https://github.com/julio-com/order/issues/3
$this->addXmlChild($d, $itemEl, 'item_id', $i->getSku());
$this->addXmlChild($d, $itemEl, 'quantity', df_oqi_qty($i));
$this->addXmlChild($d, $itemEl, 'label', $i->getName());
$this->addXmlChild($d, $itemEl, 'item_price', df_oqi_price($i));
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "julio.com/order"
,"version": "0.0.6"
,"version": "0.0.7"
,"description": "The module exports orders from Magento 2 to Dropbox"
,"type": "magento2-module"
,"homepage": "https://github.com/julio-com/order"
Expand Down

0 comments on commit 376ead0

Please sign in to comment.