Home Forums WoodMart support forum Implementation of javascript to checkout and thank you page

Implementation of javascript to checkout and thank you page

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #306437

    Mat
    Participant

    Hello,

    How to implement js code on checkout page and on thank you page? In addition, this code should take from the database and display certain values.

    1. Checkout page code:

    <script type="text/javascript">
    var webeOrder = {
    "mid": 12345,
    "refer": "",
    "sum": [gross order value excluding delivery costs]
    };
    </script>
    <script type="text/javascript" src="//b.webep1.com/js/webebefore.js"></script>

    The output of this code should look like (example):

    <script type="text/javascript">
    var webeOrder = {
    "mid": 12345,
    "refer": "",
    "sum": 305.48
    };
    </script>
    <script type="text/javascript" src="//b.webep1.com/js/webebefore.js"></script>

    2. Thank you page code:

    <script type="text/javascript">
    var webeOrder = {
    "mid": 12345,
    "refer": [order ID],
    "pid": [ordered products IDs],
    "q": [quantities of individual ordered products],
    "price": [gross unit price of individual ordered products],
    "sum": [gross order value excluding delivery costs]
    };
    </script>

    The output of this code should look like (example):

    <script type="text/javascript">
    var webeOrder = {
    "mid": 12345,
    "refer": "2653545",
    "pid": "31671:91431:11671",
    "q": "1:3:1",
    "price": "15.52:19.99:229.99",
    "sum": 305.48
    };
    </script>

    Thank you in advance for step by step instructions on how to implement this code.

    #306488

    Hello,

    You need all the JS code to the Theme Settings > Custom JS.

    Woocommerce customization issues are not covered by our support. Please check the Woocommerce documentation on how to customize correctly, the person or source that gives the customization code should also give the place where it should be added.

    Best Regards

Viewing 2 posts - 1 through 2 (of 2 total)