Digital Products

Hi all.

I’m trying to setup a number of free digital products.
All I want to do is collect names and email addresses from the cart, and then give them the file.

I’ve downloaded the Digital product Extra and enabled it in modules.
I’ve setup a new Product TV with the Product Type of ‘Digital Product’.
I’ve added my product, and added the URL of the Digital File I’m offering.
I’ve created a new twig theme, and added in the code specified here:

<div class="c-digital-products">
    {% for digitalProduct in digitalProducts %}
        {% if digitalProduct.resources|length > 0 %}
            <h4>{{ digitalProduct.product.name }} {{ lex('commerce_digitalproduct.pages') }}</h4>
            {% for resource in digitalProduct.resources %}
                <p><a href="[[~[[++commerce_digitalproduct.download_resource]]? &scheme=`full` &secret=`{{ resource.secret }}`]]">{{ resource.name }}</a></p>
            {% endfor %}
        {% endif %}

        {% if digitalProduct.files|length > 0 %}
            <h4>{{ digitalProduct.product.name }} {{ lex('commerce_digitalproduct.files') }}</h4>
            {% for file in digitalProduct.files %}
                <p><a href="[[~[[++commerce_digitalproduct.download_resource]]? &scheme=`full` &secret=`{{ file.secret }}`]]">{{ file.name }}</a></p>
            {% endfor %}
        {% endif %}
    {% endfor %}
</div>

Two problems:

1 - the checkout wants my full postal address and shipping address - but all i want to collect is name and email address (but I do have physical products too, so I can’t just delete those fields from checkout)

2 - after checking out (test mode) I’m not redirected to the file to download it, nor does it appear in my email confirmation.

Any ideas what I’m missing?

Thanks
Andy

I have revisited this, as after trying again to setup a digital product, I have the same issue. I can checkout, but I just get a thanks email - and no redirect to the downloadable file.

One point to add - my product is free - would that have an effect on this?

So I have figured this out - I needed to add the additional code to my thanks page and email twig templates!

Details were found here:

Hi @andyjones ,

Great, glad you’ve got it sorted!

Details about template changes can also be found in the docs at Thank You page & Email template - modmore documentation