Example #1
0
        <?php 
}
?>

        <?php 
// display the files associated with this product
?>
        <?php 
echo $this->files;
?>

        <?php 
// display the gallery images associated with this product if there is one
?>
        <?php 
$path = CitruscartHelperProduct::getGalleryPath($item->product_id);
?>
        <?php 
$images = CitruscartHelperProduct::getGalleryImages($path, array('exclude' => $item->product_full_image));
?>
        <?php 
jimport('joomla.filesystem.folder');
if (!empty($path) && !empty($images)) {
    ?>

            <div class="reset"></div>
            <div class="product_gallery">
                <div id="product_gallery_header" class="citruscart_header">
                    <span><?php 
    echo JText::_('COM_CITRUSCART_IMAGES');
    ?>
Example #2
0
 public static function getGalleryLayout($view, $product_id, $product_name = '', $exclude = '', $layout = 'product_gallery', $values = array())
 {
     /* Get the application */
     $app = JFactory::getApplication();
     if (is_array($values) && !count($values)) {
         $values = $app->input->getArray($_POST);
     }
     if ($view === null) {
         // if nothing is specified, load products view
         $view = CitruscartHelperProduct::getProductViewObject();
     }
     $path = CitruscartHelperProduct::getGalleryPath($product_id);
     $images = CitruscartHelperProduct::getGalleryImages($path, array('exclude' => $exclude));
     $uri = CitruscartHelperProduct::getUriFromPath($path);
     $show_gallery = false;
     if (!empty($path) && !empty($images)) {
         $show_gallery = true;
     }
     Citruscart::load('CitruscartUrl', 'library.url');
     $gallery_data = new stdClass();
     $gallery_data->values = $values;
     $gallery_data->show_gallery = $show_gallery;
     $gallery_data->uri = $uri;
     $gallery_data->images = $images;
     $gallery_data->product_name = $product_name;
     $view->gallery_data = $gallery_data;
     $lt = $view->getLayout();
     $view->setLayout($layout);
     ob_start();
     echo $view->loadTemplate(null);
     $html = ob_get_contents();
     ob_end_clean();
     $view->setLayout($lt);
     unset($view->gallery_data);
     return $html;
 }