Jump to content

Err 500


echauffage

Recommended Posts

Bonjour,

 

Depuis ce matin une erreur 500 apparaît sur le site internet hébergé depuis prestashop cloud, sans raison apparente car aucune modification ne justifie cette erreur. 

 

Je voulais savoir si il s'agit d'un problème commun qui concerne le cloud de prestashop, ou d'un problème sur un fichier de configuration?

 

En vous remerciant par avance 

 

Cordialement 

Link to comment
Share on other sites

Oui, le problème persiste, le support m'indique qu'il s'agit d'un problème avec un override du fichier product.php, ce qui semble cohérent car l'unique page qui ne fonctionne pas sur le back-office est celle des produits. Je soupçonne le module ebay installé hier. Je ne sais cependant pas comment résoudre le problème

 

Edit : Problème résolu en comparant avec une ancienne sauvegarde,  le problème vient de ce code dans product.php :

 

/*

* module: quotation
* date: 2016-01-25 12:40:22
* version: 2.33.0
*/
public function __construct($id_product = null, $full = false, $id_lang = null, $id_shop = null, Context $context = null)
 
{
 
$return = parent::__construct($id_product, $full, $id_lang, $id_shop, $context);
 
if (defined('OVERRIDE_AVAILABLE'))
 
$this->available_for_order = true;
 
return $return;
 
}
 
 
 
/*
* module: quotation
* date: 2016-01-25 12:40:22
* version: 2.33.0
*/
public static function isAvailableWhenOutOfStock($out_of_stock)
 
{
 
if (defined('OVERRIDE_AVAILABLE'))
 
return true;
 
 
 
return parent::isAvailableWhenOutOfStock($out_of_stock);
 
}
 
 
 
/*
* module: quotation
* date: 2016-01-25 12:40:22
* version: 2.33.0
*/
public static function getIdTaxRulesGroupByIdProduct($id_product, Context $context = null)
 
{
 
if ($id_product > 0)
 
{
 
Cart::$products_quotation_it2++;
 
return parent::getIdTaxRulesGroupByIdProduct($id_product, $context);
 
}
 
 
 
$qp = new QuotationProduct(Cart::$products_quotation[Cart::$products_quotation_it2]['id_product_attribute']);
 
Cart::$products_quotation_it2++;
 
 
 
return $qp->id_tax;
 
}
 
 
 
/*
* module: quotation
* date: 2016-01-25 12:40:22
* version: 2.33.0
*/
public static function getPriceStatic($id_product, $usetax = true, $id_product_attribute = null, $decimals = 6, $divisor = null,
 
$only_reduc = false, $usereduc = true, $quantity = 1, $force_associated_tax = false, $id_customer = null, $id_cart = null,
 
$id_address = null, &$specific_price_output = null, $with_ecotax = true, $use_group_reduction = true, Context $context = null,
 
$use_customer_price = true)
 
{
 
if ($id_product == 0 && !empty($id_product_attribute))
 
{
 
$quotation_product = new QuotationProduct((int)$id_product_attribute);
 
 
if (!empty($quotation_product->id))
 
{
 
if ($only_reduc)
 
{
 
if ($usetax)
 
return ($quotation_product->final_price_with_tax - $quotation_product->final_price_with_tax_discount);
 
else
 
return ($quotation_product->final_price_without_tax - $quotation_product->final_price_without_tax_discount);
 
}
 
 
 
if ($usereduc)
 
{
 
if ($usetax)
 
return $quotation_product->final_price_with_tax_discount;
 
else
 
return $quotation_product->final_price_without_tax_discount;
 
}
 
else
 
{
 
if ($usetax)
 
return $quotation_product->final_price_with_tax;
 
else
 
return $quotation_product->final_price_without_tax;
 
}
 
}
 
}
 
return parent::getPriceStatic($id_product, $usetax, $id_product_attribute, $decimals, $divisor,
 
$only_reduc, $usereduc, $quantity, $force_associated_tax, $id_customer, $id_cart,
 
$id_address, $specific_price_output, $with_ecotax, $use_group_reduction, $context,
 
$use_customer_price);
 
}
 
}
Edited by echauffage (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...