georgikolev7 / opencart-js-css-minifier Goto Github PK
View Code? Open in Web Editor NEWJS & CSS Minifier for OpenCart 2.1
JS & CSS Minifier for OpenCart 2.1
Hello,
It looks like your code is for OpenCart 3 series. I changed it for OpenCart 2.0.3.1. I ended up with error:
Argument 1 passed to MatthiasMullie\Minify\CSS::move() must be an instance of MatthiasMullie\PathConverter\ConverterInterface, instance of MatthiasMullie\PathConverter\Converter given, called in system/library/minify/CSS.php on line 322 and defined in system/library/minify/CSS.php:344
Debugging brought me deeper in the minifier then I expected to be necessary. That is why I downloaded minify and path-converter from matthiasmullie on Git and installed it without composer using:
$path = DIR_SYSTEM . 'library';
require_once $path . '/minify/src/Minify.php';
require_once $path . '/minify/src/CSS.php';
require_once $path . '/minify/src/JS.php';
require_once $path . '/minify/src/Exception.php';
require_once $path . '/minify/src/Exceptions/BasicException.php';
require_once $path . '/minify/src/Exceptions/FileImportException.php';
require_once $path . '/minify/src/Exceptions/IOException.php';
require_once $path . '/path-converter/src/ConverterInterface.php';
require_once $path . '/path-converter/src/Converter.php';
use MatthiasMullie\Minify;
The error was gone.
I did't had the time to find out if it has something to do with OpenCart 2.0.3.1, but now it runs like a charm. I removed all js en css files calls in header.tpl, and added them in header.php using addStyle and addScript from the document library. Don't need a tool to conclude that this makes openCart running much faster.
it's not made for OpenCart v.1.5.6.4 + , since it's not much of a difference, but I am not Coder enough, to make it work!
Ernie
My version of Opencart doesn't have this code inside index.php
Scripts in OC does not have posittions this vqmod fails and compress class is missing. Could you rework it?
The module is not working for opencart 3. There is no //Document in index.php
Hey, really appricieated.
I'm using oc 2.0.1.1 and i installed minifier succesfully.
How can i test the differency ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.