Witam'Jak w temacie, podczas dodawania do koszyka produktu, serwer wywala błąd 500...
Komunikat z log:
[16-Sep-2015 21:21:01 Europe/Warsaw] PHP Fatal error: Undefined class constant 'ROUND_TOTAL' in /sklep/classes/Cart.php on line 702
[16-Sep-2015 21:26:54 Europe/Warsaw] PHP Fatal error: Undefined class constant 'ROUND_TOTAL' in /sklep/classes/Cart.php on line 702
[16-Sep-2015 22:53:56 Europe/Warsaw] PHP Fatal error: Undefined class constant 'ROUND_ITEM' in /sklep/controllers/admin/AdminPreferencesController.php on line 161
[16-Sep-2015 22:54:02 Europe/Warsaw] PHP Fatal error: Undefined class constant 'ROUND_ITEM' in /sklep/controllers/admin/AdminPreferencesController.php on line 161
[17-Sep-2015 09:58:20 Europe/Warsaw] PHP Fatal error: Undefined class constant 'ROUND_TOTAL' in /sklep/classes/Cart.php on line 702
[18-Sep-2015 00:06:30 Europe/Warsaw] PHP Fatal error: Undefined class constant 'ROUND_TOTAL' in /sklep/classes/Cart.php on line 702
[18-Sep-2015 00:06:37 Europe/Warsaw] PHP Fatal error: Undefined class constant 'ROUND_TOTAL' in /sklep/classes/Cart.php on line 702
[18-Sep-2015 00:07:01 Europe/Warsaw] PHP Fatal error: Undefined class constant 'ROUND_TOTAL' in /sklep/classes/Cart.php on line 702
'PS_ROUND_TYPE' => array(
'title' => $this->l('Round type'),
'desc' => $this->l('You can choose when to round prices: either on each item, each line or the total (of an invoice, for example).'),
'cast' => 'intval',
'type' => 'select',
'list' => array(
array(
'name' => $this->l('Round on each item'),
'id' => Order::ROUND_ITEM
),
array(
'name' => $this->l('Round on each line'),
'id' => Order::ROUND_LINE
),
array(
'name' => $this->l('Round on the total'),
'id' => Order::ROUND_TOTAL
),
),
'identifier' => 'id'
),
Jak w poście kolegi VEKIA uaktywniłem raportowanie i taki wyskoczył komunikat:
Impossible to add the product to the cart.
textStatus: 'parsererror'
errorThrown: 'SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data'
responseText:
Fatal error: Undefined class constant 'ROUND_TOTAL' in /sklep/classes/Cart.php on line 702
Question
smiglon
Witam'Jak w temacie, podczas dodawania do koszyka produktu, serwer wywala błąd 500...
Komunikat z log:
Wiersz 702 w cart.php:
switch (Configuration::get('PS_ROUND_TYPE')) { case Order::ROUND_TOTAL: $row['total'] = $row['price_with_reduction_without_tax'] * (int)$row['cart_quantity']; $row['total_wt'] = $row['price_with_reduction'] * (int)$row['cart_quantity']; break; case Order::ROUND_LINE: $row['total'] = Tools::ps_round($row['price_with_reduction_without_tax'] * (int)$row['cart_quantity'], _PS_PRICE_COMPUTE_PRECISION_); $row['total_wt'] = Tools::ps_round($row['price_with_reduction'] * (int)$row['cart_quantity'], _PS_PRICE_COMPUTE_PRECISION_); break; case Order::ROUND_ITEM: default: $row['total'] = Tools::ps_round($row['price_with_reduction_without_tax'], _PS_PRICE_COMPUTE_PRECISION_) * (int)$row['cart_quantity']; $row['total_wt'] = Tools::ps_round($row['price_with_reduction'], _PS_PRICE_COMPUTE_PRECISION_) * (int)$row['cart_quantity']; break; }AdminPreferencesController.php wiersz 161:
'PS_ROUND_TYPE' => array( 'title' => $this->l('Round type'), 'desc' => $this->l('You can choose when to round prices: either on each item, each line or the total (of an invoice, for example).'), 'cast' => 'intval', 'type' => 'select', 'list' => array( array( 'name' => $this->l('Round on each item'), 'id' => Order::ROUND_ITEM ), array( 'name' => $this->l('Round on each line'), 'id' => Order::ROUND_LINE ), array( 'name' => $this->l('Round on the total'), 'id' => Order::ROUND_TOTAL ), ), 'identifier' => 'id' ),Jak w poście kolegi VEKIA uaktywniłem raportowanie i taki wyskoczył komunikat:
Ma ktos jakis pomysł jak sie pozbyć problemu ?
Wersja prestashop 1.6.1.1
Hosting home.pl php: 5.4
Edited by smiglon (see edit history)Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now