New Landing How can we help? Atelier Put custom input field inside checkout page

Viewing 5 posts - 1 through 5 (of 5 total)
  • Posted in: Atelier
  • #254453
    JWZegelaar
    Member
    Post count: 13

    Hi!

    We need to insert a custom field on the checkout page. Our product is a digital plugin that is linked to a license code from an application. People give there own application license where we create a new one to secure the plugin. This way the plugin is locked to one application license. Very common way to secure for Cinema 4D plugins.

    How can we add a new field to the checkout page to make this work? The script will generate a lic. file (or txt file) that needs to be stored on the server.

    To make it even more complicated, not all product need to have a license generator.

    You help is really appreciated! 🙂

    This is an example of the code:

    <?php

    function GenerateLicense ($C4Dserial) {
    $LicenseSalt1 = ‘salt1’;
    $LicenseSalt2 = ‘salt2’;
    $LicenseChallange = $LicenseSalt1.$C4Dserial.$LicenseSalt2;
    $LicenseHash = hash (‘sha256′, $LicenseChallange);
    $License = substr ($LicenseHash,8).substr ($LicenseHash,0,8);
    $LicenseFileName = “/licenses/”.$C4Dserial.’license.lic’;
    $LicenseFileHandle = fopen($LicenseFileName, ‘w’) or die(“can’t open file”);
    fwrite($LicenseFileHandle, $License);

    fclose($LicenseFileHandle);

    return $C4Dserial.’license.lic’;
    }

    function StreamLicenseFile ($LicenseFile) {
    $LicenseFileFullpath = ‘/licenses/’.$LicenseFile;
    if (file_exists($LicenseFileFullpath)) {
    header(‘Content-Description: File Transfer’);
    header(‘Content-Type: application/octet-stream’);
    header(‘Content-Disposition: attachment; filename=license.lic’);
    header(‘Content-Transfer-Encoding: binary’);
    header(‘Expires: 0’);
    header(‘Cache-Control: must-revalidate’);
    header(‘Pragma: public’);
    header(‘Content-Length: ‘ . filesize($LicenseFileFullpath));
    ob_clean();
    flush();
    readfile($LicenseFileFullpath);
    }
    }

    $StreamFile = GenerateLicense (‘1234567890’);
    StreamLicenseFile ($StreamFile);

    ?>

    #254469
    David Martin – Support
    Moderator
    Post count: 20834

    Hi there,

    Unfortunately that customisation is beyond our scope of support as it is more work than a small customisation.

    We only provide support for theme issues, and at times basic customisations.

    While we’d love to be able to support every customisation request, we simply don’t have the time.

    We recommend that you seek a freelance developer if you need to make that customisation: http://www.swiftideas.com/customization/

    Thanks.

    #254476
    JWZegelaar
    Member
    Post count: 13

    No problem,

    Can you only tell me if its possible to add custom field and remove field inside the checkout page?

    Thanks!

    #254478
    David Martin – Support
    Moderator
    Post count: 20834

    Yes, you will to edit files or look towards using a plugin such as: https://docs.woothemes.com/document/checkout-field-editor/

    Thanks.

    #254479
    David Martin – Support
    Moderator
    Post count: 20834

    Yes, you will to edit files or look towards using a plugin such as: https://docs.woothemes.com/document/checkout-field-editor/

    Thanks.

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

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register