Displaying Items names in cart during checkout MKB - 0071

    Follow

    By default, MyOrderDesk shows the Job Form name on the cart checkout screen. This may not be preferable when using a DocMart menu.

    CartItems001.png


    Below is an screenshot of how to include the DocMart Menu item name on the cart check out page. 

    CartItems002.png

     

    In this knowledge base article we will be learning how to add the DocMart name to the cart checkout screen utilizing the Project Name field.

     

    1. Below is a screen shot of the minimum Form Fields needed to complete this example

    CartItems003.png

     

    2. Enabled the Cart for the JobForm. Cart > Enable Shopping Cart features on this form

    3. Mark the JobDescription field as Hidden

    4. Add a DocMart Menu field to your Job Form

    5. Open the Cart options again and map the Quantity to the name of your DocMart Menu field

    CartItems007.png

    6. Add a "Script" field to the Job Form, name it CopyToProjectName" and insert the following code (screen shot below).

    Be sure to replace DOCMARTFIELDNAME in the two spots indicated below with the name of the DocMart Menu field on your form

    <script type="text/javascript">
    <!--
    $(document).ready(function(){
    function CopyText() {
         $('#mod_JobDescription').val($('#invlist_DOCMARTFIELDNAME option:selected').text());
    }
        $('#invlist_DOCMARTFIELDNAME').bind('change', function() {
    CopyText();
    });
    CopyText();
    });
    -->
    </script>

    CartItems008.png

    7. You are all set! Now, when adding a DocMart Menu item to your cart the item name will appear under the Project Name column.

     

    Comments

    • Avatar
      Walter Germer

      How would code it to concatenate three fields to create Project name

      say {udf_FirstName}  {udf_LastName} and  {udf_type} with say "-" between them?

      I guess we could have a fielded call {udf_Add1} which would be "-" …..

      Walter

    • Avatar
      Adam Witek

      Great question Walter,

      You can use the script found in the link below to copy text from one field to another.

      https://myorderdesk.zendesk.com/entries/23034003-Copying-text-from-one-field-to-another-on-a-Job-Form-MKB-0065

      I would create 3 new fields (hide them if the customer doesn't need to see them) on your form and autofill those fields with firstname, lastname, and type.

       

      Then use the script to copy that information into the JobDescription field.

       

      All the best,

    • Avatar
      Adam Kalcic

      Is there a way to do this if you have docmart items setup as individual fields on the order form and not a docmart menu? 

    • Avatar
      Adam Witek

      Adam,

      Great question! Here's the script to accomplish this when using a Single DocMart item:

      Try this:

      <script type="text/javascript">

      <!--

      $(document).ready(function() {

      $('#mod_JobDescription').val($('#val_DOCMARTFIELDNAME').val());

      });

      -->

      </script>

       

      All the best,

    • Avatar
      Adam Witek

      Walter,

      I've updated the comment above to reflect the new script that will copy single DocMart Items into the Job Description.

       Be sure to substitute "DOCMARTFIELDNAME" with the name of the DocMart Field name on your Job Form.

      All the best,

    • Avatar
      Adam Kalcic

      If you have more than one individual item on a form this seems to just copy the most recent script to the Job Description field. However, if I choose the quantity of another item on the form that doesn't get copied and the Job Description field remains unchanged. Is there another step for multiples docmart items on a form? 

    • Avatar
      Adam Witek

      Adam,

      We do not have a fix for the scenario you are describing above. Hopefully we will soon!

      Thank you,

    Powered by Zendesk