JaimeChizavane / magento-w2p

Automatically exported from code.google.com/p/magento-w2p
0 stars 0 forks source link

Make ext more friendly to M. compilation feature #777

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
We don't fit in with M. standard way of placing various files in its tree.

We have plain PHP files with a set of functions (so they can be re-used easily 
in other projects) and a several of XSLT files (they're ignored by the 
compilation process).

I have an idea to move XSLT files to the directory of the extension and use 
path to the extension to access them from any place. It will solve the problem 
of ignoring them.

But I don't have clear idea what to do with plain PHP files (which are 
ZetaPrints API implementation in PHP)

Original issue reported on code.google.com by Anatoly....@gmail.com on 22 Mar 2012 at 3:57

GoogleCodeExporter commented 8 years ago
I wouldn't bother with this.
Let's just provide a clear explanation and forget about it.
You sort of explained the background, but still need to give detailed 
instructions.

Original comment by ad...@zetaprints.com on 22 Mar 2012 at 7:32

GoogleCodeExporter commented 8 years ago
I think you did

Instructions to make w2p work after compilation.

After compilation process finished, please do following:

1. Edit includes/src/ZetaPrints_Api.php file.
Replace
require_once 'zetaprints-api.php';
with
require_once 'ZetaPrints/zetaprints-api.php';
2. Copy XSLT files (compilation process doesn't move them automatically)
Copy lib/ZetaPrints/xslt to includes/src/ZetaPrints

Original comment by ad...@zetaprints.com on 22 Mar 2012 at 7:33

GoogleCodeExporter commented 8 years ago
I can't say that I understand this thing so I'm just gonna copy the previous 
comment as a help post.

Original comment by agur...@gmail.com on 22 Mar 2012 at 9:14

GoogleCodeExporter commented 8 years ago
What you didn't understand?

Original comment by Anatoly....@gmail.com on 22 Mar 2012 at 9:42

GoogleCodeExporter commented 8 years ago
I understand that hack it self, as in how to implement. Just need to read a bit 
so that I can offer an introduction on what magento compiler actually is and 
what it does.

Original comment by agur...@gmail.com on 22 Mar 2012 at 9:47

GoogleCodeExporter commented 8 years ago
From http://alanstorm.com/magento_compiler_path (be careful with the quote and 
link to the source)

Magento’s source is spread out over a large number of modules.
It turns out that having PHP search for a large number of include files over a 
large number of different directories can create a performance bottleneck under 
certain types of load. To combat this, the Magento core team created the 
Magento Compiler extension, and started shipping Magento with this 
functionality around version 1.4 CE.

What the compiler does is makes a copy of every class in a Magento system and 
places them in a single folder. The class’s full name is used for the 
filename to ensure uniqueness

include/src/Mage_Core_Model_Abstract.php
include/src/Foo_Module_FooController.php
etc...

This is done once. Then, when Magento is configured to use the compiler 
classes, its autoload will look in the compiler folder instead of running its 
normal autoload routine. This spares PHP the overhead of transversing the file 
system for all the different include paths. 

Original comment by ad...@zetaprints.com on 22 Mar 2012 at 10:07

GoogleCodeExporter commented 8 years ago
check and publish:
http://www.zetaprints.com/magentohelp/web-to-print-extension-and-magento-compile
r/

Original comment by agur...@gmail.com on 29 Mar 2012 at 1:23

GoogleCodeExporter commented 8 years ago

Original comment by ad...@zetaprints.com on 3 Apr 2012 at 12:29