Ejemplo n.º 1
0
<?php

defined('_JEXEC') or die('Restricted access');
$form = @$this->form;
$row = @$this->row;
$helper_product = new TiendaHelperProduct();
$gallery_path = $helper_product->getGalleryPath($row->product_id);
$gallery_url = $helper_product->getGalleryUrl($row->product_id);
$images = $helper_product->getGalleryImages($gallery_path);
?>

<?php 
if (!empty($images)) {
    ?>
<fieldset id="product-form-gallery">
    <legend><?php 
    echo JText::_("COM_TIENDA_GALLERY");
    ?>
</legend>
        
    <ul>
    <?php 
    foreach ($images as $image) {
        ?>
        <li class="pull-left">
            <img src="<?php 
        echo $gallery_url;
        ?>
thumbs/<?php 
        echo $image;
        ?>
Ejemplo n.º 2
0
            </div>
        <?php 
}
?>
        
        <?php 
if (@$params['show_image'] == '1') {
    ?>
        <?php 
    // display the gallery images associated with this product if there is one
    ?>
        <?php 
    $path = TiendaHelperProduct::getGalleryPath($item->product_id);
    ?>
        <?php 
    $images = TiendaHelperProduct::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="tienda_header">
                    <span><?php 
        echo JText::_('COM_TIENDA_IMAGES');
        ?>
</span>
                </div>
                <?php 
Ejemplo n.º 3
0
 public static function getGalleryLayout($view, $product_id, $product_name = '', $exclude = '', $layout = 'product_gallery', $values = array())
 {
     if (is_array($values) && !count($values)) {
         $values = JRequest::get('post');
     }
     if ($view === null) {
         // if nothing is specified, load products view
         $view = TiendaHelperProduct::getProductViewObject();
     }
     $path = TiendaHelperProduct::getGalleryPath($product_id);
     $images = TiendaHelperProduct::getGalleryImages($path, array('exclude' => $exclude));
     $uri = TiendaHelperProduct::getUriFromPath($path);
     $show_gallery = false;
     if (!empty($path) && !empty($images)) {
         $show_gallery = true;
     }
     Tienda::load('TiendaUrl', '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;
 }