Forums / Templates, Stylesheets, Page Layout / css layout based template ?

css layout based template ?

Locked

Started by vasilios on 1 Jan 2009, 3:59 PM · Views: 4,018

Results 1 to 20 of 24
This thread is locked. New replies are disabled.
1 Jan 2009, 3:59 PM
#1
vasilios avatar

vasilios

New Zenner

Join Date:
Sep 2008
Posts:
59
Plugin Contributions:
0

css layout based template ?

I have setup a 1.3.7.1 zen cart site and have installed a commercial template from ThemeStock to check it out. In general terms it works ok except a broken colored bar/strip that is under the header of the page and two other misplaced things. I checked the page source code to find out the culprit and I noticed that the layout is actually table-based. It uses external css anyway, but mainly for formatting reasons (background colors, fonts, sizes, etc and some floated elements) but the main layout structure is not based on purely css techniques. I thought that this company provides purely css compliant templates but it seems that this specific template is not 100% css based. Does anybody have a clue what I could do? Try to find another 100% css based template, (and which company has pure 100% css layout templates?) or just fix this one and continue? (kind of hard to find the reason for the misplaced elements in the page)

1 Jan 2009, 5:26 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: css layout based template ?

Firstly, why are you using an old version of Zen Cart? 1.3.7.1 is over 18 months old. Security is tighter in the current version 1.3.8a.

The layout table is probably not coming from the template, but from underlying Zen Cart, which currently has a single layout table. The template is probably just styling it. That layout table will disappear from Zen Cart 2.0 for those browsers that can cope adequately without it.

So my advice would be, don't worry about the layout table for now, but do upgrade to the current version of Zen Cart.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

1 Jan 2009, 8:02 PM
#3
vasilios avatar

vasilios

New Zenner

Join Date:
Sep 2008
Posts:
59
Plugin Contributions:
0

Re: css layout based template ?

So, you think that the 1.3.7.1 version might be the reason for the misplaced elements?
The template that I use also has a table nested layout, I can see it in the php file code. As a matter of fact I added a little bit of php to swap some images in a with navigational-links sidebox according to the set language of the site.
Anyway, I fixed some misplaced elements by adding some alignment styles in table cells.
Now for the upgrading part: I have added a greek language pack, the dual pricing module (for wholesale clients), and I want to add a wish list add-on as well as the capability to register the info when someone comies from a link from a cooperating site and buys something, so this site's owner will able to get notified and give the cooperating site some credit (does that have to do with affiliate program?). I know that the wish list module and the dual pricing module exist for 1.3.8 also but what about the last ability I described ? and also the greek language pack which exists ONLY for 1.3.7 ?

Sorry for the many questions ..........

1 Jan 2009, 10:26 PM
#4
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: css layout based template ?

No. 1.3.7.1 doesn't have displaced elements. And if the tables are nested, then they must be coming from the template after all. Zen Cart only has one layout table.

Affiliate packages (such as JROX) are designed to work with multiple carts and are genrally easy to install irrespective of the version of the cart into which you install them.

Upgrading language packs is normal, and shouldn't be too onerous between 1.3.7.1 and 1.3.8a.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

2 Jan 2009, 8:58 AM
#5
vasilios avatar

vasilios

New Zenner

Join Date:
Sep 2008
Posts:
59
Plugin Contributions:
0

Re: css layout based template ?

Since there is no any updated greek lang pack for 1.3.6, would it be a good idea to go ahead and upgrade the site (it is a local site) to 1.3.8a and leave the greek lang pack as it is and then compare differences between the override greek lang files and the english lang files of the new version and start modifying from there, or would it be a better idea to completely remove the greek lang pack before upgrading to 1.3.8 and after finishing the upgrade, create my own lang pack the typical way that is described in the tutorials ? (this pack has translated only the front-end)

2 Jan 2009, 11:23 AM
#6
vasilios avatar

vasilios

New Zenner

Join Date:
Sep 2008
Posts:
59
Plugin Contributions:
0

Re: css layout based template ?

I just upgraded to 1.3.8 and everything seems to work fine. I don't even have to bother with the greek lang pack (I just added again the mysql_query('SET NAMES "greek"', $this->link); line in the query_factory.php and I got a 2 language site. Of course I will have to re-install the dual pricing module for 1.3.8
Thank you for the help.

2 Jan 2009, 3:15 PM
#7
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: css layout based template ?

You're welcome.

