lightspeedretail / webstore

Web Store eCommerce solution for Lightspeed
http://www.lightspeedpos.com/webstore
Open Software License 3.0
85 stars 63 forks source link

Amazon Downloader Property of non-object #620

Closed wwbs closed 8 years ago

wwbs commented 10 years ago

Here is the error from the logs on download attempt that prevents the order from downloading properly into POS. Note the line number is referencing this line when creating the $config array for the shipping address assignment: 'state_id'=>$objState->id

Trying to get property of non-object (/site.com/core/protected/extensions/wsamazon/wsamazon.php:469) Stack trace:

0 /site.com/core/framework/web/CController.php(308): CInlineAction->runWithParams()

1 /site.com/core/framework/web/CController.php(286): CronController->runAction()

2 /site.com/core/framework/web/CController.php(265): CronController->runActionWithFilters()

3 /site.com/core/framework/web/CWebApplication.php(282): CronController->run()

4 /site.com/core/framework/web/CWebApplication.php(141): WsWebApplication->runController()

5 /site.com/core/framework/base/CApplication.php(180): WsWebApplication->processRequest()

6 /site.com/index.php(38): WsWebApplication->run()

REQUEST_URI=/integration/cron

The Amazon API sends shipping information inconsistently using both state abbreviations (NY) and full names (New York) that vary from order to order. It looks like line 460 only assigns $objState via State::LoadByCode which returns nothing if the input is a full name value. That assignment should determine if it is a 'code' or 'state' (db col name) and query for the ID appropriately.

ottaz commented 8 years ago

Sorry for such a late response on this, but owing to the limitations between the two systems and increasing conflicts therein, Amazon integration support has been dropped from Web Store.