ambimax/magento-module-ambimax-ribbon

There is no license information available for the latest version (dev-master) of this package.

This module adds the ability to disable duplicate media gallery removal.

dev-master 2016-07-25 17:14 UTC

This package is not auto-updated.

Last update: 2024-04-27 17:31:41 UTC


README

This module is supposed to add an ribbon attribute to Magento eCommerce.

Installation

For installation use composer or copy files manually.

composer

"require": {
    "ambimax/magento-module-ambimax-ribbon": "~1.0"
}

Theme

To add the ribbons to your theme, add the following snippet to all required theme files.

<div class="ambimax-ribbon">
    
    <?php foreach($_product->getAttributeText('ribbon') as $ribbon): ?>
        <span class="<?php echo strtolower($ribbon) ?>">
            <?php echo $this->__($ribbon) ?>
        </span>
    <?php endforeach ?>
    
</div>

Add Ribbon

  1. To add a ribbon just extend the ribbon attribute options (Catalog > Manage Attributes > Ribbon Attribute > Manage Options)
  2. Style with css
  3. Add translation

Custom Ribbons

To add a custom ribbon you can extend it very easily

<div class="ambimax-ribbon">
    
    <?php foreach($_product->getAttributeText('ribbon') as $ribbon): ?>
        <span class="<?php echo strtolower($ribbon) ?>">
            <?php echo $this->__($ribbon) ?>
        </span>
    <?php endforeach ?>
    
    <?php if($_product->getData('custom_ribbon')): ?>
        <span class="custom-ribbon">
            <?php echo $this->__('Custom Ribbon') ?>
        </span>
    <?php endif; ?>
    
</div>

Use Image-Ribbons

It is possible to place an image within the html. But you should always try to sove this by css!

License

MIT License

Author Information