Overriding Elements in a Package

Permalink 1 user found helpful
I've been working on developing a website that uses eCommerce. It's a great package, but I need to change some of the package elements used in it.

I've been editing the references from
Loader::packageElement('my_element/name', 'core_commerce');
to
Loader::element('my_element/name');


But I'm thinking that there has to be a better way of doing it.

My thought was to create a directory structure under the {root}/elements folder, such as:
{root}/elements/packages/core_commerce
and then whatever directory structure as necessary. So for the above example, the full path to replace the element would be
{root}/elements/packages/core_commerce/my_element/name.php


I believe the Environment library at {root}/concrete/core/libraries/environment.php would need to be modified.

Does anyone else have this problem and/or a good solution? I'm a bit confused at the Environment library; if anyone can help, that would be great.

SkyBlueSofa