Announcement

Collapse

Posting Rules

Posting Rules
This forum was created to help 3dcart users share tips on getting the best out of the service, offer knowledge and experiences about e-commerce in general, and to promote a positive environment in which our merchants can request/dispense advice regarding best practices.

The forum was not created for 3dcart users to submit requests for customer support. Any support related thread will be removed and a support ticket will be placed on your behalf. If you have technical difficulties please visit http://support.3dcart.com.

The 3dcart forum is also not intended to be a medium in which to express dissatisfaction about 3dcart's service, policies or its management and staff. Threads of this nature will also be removed from the forum. If a support issue with your 3dcart store was not resolved in a satisfactory manner; or if you feel that a particular 3dcart offering/policy is not to your liking, please let us know by emailing [email protected] so we can address your concerns directly.

Again, our purpose is to cultivate a positive learning environment for our merchants rather than platform in which to express grievances.

Very Important Rules:
* Never give away your store administration login/password in this forum.

Should you need technical help, please let 3dcart staff help.
Also, please be aware that 3dcart staff will NEVER need to ask for your 3dcart related passwords.

General Rules:
* While debate and discussion are acceptable, we will never tolerate rudeness, insulting posts, personal attacks or inflammatory posts. Our decision is final in these matters.
* Please refrain from posting meaningless threads, one word (or short) nonsensical posts, or similar postings.
* Multiple or repeated posting in order to increase your post count is not allowed.
* Advertising, spamming and trolling is not allowed. This includes using the forum email and Private message system to spam other members.
* We also do not allow posts that are sexual in nature.
* Please wait at least 24 hours before bumping posts.
* Discussion of illegal activities such as software and music piracy and other intellectual property violations are not allowed.
* Each member is allowed one login account. Registering with multiple accounts is not allowed.
* We reserve the right to remove offensive posts without notice.
* We also reserve the right to remove postings which are in violation of our specified posting rules
* Also, while these rules cover most common situations, they cannot anticipate everything. Consequently, we reserve the right to take any actions we deem appropriate to ensure these forums are not disrupted or abused in any way.
* You cannot post any affiliate or referral links, or post anything asking for a referral. Such posts will be subject to removal.
* You cannot post advertisements or notices for contests.
* We also reserve the right to ban anyone who willfully violates the forum rules, as access to our support forums are a privilege and not a right. A banned customer is still entitled to support from the support system, but will not be able to participate in the forum.
See more
See less

