Search code examples
jqueryjoomlavirtuemart

How can i show product details in Pop up rather than redirecting to another page in Virtue Mart


I am working on a site Using Joomla and virtuemart:- I want to show poduct details in ligthbox or pop up on current page rather than redirecting to other page. Please take a look of my site http://50.116.97.120/~amarhost/park_gold/index.php And click on product details link it will redirect you to other page.I want to stop redirection and display all the details in light box or pop up. Your advise is priceless. Thanks in advance!!!!


Solution

  • Refer this : http://fancybox.net/

    Have your redirect converted into ajax call and pull the data via that ajax call and bind it your fancybox. There is provision for this in fancybox...

    http://fancybox.net/blog

    Example Code:

    $("a#productdetails").bind("click", function() {
    
    
    $.ajax({
        type        : "POST",
        cache   : false,
        url     : "/data/product.php",
        data        : $(this).serializeArray(),
        success: function(data) {
            $.fancybox(data);
        }
    });
    
    return false;
    });