1

I have added a custom block in my header and inside it is a button called Get a Quote. I've integrated Foundation into my RWD child theme, so when hovered over, a modal appears.

What I'd like to happen, is that the modal will act almost like the minicart. So when the customer adds a product it goes into the "minicart/modal" and shows just the image, qty, price per product. Plus the subtotal(quote amount) and go to checkout/clear buttons of the standard minicart.

So far I can add the product details, but I'm sure Im doing it wrong.

<?php $session = Mage::getSingleton('checkout/session'); $items = $session->getQuote()->getAllItems(); ?>

<?php if(count($items)): ?>

<?php foreach($items as $_item): ?>

<?php $isVisibleProduct = $_item->getProduct()->isVisibleInSiteVisibility();?>

<?php $product = $_item->getProduct(); ?>

<div class="row">

<div class="large-3 columns">

<a href="<?php echo $product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($product, 'small_image')->resize(50, 50); ?>" width="50" height="50" alt="<?php echo $this->stripTags($this->getImageLabel($product, 'small_image'), null, true) ?>" /></a>

</div>

<div class="large-3 columns"> <?php echo $_item->getName();?> </div>

<div class="large-3 columns"> <?php echo $_item->getQty();?> </div>

<div class="large-3 columns"> <?php echo $_item->getPrice();?> </div>

</div>

<?php endforeach; ?>

This will add the product details to the modal, but I can remove it or get a subtotal for all products.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.