Skip to content

Commit

Permalink
Merge pull request #4 from ikonoshirt/Schrank-patch-1
Browse files Browse the repository at this point in the history
Add autoloader to Order.php and remove from readme
  • Loading branch information
Schrank authored Jul 29, 2020
2 parents 93f691f + d9d9ba1 commit e1270c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ Unfortunately is the bug in an abstract class, therefore we have to overwrite a
}
}

The problem is, that magento doesn't load libraries, that use namespaces. But as always, there is a [stackoverflow question, how to add the composer autoloader](http://magento.stackexchange.com/questions/1375/integrating-composers-autoloader-into-magento). I personally just added `require 'vendor/autoload.php';` to the first line of `index.php`. Not best practice, but our index.php is already edited, so it doesn't matter.

# What this module is doing
This module takes a library for topological sorting and fixes the broken algorithm to sort lots of stuff which has `before` and `after` dependencies, like totals in quote, order and creditmemo.

Expand Down
3 changes: 3 additions & 0 deletions src/app/code/local/Mage/Sales/Model/Config/Ordered.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?php

require_once BP . '/vendor/autoload.php';

/**
* Configuration class for ordered items
*
Expand Down

0 comments on commit e1270c0

Please sign in to comment.