News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Category image fancybox

Started by netajour, March 05, 2015, 11:14:48 AM

Previous topic - Next topic

netajour

Hello,

I try to change the thumbs image link in category view to make it open FancyBox with the full image.
I change the line with : <?php
                  echo $product->images[0]->displayMediaThumb('class="browseProductImage" border="0" title="'.$product->product_name.'"
',true,'class="modal"');                  ?>

But it opens a new browser page not the Fancy popup.
I think it missed the Fancy JHTML calling but whenb I tried to copie the same code that is available on product page It does not Work
Thanks for helping
Regards
Rodolphe

GJC Web Design

is all the fancy box js and css loaded on the cat page?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

netajour

Hello
Thanks for answering

Currently not I think but not sure.
I use the default category template of VM and it call the products sublayout, where I change the code as shown.
No JS colling in this sublayout.

And in the category default page the code call :
<div class="category-view"> <?php
$js 
"
jQuery(document).ready(function () {
jQuery('.orderlistcontainer').hover(
function() { jQuery(this).find('.orderlist').stop().show()},
function() { jQuery(this).find('.orderlist').stop().hide()}
)
});
"
;
vmJsApi::addJScript('vm.hover',$js);

if (empty(
$this->keyword) and !empty($this->category)) {
?>

Must I call the scripty in category page or sublayout product tmpl ?

Thank you

netajour

So I add the following lines in the sublayout image and in the default category  tmpl
But not working !!!

<?php 
   JHTML
::stylesheet("facebox.css","components/com_virtuemart/assets/css/");
   
JHTML::script("facebox.js""components/com_virtuemart/assets/js/");
?>


Joomla 3 and VM3

GJC Web Design

on my std vm3.0.6 fancybox js and css IS loaded already on category pages
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

netajour

You're right it is for me two.
I found the error I forgot to add the imagepopup class.
It works then.
Last correction to do : autoresize the picture in fancybox.
I Come back when I find it...
Thanks a lot