Joomla 4 Migration Produktansicht fehler: Call to undefined function formatprice()

05.08.2022 14:47
#1
adi007
User adi007
Name: Adi Heutschi
01.12.2011
Posts: 58
Quote
Joomla 4 Migration Produktansicht fehler: Call to undefined function formatprice()

Hallo
Bei der Migration von Joomla3 auf Joomla4 und upgrade vom Joomshopping 4.18.8 auf 5.0.6
erscheint beim Aufruf eines Shop Produktes folgender Fehler:

0
Call to undefined function formatprice()

Haben Sie mir ein Tipp hierfür?
Backend und Kategorie ansicht funktionieren.

Wenn ich auf PHP 8.1 umstelle erscheinen weitere Fehler:
Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/papeli8r/public_html/stage/components/com_jshopping/Helper/Helper.php on line 600

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/papeli8r/public_html/stage/components/com_jshopping/Helper/Helper.php on line 600

Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/papeli8r/public_html/stage/components/com_jshopping/Helper/Helper.php on line 1128

Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/papeli8r/public_html/stage/components/com_jshopping/Helper/Helper.php on line 1128

Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/papeli8r/public_html/stage/components/com_jshopping/Helper/Helper.php on line 1128

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/papeli8r/public_html/stage/components/com_jshopping/Helper/Helper.php on line 600

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/papeli8r/public_html/stage/components/com_jshopping/Helper/Helper.php on line 600


Haben Sie mir ein Tipp?

Adi


Joomla: 4.1.5
JoomShopping: 5.0.6
PHP: 7.4 und 8.1
Website Url: https://www.papelier.ch/stage/shop/category/view/3

Last change: 06.08.2022 13:20
 
05.08.2022 15:44
#2
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25934
Quote
Aw: Joomla 4 Migration Produktansicht fehler: Call to undefined function formatprice()

Now use php 7.4

or
change code
1.

public static function saveAsPrice($val){
$val = str_replace(",",".",$val);
preg_match('/-?[0-9]+(\.[0-9]+)?/', $val, $matches);
return isset($matches[0]) ? floatval($matches[0]) : 0;
}

change to

public static function saveAsPrice($val){
if (!isset($val)) return 0;
$val = str_replace(",", ".", $val);
preg_match('/-?[0-9]+(\.[0-9]+)?/', $val, $matches);
return isset($matches[0]) ? floatval($matches[0]) : 0;
}

2.
public static function getListFromStr($stelist){
if (preg_match('/\,/', $stelist)){
return self::filterAllowValue(explode(',',$stelist), 'int+');
}else{
return null;
}
}

change to

public static function getListFromStr($stelist){
if (isset($stelist) && preg_match('/\,/', $stelist)){
return self::filterAllowValue(explode(',',$stelist), 'int+');
}else{
return null;
}
}


Last change: 05.08.2022 15:45
 
11.08.2022 13:28
#3
MarielaNK
Joomshopping forum user no avatar
Name: Mariela
04.10.2011
Posts: 15
Quote
Aw: Joomla 4 Migration Produktansicht fehler: Call to undefined function formatprice()

I have the same problem.
After changing code, i have the error:
Warning: Undefined array key "view" in /home/vipklima/public_html/new/components/com_jshopping/Service/Router.php on line 63

 
12.08.2022 10:29
#4
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25934
Quote
Aw: Joomla 4 Migration Produktansicht fehler: Call to undefined function formatprice()

1. Update Joomshopping to 5.6.0

2. update
joomsjopping_upd_5.0.7_a1.zip

 
12.08.2022 15:10
#5
MarielaNK
Joomshopping forum user no avatar
Name: Mariela
04.10.2011
Posts: 15
Quote
Aw: Joomla 4 Migration Produktansicht fehler: Call to undefined function formatprice()

I did it but the result is again
"Call to undefined function formatprice()"

 
12.08.2022 18:41
#6
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25934
Quote
Aw: Joomla 4 Migration Produktansicht fehler: Call to undefined function formatprice()

Enable debug mode joomla

details?

 
15.08.2022 07:38
#7
MarielaNK
Joomshopping forum user no avatar
Name: Mariela
04.10.2011
Posts: 15
Quote
Aw: Joomla 4 Migration Produktansicht fehler: Call to undefined function formatprice()

The errors
Aw: Joomla 4 Migration Produktansicht fehler: Call to undefined function formatprice()


Last change: 15.08.2022 07:39
 
10.09.2022 23:19
#8
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25934
Quote
Aw: Joomla 4 Migration Produktansicht fehler: Call to undefined function formatprice()

Template defaultDib only for old version JoomShopping (4.8.0)

Use default template.

 


Copyrights MAXXmarketing GmbH. Alle Rechte vorbehalten
Durch die Nutzung dieser Website stimme ich zu, dass Cookies zur optimalen Gestaltung der Website sowie zur Analyse der Nutzung der Website verwendet werden. Weiterführende Informationen finden Sie hier. OK, einverstanden.