Author Topic: [SOLVED]Click on product image = product details  (Read 17729 times)

tzeus

  • Beginner
  • *
  • Posts: 18
[SOLVED]Click on product image = product details
« 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

adrianpaun

  • Beginner
  • *
  • Posts: 32
Re: Click on product image = product details
« Reply #1 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

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

Code: [Select]
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

Code: [Select]
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:

Code: [Select]
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.


Bruce Morgan

  • Full Member
  • ***
  • Posts: 672
Re: Click on product image = product details
« Reply #2 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.

adrianpaun

  • Beginner
  • *
  • Posts: 32
Re: Click on product image = product details
« Reply #3 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]

tzeus

  • Beginner
  • *
  • Posts: 18
[SOLVED] Re: Click on product image = product details
« Reply #4 on: April 12, 2012, 04:26:59 am »
Thank you very much Adi! It worked like a charm!

Bruce Morgan

  • Full Member
  • ***
  • Posts: 672
Re: [SOLVED]Click on product image = product details
« Reply #5 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?

adrianpaun

  • Beginner
  • *
  • Posts: 32
Re: [SOLVED]Click on product image = product details
« Reply #6 on: April 12, 2012, 19:01:08 pm »
Yes indeed i use custom field for specifications.

ssanchez

  • Jr. Member
  • **
  • Posts: 58
Re: [SOLVED]Click on product image = product details
« Reply #7 on: May 17, 2012, 19:27:05 pm »
any suggestions where this can be in virtuemart 1.9?

furtherdg

  • Beginner
  • *
  • Posts: 7
Re: Click on product image = product details
« Reply #8 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!



Change in:

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

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

Code: [Select]
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

Code: [Select]
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:

Code: [Select]
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.
Many Thanks --- Alex

razvanbirle

  • Beginner
  • *
  • Posts: 14
Re: Click on product image = product details
« Reply #9 on: January 22, 2013, 11:39:02 am »
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!



Change in:

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

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

Code: [Select]
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

Code: [Select]
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:

Code: [Select]
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.