MODX Community

Commerce Digital Products

Hi there,

I want to sell some digital products using Commerce.
I have added the extra ’ Digital Product for Commerce’ which handles most of it, but I’m stuck on two things.

  1. on checkout, I’m asked for my delivery address - but this should be skipped because it’s a digital product.

  2. I can’t work out how to server the link to the file after checkout - ideally it’s in an email - but the email which comes through is the standard email confirmation which says ‘your product is on its way’.

I’ve read the docs, but there isn’t really much detail there:

Has anyone used this Extra who can advise?

Thanks
Andy

So on further reading, I have seen a modification to add to the theme file thank-you.twig which would display information about how to download the file:

<div class="c-digital-products">
{% for digitalProduct in digitalProducts %}
    <h4>{{ digitalProduct.product.name }} {{ lex('commerce_digitalproduct.pages') }}</h4>

    {% for resource in digitalProduct.resources %}
        <p><a href="[[~DOWNLOADRESOURCE]]?secret={{ resource.secret }}">{{ resource.name }}</a></p>
    {% endfor %}
        
    <h4>{{ digitalProduct.product.name }} {{ lex('commerce_digitalproduct.files') }}</h4>
    {% for file in digitalProduct.files %}
        <p><a href="[[~DOWNLOADRESOURCE]]?secret={{ resource.secret }}">{{ file.name }}</a></p>
    {% endfor %}
{% endfor %}

But this doesn’t seem to be triggered.
I’ve even aded it to the default template, just in case mine’s isn’t overriding it - but to no avail.

My product has the type of ‘digital product’.

Wo while testing, it is creating an empty div on the checkout page:

But is not populating it with any content.
I’ve tried a download file (PDF) and also a static resource (PDF)

Pinging @tonyklapatch

UPDATE: Checking my database, the following tables are empty:

modx_commerce_digitalproduct_file
modx_commerce_digitalproduct

But I have set up a digital product as both a file AND a resource.
Assuming this is partly the reason nothing is showing up on checkout?

I’m getting this error in my log every time I view the product, but it seems to be a warning for future releases:

[2020-04-24 20:35:52] (ERROR @ /home/site/staging.site.co.uk/core/components/commerce/src/Adapter/Revolution.php : 121) [Commerce] RogueClarity\Digitalproduct\Modules\Digitalproduct::getDigitalProducts uses a deprecated event that will be removed in Commerce 1.3 - update that module as soon as possible.

Can anyone help with this?
I really want the ability to sell digital products, but cannot seem to figure out how to delivery the product to the customer once they have paid.

Hi Mark,

I haven’t had much luck with this.The developer hasn’t come back to me and I have reinstalled everything, but still still not working.

Is there a way to sell simple digital products in Commerce without Tony’s Extra or do I need to look into a separate solution?

All I really want to do is bypass the shipping address on digital products (because it’s not being shipped) and then send an email with a link to the downloadable resource.

So have a separate/customised email for products that are Digital delivery.

Thanks
Andy

HI all.
So I’ve been going round in circles with this - I thought selling digital products would be easy!
One thing I noticed in the docs (https://github.com/poconosewandvac/Commerce_DigitalProduct) was that the twig template example:

<div class="c-digital-products">
    {% for digitalProduct in digitalProducts %}
        <h4>{{ digitalProduct.product.name }} {{ lex('commerce_digitalproduct.pages') }}</h4>

        {% for resource in digitalProduct.resources %}
            <p><a href="[[~DOWNLOADRESOURCE]]?secret={{ resource.secret }}">{{ resource.name }}</a></p>
        {% endfor %}
            
        <h4>{{ digitalProduct.product.name }} {{ lex('commerce_digitalproduct.files') }}</h4>
        {% for file in digitalProduct.files %}
            <p><a href="[[~DOWNLOADRESOURCE]]?secret={{ resource.secret }}">{{ file.name }}</a></p>
        {% endfor %}
    {% endfor %}
</div>

Refers to ‘resources’ where I think maybe it should refer to files in this section:

        {% for file in digitalProduct.files %}
                <p><a href="[[~DOWNLOADRESOURCE]]?secret={{ resource.secret }}">{{ file.name }}</a></p>
            {% endfor %}

So I’ve change it to:

{% for file in digitalProduct.files %}
        <p><a href="[[~**DOWNLOADFILE**]]?secret={{ **file**.secret }}">{{ **file**.name }}</a></p>
    {% endfor %}

But still not outputting anything on the thanks page when transaction is complete.

The only other thing I can think of is that I’m using ‘test mode’ in Commerce - but surely it work would work in both test and live mode?

Really struggling to find a solution so this.

Thanks anyone who has a few mins to steer me in the right direction!

Andy

So, normally third party extensions are excluded from support, but if you can provide a manager login to support@modmore.com (please include a link to this topic) I’ll take a look at why that’s not working for you. There are definitely people using that in production.

It might be a few days as I’ve had a bunch of urgent projects delivered to me simultaniously, but a few more days might not be the end of the world given your patience so far :sweat_smile:

Thank Mark have emailed you. You’re a star!

Andy

Hi Mark,

I know you’re mega busy, but did you manage to get time to look at this at all?

No worries if not.

Thanks
Andy