/** * Display addition image * * @return void */ public function displayAdditionImage() { $url = JURI::base(); $get = JRequest::get('get'); $option = JRequest::getVar('option'); $producthelper = new producthelper(); $property_id = urldecode($get['property_id']); $subproperty_id = urldecode($get['subproperty_id']); $product_id = $get['product_id']; $accessory_id = $get['accessory_id']; $relatedprd_id = $get['relatedprd_id']; $main_imgwidth = $get['main_imgwidth']; $main_imgheight = $get['main_imgheight']; $redview = $get['redview']; $redlayout = $get['redlayout']; $dispatcher = JDispatcher::getInstance(); JPluginHelper::importPlugin('redshop_product'); $pluginResults = $dispatcher->trigger('onBeforeImageLoad', array($get)); if (!empty($pluginResults)) { $mainImageResponse = $pluginResults[0]['mainImageResponse']; $result = $producthelper->displayAdditionalImage($product_id, $accessory_id, $relatedprd_id, $property_id, $subproperty_id); $result['attrbimg'] = $pluginResults[0]['attrbimg']; } else { $result = $producthelper->displayAdditionalImage($product_id, $accessory_id, $relatedprd_id, $property_id, $subproperty_id, $main_imgwidth, $main_imgheight, $redview, $redlayout); $mainImageResponse = $result['mainImageResponse']; } $response = $result['response']; $aHrefImageResponse = $result['aHrefImageResponse']; $aTitleImageResponse = $result['aTitleImageResponse']; $stockamountSrc = $result['stockamountSrc']; $stockamountTooltip = $result['stockamountTooltip']; $ProductAttributeDelivery = $result['ProductAttributeDelivery']; $attrbimg = $result['attrbimg']; $pr_number = $result['pr_number']; $productinstock = $result['productinstock']; $stock_status = $result['stock_status']; $ImageName = $result['ImageName']; $notifyStock = $result['notifyStock']; $product_availability_date_lbl = $result['product_availability_date_lbl']; $product_availability_date = $result['product_availability_date']; echo "`_`" . $response . "`_`" . $aHrefImageResponse . "`_`" . $aTitleImageResponse . "`_`" . $mainImageResponse . "`_`" . $stockamountSrc . "`_`" . $stockamountTooltip . "`_`" . $ProductAttributeDelivery . "`_`" . $product_img . "`_`" . $pr_number . "`_`" . $productinstock . "`_`" . $stock_status . "`_`" . $attrbimg . "`_`" . $notifyStock . "`_`" . $product_availability_date_lbl . "`_`" . $product_availability_date; exit; }
if (count($selectedId) > 0) { $selectedpropertyId = $selectedId[count($selectedId) - 1]; $subproperty = $producthelper->getAttibuteSubProperty(0, $selectedpropertyId); $selectedId = array(); for ($sp = 0; $sp < count($subproperty); $sp++) { if ($subproperty[$sp]->setdefault_selected) { $selectedId[] = $subproperty[$sp]->subattribute_color_id; } } if (count($selectedId) > 0) { $selectedsubpropertyId = $selectedId[count($selectedId) - 1]; } } } } $preselectedresult = $producthelper->displayAdditionalImage($this->data->product_id, 0, 0, $selectedpropertyId, $selectedsubpropertyId, $pw_thumb, $ph_thumb, $redview = 'product'); $productAvailabilityDate = strstr($template_desc, "{product_availability_date}"); $stockNotifyFlag = strstr($template_desc, "{stock_notify_flag}"); $stockStatus = strstr($template_desc, "{stock_status"); if ($productAvailabilityDate || $stockNotifyFlag || $stockStatus) { $attributeproductStockStatus = $producthelper->getproductStockStatus($this->data->product_id, $totalatt, $selectedpropertyId, $selectedsubpropertyId); } $moreimage_response = $preselectedresult['response']; $aHrefImageResponse = $preselectedresult['aHrefImageResponse']; $aTitleImageResponse = $preselectedresult['aTitleImageResponse']; $mainImageResponse = $preselectedresult['product_mainimg']; $attrbimg = $preselectedresult['attrbimg']; if (!is_null($preselectedresult['pr_number']) && !empty($preselectedresult['pr_number'])) { $pr_number = $preselectedresult['pr_number']; } } else {