4871860ac43e9bb0bace1dd16f060174311423dd
4.) Instead of mod='ws_giftdropdown' say d='Admin.Modules.ws_giftdropdown'
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}
3.) Make this translatable in displayHooks.php
if ($paperChoice) {
$note = 'Cadeaupapier: ' . $paperChoice;
$order->note = $order->note ? $order->note . "\n" . $note : $note;
$order->update();
}
5.) Make paper choice an entity
Description
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.
59 KiB
Languages
PHP
82.3%
Smarty
9%
JavaScript
5.9%
CSS
2.8%