Surprises of the transition from 3.1.1 to 3.5.8
Posted: 15 Feb 2022, 11:56
Hi.
1.In administrator\components\com_phocacart\update\sql\mysql\3.5.4.sql is present next strings, which are also in 3.1.1.sql. I think it's hard to add a column if it already exists :)
ALTER TABLE `#__phocacart_product_stock` ADD COLUMN `sku` varchar(255) NOT NULL DEFAULT '';
ALTER TABLE `#__phocacart_product_stock` ADD COLUMN `ean` varchar(15) NOT NULL DEFAULT '';
2.In components\com_phocacart\views\items\tmpl\default.php is present next strings (from line 147):
$priceItems = $price->getPriceItems($v->price, $v->taxid, $v->taxrate, $v->taxcalculationtype, $v->taxtitle, $v->unit_amount, $v->unit_unit, 1, 1, $v->group_price);
$price->getPriceItemsChangedByAttributes($dP['priceitems'], $attributesOptions, $price, $v);
$dP['priceitemsorig']= array();
$dP['priceitems'] = $priceItems;
May be you should put "$dP['priceitems']=$priceItems;" before the call "$price->getPriceItemsChangedByAttributes"?
Otherwise, we pass an undefined $dP['priceitems'] to getPriceItemsChangedByAttributes() and had errors:
- Undefined index: netto in ...administrator\components\com_phocacart\libraries\phocacart\price\price.php on line 1051
- Undefined index: brutto in ...administrator\components\com_phocacart\libraries\phocacart\price\price.php on line 1052
- Undefined index: tax in ...administrator\components\com_phocacart\libraries\phocacart\price\price.php on line 1052
Or is there some other way to solve this problem?
Kind regards,
Sergey Kuznetsov
1.In administrator\components\com_phocacart\update\sql\mysql\3.5.4.sql is present next strings, which are also in 3.1.1.sql. I think it's hard to add a column if it already exists :)
ALTER TABLE `#__phocacart_product_stock` ADD COLUMN `sku` varchar(255) NOT NULL DEFAULT '';
ALTER TABLE `#__phocacart_product_stock` ADD COLUMN `ean` varchar(15) NOT NULL DEFAULT '';
2.In components\com_phocacart\views\items\tmpl\default.php is present next strings (from line 147):
$priceItems = $price->getPriceItems($v->price, $v->taxid, $v->taxrate, $v->taxcalculationtype, $v->taxtitle, $v->unit_amount, $v->unit_unit, 1, 1, $v->group_price);
$price->getPriceItemsChangedByAttributes($dP['priceitems'], $attributesOptions, $price, $v);
$dP['priceitemsorig']= array();
$dP['priceitems'] = $priceItems;
May be you should put "$dP['priceitems']=$priceItems;" before the call "$price->getPriceItemsChangedByAttributes"?
Otherwise, we pass an undefined $dP['priceitems'] to getPriceItemsChangedByAttributes() and had errors:
- Undefined index: netto in ...administrator\components\com_phocacart\libraries\phocacart\price\price.php on line 1051
- Undefined index: brutto in ...administrator\components\com_phocacart\libraries\phocacart\price\price.php on line 1052
- Undefined index: tax in ...administrator\components\com_phocacart\libraries\phocacart\price\price.php on line 1052
Or is there some other way to solve this problem?
Kind regards,
Sergey Kuznetsov