VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: hopinn on October 04, 2016, 15:27:24 PM

Title: How to display all product images on the Category page?
Post by: hopinn on October 04, 2016, 15:27:24 PM
I used this code beneath in "../components/com_virtuemart/views/category/tmpl/default.php" but only the first category image shows up. Where do i go wrong? thank you!

      <?php
   
         // List all Images
         if (count($this->category->images) > 0) {
       
             foreach ($this->category->images as $image) { // Loop through the results
     
               $ImgLink = $image->file_url;
               $ImgTitle = $this->category->category_name;
         
           
            echo '<img src="'.$ImgLink.'" alt="" title="'.$ImgTitle.'" />';
           
           
                           }
                        }
      ?>
Title: Re: How to display all product images on the Category page?
Post by: PRO on October 04, 2016, 22:07:19 PM
do you want CATEGORY IMAGE?

OR PRODUCT IMAGE?