Attempt to assign property "address_country" on true

  • Posts: 224
  • Thank you received: 10
  • Hikaserial Subscription Hikashop Multisite
2 weeks 18 hours ago #372219

-- HikaShop version -- : 6.5.0
-- Joomla version -- : 6.1.1

Hi,

I use the fedex plugin but it is not showing in the checkout.
When i activate Debug i see this error. Can you help us to this?

Kind regards,
Jeroen Moolenschot
www.joomill.com

Attempt to assign property "address_country" on true

Home Page
Call Stack
# Function Location
1 () JROOT/plugins/hikashopshipping/fedex2/fedex2.php:365
2 plgHikashopshippingFedEx2->_fedex_request_rates() JROOT/plugins/hikashopshipping/fedex2/fedex2.php:585
3 plgHikashopshippingFedEx2->_getShippingMethods() JROOT/plugins/hikashopshipping/fedex2/fedex2.php:533
4 plgHikashopshippingFedEx2->_getBestMethods() JROOT/plugins/hikashopshipping/fedex2/fedex2.php:236
5 plgHikashopshippingFedEx2->onShippingDisplay() JROOT/administrator/components/com_hikashop/pluginCompatJ4.php:53
6 hikashopJoomlaPlugin->__call() JROOT/libraries/vendor/joomla/event/src/Dispatcher.php:454
7 Joomla\Event\Dispatcher->dispatch() JROOT/libraries/src/Application/EventAware.php:111
8 Joomla\CMS\Application\WebApplication->triggerEvent() JROOT/administrator/components/com_hikashop/classes/shipping.php:428
9 hikashopShippingClass->getShippings() JROOT/administrator/components/com_hikashop/helpers/checkout/shipping.php:272
10 hikashopCheckoutShippingHelper->applyAddressPreview() JROOT/administrator/components/com_hikashop/helpers/checkout/shipping.php:314
11 hikashopCheckoutShippingHelper->display() JROOT/components/com_hikashop/views/checkout/view.html.php:255
12 CheckoutViewCheckout->showblock() JROOT/components/com_hikashop/views/checkout/view.html.php:54
13 CheckoutViewCheckout->display() JROOT/libraries/src/MVC/Controller/BaseController.php:697
14 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/administrator/components/com_hikashop/helpers/helper.php:2954
15 hikashopController->display() JROOT/components/com_hikashop/controllers/checkout.php:67
16 checkoutController->display() JROOT/components/com_hikashop/controllers/checkout.php:251
17 checkoutController->{closure:checkoutController::showblock():250}() JROOT/administrator/components/com_hikashop/helpers/helper.php:1998
18 hikashop_getHTML() JROOT/components/com_hikashop/controllers/checkout.php:250
19 checkoutController->showblock() JROOT/libraries/src/MVC/Controller/BaseController.php:730
20 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/administrator/components/com_hikashop/helpers/helper.php:2932
21 hikashopController->execute() JROOT/components/com_hikashop/hikashop.php:89
22 require_once() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71
23 Joomla\CMS\Dispatcher\LegacyComponentDispatcher::{closure:Joomla\CMS\Dispatcher\LegacyComponentDispatcher::dispatch():70}() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73
24 Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:361
25 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:218
26 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:272
27 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:320
28 Joomla\CMS\Application\CMSApplication->execute() JROOT/includes/app.php:58
29 require_once() JROOT/index.php:51

Please Log in or Create an account to join the conversation.

  • Posts: 85786
  • Thank you received: 14078
  • MODERATOR
2 weeks 14 hours ago #372220

Hi,

Thank you for your feedback. I've made a patch in order to fix this problem.
Download again the install package of HikaShop on our website and install it on yours and you'll have the patch.

Please Log in or Create an account to join the conversation.

  • Posts: 224
  • Thank you received: 10
  • Hikaserial Subscription Hikashop Multisite
1 week 6 days ago #372222

Hi sorry but i don't see the fedex shipping method in the checkout.

The error changed to:
Warning: Attempt to read property "zone_code_3" on null in /var/www/vhosts/....httpdocs/plugins/hikashopshipping/fedex2/fedex2.php on line 384

Please Log in or Create an account to join the conversation.

  • Posts: 85786
  • Thank you received: 14078
  • MODERATOR
1 week 6 days ago #372225

Hi,

That error is a second, separate spot in the FedEx 2 plugin: it read the state/province code from the address without checking that a state was actually set. When the address has no state (which is normal while the address is still being typed, or for countries that have no states), reading the state raised the "zone_code_3 on null" warning, and on United States and Puerto Rico addresses the plugin then sent an empty state to FedEx, which FedEx rejects, so no rate came back.

We have fixed it: the plugin now reads the state safely and only sends a state to FedEx when one is actually present, so an address with just a country and a postcode should still gets rates if FedEx allows for it.
Download again the install package of HikaShop on our website and install it on yours and you'll have the new patch.

One thing to keep in mind: the live shipping refresh asks FedEx for rates as you type, so the FedEx method only appears once the address is complete enough for FedEx to quote (at least the country and the postcode). If it still does not appear once the address is filled in with the patched file, please turn on the FedEx plugin's debug option, reproduce the issue, and look at the bottom of the "Payment log file" in the HikaShop configuration. It should provide information on what's going on.

Please Log in or Create an account to join the conversation.

  • Posts: 224
  • Thank you received: 10
  • Hikaserial Subscription Hikashop Multisite
1 week 6 days ago #372227

Hi Nicolas,

The errors are gone, but i still don't see the shipping method in the frontend.
I turned on debug but nothing in the logs. Where can i find the payment log file?

Please Log in or Create an account to join the conversation.

  • Posts: 85786
  • Thank you received: 14078
  • MODERATOR
1 week 6 days ago #372228

Hi,

This would indicate that FedEx doesn't have enough information to be able to provide the rates.

The log is on the HikaShop configuration page, under the Main tab in the Files section:
www.hikashop.com/support/documentation/5...nfig.html#main_files

Please Log in or Create an account to join the conversation.

Time to create page: 0.078 seconds
Powered by Kunena Forum