Files
ws_giftdropdown/README.md
T
2026-06-22 14:27:47 +02:00

1.7 KiB

ws_giftdropdown

A companion module for thecheckout. Adds gift wrapping options when a user wants to make the order a gift. Originally created for houtendiershop and Knuffelshop.

This module requires thecheckout module to be installed.

Todo: 1.) Make the module more portable when it comes to mail and PDF templates. Right now you have to manually add {ws_gift_paper_choice} to the mail templates

order_conf.html:

<tr>
    <td
        align="left"
        style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-size: 0px; padding: 10px 25px; padding-top: 0; word-break: break-word;"
    >
        <div
            style="font-family: Open sans, arial, sans-serif; font-size: 16px; line-height: 25px; text-align: left; color: #363a41;"
            align="left"
        >
            <span class="label" style="font-weight: 700;">Cadeaupapier</span>
            {ws_gift_paper_choice}
        </div>
    </td>
</tr>

2.) Make the module more portable when it comes to adding the radio buttons in the checkout. Right now we have to manually add to the tpl: themes/falcon/modules/thecheckout/views/templates/front/blocks/shipping.tpl

{if isset($gift_paper_options) && $gift_paper_options|count}
<div id="gift-paper-choice">
    <span class="gift-paper-label">{l s='Kies je cadeaupapier' d='Admin.Modules.ws_giftdropdown'}</span>
    <div class="gift-paper-options">
        {foreach from=$gift_paper_options item=option}
            <label class="gift-paper-option">
                <input type="radio" name="gift_paper" value="{$option|escape:'htmlall':'UTF-8'}">
                {$option|escape:'htmlall':'UTF-8'}
            </label>
        {/foreach}
    </div>
</div>
{/if}

5.) ✅ Make paper choice an entity