// Get image size information and add the full URL if (substr($product_full_image, 0, 4) != 'http') { // This is a local image if (file_exists(IMAGEPATH . 'product/' . $product_full_image)) { $full_image_info = getimagesize(IMAGEPATH . 'product/' . $product_full_image); $full_image_width = $full_image_info[0] + 40; $full_image_height = $full_image_info[1] + 40; } $product_full_image = IMAGEURL . 'product/' . $product_full_image; } elseif (!isset($full_image_width) || !isset($full_image_height)) { // This is a URL image $full_image_info = getimagesize($product_full_image); $full_image_width = $full_image_info[0] + 40; $full_image_height = $full_image_info[1] + 40; } $files = ps_product_files::getFilesForProduct($db_browse->f('product_id')); $products[$i]['files'] = $files['files']; $products[$i]['images'] = $files['images']; $product_name = $db_browse->f("product_name"); if ($db_browse->f("product_publish") == "N") { $product_name .= " (" . $VM_LANG->_('CMN_UNPUBLISHED', false) . ")"; } if (empty($product_name) && $product_parent_id != 0) { $product_name = $dbp->f("product_name"); // Use product_name from Parent Product } $product_s_desc = $db_browse->f("product_s_desc"); if (empty($product_s_desc) && $product_parent_id != 0) { $product_s_desc = $dbp->f("product_s_desc"); // Use product_s_desc from Parent Product }
} if ($box) { $product_packaging .= $VM_LANG->_('PHPSHOP_PRODUCT_PACKAGING2') . $box; } $product_packaging = str_replace("{unit}", $db_product->f("product_unit") ? $db_product->f("product_unit") : $VM_LANG->_('PHPSHOP_PRODUCT_FORM_UNIT_DEFAULT'), $product_packaging); } else { $product_packaging = ""; } // Change Packaging - End // PRODUCT IMAGE $product_full_image = $product_parent_id != 0 && !$db_product->f("product_full_image") ? $dbp->f("product_full_image") : $db_product->f("product_full_image"); // Change $product_thumb_image = $product_parent_id != 0 && !$db_product->f("product_thumb_image") ? $dbp->f("product_thumb_image") : $db_product->f("product_thumb_image"); // Change /* MORE IMAGES ??? */ $files = ps_product_files::getFilesForProduct($product_id); $more_images = ""; if (!empty($files['images'])) { $more_images = $tpl->vmMoreImagesLink($files['images']); } // Does the Product have files? $file_list = ps_product_files::get_file_list($files['product_id']); $product_availability = ''; if (@$_REQUEST['output'] != "pdf") { // Show the PDF, Email and Print buttons $tpl->set('option', $option); $tpl->set('category_id', $category_id); $tpl->set('product_id', $product_id); $buttons_header = $tpl->fetch('common/buttons.tpl.php'); $tpl->set('buttons_header', $buttons_header); // AVAILABILITY