Question

In my store i have a group called "loyal customers" This group of customers gets a special price which i can set in the backend under product-> prices-> group prices. Is there a way of the products with these special group prices to display a lil image in the corner of the product image (like some sites do with products on sale) but the image should of display if the customer is logged in and is within the "loyal customer" group??

Thank you for your help if you can.

<?php
$_helper = $this->helper('catalog/output');
$_product = $this->getProduct();
$enable_upsell =  Mage::getStoreConfig('midmedssettings/labels/enable_upsell');
$replace_upsell =  Mage::getStoreConfig('midmedssettings/labels/replace_upsell');

$helper = $this->helper('midmedssettings/image');
list($defaultImgX, $defaultImgY) = $helper->getDefaultSize();
list($imgX, $imgY) = $helper->getMainSize();
if ( $imgX > 800 ) {
    $imgX = 800;
    $imgY = $helper->calculateHeight($imgX);
}

$product_img_box_width = $defaultImgX;
if ( $defaultImgX != $imgX ) {
    $product_img_box_width = $imgX;
}
//add image border
$product_img_box_width += 18;
?>
<script type="text/javascript">
    var optionsPrice = new Product.OptionsPrice(<?php echo $this->getJsonConfig() ?>);
</script>
<?php echo $this->getChildHtml('global_messages') ?>
<div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
<div class="product-view">

<div class="rcolumn"> 

<div class="additionaldata">
   <ul>
   <li class="freedelivery"><strong>FREE!!</strong> Delivery over £75 exc VAT<br><span style="color:#666666">more information on delivery</span></li>
    <?php   
                        $_direct_delivery_product = $this->htmlEscape($_product->getdirect_delivery_product());
                        if ($_direct_delivery_product == 1){
                        ?>
                       <li class="deliverytime">Direct Delivery Item - delivery may take longer than usual</li>
                            <?php
} else {
?>                           <li class="nextday">Next Day Delivery Available<br>Standard Delivery 1 - 5 working days</li>
                          <?php
}
?>
<li class="globe">International Delivery Available</li>
<li class="pricebeat">Seen this cheaper elsewhere? Fill out our simple <strong><A HREF="javascript:popUp('http://www.midmeds.com/tinc?key=VlYdESS9&formname=pricematch')">Pricematch Form</A></strong> and we will beat the price by 3%*</li>
<li class="bulk">Buying in larger quantities?
Phone for a quote - <br> 0845 00 34 212</li>
<li class="paymentoptions"> Payment and Security </li>
<div class="credit"> 30 days credit account </div>
<div class="nhs">We accept NHS purchase orders </div>
<div class="clear"></div>
<div class="paymentoptionsdcc">Credit Cards Accepted </div> 
</ul>
    </div>
</div> 
    <div class="product-essential">
    <form action="<?php echo $this->getSubmitUrl($_product) ?>" method="post" id="product_addtocart_form"<?php if($_product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>
        <div class="no-display">
            <input type="hidden" name="product" value="<?php echo $_product->getId() ?>" />
            <input type="hidden" name="related_product" id="related-products-field" value="" />
        </div>

        <div class="product-img-box" style="width:<?php echo $product_img_box_width; ?>px">
            <?php echo $this->helper('midmedssettings')->getLabel($_product);  ?>
            <?php echo $this->getChildHtml('media') ?>
            <?php       
        $_isLoggedIn = $this->helper('customer')->isLoggedIn();
        if($_isLoggedIn == true){
        $_myGroupId = Mage::getSingleton('customer/session')->getCustomerGroupId();          
        if($_myGroupId == 4){
        echo '<img style="float: left; margin: 2px;" src="/media/catalog/category/LMC-img.gif">';
                }
            }
            ?>
        </div>
        <div class="product-shop"> 
            <div class="product-shop-info">

<?php
if($_product->isSaleable())
{
$quote = Mage::getModel('sales/quote');
$quote->getShippingAddress()->setCountryId('*');
$quote->addProduct($_product);
$quote->getShippingAddress()->collectTotals();
$quote->getShippingAddress()->setCollectShippingRates(true);
$quote->getShippingAddress()->collectShippingRates();
$rates = $quote->getShippingAddress()->getShippingRatesCollection();

foreach ($rates as $rate)
{
echo $rate->getPrice();
}
}
?>  
                <div class="product-name">
                    <h1><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h1>
                </div>
                <?php if ($this->hasOptions()):?>

                <?php endif; ?>
                <?php echo $this->getReviewsSummaryHtml($_product, false, true)?>

                <?php echo $this->getChildHtml('alert_urls') ?>
                <?php if(!$_product->getAWDisableOutOfStock()): ?>      
   <?php echo $this->getChildHtml('product_type_data') ?>
<?php else: ?>
    <div class="aw-cat-perm-notify"><?php echo Mage::getStoreConfig('catalogpermissions/general/product_notice'); ?></div>
<?php endif; ?>

                <?php echo $this->getTierPriceHtml() ?>
                <?php echo $this->getChildHtml('extrahint') ?>
                <?php echo $this->getChildHtml('other');?>
         <?php if (!$this->hasOptions()):?>

                        <?php if($_product->isSaleable()): ?>
                                <!-- RELATED -->
    <?php echo $this->getChildHtml('content_related2') ?>
        <!-- RELATED -->
                            <?php echo $this->getChildHtml('addtocart') ?>
         <?php endif; ?>

                    <?php echo $this->getChildHtml('extra_buttons') ?>
                <?php endif; ?>

                <?php if ($_product->isSaleable() && $this->hasOptions()):?>
                    <?php echo $this->getChildChildHtml('container1', '', true, true) ?>
                <?php endif;?>
 <?php if ($_product->isSaleable() && $this->hasOptions()):?>
            <?php echo $this->getChildChildHtml('container2', '', true, true) ?>
        <?php endif;?>
                <div class="clear"></div>
                </div>
        <div class="clearer"></div></div>

    </form>

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top