News:

Support the VirtueMart project and become a member

Main Menu

Categories Virtuemart

Started by fanny0, November 06, 2012, 20:14:34 PM

Previous topic - Next topic

fanny0

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!

bytelord

Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

fanny0


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

fanny0


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


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

fanny0

No file should I change that, I tried changing that is not listed but which is

bytelord

#5
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
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

fanny0

#6



thanks so much!!


turned out! :D

:-*