Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Floating window - Add to cart
 
kasepov
Jr. Member
 
Total Posts:  3
Joined:  2013-01-07
 

Hello, soory for my bad english i’m french,

Concrete example of what I would like to do: http://www.ruedeshommes.com/tee-shirt.php
When I put the mouse over “ajouter au panier” >>> displaying a ‘window’ floating.

I would like to implement a floating window that you can add to cart the product when i over the image of the product in the catalog.
The window would display via the event OnMouseOver image.

I started to code a popover with bootstrap and jquery library but had some difficulties to load php content in my popover

My script:

<script src="bootstrap/js/jquery-min.js"></script> 
<script src="bootstrap/js/bootstrap.min.js"></script>
<script
    $(function ()
{
        
$("#pop").popover({
        html
true,
        
placement:'bottom',
        
trigger:'hover',
        
content: $('#content').html()
   
        
}); 
    
}); 
</script>

And HTML part:

<body>
<
div class="container"> <br>
  <
div class="well"> <a href="#" id="pop" class="btn btn-info" rel="popover" >
  <
img src="image.jpg"/></a> </div>   // event onmouseover on this image
</div>

<
div id="content" style="display: none">
<?php echo 'Choose size: ...'?>
<?php 
echo 'Quantity: ....'?>
// php content of the popover: i need to collect size and stock left of the product
// but php content don't show in the popover
</div>

Any advice ? Thanks for help

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top