Skip to content

Commit

Permalink
Merge pull request #44 from Simicart/hotfix/hide-shipping-address-on-…
Browse files Browse the repository at this point in the history
…virtual

Hide shipping address on virtual products
  • Loading branch information
Cody Nguyễn authored Jul 22, 2020
2 parents 1f4a654 + 4cf504a commit 61478a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/code/Simi/Simiconnector/Model/Api/Orders.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,10 @@ public function show()

$order['billing_address'] = $this->simiObjectManager->get('Simi\Simiconnector\Helper\Address')
->getAddressDetail($quote->getBillingAddress(), $customer);
$order['shipping_address'] = $this->simiObjectManager->get('Simi\Simiconnector\Helper\Address')
if(!$quote->getIsVirtual()) {
$order['shipping_address'] = $this->simiObjectManager->get('Simi\Simiconnector\Helper\Address')
->getAddressDetail($quote->getShippingAddress(), $customer);
}
$order['shipping'] = $this->simiObjectManager->get('Simi\Simiconnector\Helper\Checkout\Shipping')
->getMethods();
$order['payment'] = $list_payment;
Expand Down

0 comments on commit 61478a1

Please sign in to comment.