X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   News and Announcements (https://forum.x-cart.com/forumdisplay.php?f=28)
-   -   X-Cart 4.7.5 released: Amazon Feeds, Gross Profit, Convenient search tools (https://forum.x-cart.com/showthread.php?t=73597)

herber@wirehub.nl 04-06-2016 01:36 AM

Re: X-Cart 4.7.5 released: Amazon Feeds, Gross Profit, Convenient search tools
 
I have just upgraded our live store to 4.7.5 and now we get these errors:
Quote:

[06-Apr-2016 11:18:10 Europe/Amsterdam] PHP Fatal error: Call to undefined function func_decimal_empty() in /public_html/include/func/func.product.php on line 1305
[06-Apr-2016 11:18:24 Europe/Amsterdam] PHP Fatal error: Call to undefined function func_decimal_empty() in /public_html/include/func/func.product.php on line 1305


In addition to that: the cost price is not calculated on the dashboard, and it is not shown on the orders list (like in this screenshot). The module is enabled.
I checked & skin/common_files/main/orders_list.tpl has indeed been modified and the requires modifications have been made by the upgrade.

/include/func/func.core.php has also been modified, function func_decimal_empty($value) is declared in that file, so I don't understand the call to undefined function.

aim 04-06-2016 05:57 AM

Re: X-Cart 4.7.5 released: Amazon Feeds, Gross Profit, Convenient search tools
 
Quote:

Originally Posted by herber@wirehub.nl
I have just upgraded our live store to 4.7.5 and now we get these errors:


In addition to that: the cost price is not calculated on the dashboard, and it is not shown on the orders list (like in this screenshot). The module is enabled.
I checked & skin/common_files/main/orders_list.tpl has indeed been modified and the requires modifications have been made by the upgrade.



The module shows the 'Gross profit' field only.

Quote:

Originally Posted by herber@wirehub.nl

/include/func/func.core.php has also been modified, function func_decimal_empty($value) is declared in that file, so I don't understand the call to undefined function.


It is very strange bug.
May be this a single case during the upgrade.

Thank you.

herber@wirehub.nl 04-06-2016 11:47 AM

Re: X-Cart 4.7.5 released: Amazon Feeds, Gross Profit, Convenient search tools
 
1 Attachment(s)
Quote:

Originally Posted by aim
The module shows the 'Gross profit' field only.


Unfortunately, it does not. See attachment, that is all that we see.

Quote:

Originally Posted by aim
It is very strange bug.
May be this a single case during the upgrade.

Thank you.

Can we isolate the problem somehow?

This error is also showing up in the logs:
Quote:

[06-Apr-2016 16:42:27] Warning: Illegal string offset 'products' in /public_html/include/func/func.cart.php on line 4313

[06-Apr-2016 17:25:44] Warning: Illegal string offset 'products' in /public_html/include/func/func.cart.php on line 4313

[06-Apr-2016 18:36:00] Warning: Illegal string offset 'products' in /public_html/include/func/func.cart.php on line 4313

[06-Apr-2016 19:49:52] Warning: Illegal string offset 'products' in /public_html/include/func/func.cart.php on line 4313

[06-Apr-2016 20:17:08] Warning: Illegal string offset 'products' in /public_html/include/func/func.cart.php on line 4313
But that line is about the DMO mod, that bug ticket is already filed under number 0045393.

cflsystems 04-06-2016 01:05 PM

Re: X-Cart 4.7.5 released: Amazon Feeds, Gross Profit, Convenient search tools
 
The

Warning: Illegal string offset 'products' in /public_html/include/func/func.cart.php on line 4313

is just a warning. Not an error and it will not prevent cart from functioning. It will however fill up your log files. This is not the only place this warning will show up.
It is due to the outdated code in XC and the use of newer PHP version.

cflsystems 04-06-2016 01:10 PM

Re: X-Cart 4.7.5 released: Amazon Feeds, Gross Profit, Convenient search tools
 
Bug reported - https://bt.x-cart.com/view.php?id=45911

herber@wirehub.nl 04-06-2016 01:13 PM

Re: X-Cart 4.7.5 released: Amazon Feeds, Gross Profit, Convenient search tools
 
Quote:

Originally Posted by cflsystems
The

Warning: Illegal string offset 'products' in /public_html/include/func/func.cart.php on line 4313

is just a warning. Not an error and it will not prevent cart from functioning. It will however fill up your log files. This is not the only place this warning will show up.
It is due to the outdated code in XC and the use of newer PHP version.

Thanks!
That's not great though.. but as long as my customers won't see the error I can live with it, but I'd rather have it fixed ofcourse.

Cost Price thing still not working here though, I'll wait with upgrading my other store from 4.7.4 to 4.7.5 until there's a fix for that.

cflsystems 04-06-2016 02:36 PM

Re: X-Cart 4.7.5 released: Amazon Feeds, Gross Profit, Convenient search tools
 
You can fix it. The error generally means you are trying to use string as a full array.
In the XC code this probably means $products is not set or is false and the next line of code is trying to run foreach on it.

You can fix it by checking if $products is an array and only then run the foreach. But I can tell you right now same error pops up on several places in XC depending on settings, modules active, customizations, etc. But yes it is possible to fix these pretty easily.

aim 04-06-2016 08:14 PM

Re: X-Cart 4.7.5 released: Amazon Feeds, Gross Profit, Convenient search tools
 
Quote:

Originally Posted by herber@wirehub.nl
Unfortunately, it does not. See attachment, that is all that we see.


Can we isolate the problem somehow?


I cannot localize the "Call to undefined function func_decimal_empty" problem without a ssh/ftp access to your server.

Could you provide us with the valid FTP/SSH or Control Panel access to your X-Cart server ?

Please place the access information into a special secure form in the "Communication index", "Post access info" section:

* https://secure.x-cart.com/customer.php?target=create_access_info

aim 04-06-2016 08:18 PM

Re: X-Cart 4.7.5 released: Amazon Feeds, Gross Profit, Convenient search tools
 
Quote:

Originally Posted by herber@wirehub.nl
Cost Price thing still not working here though, I'll wait with upgrading my other store from 4.7.4 to 4.7.5 until there's a fix for that.


The 'Gross profit' field is not shown for orders with zero gross costs.

Thank you.

herber@wirehub.nl 04-06-2016 11:17 PM

Re: X-Cart 4.7.5 released: Amazon Feeds, Gross Profit, Convenient search tools
 
Quote:

Originally Posted by aim
I cannot localize the "Call to undefined function func_decimal_empty" problem without a ssh/ftp access to your server.

Could you provide us with the valid FTP/SSH or Control Panel access to your X-Cart server ?

Please place the access information into a special secure form in the "Communication index", "Post access info" section:

* https://secure.x-cart.com/customer.php?target=create_access_info

If it's only a 1 time thing right after the upgrade or something, then no need. I'll keep an eye on it & if it pops up more often I'll open a ticket.

Quote:

Originally Posted by aim
The 'Gross profit' field is not shown for orders with zero gross costs.

Thank you.

What are the condintions for the field to be shown like in the screenshot?
I have added costs prices for all items in 1 order for example, then searched for that order & it still does not show, while both products in that order have costs entered.


All times are GMT -8. The time now is 11:39 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.