Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Julia Osipova Posted November 3, 2021 Posted November 3, 2021 Hi! I receive this error when try to edit or add physical package item in invoice in ACP. Edit or add comissions, and other items are ok. Error only when adding/editing package item. Problem and in version 4.6.7, and in version 4.6.8. Where can I look to solve this problem? Thanks Error: Access to undeclared static property: IPS\nexus\extensions\nexus\Item\ShippingCharge::$arent (0) #0 /var/www/u1463182/data/www/fashionproduct.ru/test/applications/nexus/sources/Invoice/Item/Item.php(375): IPS\nexus\Invoice\_Item->__get('arent') #1 /var/www/u1463182/data/www/fashionproduct.ru/test/applications/nexus/extensions/nexus/Item/Package.php(516): IPS\nexus\Invoice\_Item->isSameAsOtherItem(Object(IPS\nexus\extensions\nexus\Item\Package)) #2 /var/www/u1463182/data/www/fashionproduct.ru/test/applications/nexus/modules/admin/payments/invoices.php(1276): IPS\nexus\extensions\nexus\Item\_Package::createFromForm(Array, Object(IPS\nexus\Invoice)) #3 /var/www/u1463182/data/www/fashionproduct.ru/test/system/Helpers/Wizard/Wizard.php(181): IPS\nexus\modules\admin\payments\_invoices->IPS\nexus\modules\admin\payments\{closure}(Array)
Julia Osipova Posted November 3, 2021 Author Posted November 3, 2021 When I add this hook, problem is solved. But groupping of products now not works. For example, I have product1 in invoice, and I add another product1 in invoice. Now I don't receive error, but I now have 2 copies of product1 in invoice. Any ideas why this happened? product1 is not a charge, it's physical product. abstract class ecwid_hook_nexus_invoice_item extends _HOOK_CLASS_ { /** * Is this item the same as another item in the cart? * Used to decide when an item is added to the cart if we should just increase the quantity of this item instead of creating a new item. * * @param \IPS\nexus\Invoice\Item $item The other item * @return bool */ public function isSameAsOtherItem( $item ) { if ( $this instanceof \IPS\nexus\extensions\nexus\Item\ShippingCharge ) { return FALSE; } if ( $item instanceof \IPS\nexus\extensions\nexus\Item\ShippingCharge ) { return FALSE; } if ( $this instanceof \IPS\nexus\extensions\nexus\Item\MiscellaneousCharge ) { return FALSE; } if ( $item instanceof \IPS\nexus\extensions\nexus\Item\MiscellaneousCharge ) { return FALSE; } return parent::isSameAsOtherItem( $item ); }
Solution Stuart Silvester Posted November 15, 2021 Solution Posted November 15, 2021 Hello, Thank you for your report. I have identified the issue (it's specific to adding a product after a Misc Charge, or Shipping Charge). This issue will be fixed in a future release. Julia Osipova 1
Recommended Posts