View Single Post
  #2  
Old 10-24-2010, 12:25 PM
 
peddler peddler is offline
 

Senior Member
  
Join Date: May 2007
Posts: 140
 

Default Re: How to edit html or inline CSS in 4.4.1

I apologize right up front for this long-winded post, but I like to know Why, Where, When and (the biggie) What If? That makes me explain in detail, or so I believe.

Stop using webmaster, unless you want to start ordering aspirin by the case. It may not happen today, and it may not happen for a while, but some day when you least expect it, webmaster is going to FUBAR the template you're working on and maybe a few that are just minding their own business in the background.

You're using the fashion mosaic template-set, right? I'm guessing at that (with good certainty), cuz that's the only skin templates with this: class="image-border"

How did I know that? By searching the xcart V4.4.1 directory that I have on my pc. You need this functionality also, in addition to firebug, etc. Unzip the xcart package with winzip onto your pc's hard drive. Be sure to set the winzip option for "smart CR/LF" in the misc option settings.

Winzip is great for this usage, but this very thing is why you don't want to use it for your online copy of the store - it puts too many cr/lf into the files. (cr = carriage return ; lf = line feed) A Winrar extracted xcart is ideal for the server, but the files have no CR/LF, which means everything is jammed together. That sucks if you're human and you want to read them.

If you have WinXP, you need to set the system to be able to "read" (and search!) tpl and php file types, If you don't have winxp (vista, mac, etc) search for similar settings. Click the following link to the Microsoft site and do Method #2 near the bottom of the page - or, modify the registry with the simple entry.. if you're comfortable working with the registry.

http://support.microsoft.com/default.aspx?scid=KB;EN-US;309173

From then onward, you can search within likely folders within the xcart directory (ie skin/fashion_mosaic_blue, etc), or search the entire xcart directory for "a word or phrase in the file" and leave the filename section blank. Yes, it will take a LONG time to search for a particular text-string in all 5434 files - it took 28 seconds on my old Athlon 2.2ghz to find the occurrences of (class="image-border") in 3 files, in each of the Fashion Mosaic template-sets.

======

Which brings us to your current problem. These files contain that string (class="image-border"): cart.tpl , products_list.tpl and products_t.tpl - all of them reside within the fashion_mosaic_xxxx\customer\main folder. The first two files have a simple DIV statement with that css class statement and no inline style attribute. The products_t.tpl file, however, has this:

Code:
<div class="image-border"{if $config.Appearance.image_width gt 0 or $product.tmbn_x gt 0} style="width: {math equation="x+14" x=$product.tmbn_x|default:$config.Appearance.image_width}px;"{/if}>

The developers saw fit to put a "math" command into that code when it isn't necessary; a simple "+14" at the end of both x-variables would have sufficed. (e.g. $product.tmbn_x+14|default:$config.Appearance.imag e_width+14 ) It would have saved a bit of code-execution time, but that's another story, for another day.

They did put that 14 extra Pixels in there for a reason, and it may not hurt taking it out.. and it may totally screw up the placement of images. Do what you want and then check it every way possible. And then check it some more.

I hope this lengthy novella may help you. It is just the basics, in how to search for certain phrases, strings, etc., but knowing which string to search for is partly guess and partly experience. Sometimes Firebug and WM (ugh!) don't tell the whole story and sometimes the bit of story they do tell, doesn't tell you enough. Searching through the actual files can be enlightening.
__________________
Ralph
X-Cart v4.4.2 Gold (still buggy, some are new ones)
PHP 5.2.13
Reply With Quote