A note of caution, I've dug into the themestock templates a little and they're not very good. They over-ride every template file. Sometimes they even over-write template_default files (very naughty). So it's possible that the Greek language pack is working because all new features visible from the catalog have been removed.

Also, check that everything works when you try to log in as this sort of template often has a problem with 1.3.8a. If you can't login, search the forum for "security token" for advice as to how to fix the problem.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

3 Jan 2009, 2:31 PM
#8
vasilios avatar

vasilios

New Zenner

Join Date:
Sep 2008
Posts:
59
Plugin Contributions:
0

Re: css layout based template ?

The greek lang pack works even if I switch to classic template, I have not yet checked all the site pages, just the main cart flow.
Regarding the login issue, indeed, I noticed that generally I cannot login as a registered client (in my testing local site, that is), even if I have switched to the Classic template (I have added the dual pricing add-on if that could be the culprit). In the previous 1.3.7 version there was not such an issue. I fixed that by setting the Admin>Configuration>Sessions>Recreate Session to False (from forum post) and the classic template works ok in the login, but the themestock template outputs a "There was a security error when trying to login." error as you said. Even if I fix this problem, do you think that I will come through more problems ? Is it a good idea to change to another template, and which company sells PURE CSS compliant templates for 1.3.8 (is it templateMonster ? )

3 Jan 2009, 2:58 PM
#9
charmedbytina2 avatar

charmedbytina2

Totally Zenned

Join Date:
Mar 2007
Location:
AZ
Posts:
1,890
Plugin Contributions:
0

Re: css layout based template ?

(is it templateMonster ? ) :shocking:

Search this forum for an answer to that!

