X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Smarty.php Mod to Remove all UN-NECESSARY White Space (https://forum.x-cart.com/showthread.php?t=7920)

Adian009 06-13-2004 08:11 PM

Measuring Impact of This
 
Does anyone have any ideas or interest in measuring the impact of triming the whitespaces?

Personally, I do - the only way I can think of to measure it would be to create a script that accesses specific pages in succession. Run the script with whitespaces then trimming them and compare the average Bandwidth and Response time.

Anyone have any other ideas? I am working full-time at a client site who is a large ASP so we I have access to sophisticated web testing/stress testing software...just don't know what to test.

--al

TelaFirma 06-15-2004 03:53 AM

Quote:

Originally Posted by NuAlpha
Some email templates are used for display in the browser.

I guess I will just stick with adding {strip} tags to various documents until I get this worked out.


What the addition to Smarty will do is change this:

Code:

<head>

</head>

<body>


</body>


To this:

Code:

<head>
</head>
<body>
</body>


It is not going to strip out the \n commands (New Line) like the {strip} tag does. So, it is not going to shove all the email data on one line.

As for measuring impact, that is easy. If you strip out the extra blank lines from an HTML file, then you decrease file size, thus making the download time of the HTML shorter.

adpboss 06-15-2004 07:23 AM

So is this safe to use?

I am running 3.4.14 and most of my invoice templates are in html.

I've tried following this thread but the concensus isn't clear to me.

adpboss 06-15-2004 07:31 AM

So I just went and added it in. Haven't tested my invoices yet, but this is like VIAGRA for your store. Big time.

adpboss 06-15-2004 11:08 AM

UPDATE.

Still working great EXCEPT it isn't playing nice with my plain text emails. Particularily the company signature and the order template. All of the blank lines between product details are gone and the products have no spaces between them.

example

Quote:

SKU: 8801
Product: Blue Meteor Light Kit
Quantity: 1
Item price: $ 21.95
SKU: 3319
Product: 80mm Chrome Tribal Sun Laser Cut Fan Grill
Quantity: 1
Item price: $ 6.95

Should look like

Quote:

SKU: 8801
Product: Blue Meteor Light Kit
Quantity: 1
Item price: $ 21.95

SKU: 3319
Product: 80mm Chrome Tribal Sun Laser Cut Fan Grill
Quantity: 1
Item price: $ 6.95

and my email sig is just one run on line.

Emerson 06-15-2004 11:21 AM

Quote:

Originally Posted by adpboss
...this is like VIAGRA for your store. Big time.


You ain't kidding :lol:

Thanks for the tip Adian009 ;)

Jon 06-15-2004 04:05 PM

Will this work for Smarty-2.5.0 ?

Emerson 06-15-2004 04:07 PM

Quote:

Originally Posted by Jon
Will this work for Smarty-2.5.0 ?


Yes, that is what I have and it works!

adpboss 06-15-2004 04:09 PM

If I enclose my email tpls in {literal} tags should I be ok?

FX 06-17-2004 11:05 PM

Well, here is what i get:

If i enclose my plain text email *.tpl in {strip}{/strip} the result is printed out in one line.

Enclosing email in {literal}{/literal} don't parse code and just prints it out all code included between {literal}

hmm :roll:


All times are GMT -8. The time now is 08:58 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.