Go Back   3dCart Shopping Cart Software Forums > Shopping Cart Software > Store Design

Reply
 
Thread Tools Display Modes
  #1 ()  
Old 11-05-2007, 10:51 PM
syncbox syncbox is offline
3dCart User
 
Join Date: Oct 2007
Posts: 58
Default invalid table markup in default category_0 file

Hi..

this markup, taken from the default category_0.html file in the assets/common/ directory is invalid:

<table border="0" cellspacing="0" cellpadding="5" width="100%" align="center">
<!--START: CATEGORY_ITEMS-->

<!--START: ITEM_TEMPLATE_0-->
<table border="0" cellspacing="0" cellpadding="0" width="95%">


you cannot put a table inside a table without first putting it into a table row and table cell.

additionally, you cannot have a table row inside a paragraph:

<p>
</td>
</tr>
<tr>
<td colspan="5">&nbsp;</td>


and I don't even KNOW what <s></s> is!

<s>[ITEMPRICE]</s><br>[ITEMSALEPRICE]




This is true for whatever doctype you are using...

any thought on these issues?

Last edited by syncbox : 11-05-2007 at 11:06 PM. Reason: typo
Reply With Quote
  #2 ()  
Old 11-05-2007, 11:15 PM
GonzaloGil GonzaloGil is offline
Moderator
 
Join Date: Feb 2006
Posts: 239
Default

You are correct, the page as is, is not valid, but once it runs through the engine, it will add rows/cols tags.

Also about the S tag, see:

http://www.w3schools.com/tags/tag_strike.asp

Feel free to replace it if you like, you are not forced to use it if you don't want to.
__________________
----------------------------
Gonzalo Gil
3dCart Support
800-828-6650 x111
Reply With Quote
  #3 ()  
Old 11-06-2007, 01:06 AM
syncbox syncbox is offline
3dCart User
 
Join Date: Oct 2007
Posts: 58
Default

Quote:
Originally Posted by syncbox View Post
[size="2"]Hi..

<table border="0" cellspacing="0" cellpadding="5" width="100%" align="center">
<!--START: CATEGORY_ITEMS-->

<!--START: ITEM_TEMPLATE_0-->
<table border="0" cellspacing="0" cellpadding="0" width="95%">

Does the software dynamically write the missing row selector (tr) when it writes in the item blocks?

does it add a <tr> then add as many <td> blocks as category columns set in the admin, then add an item block table inside each?

Last edited by syncbox : 11-06-2007 at 01:08 AM. Reason: more question to add
Reply With Quote
  #4 ()  
Old 11-06-2007, 01:51 AM
GonzaloGil GonzaloGil is offline
Moderator
 
Join Date: Feb 2006
Posts: 239
Default

That's right, since we don't know how many columns and rows you may want on this page, the software inserts them as needed.

The same template can be used to build 1 column by 20 row, as well as 4 column by 10 row table, this is one of the areas of the software that we had to add HTML to the template, we are thinking about adding 2 new blocks (one for TR, and one for TD), so that then you truly have 100% of the html code being used, but at this time it throws in the html code for you.
__________________
----------------------------
Gonzalo Gil
3dCart Support
800-828-6650 x111
Reply With Quote
  #5 ()  
Old 11-06-2007, 02:07 AM
syncbox syncbox is offline
3dCart User
 
Join Date: Oct 2007
Posts: 58
Default

ok, thanks for that. I'll experiment with putting my item templates into things planning for this row/cell approach.

However, would it not have been just as possible to have a div block (with hasLayout properties) with item template blocks that float?

For example, if I set up a block that is 150px wide and that floats left, and that is written into

<div style="width:450px; clear:left;"> (replaces a row)
<div class="mytemplate0">stuff here, even a table using the width for 3 columns (150px)</div>
<div class="mytemplate0">stuff here, even a table using the width for 3 columns (150px)</div>
<div class="mytemplate0">stuff here, even a table using the width for 3 columns (150px)</div>
</div>

that would produce a 3 column layout if a row div were added for every product item blocks.

I'll try to put something like that together (when I have time) and get back to this post to put a link to it. CSS layout isn't that difficult, unless you are still trying to support archaic browsers like netscape4 or ie5x for mac

There will come a time when deprecated html is eliminated, you know? I've been building css-only layouts for over 5 years. I've nothing against using a table for the actual layout of the item elements (if that makes it easier) but I do try to avoid it, particularly since xml and ajax and other technologies are moving to xhtml standards.

What would rock would be using row_format blocks (like in category_format) to allow designers to define the grid (my div above) used and column_format for columns (replacing the current td selectors).

I'd love to be involved if you guys get around to changing things - I am a good beta tester and expert at both markup and css.
Reply With Quote
  #6 ()  
Old 11-06-2007, 03:00 AM
GonzaloGil GonzaloGil is offline
Moderator
 
Join Date: Feb 2006
Posts: 239
Default

Right, that would be good, if and only if you are going to have 3 columns on 450px, if you wanted 4 columns, or 5, that would mean editing the template.

Now each template also has 3 styles of "special" items, and 3 styles of "normal" items, so, i guess, its possible to have tons of category templates with all possible options, of 1 through 5 columns, for all possible styles, but then you would have a huge set of templates, and if you are finding the current setup difficult, a common folder with an additional 30-40 templates isn't going to help .

If there is a way to make this happen, perhaps with CSS 3.0 something like: http://www.css3.info/preview/multi-column-layout/

Then, that will be the way to go for future templates. However, I don't think CSS 3.0 is widely integrated yet, but it seems that the new functionality there will help solve this problem. Until then, tables it is
__________________
----------------------------
Gonzalo Gil
3dCart Support
800-828-6650 x111
Reply With Quote
  #7 ()  
Old 11-06-2007, 04:21 AM
syncbox syncbox is offline
3dCart User
 
Join Date: Oct 2007
Posts: 58
Default

although the problem itself starts with not making it EASIER to determine which template you are choosing in the first place. It's specious and a bit self-serving to say that the reason is that it would mean too many templates that are hard to choose already... that problem is mostly due to lack of fore-thought... like I said in another thread.. how hard is it to count the category_x files, build the array and modify the count so that 0!=1, 1!=2 and so on...

in fact, it's not too late to do that if you simply build in some code block that allows you to put a "human" name on a template (like 3-column or 2-column or homepage...) that is used in conjunction with the array of category_x numbers.

Additionally, anyone who has read any interface design books would know that using a particularly loaded term like "style" (which is major in CSS and and html) to build an array of choices not only once, but TWICE, each thing meaning something different!

little changes to things like that would make the learning curve of this software easier.

But like I said, I'll work up my own blocks for my templates sans the funky outer table and we'll see how it goes. I'll keep you posted!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 11:12 PM.


Powered by vBulletin® Version 3.6.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8