VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: Bruce Morgan on April 11, 2012, 03:28:20 AM

Title: Product detail view
Post by: Bruce Morgan on April 11, 2012, 03:28:20 AM
I could use some help.  I nam trying to more or less make a clone of the VM1 flypage.  I took the default.php file in the tmpl folder and did a little cut and paste.  So far so good.  There was this little snippet of code that I removed that showed a medium sized image with a little thumbnail (smae image) below. 
   
   <div>
<div class="width50 floatleft">
<?php
echo $this->loadTemplate('images');
?>

</div>


What I would like to do it modify that code so that only a small thumbnail is shown with the text below "View Full-Sized Image", just like in VM 1.1.  Any coders who could lend a hand with this?

Title: Re: Product detail view
Post by: Bruce Morgan on April 12, 2012, 02:55:50 AM
Bump.  Can someone point me towards the correct file?
Title: Re: Product detail view
Post by: adrianpaun on April 12, 2012, 03:03:12 AM
edit the file default_images.php from the productdetails directory.
Title: Re: Product detail view
Post by: Bruce Morgan on April 12, 2012, 16:50:54 PM
Thanks.  I will try commenting out the call for the large image and leave just the addtional image.
Title: Re: Product detail view
Post by: PRO on April 12, 2012, 18:13:47 PM
Quote from: Bruce Morgan on April 12, 2012, 16:50:54 PM
Thanks.  I will try commenting out the call for the large image and leave just the addtional image.

remove

if (!empty($this->product->images[0])) {
    ?>
    <div class="main-image">
   <?php echo $this->product->images[0]->displayMediaFull('class="medium-image" id="medium-image"', false, "class='modal'", true); ?>
    </div>
<?php } // Product Main Image END ?>
Title: Re: Product detail view
Post by: adrianpaun on April 12, 2012, 19:24:56 PM
That will remove the image for good :)

replace this code:

    <div class="main-image">
   <?php echo $this->product->images[0]->displayMediaFull('class="medium-image" id="medium-image"'false"class='modal'"true); ?>
    </div>

with this one:

    <div class="main-image">
<?php echo $this->product->images[0]->displayMediaThumb('class="productimage" border="0"'true"class='modal'"true); ?>
    </div>
Title: Re: Product detail view
Post by: Bruce Morgan on April 12, 2012, 20:00:31 PM
Both are good suggestions.  I had already done what BTP suggested because it was easier and the addtional image was left.  I used the css to increase the size to 130 px and it looks better.  I guess with 2.0 there is the opportunity to use mulitple images that did not exist before but a single one is fine for me.  Is there an easy way to remove the picture name and replace it with an active link with the text "View Full-Size Image"?

The layout is looking better but I would like to have the description moved back owards the top.

Here is the layout look that I am tying to replicate http://www.pepper-passion.com/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=192&category_id=1&option=com_virtuemart&Itemid=200024

Here is what I have so far.

[attachment cleanup by admin]
Title: Re: Product detail view
Post by: PRO on April 12, 2012, 20:19:05 PM
go in 'show media files"

and thats the description or something
Title: Re: Product detail view
Post by: Bruce Morgan on April 12, 2012, 22:12:02 PM
Do not see that file anywhere.  Have any other ideas?
Title: Re: Product detail view
Post by: PRO on April 13, 2012, 13:23:39 PM
Quote from: Bruce Morgan on April 12, 2012, 22:12:02 PM
Do not see that file anywhere.  Have any other ideas?

the link is in the menu on the left in your vmart administrator
Title: Re: Product detail view
Post by: Bruce Morgan on April 13, 2012, 16:56:19 PM
Oh!  I thought you wer directing me to a php file.  That links is handy.  I have never used it much before.  Not sure how that will help me modify the product detail view to my liking though.
Title: Re: Product detail view
Post by: PRO on April 13, 2012, 17:33:30 PM
Quote from: Bruce Morgan on April 13, 2012, 16:56:19 PM
Oh!  I thought you wer directing me to a php file.  That links is handy.  I have never used it much before.  Not sure how that will help me modify the product detail view to my liking though.

see image for explanation of the image title



[attachment cleanup by admin]
Title: Re: Product detail view
Post by: Bruce Morgan on April 13, 2012, 17:50:30 PM
Okay, I understand.  The migration left some pretty ugly file names for all of my images so that would be a great way to clean that up.  However, what i really want to do is to delete the photo title fro the view and replace it with an active link with the text "View Full-Size Image" as I stated above.  I could change all of the titles but that would not do it.  I was thinking to modify the product detail view to do that.  Again, this would simply be replicating what was the default in VM1.1.  If you can help that would be great.
Title: Re: Product detail view
Post by: PRO on April 13, 2012, 18:17:26 PM
Quote from: Bruce Morgan on April 13, 2012, 17:50:30 PM
Okay, I understand.  The migration left some pretty ugly file names for all of my images so that would be a great way to clean that up.  However, what i really want to do is to delete the photo title fro the view and replace it with an active link with the text "View Full-Size Image" as I stated above.  I could change all of the titles but that would not do it.  I was thinking to modify the product detail view to do that.  Again, this would simply be replicating what was the default in VM1.1.  If you can help that would be great.

I have tried and cannot get it to work
Title: Re: Product detail view
Post by: Bruce Morgan on April 13, 2012, 18:20:28 PM
It is not that important but thanks for trying.  I will simply amend all fo the image titles.  Now if I could find way to make the rating stars visible again.