Template Variables, how are they implemented?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Template Variables, how are they implemented?

    Hello,

    Does anyone know how the 3DC cart engine deals with template variables?

    Specifically, what determines which variables are available for a given template? (I am aware that there is documentation in the guide about which templates have which variables available. The question is how do they get to be that way?).

    The reason I ask, specifically, is that I want to generate a packing slip with thumbnails, and the [thumbnails] variable which is available in some templates, is not in the packing_print.html template.

    Tech support's short answer is that I can call sales and ask for custom coding (phone number provided).

    Thanks
    Last edited by obleck; 01-09-2020, 05:01 PM.

  • #2
    The answer is pretty much if its not available on the default templates, it isn't available. But, in this case, i think [thumbnail] might work, also, [image1]...give it a shot.
    ----------------------------
    Gonzalo Gil
    3dCart Support
    800-828-6650 x111

    Comment


    • #3
      I tried [thumbnail} and it didn't work. I'll try the others.

      However, that didn't answer my question, which was, "What determines which variables are available for a given template?"

      Obviously if I can call sales and pay someone at 3DC to code up what I want, then there is an answer to this. Moreover, if I can pay 3DC's people to do it, I should be able to do it myself too, given that I'm competent in this realm.

      Comment


      • #4
        "What determines which variables are available for a given template?"

        When we build a template for something, we get a list of the variables that we want to have available based on the requirements we setup when we created the project, put them on the template, and on the software.

        This is why, if it isn't on the template, it most likely isn't available for you to use. We can always make a customization, but, we try to have the app do the least work as necessary, as if we wanted to make every variable available on every template, it would make things a lot more complicated & unnecessary for the app.

        However, in this case, [thumbnail] does work, i just tested it. I think you were close, but you used "thumbnails" (plural), which isn't a valid one.

        Here is what i did:


        HTML Code:
        <!--START: items-->
                    <div class="row">
                        <div class="invoice-id">[id] <img src="[thumbnail]"></div>
                        <div class="invoice-items">
                            [itemname]<!--START: warehouse_location--><br />
                            [warehouse_location] [warehouse_aisle] [warehouse_bin] [warehouse_custom]<!--END: warehouse_location-->
                        </div>
                        <div class="invoice-qty">[numitems]</div>
                        <div class="clear"></div>
                    </div>
                    <!--END: items-->
        on /packing_print.html
        ----------------------------
        Gonzalo Gil
        3dCart Support
        800-828-6650 x111

        Comment


        • #5
          I had it as [THUMBNAIL] for some reason (copied from a different template if I recall correctly), but it's not documented in any case on this page:

          https://www.3dcart.com/guide/templat...ing_print.html

          ...where I'm sure you would agree one would expect to find it:

          Nevertheless, two things:

          1) I still don't know the answer to my question, which is, "What determines which variables are available for a given template?" Clearly somewhere in your system there is _some_ mapping somewhere somehow. If the answer is, "We're not going to tell you because you can't access it anyway", that's fine.

          2) Is there some way to actually determine what variables ARE in fact available for any given template, given that the documentation leaves some out?
          Perhaps some code block called "LIST-ALL-TEMPLATE-VARIABLES"....

          Comment


          • #6
            I'm sorry, but, typically the packing print, is usually black and white (currently lol, i guess pretty soon color printing will be the nrom), so no, i wouldn't expect it there, but, yes, if you print those in color i would understand, that's great, but, it isn't normal, this is why it wasn't part of that template because when it was designed, it was understood that it would most likely print on a thermal printer, or black and white and wouldn't want that in it.

            #2, yes, the variables you have access to, are the ones in the templates. Now, i'm sure you'll say "Hey, but this one wasn't there!!!!", true, that's because we have done a customization recently that's not available to everyone yet. When you reach our customization team, the first thing they do is test on the latest version if its possible, if it is, they tell you how to do it, if it isn't they let you know what we can do.A good % of "how can i" sales tickets end up with similar answers as the one i placed. Now, if you are a developer, look here:

            https://apirest.3dcart.com/v1/index.html

            You can pretty much have access to pretty much anything of your store and do your own development, so if the stock app doesn't fit your needs, you could read the order, make your own email and send it, but that's a lot more complicated.

            So if the question is "What can i make sure i have access to?" then, read the templates the variables there are 100% available, if your question is "I want XYZ available and that's not on templates?" then, we would need to look at that and that's not something our support team handles. The "List all template variables" is basically "open the template and anything you see there is available".

            I wish we can make this simpler, but, if we added the thumbnails today (a few years after we introduced the original template for packing slip), i am sure we would have a huge issue with those that don't want to spend so much ink :(

            ----------------------------
            Gonzalo Gil
            3dCart Support
            800-828-6650 x111

            Comment


            • #7
              Well, I suppose that mostly answers it:

              1) Template variables are mostly documented, but the ones that aren't, well... that's just how it is
              2) Variable assignment to templates is internal and not accessible. Unless...
              3) ... it sounds like maybe you can do it through the API if one wants to dig into it.

              Fair enough. Thanks.

              Comment


              • #8
                Interesting pages:

                https://core.3dcart.com/template-pages
                https://support.3dcart.com/knowledge...late-variables
                http://www.pack-secure.com

                Packaging and Shipping Supply Specialists

                Comment


                • #9
                  @GonzaloGil

                  Why does the packing slim include the price for options? Example; The price we charge to personalize an item appears on the packing slip. It has been this way for years. Why doesn't 3dCart fix this?
                  Luxlife

                  Comment

                  Working...
                  X