My advice (for what it's worth) is to steer clear of them.

Tina

3 Jan 2009, 3:01 PM
#10
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: css layout based template ?

That's the main problem that happens when old templates over-write newer code. Fix that and hopefully everything will be OK, though can't be certain as that will depend a bit on the template.

Template Monster do seem recently to have switched to tableless templates for Zen Cart, but a search of Template Monster on this forum will quickly reveal the general opinion of the organization.

Many of the specific views expressed are out-of-date, but unfortunately they've introduced a whole new set of problems. :cry:

Producing a range of templates is difficult - much more difficult than producing a series of individual templates. And it looks as though their current approach is to try to use one set of PHP code for every template design. The trouble is that leads to ridiculously complex markup e.g. sidebox titles contained in divs nested 17 layers deep. When something goes wrong, or even just when you want to change something - it's a nightmare. I'm guessing that they would also be real SEO killers too.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

3 Jan 2009, 4:46 PM
#11
vasilios avatar

vasilios

New Zenner

Join Date:
Sep 2008
Posts:
59
Plugin Contributions:
0

Re: css layout based template ?

Ok, I fixed the login problem with the ThemeStock template that I have been using. Now, I have a dilemma. I have experience with html, css, php, mysql and can find my way around code. I have this project to finish up in 2 months (e-commerce site with lots of features). Do you think that I coulld continue with this template and do fixes if they arise, or change to another pure css compliant template being sure that it is 100% compatible? (I know my way around differences merging stuff with the code in the old template files, compared to the overriden 1.3.8 zen cart files). In a few words, will merging the code differences between the old custom template files and the 1.3.8 zen cart version template files solve the problem in almost all the situations ? I have a feeling that I will find my way around this (the site now works ok, at least through the whole checking out procedure, as well as the product browsing, in both languages)

3 Jan 2009, 4:48 PM
#12
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: css layout based template ?

Do you think that I coulld continue with this template and do fixes if they arise, or change to another pure css compliant template being sure that it is 100% compatible?
Simple answer is YES...change template to one that has nothing whatsover to do with TM.

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

3 Jan 2009, 4:50 PM
#13
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: css layout based template ?

Which Themestock template are you using? What sort of features do you need to add? What do you mean by css compliant?

In the meantime, I would recommend doing a file comparison on all the template files and throwing away any that haven't actually changed from the Zen Cart defaults for the template you're using (tell us which one and I should be able to work out which version of Zen Cart it was developped from).

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

3 Jan 2009, 6:26 PM
#14
vasilios avatar

vasilios

New Zenner

Join Date:
Sep 2008
Posts:
59
Plugin Contributions:
0

Re: css layout based template ?

$template_name = 'TS-BlossomingBeauty';
$template_version = 'Version 1.0';
$template_author = 'ThemeStock.com (c) 2006';

I have already added the dual pricing module which works ok, greek lang pack which I am running through all english and corresponding greek files and merging differences, want to add a wish list mod for 1.3.8 (I guess the wishspot free add-on), and an affiliate module. By CSS compliant I mean to be compliant with the standard css rules (I have knowledge of the IE incompatibilities in the css world) and be as tableless as possible. Any good zen cart templates company in mind ? (before I search the forum, if there is an answer to that)

12 Jan 2009, 9:21 PM
#15
vasilios avatar

vasilios

New Zenner

Join Date:
Sep 2008
Posts:
59
Plugin Contributions:
0

Re: css layout based template ?

In the meantime, I would recommend doing a file comparison on all the template files and throwing away any that haven't actually changed from the Zen Cart defaults for the template you're using

I can realize that this is the correct way, since a custom template directory contains only the override files that are different from the default ones from the zen cart installation. But even if some files are identical (and many are in the case of the themestock template I use) how could that alter the functionality since the code is identical ? And by "template files" I guess you mean all files under the C:\wamp\www\store\includes\templates<themestock_template>\ directory (in all subdirectories).

12 Jan 2009, 9:31 PM
#16
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: css layout based template ?

Where they are identical, no, they're not changing the functionality. With one possible exception, and that's your buttons, where the template unnecessarily over-writes the default buttons.

The main reason for removing the files apparently not doing anything is because they are doing something subtle, and that's making it difficult to see what has changed, and then work out why. And next time you want to do work on the site, or maybe upgrade to 1.3.9. You're going to have to check again whether those files have changed. And in the case of the upgrade, whether they are over-riding any more important new security features.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

12 Jan 2009, 10:59 PM
#17
vasilios avatar

vasilios

New Zenner

Join Date:
Sep 2008
Posts:
59
Plugin Contributions:
0

Re: css layout based template ?

Now, since the template I am using is made for a previous version of zen cart ($template_name = 'TS-BlossomingBeauty'; $template_version = 'Version 1.0';), I guess there must be new added code in zen cart 1.3.8 which is overriden by the old template files (e.g. I checked the tpl_main_page.php and some php code is overriden by the old template file). In the meantime I cannot get rid of the "e-start your Web Store with zen cart" manual banner which is in the center column. I followed all the directions in the admin (both in Layout Settings and in Banner Manager), I also deleted the banner (through the banner manager) but the banner doesn't go away.

So I guess this problem is a matter of some php code from zen cart 1.3.8 that is overriden, and this code must be controlling the output of banners. Am I right in my logic ?

If I wanted to go on using that template would it be a good idea to merge back the code differences between the template files of template_default dir and the themestock template files ? (I would leave the html content of the themestock files intact in order to keep the presentation). (I have some experience with php, html and css)

13 Jan 2009, 9:14 AM
#18
vasilios avatar

vasilios

New Zenner

Join Date:
Sep 2008
Posts:
59
Plugin Contributions:
0

Re: css layout based template ?

ok, I solved the above mentioned problem by editing the define_main_page.php in Define Pages Editor in Admin (with a little help from a forum member), but I am still wondering about the logic of my previous posting:

If I wanted to go on using that template would it be a good idea to merge back the code differences between the template files of template_default dir and the themestock template files ? (I would leave the html content of the themestock files intact in order to keep the presentation). (I have some experience with php, html and css)

13 Jan 2009, 9:49 AM
#19
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: css layout based template ?

Yes, it would be a two-part process, starting from a determination of which files changed from v1.3.7 to v1.3.8a (see the changelog).

Compare the stock ZC files from v1.3.7 and v1.3.8a to see exactly what is different (make detailed notes).

Then compare the template files and their v1.3.8 versions, and merge them in whichever direction works best, saving the final result as your template file.

13 Jan 2009, 12:32 PM
#20
vasilios avatar

vasilios

New Zenner

Join Date:
Sep 2008
Posts:
59
Plugin Contributions:
0

Re: css layout based template ?

since the template that i am using might be made for a version of zen cart older than 1.3.7 (i have updated to 1.3.8 now), wouldn't it be simpler to directly compare the old tempate's files with the template_default dir files of 1.3.8 ? With that comparison I can directly see what has changed in the php code since that template was developed.

I mean, what's the point of comparing the files between 1.3.7 and 1.3.8 since eventually the comparison that matters is between the files of the template I am using and the 1.3.8 default template files.