error database spanish leng

Open to all! Ask other shopowners for help.
Post Reply
camaron
Posts: 4
Joined: Sun Oct 13, 2024 7:12 pm
Phoenix Version:

error database spanish leng

Post by camaron »

hi boys.
install the Spanish language in the current version of the program and get rid of this database error
Warning: The [es] locale will be treated as en in C:\xampp\htdocs\PhoenixCart-master\includes\system\versioned\1.0.9.3\intl_date_formatter.php on line 144
:shock: :shock: :shock:

this is the archive in line 144

* @see http://userguide.icu-project.org/formatparse/datetime
*/
public function __construct(string $locale = null, int $datetype = null, int $timetype = null, $timezone = null, int $calendar = null, string $pattern = null) {
if ('en' !== $locale && null !== $locale) {
144 :shock: trigger_error("The [$locale] locale will be treated as en", E_USER_WARNING);
}

if (self::GREGORIAN !== $calendar && null !== $calendar) {
trigger_error("The [$calendar] calendar will be treated as Gregorian", E_USER_WARNING);
}


Join The Code Co-op to get access to your library in the Code Co-op Forum
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: error database spanish leng

Post by heatherbell »

Do you have PHP extension intl enabled as advised here: https://github.com/CE-PhoenixCart/Phoen ... quirements
camaron
Posts: 4
Joined: Sun Oct 13, 2024 7:12 pm
Phoenix Version:

Re: error database spanish leng

Post by camaron »

heatherbell wrote: Mon Oct 14, 2024 4:42 am Do you have PHP extension intl enabled as advised here: https://github.com/CE-PhoenixCart/Phoen ... quirements
Hi, I already found out how to activate php intl and IT WORKS NOW IN THE BACKEND THANK YOUUU ... but in the frontend store


Uncaught Error: Undefined constant "NAVBAR_ICON_CART_CONTENTS" in C:\xampp\htdocs\PhoenixCart-master\templates\bootstrap5\includes\modules\navbar\tpl_nb_shopping_cart.php:3 Stack trace: #0 C:\xampp\htdocs\PhoenixCart-master\includes\modules\block_template.php(14): include() #1 C:\xampp\htdocs\PhoenixCart-master\includes\modules\navbar\nb_shopping_cart.php(21): include('C:\\xampp\\htdocs...') #2 C:\xampp\htdocs\PhoenixCart-master\includes\modules\content\navigation\cm_navbar.php(30): nb_shopping_cart->getOutput() #3 C:\xampp\htdocs\PhoenixCart-master\includes\system\versioned\1.0.8.4\template.php(106): cm_navbar->execute() #4 C:\xampp\htdocs\PhoenixCart-master\templates\bootstrap5\includes\components\template_top.php(44): Template->get_content('navigation') #5 C:\xampp\htdocs\PhoenixCart-master\templates\default\includes\pages\index.php(13): require('C:\\xampp\\htdocs...') #6 C:\xampp\htdocs\PhoenixCart-master\index.php(17): require('C:\\xampp\\htdocs...') #7 {main} thrown in
:| :|
User avatar
Kofod95
Senior Contributor
Posts: 748
Joined: Sat Feb 06, 2021 7:38 pm
Phoenix Version: 1.0.8.20
Has thanked: 99 times
Been thanked: 179 times

Re: error database spanish leng

Post by Kofod95 »

Spanish is not yet updated to 1.0.9.7. You can wait for that update, make it yourself, make do with English for now, or install CE PhoenixCart 1.0.9.6 instead of 1.0.9.7.
Spanish is maintained by volunteers, but they are usually rather quick with updates.

//Daniel
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: error database spanish leng

Post by heatherbell »

camaron wrote: Mon Oct 14, 2024 7:01 pm Uncaught Error: Undefined constant "NAVBAR_ICON_CART_CONTENTS" in C:\xampp\htdocs\PhoenixCart-master\templates\bootstrap5\includes\modules\navbar\tpl_nb_shopping_cart.php:3
First, do not install an Addon that is not compatible for your Phoenix Cart version.
You are using 1.0.9.7 and the latest Spanish Language Pack Addon is clearly marked for 1.0.9.6.
As previously suggested, you could use Phoenix Cart version 1.0.9.6 instead.

Otherwise, the notice tells you the problem.
NAVBAR_ICON_CART_CONTENTS outputs a Language value.
It is in the Core Code but is not in your (Spanish) Language files.
So, where is it in the Core Code?
You could search the Core Code on your local computer or search the Phoenix Cart Public GitHub Repository here: https://github.com/CE-PhoenixCart/PhoenixCart
Use the Search Box at the top to search the repository for NAVBAR_ICON_CART_CONTENTS
This gives the results: https://github.com/search?q=repo%3ACE-P ... &type=code
That shows it is defined in /templates/bootstrap5/includes/languages/english.php
Therefore that Language file is overriding the Language file here: /includes/languages/english.php

Now, this is confusing because it is unfortunate that v1.0.9.7 is on the pathway to merging the new Bootstrap 5 template into Core Code. /templates/bootstrap5/ is new in v1.0.9.7 and NAVBAR_ICON_CART_CONTENTS is a new Constant.
Therefore, there will not be a /templates/bootstrap5/ in the 1.0.9.6 Spanish Language Pack.

You can quick fix by adding the new Constant:
https://github.com/CE-PhoenixCart/Phoen ... #L107-L113
to your main Language file, /includes/languages/espanol.php
camaron
Posts: 4
Joined: Sun Oct 13, 2024 7:12 pm
Phoenix Version:

Re: error database spanish leng

Post by camaron »

now install version 1.0.9.6 and EVERYTHING WORKS WELL. THANK YOU VERY MUCH FOR YOUR HELP GUYS.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply