} $template = str_replace('{discount_start_date}', $exp_div . $disc_start_date . $div_end . $td_end . $td_start . "{discount_start_date}", $template); } if (strstr($template, "{discount_end_date}")) { $disc_end_date = ""; if ($product->discount_enddate) { $disc_end_date = $config->convertDateFormat($product->discount_enddate); } $template = str_replace('{discount_end_date}', $exp_div . $disc_end_date . $div_end . $td_end . $td_start . "{discount_end_date}", $template); } $template = str_replace('{product_s_desc}', $exp_div . $product->product_s_desc . $div_end . $td_end . $td_start . "{product_s_desc}", $template); $template = str_replace('{product_desc}', $exp_div . $product->product_desc . $div_end . $td_end . $td_start . "{product_desc}", $template); $product_number_output = '<span id="product_number_variable' . $product->product_id . '">' . $product->product_number . '</span>'; $template = str_replace('{product_number}', $exp_div . $product->product_number . $div_end . $td_end . $td_start . "{product_number}", $template); $product_weight_unit = '<span class="product_unit_variable">' . DEFAULT_WEIGHT_UNIT . '</span>'; $template = str_replace('{product_weight}', $exp_div . $producthelper->redunitDecimal($product->weight) . " " . $product_weight_unit . $div_end . $td_end . $td_start . "{product_weight}", $template); $product_unit = '<span class="product_unit_variable">' . DEFAULT_VOLUME_UNIT . '</span>'; $template = str_replace('{product_length}', $exp_div . $producthelper->redunitDecimal($product->product_length) . " " . $product_unit . $div_end . $td_end . $td_start . "{product_length}", $template); $template = str_replace('{product_height}', $exp_div . $producthelper->redunitDecimal($product->product_height) . " " . $product_unit . $div_end . $td_end . $td_start . "{product_height}", $template); $template = str_replace('{product_width}', $exp_div . $producthelper->redunitDecimal($product->product_width) . " " . $product_unit . $div_end . $td_end . $td_start . "{product_width}", $template); $product_volume_unit = '<span class="product_unit_variable">' . DEFAULT_VOLUME_UNIT . "3" . '</span>'; $template = str_replace('{product_volume}', $exp_div . $producthelper->redunitDecimal($product->product_volume) . " " . $product_volume_unit . $div_end . $td_end . $td_start . "{product_volume}", $template); if (strstr($template, "{product_price}")) { $price = 0; if (SHOW_PRICE && !USE_AS_CATALOG && (!DEFAULT_QUOTATION_MODE || DEFAULT_QUOTATION_MODE && SHOW_QUOTATION_PRICE)) { $price = $producthelper->getProductFormattedPrice($product->product_price); } $template = str_replace('{product_price}', $exp_div . $price . $div_end . $td_end . $td_start . "{product_price}", $template); } if (strstr($template, "{product_rating_summary}")) { $final_avgreview_data = $producthelper->getProductRating($compare[$i]["product_id"]);
} $prddata_add = $prddata_add . $hidden_userfield; /************** end user fields ***************************/ $ItemData = $producthelper->getMenuInformation(0, 0, '', 'product&pid=' . $product->product_id); if (count($ItemData) > 0) { $pItemid = $ItemData->id; } else { $pItemid = $objhelper->getItemid($product->product_id); } $prddata_add = str_replace("{product_id_lbl}", JText::_('COM_REDSHOP_PRODUCT_ID_LBL'), $prddata_add); $prddata_add = str_replace("{product_id}", $product->product_id, $prddata_add); $prddata_add = str_replace("{product_number_lbl}", JText::_('COM_REDSHOP_PRODUCT_NUMBER_LBL'), $prddata_add); $product_number_output = '<span id="product_number_variable' . $product->product_id . '">' . $product->product_number . '</span>'; $prddata_add = str_replace("{product_number}", $product_number_output, $prddata_add); $product_volume_unit = '<span class="product_unit_variable">' . DEFAULT_VOLUME_UNIT . "3" . '</span>'; $strToInsert = $producthelper->redunitDecimal($product->product_volume) . " " . $product_volume_unit; $prddata_add = str_replace("{product_size}", $strToInsert, $prddata_add); $product_unit = '<span class="product_unit_variable">' . DEFAULT_VOLUME_UNIT . '</span>'; $strToInsert = $producthelper->redunitDecimal($product->product_length) . " " . $product_unit; $prddata_add = str_replace("{product_length}", $strToInsert, $prddata_add); $prddata_add = str_replace("{product_width}", $producthelper->redunitDecimal($product->product_width) . " " . $product_unit, $prddata_add); $strToInsert = $producthelper->redunitDecimal($product->product_height) . " " . $product_unit; $prddata_add = str_replace("{product_height}", $strToInsert, $prddata_add); $prddata_add = $producthelper->replaceVatinfo($prddata_add); $this->catid = $row->category_id; $link = JRoute::_('index.php?option=com_redshop&view=product&pid=' . $product->product_id . '&cid=' . $this->catid . '&Itemid=' . $pItemid); if (strstr($prddata_add, '{product_name}')) { $pname = $config->maxchar($product->product_name, CATEGORY_PRODUCT_TITLE_MAX_CHARS, CATEGORY_PRODUCT_TITLE_END_SUFFIX); $pname = "<a href='" . $link . "' title='" . $product->product_name . "'>" . $pname . "</a>"; $prddata_add = str_replace("{product_name}", $pname, $prddata_add); }
$prevbutton = '<a href="' . $prevlink . '">' . DAFULT_PREVIOUS_LINK_PREFIX . "" . $previousproducts->product_name . '</a>'; } elseif (DEFAULT_LINK_FIND == 1) { $prevbutton = '<a href="' . $prevlink . '">' . CUSTOM_PREVIOUS_LINK_FIND . '</a>'; } elseif (file_exists(REDSHOP_FRONT_IMAGES_RELPATH . IMAGE_PREVIOUS_LINK_FIND)) { $prevbutton = '<a href="' . $prevlink . '"><img src="' . REDSHOP_FRONT_IMAGES_ABSPATH . IMAGE_PREVIOUS_LINK_FIND . '" /></a>'; } // End } $template_desc = str_replace('{navigation_link_right}', $nextbutton, $template_desc); $template_desc = str_replace('{navigation_link_left}', $prevbutton, $template_desc); } /* * product size variables */ $product_volume = ""; $product_volume .= '<span class="length_number">' . $producthelper->redunitDecimal($this->data->product_length) . '</span>'; $product_volume .= '<span class="length_unit">' . DEFAULT_VOLUME_UNIT . '</span>'; $product_volume .= '<span class="separator">X</span>'; $product_volume .= '<span class="width_number">' . $producthelper->redunitDecimal($this->data->product_width) . '</span>'; $product_volume .= '<span class="width_unit">' . DEFAULT_VOLUME_UNIT . '</span>'; $product_volume .= '<span class="separator">X</span>'; $product_volume .= '<span class="height_number">' . $producthelper->redunitDecimal($this->data->product_height) . '</span>'; $product_volume .= '<span class="height_unit">' . DEFAULT_VOLUME_UNIT . '</span>'; $template_desc = str_replace('{product_size}', $product_volume, $template_desc); if (DEFAULT_VOLUME_UNIT) { $product_unit = '<span class="product_unit_variable">' . DEFAULT_VOLUME_UNIT . '</span>'; } else { $product_unit = ''; } // Product length if ($this->data->product_length > 0) {