Bonjour,
Merci pour le nouvel accès.
A la suite des tests, le problème a été identifié et corrigé.
Il a fallu changer le code:
if(!is_array($product_id)){
$pid =$product_id;
$this->mainProduct = $product_id;
$product_id=array($product_id=>$quantity);
$options = JRequest::getVar( 'hikashop_product_option', array(), '', 'array' );
if(!empty($options)&& is_array($options)){
$options=array_reverse($options);
foreach($options as $optionElement){
$this->options[$optionElement]=$pid;
$product_id[$optionElement]=$quantity;
}
}
}
$updated = false;
foreach($product_id as $id => $infos){
$res = $this->updateEntry($infos,$cartContent,(int)$id,$add,false,$type,$force);
if(is_numeric($id) && $res){
$updated = true;
}
}
en:
$severalMainProducts = false;
if(!is_array($product_id)){
$pid =$product_id;
$this->mainProduct = $product_id;
$product_id=array($product_id=>$quantity);
$options = JRequest::getVar( 'hikashop_product_option', array(), '', 'array' );
if(!empty($options)&& is_array($options)){
$options=array_reverse($options);
foreach($options as $optionElement){
$this->options[$optionElement]=$pid;
$product_id[$optionElement]=$quantity;
}
}
}else{
$severalMainProducts = true;
}
$updated = false;
foreach($product_id as $id => $infos){
if($severalMainProducts) $this->mainProduct = $id;
$res = $this->updateEntry($infos,$cartContent,(int)$id,$add,false,$type,$force);
if(is_numeric($id) && $res){
$updated = true;
}
}
dans administrator/components/com_hikashop/classes/cart.php
La modification sera incluse pour la prochaine version d'HikaShop.