Is there a way to add a note section for customers to add a note at checkout? Thanks!
Announcement
Collapse
No announcement yet.
Note Section for Customers at Checkout
Collapse
X
-
I recommend reading into custom fields here: https://docs.miva.com/template-langu...-documentation
You need to create a new custom field by navigating to utilities > custom fields.
Create a custom field with:
Code: order_instructions
Name: Up to you
Field Type: Text Area
Type: Order
On page OCST place the following code where you want to display the text area (note you may have to update the classes depending on your theme):
<mvt:item name="customfields" param="Read_Basket('order_instructions', g.order_instructions)" />
<label class="c-form-label c-heading-delta u-text-bold" for="order_instructions" title="Delivery Notes">Comments / Shipping Instructions <span class="c-heading--subheading">(Optional)</span></label>
<textarea id="order_instructions" class="c-form-input c-form-input--long" name="order_instructions">&mvte:global:order_instr uctions;</textarea>
On OPAY:
<mvt:if expr="NOT ISNULL g.order_instructions">
<mvt:item name="customfields" param="Write_Basket('order_instructions', g.order_instructions)"/>
</mvt:if>
<mvt:item name="customfields" param="Read_Basket('order_instructions', g.order_instructions)"/>
On INVC :
<mvt:item name="customfields" param="Read_Basket('order_instructions', l.settings:order_instructions)" />
<mvt:item name="customfields" param="Write_Order(l.settings:order:id, 'order_notes', l.settings:order_instructions)" />
<mvt:if expr="l.settings:order_instructions">
<li class="o-list-block__item">
<p class="c-heading-delta u-text-bold">Delivery Notes</p>
<hr class="c-keyline">
<p class="u-font-small u-color-gray-40">
&mvte:order_instructions;<br>
</p>
<br>
</li>
</mvt:if>
On your template based batch report (or wherever you intend on displaying the custom field):
<mvt:item name="customfields" param="Read_Order(l.settings:order:id, 'order_instructions', g.order_instructions)" />
&mvte:global:order_notes;
You'll also be able to view notes while viewing orders in the admin under custom fields.
Hope that helps!
-Ryan
- 1 like
Comment
-
at that date, i'd first check to see if the custom fields module is even there
customfields
Custom Fields
10.0400
Bruce Golub
Phosphor Media - "Your Success is our Business"
Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
phosphormedia.com
Comment
Comment