We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Change attachment name in place order + puzzle

Home Forums Programming Change attachment name in place order + puzzle

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #56428
    Mariusz
    Customer

    The new “place order +” puzzle works really well and it’s great that it allows us to send attachments via email.

    But currently, the attachments, that come with the email get the names “attachment1”, “attachment2”, etc. Is it possible to give the unique names to these files? For example “YourConfiguration.pdf” for a PDF file? I mean the option that we have in the standard “download” file.

    Can it be done with a puzzle? I attach my standard configuration.

    Or maybe it should be done in order_form.php or order_email_body.php?

    <?php if (!empty($attachments)): ?>
                                <?php foreach($attachments as $att): ?>
                                    <input type="hidden" name="v3d_attachments[]" value="<?= $att ?>" />
                                <?php endforeach; ?>
                            <?php endif; ?>
    Attachments:
    You must be logged in to view attached files.
    #56443

    Hi

    Currently it’s not supported (adding this task to our TODO list), but you can modify the $name variable assignment in the v3d_gen_email_attachments() function of the plugin’s order.php script.

    Verge3D’s Tech Chief
    FB | Twitter | VK

    #56491
    Mariusz
    Customer

    It worked, this solution is good enough for now. Thank you Alexander! :)

    Another question, in the email body I put a link to the configuration, so the user can come back to it in the future and modify it. The link is taken from another attachment, as you suggested a while ago (the setup was in the first picture in this topic). It works nicely and allows me to add this link to the email body. But at the same time, it sends this attachment as a text file together with the email. It doesn’t look pretty and professional, since the user really doesn’t need to receive the file with one single link. Is there any way that I can stop it from being sent with the order email?

    Attachments:
    You must be logged in to view attached files.
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.