Arkadaşlar yukarda gördüğünüz resmi kısaca özetleyim size şimdi opencart apili bir mobil uygulama aldım uygulamanın hiçbir yerinde sıkıntı yok tek sıkıntı çektiğim nokta burası options u seçiyorum seçtiğim halde bu hatayı veriyor
kodlar aşşağıda ücretiyle yardım etmek isteyen arkadaşlar da ulaşabilir şimdiden tüm foruma teşekkürler :)
$this->load->model('catalog/product');
$options = $this->model_catalog_product->getProductOptions($productId);
$variations = array();
$product = $this->model_catalog_product->getProduct($productId);
$attributesForVariation = array();
foreach ($options as $option) {
if($option['required'] == 1 && ($option['type'] == 'radio' || $option['type'] == 'select')) {
$attributesForVariation[] = $option;
}
}
$countAllAttributes = count($attributesForVariation);
$keyResult = '';
for($i=0;$i<$countAllAttributes;$i++) {
$keyResult .= '11';
}
$resultArray = array();
$this->getRecursiveVariant($attributesForVariation, 0, @$attributesForVariation[0], $resultArray, (int)0, array(@$attributesForVariation[0]['product_option_value'][0]));
foreach($resultArray as $key => $combination) {
$variantPriceCurrent = $productPriceCurrent = $product['special']?:$product['price'];
$variantPrice = $productPrice = $product['price'];
$variantWeight = $productWeight = $product['weight'];
$attributeForShow = array();
foreach($combination as $option) {
$variantPriceCurrent = eval('return '.$variantPriceCurrent.$option['price_prefix'].$option['price'].' ;');
$variantPrice = eval('return '.$variantPrice.$option['price_prefix'].$option['price'].' ;');
$variantWeight = eval('return '.$variantWeight.$option['weight_prefix'].$option['weight'].' ;');
$attributeForShow[] = array(
"id" => (int) $option['product_option_value_id'],
"name" => $option['name'],
"option" => $option['name']
);
}