No announcement yet.

possible to comment out 3DCart code blocks?

  • Filter
  • Time
  • Show
Clear All
new posts

  • possible to comment out 3DCart code blocks?

    Per this doc:

    3DCart has designed its templates with Code Blocks, for example:
    <!--START: PREV_PROD-->
    <!--END: PREV_PROD-->
    I'm wondering if it's possible to comment these out...standard HTML comments don't work (obviously, because they're already there. They hide the codeblock from displaying the start and end commands, but the referenced data is still called; in the case above [prevprodlink] and [prevprodthumb] are still rendered. Also, JS comments don't seem to do the trick either--a big reason being it's not JS, I'm guessing.

    The reason I need to comment out a block is for development reasons: We use one of 3DCart's fields to store a reference marker to another database. During debug this helps because we can see rendered on page which record is being referenced in another non-3DCart table.

    But, when we cut over live I need to be able to hide the codeblock altogether so the end-user doesn't see our reference data (not that it's sensitive or hurts anything. It's just ugly and/or confusing).

    Currently, just removing the required codeblock works. But, it'd be nice if one could just comment it out when needed. That would make for a lot less cut/paste between template files if I could just comment/uncomment out the blocks.

  • #2
    dibble The below will comment the block for you (remove 1 dash from the end of the first comment and 1 dash form the beginning of the last comment)

    <!--START: PREV_PROD-> [prevprodlink] [prevprodthumb] <!-END: PREV_PROD-->
    Not 3dcart Owned or Operated
    100% Independent 3dcart Expert

    Follow Us on Twitter


    • #3
      GREAT! That did the trick. Thank you.