VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: tzeus on April 11, 2012, 17:02:33 PM

Title: [SOLVED]Click on product image = product details
Post by: tzeus on April 11, 2012, 17:02:33 PM
Hello,
I have an issue. My knowledge in php is rather limited, and this is nothing but agravated by the use of JHTML and J* stuff that i don't really understand. Here is my problem:
I want to completely remove the Product details button and and it's link to the thumbnail of the product. No modal popup for image, just the link to product details. I have tried doing it myself but due to limited know how in php couldn't  achieve anything.
While i continue my research and i try to fix the problem myself, i really hope someone can help me with these, i feel like i`m not moving at all.
here is the website:
http://www.xquisiteart.com
Title: Re: Click on product image = product details
Post by: adrianpaun on April 12, 2012, 02:05:09 AM
Change in:

templates/your_template/html/com_virtuemart/category/default.php or components/com_virtuemart/views/category/tmpl/default.php

echo $product->images[0]->displayMediaThumb('class="browseProductImage" border="0" title="'.$product->product_name.'" ',true,'class="modal"');

with this one

echo JHTML::_ ( 'link', JRoute::_ ( 'index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $product->virtuemart_product_id . '&virtuemart_category_id=' . $product->virtuemart_category_id ), $product->images[0]->displayMediaThumb( 'class="featuredProductImage" border="0"',false,'class="modal"' ) );

templates/your_template/html/com_virtuemart/virtuemart/default_products.php or components/com_virtuemart/views/virtuemart/tmpl/default_products.php

if ($product->images) {
echo JHTML::_ ( 'link', JRoute::_ ( 'index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $product->virtuemart_product_id . '&virtuemart_category_id=' . $product->virtuemart_category_id ), $product->images[0]->displayMediaThumb( 'class="featuredProductImage" border="0"',true,'class="modal"' ) );
}


with this one:

echo JHTML::_ ( 'link', JRoute::_ ( 'index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $product->virtuemart_product_id . '&virtuemart_category_id=' . $product->virtuemart_category_id ), $product->images[0]->displayMediaThumb( 'class="featuredProductImage" border="0"',false,'class="modal"' ) );
}


This should work.

Title: Re: Click on product image = product details
Post by: Bruce Morgan on April 12, 2012, 02:48:41 AM
I found that helpful as well.  I removed the product details button as it seems redundant and made the font for the product name line larger.  It looks much better. Thanks.
Title: Re: Click on product image = product details
Post by: adrianpaun on April 12, 2012, 02:53:07 AM
i have done some changins in productdetailede and improved the look of it :D

[attachment cleanup by admin]
Title: [SOLVED] Re: Click on product image = product details
Post by: tzeus on April 12, 2012, 04:26:59 AM
Thank you very much Adi! It worked like a charm!
Title: Re: [SOLVED]Click on product image = product details
Post by: Bruce Morgan on April 12, 2012, 17:15:16 PM
I like what you have done.  Would you car to share some of your work with me?  I am guessing that you used the custome fields to create the specifications?  Send me a PM?
Title: Re: [SOLVED]Click on product image = product details
Post by: adrianpaun on April 12, 2012, 19:01:08 PM
Yes indeed i use custom field for specifications.
Title: Re: [SOLVED]Click on product image = product details
Post by: ssanchez on May 17, 2012, 19:27:05 PM
any suggestions where this can be in virtuemart 1.9?
Title: Re: Click on product image = product details
Post by: furtherdg on September 20, 2012, 21:05:45 PM
Hi adrianpaun. You said to edit two files but if I apply the edit you suggested to only templates/your_template/html/com_virtuemart/category/default.php my thumbnails from my category page direct fine to my product details page. What is the purpose of also editing the templates/your_template/html/com_virtuemart/virtuemart/default_products.php page?

Thanks!



Quote from: adrianpaun on April 12, 2012, 02:05:09 AM
Change in:

templates/your_template/html/com_virtuemart/category/default.php or components/com_virtuemart/views/category/tmpl/default.php

echo $product->images[0]->displayMediaThumb('class="browseProductImage" border="0" title="'.$product->product_name.'" ',true,'class="modal"');

with this one

echo JHTML::_ ( 'link', JRoute::_ ( 'index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $product->virtuemart_product_id . '&virtuemart_category_id=' . $product->virtuemart_category_id ), $product->images[0]->displayMediaThumb( 'class="featuredProductImage" border="0"',false,'class="modal"' ) );

templates/your_template/html/com_virtuemart/virtuemart/default_products.php or components/com_virtuemart/views/virtuemart/tmpl/default_products.php

if ($product->images) {
echo JHTML::_ ( 'link', JRoute::_ ( 'index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $product->virtuemart_product_id . '&virtuemart_category_id=' . $product->virtuemart_category_id ), $product->images[0]->displayMediaThumb( 'class="featuredProductImage" border="0"',true,'class="modal"' ) );
}


with this one:

echo JHTML::_ ( 'link', JRoute::_ ( 'index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $product->virtuemart_product_id . '&virtuemart_category_id=' . $product->virtuemart_category_id ), $product->images[0]->displayMediaThumb( 'class="featuredProductImage" border="0"',false,'class="modal"' ) );
}


This should work.
Title: Re: Click on product image = product details
Post by: razvanbirle on January 22, 2013, 11:39:02 AM
Quote from: furtherdg on September 20, 2012, 21:05:45 PM
Hi adrianpaun. You said to edit two files but if I apply the edit you suggested to only templates/your_template/html/com_virtuemart/category/default.php my thumbnails from my category page direct fine to my product details page. What is the purpose of also editing the templates/your_template/html/com_virtuemart/virtuemart/default_products.php page?

Thanks!



Quote from: adrianpaun on April 12, 2012, 02:05:09 AM
Change in:

templates/your_template/html/com_virtuemart/category/default.php or components/com_virtuemart/views/category/tmpl/default.php

echo $product->images[0]->displayMediaThumb('class="browseProductImage" border="0" title="'.$product->product_name.'" ',true,'class="modal"');

with this one

echo JHTML::_ ( 'link', JRoute::_ ( 'index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $product->virtuemart_product_id . '&virtuemart_category_id=' . $product->virtuemart_category_id ), $product->images[0]->displayMediaThumb( 'class="featuredProductImage" border="0"',false,'class="modal"' ) );

templates/your_template/html/com_virtuemart/virtuemart/default_products.php or components/com_virtuemart/views/virtuemart/tmpl/default_products.php

if ($product->images) {
echo JHTML::_ ( 'link', JRoute::_ ( 'index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $product->virtuemart_product_id . '&virtuemart_category_id=' . $product->virtuemart_category_id ), $product->images[0]->displayMediaThumb( 'class="featuredProductImage" border="0"',true,'class="modal"' ) );
}


with this one:

echo JHTML::_ ( 'link', JRoute::_ ( 'index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $product->virtuemart_product_id . '&virtuemart_category_id=' . $product->virtuemart_category_id ), $product->images[0]->displayMediaThumb( 'class="featuredProductImage" border="0"',false,'class="modal"' ) );
}


This should work.

the first one does not apply to the featured products; the second one does.