No announcement yet.

Table <tr><td> tags in category template file

  • Filter
  • Time
  • Show
Clear All
new posts

  • Table <tr><td> tags in category template file

    Has anyone managed to clear out all generated table tags (<tr><td>) from the category listing? I still get them after each subcategory listing no matter what changes I make to the template file. From what I have seen in other files the system is finnicky and if it sees certain things after the <!-- --> tags it will not place them, but I haven't been able to trick it on this file.

  • #2
    Im not sure what you mean, do you mean you are rewriting your template to CSS?

    If so, then you would need to rewrite almost all the templates in the common folder, depending on what your store is using.
    - Peace


    • #3
      Yes, I have re-written almost all of my files to be clean CSS with no tables. But I cannot get the category files to not automatically insert table tags at runtime, even if there are none present in the template file.


      • #4
        It sounds like an issue I had with my category pages, I check the category and it had some tables and other text in the Category Header, all I had to do was delete it.

        If this is not it, can you post a link to the page so I can take a look.
        - Peace


        • #5
          Nope, it's definitely automatically inserted table tags by the 3DCart engine.

          I ended up reverting to using the table formatting for that section of the page so that it would validate more cleanly.

          The section in question I had like below, before reverting:

          <!--START: SUB_CATEGORIES-->
          <!--START: SUB_CATEGORY_IMAGE-->
          <a href="view_category.asp?cat=[CATID]">
          	<img src="[SUB_CATEGORY_IMAGE]" alt="[SUB_CATEGORY_NAME]">
          <!--END: SUB_CATEGORY_IMAGE-->
          <!--START: SUB_CATEGORY_NAME-->
          <a href="view_category.asp?cat=[CATID]" class="product-link">
          <!--END: SUB_CATEGORY_NAME-->
          <!--END: SUB_CATEGORIES-->
          3DCart will add a </tr><tr> after every subcategory entry


          • #6
            Oh I see what you mean.
            I had this happen to me, I dont really remember what I did but I think it was either the <!-- Start:..--><!--END:..--> or the codeblock wrapper that was causing it. I know I deleted something to do with the codeblock tag wrapper.

            Ill be updating some pages on my site, Ill see if I can get it to do that again so I can pinpoint what causes this.
            - Peace


            • #7

              I tried recreating this with no luck, at least I didnt see any table tags besides the ones that I havent fully re-coded. you might want to take a look at the js files. I see that the quick_view.js file does add tags to the html output.

              good luck.
              - Peace


              • #8
                I have this same issue (with related items on the listing pages).

                I assumed that was how the codeblocks called it in. The problem might lie in the fact that you can change the amount of products per row and column, which would be quite hard to do with divs.

                I ended up just wrapping it in a div and calling it a day. Good luck finding a more concrete answer!


                • #9
                  This definitely stems from the fact that the backend has a preference for how
                  many subcategories go in a column. It will insert a <tr></tr> after every Nth subcategory entry. It's being done by the server, not by javascript.

                  User001 can you look into this more? I checked your ifilters site and saw you have the same thing that you may not have noticed.
                  Refrigerator Filters

                  If you view source to line 490 you get:
                  				<td>&nbsp;</td><td>&nbsp;</td></tr><!--END: SUB_CATEGORIES_FORMAT-->
                  				<!--END: SUB_CATEGORIES-->


                  • #10
                    sure looks like its generated from their code. mine has it too and not a darn template file in my entire site is in tables.


                    • #11
                      This is definitely used to evenly distribute the number of subcategories between the columns.

                      The 4.11.1 version that will be deployed next week actually includes a small update, where if you're using DIVs for your subcategories, then it won't dynamically insert the tables.



                      • #12
                        Thanks for pointing this out cbsteven :)

                        Ill have to revisit this issue and maybe open a ticket.

                        Update: As jimmy3dcart stated this should be fixed next week.
                        If you need a quick fix try something like


                        or if the tags are inside a div with an ID try


                        I havent tested this but using jQuery you can remove the table tags after the Dom has loaded.
                        Last edited by user001; 11-09-2012, 12:24 PM. Reason: Update:
                        - Peace