Giter VIP home page Giter VIP logo

Comments (5)

mage-eag avatar mage-eag commented on July 19, 2024

Thinking about it, I guess that it could either be a new collection column renderer, or a new rendering option for the Country renderer. For you to add it, the first solution would be the most suitable, as it doesn't need to modify the extension's code (and I think that I'll add the second one to my todo list).

To add a new collection column renderer, you need to create your own module, with a customgrid.xml file containing something like this :

<?xml version="1.0"?>
<customgrid>
    <column_renderers>
        <collection>
            <is_country_eu type="yourmodule/column_renderer_collection_eu_country" module="yourmodule">
                <name>Is Country EU</name>
                <description>Description of what the renderer does</description>
                <sort_order>100000</sort_order>
            </is_country_eu>
        </collection>
    </column_renderers>
</customgrid>

and a model file corresponding to the above type attribute :

class Your_Module_Model_Column_Renderer_Collection_Eu_Country
    extends BL_CustomGrid_Model_Column_Renderer_Collection_Abstract
{
    public function getColumnGridValues($index, $store, $grid)
    {
        return array(); // .. with the values you need (in your case, that might be a custom renderer and a custom filter)
    }
}

from mage-enhanced-admin-grids.

paales avatar paales commented on July 19, 2024

@mage-eag Is this something you'd be willing to accept in the source if implemented properly?

from mage-enhanced-admin-grids.

mage-eag avatar mage-eag commented on July 19, 2024

Yes :)

from mage-enhanced-admin-grids.

paales avatar paales commented on July 19, 2024

@mage-eag I tried to add a custom column instead of a column renderer, you almost always want the Is EU in combination with Country, so tried that, but I can't really find examples how to do that and the XML isn't very descriptive..

Do you perhaps have a good example-class how this can be achieved? Or can you perhaps add it yourself?

from mage-enhanced-admin-grids.

mage-eag avatar mage-eag commented on July 19, 2024

@paales Sorry for the late answer on this one, I have been focusing lately almost completely on the next big commit to come (that should be the last "big" one before the next release on the Magento Connect).
Anyway, a new column renderer is now available (EU country), that should suit your needs. It's implemented as a column renderer to make it be reusable in all cases without additional development, but tell me if you actually need a custom column too :)

from mage-enhanced-admin-grids.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.