Giter Club home page Giter Club logo

Comments (3)

Adamascroft avatar Adamascroft commented on August 11, 2024 2

With this I was wondering if the order has all the info it needs (name, address, product, etc...) can it sync anyway? Or skip the ones that don't meet the requirements rather than stop all orders being synced.

from shipstation-connect.

Adamascroft avatar Adamascroft commented on August 11, 2024
2020-05-22 12:28:19 - error - TypeError
TypeError: Argument 2 passed to fostercommerce\shipstationconnect\services\Xml::customer() must be an instance of craft\commerce\models\Customer, null given, called in /home/gb57zl99okgb/vendor/fostercommerce/shipstationconnect/src/services/Xml.php on line 122 and defined in /home/gb57zl99okgb/vendor/fostercommerce/shipstationconnect/src/services/Xml.php:331
Stack trace:
#0 /home/gb57zl99okgb/vendor/fostercommerce/shipstationconnect/src/services/Xml.php(122): fostercommerce\shipstationconnect\services\Xml->customer(Object(SimpleXMLElement), NULL)
#1 /home/gb57zl99okgb/vendor/fostercommerce/shipstationconnect/src/services/Xml.php(39): fostercommerce\shipstationconnect\services\Xml->order(Object(SimpleXMLElement), Object(craft\commerce\elements\Order))
#2 /home/gb57zl99okgb/vendor/fostercommerce/shipstationconnect/src/controllers/OrdersController.php(128): fostercommerce\shipstationconnect\services\Xml->orders(Object(SimpleXMLElement), Array)
#3 /home/gb57zl99okgb/vendor/fostercommerce/shipstationconnect/src/controllers/OrdersController.php(45): fostercommerce\shipstationconnect\controllers\OrdersController->getOrders(NULL)
#4 [internal function]: fostercommerce\shipstationconnect\controllers\OrdersController->actionProcess(NULL, 'export')
#5 /home/gb57zl99okgb/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#6 /home/gb57zl99okgb/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#7 /home/gb57zl99okgb/vendor/craftcms/cms/src/web/Controller.php(178): yii\base\Controller->runAction('process', Array)
#8 /home/gb57zl99okgb/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('process', Array)
#9 /home/gb57zl99okgb/vendor/craftcms/cms/src/web/Application.php(291): yii\base\Module->runAction('shipstationconn...', Array)
#10 /home/gb57zl99okgb/vendor/craftcms/cms/src/web/Application.php(559): craft\web\Application->runAction('shipstationconn...', Array)
#11 /home/gb57zl99okgb/vendor/craftcms/cms/src/web/Application.php(270): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#12 /home/gb57zl99okgb/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#13 /home/gb57zl99okgb/public_html/index.php(21): yii\base\Application->run()
#14 {main}

from shipstation-connect.

johnnynotsolucky avatar johnnynotsolucky commented on August 11, 2024

@Adamascroft We're already checking for shipping and billing addresses here: https://github.com/FosterCommerce/shipstation-connect/blob/master/src/services/Xml.php#L19-L24

    public function shouldInclude($order)
    {
        $settings = Plugin::getInstance()->settings;
        $billingSameAsShipping = $settings->billingSameAsShipping;
        return $order->getShippingAddress() && ($billingSameAsShipping || $order->getBillingAddress());
    }

We can add a condition to require a customer on an order. I think it's fine to exclude orders without customers as ShipStation requires the CustomerCode field be set.

from shipstation-connect.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.