VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: fanny0 on November 06, 2012, 20:14:34 PM

Title: Categories Virtuemart
Post by: fanny0 on November 06, 2012, 20:14:34 PM
As you can do so when you go to a category using the menu


http://provolt.cl/index.php/2012-08-19-21-10-08/2012-08-19-21-12-50


click the image to go directly to the product and not the image that pleases


thank you very much!
Title: Re: Categories Virtuemart
Post by: bytelord on November 06, 2012, 20:19:28 PM
Hi,

Hopefully understands you. https://forum.virtuemart.net/index.php?topic=103351.0
http://forum.virtuemart.net/index.php?topic=104248.0

Regards
Title: Re: Categories Virtuemart
Post by: fanny0 on November 06, 2012, 22:43:57 PM

Thank you so much!


I do not understand is that I need to change file and that part specifically

I have not got this route


templates/YOURTEMPLATE/html/com_virtuemart/category/default.php   ---->   this is for the products in category view
Title: Re: Categories Virtuemart
Post by: fanny0 on November 06, 2012, 22:49:15 PM

Well as I found it, but I get line 57


Quote<?php
       if (!empty($category->images)) {
      echo $category->images[0]->displayMediaThumb("", false);
       }
       ?>



------------------------------------------------------

1) Edit default_products.php (in components/com_virtuemart/views/virtuemart/tmpl/)
2) Go to line 57 and remove or comment the code (after if ($product->images) {)
3) Add this instead:

Quoteecho 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));


------------------------------------------------------
Title: Re: Categories Virtuemart
Post by: fanny0 on November 07, 2012, 00:41:27 AM
No file should I change that, I tried changing that is not listed but which is
Title: Re: Categories Virtuemart
Post by: bytelord on November 07, 2012, 01:03:54 AM
Hello,

You should make a template override for the file joomla_folder\components\com_virtuemart\views\category\tmpl\default.php. Copy that file to joomla_folder\templates\your_joomla_template\html\com_virtuemart\category\default.php
If the file exist under your template then just edit the file and place the code as been instructed on the post you read.

Find the part you wanna change and place the code over there

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));


Also you could override the following file and place the same code (the following files is for virtuemart front page):
joomla_folder\components\com_virtuemart\views\virtuemart\tmpl\default_products.php
copy that file to  joomla_folder\templates\your_joomla_template\html\com_virtuemart\virtuemart\default_products.php and then edit it and place the code


Some more information regarding template system and template overrides:
Template overrides: http://forum.virtuemart.net/index.php?topic=98505.0
Template System: https://dev.virtuemart.net/projects/virtuemart/wiki/Hints_for_the_use_of_the_template_system
Using firebug to examine your code & css styling: http://forum.virtuemart.net/index.php?topic=102850.0

Regards
Title: Re: Categories Virtuemart
Post by: fanny0 on November 07, 2012, 01:57:20 AM



thanks so much!!


turned out! :D

:-*