(Joomla 2.5.7 VM 2.0.12f)
Hi
Is it possible to enable a pop up on a product category image rather than it linking to the products. I'm building a website to sell self assembly kitchen so its important the product category image for a kitchen can be enlarged before a user decides to buy the products associated with that kitchen.
There is a worded link under the image to get to the products page so the user doesn't really needed the image to link to the products page too.
The kitchen product category images that I'd like to turn into a pop ups are below.
http://mvs103-013.directrouter.co.uk/~tradeki/store/traditional
Many Thanks
Hello,
The following is for category view and not for front page. As i see you are using template overrides so you have to edit the category view files under your_joomla_folder/templates/dj-furniture-store/html/com_virtuemart/category/default.php
around line 109 is where the image is been displayed. The code is like the following:
<h2>
<a href="<?php echo $caturl ?>" title="<?php echo $category->category_name ?>">
<?php echo $category->category_name ?>
<br/>
<?php // if ($category->ids) {
echo $category->images[0]->displayMediaThumb ("", FALSE);
//} ?>
</a>
</h2>
Change with the following one:
<h2>
<a href="<?php echo $caturl ?>" title="<?php echo $category->category_name ?>">
<?php echo $category->category_name ?> </a>
<br/>
<?php // if ($category->ids) {
echo $this->category->images[0]->displayMediaThumb ('class="browseProductImage" border="0" title="' . $category->category_name . '" ', TRUE, 'class="modal"');
//} ?>
</h2>
We use the css class browseProductImage but all the rest is for category view. This one will work exactly as you wish.
You can modified as you wish to your custom template.
Regards
Many thanks bytelord,
The pop up is working which is great, however the page is now displaying the image of the parent category(modern) for every child category rather than displaying the child category image. ie now have the same image rather than its own image
Cheers
Hello,
Yes i have a mistake over there, sorry for that, i was hasty :) i place a $this->category, instead of $category inside the loop, so right one at the same line should be
<h2>
<a href="<?php echo $caturl ?>" title="<?php echo $category->category_name ?>">
<?php echo $category->category_name ?> </a>
<br/>
<?php // if ($category->ids) {
echo $category->images[0]->displayMediaThumb ('class="browseProductImage" border="0" title="' . $category->category_name . '" ', TRUE, 'class="modal"');
//} ?>
</h2>
This will work fine echo $category instead of $this->category, which is the parent... let me know if everything is ok now.
Regards
Fabulous! Works perfectly ; ;D
Many thanks for your help bytelord
You are welcome
Regards