Custom Prices
last updated March 01, 2026
Note: These instructions are also built into the module.
Basic Installation for Donations and other Contributions
Product Setup
Create a product to use for accepting money. This could be a product called Donation, Contribution, Crowd Fund, or whatever you like.
Leave price at $0.
Product Attributes
Create a text attribute for the product by clicking on the ATTRIBUTES tab and then clicking on the blue ADD ATTRIBUTE button.
- attribute code: CUSTOMAP_PAYMENT
- attribute prompt: whatever you want it to be - this will also show up in the basket
- attribute type: text field
- attribute price: leave at 0
- attribute required: optional, turn it on if you want
Product Display Page PROD
Open the product page for editing and click the ITEMS tab and assign the CUSTOMAP: Custom Attribute Price item to the page.
Open the PRODUCT DISPLAY LAYOUT section of the template and add the following page item just above the closing </form> tag for the ADD TO CART form.
<mvt:item name="customap" param="set_data()" />
Find the form: Look for name="quantity" which is the quantity input field and/or check for name="add" which is often the name of the form.
Congratulations! The module is now set up. Customers are able to enter the amount to pay into the attribute field and check out.
Advanced Installation for Invoice Payments
Situation:
Store admin creates an order for a customer to pay an invoice.
The order is set to $0.
The customer receives an email with a link to pay the invoice.
The invoice payment is tied into the original order via custom order fields.
When the customer pays the invoice, the payment order includes the old invoice number and the amount, and, the original order automatically has a custom order field updated with the payment amount, original order number, and the date it was paid.
This ties the invoice order with the payment order together.
Custom Fields
These custom fields are used for admin notification and to store the info necessary to tie the payment order to the request order.
Create the following custom fields:
|
type
|
code
|
field type
|
name
|
explanation
|
|
ORDER
|
CUSTOMAP_INVOICE_NUMBER
|
text field
|
Custom AP Invoice Number
|
This stores the invoice number for the Invoice Payment order.
|
|
ORDER
|
CUSTOMAP_PAYMENT_DATE
|
text field
|
Custom AP Payment Date
|
This stores the date of the payment.
|
|
ORDER
|
CUSTOMAP_PAYMENT_AMOUNT
|
text field
|
Custom AP Payment Amount
|
This stores the amount of the payment.
|
|
PRODUCT
|
CUSTOMAP_ADMIN_EMAIL
|
text field
|
Custom AP Admin Email Address
|
Email address the payment notification is sent to.
|
|
PRODUCT
|
CUSTOMAP_EMAIL_SUBJECT
|
text field
|
Custom AP Admin Email Subject
|
Subject of email.
|
|
PRODUCT
|
CUSTOMAP_EMAIL_TEMPLATE
|
textarea
|
Custom AP Admin Email Template
|
Simple text email template. Customer information is based on billing address settings. WARNING: Make sure the "view" for the text area is "source mode" otherwise the email will not work. Tokens:
{price}
{date}
{order_id_new}
{order_id_original}
{customer_fname}
{customer_lname}
{customer_email}
{customer_phone}
|
Create Invoice Request Product
Add a new product called "Invoice Payment Request". Use the code INVOICE_REQUEST.
This product is used when the admin creates an order for someone to pay an invoice by clicking a link in the confirmation email.
Product Attribute Settings
Create a text attribute for the invoice request amount
- attribute code: CUSTOMAP_AMOUNT
- attribute prompt: whatever you want it to be - this will also show up in the basket
- attribute type: text field
- attribute price: leave at 0
- attribute required: optional
Create Invoice Payment Product
Create a product called Invoice Payment with the INVOICE_PAYMENT.
Leave price at $0.
Product Attribute Settings
Create a text attribute for the invoice payment amount
- attribute code: CUSTOMAP_PAYMENT
- attribute prompt: whatever you want it to be - this will also show up in the basket
- attribute type: text field
- attribute price: leave at 0
- attribute required: optional
Create a text attribute for the invoice number (original order id)
- attribute code: CUSTOMAP_INVOICE_NUMBER
- attribute prompt: whatever you want it to be - this will also show up in the basket
- attribute type: text field
- attribute price: leave at 0
- attribute required: optional,
Product Display Page PROD
First check the basic setup above and update the product display page as described.
Add the code below to the ATTRIBUTE TEMPLATE just above the <input type="text"... tag in the
<mvt:elseif expr="l.settings:attribute:type EQ 'text'"> section.
<small><mvt:comment>
#
# CUSTOM ATTRIBUTE PRICE auto fill invoice number and price from link in confirmation email (from admin creating an "invoice" order)
#
</mvt:comment>
<mvt:if expr="toupper(l.settings:attribute:code) EQ 'CUSTOMAP_PAYMENT'">
<mvt:assign name="l.settings:attribute:value" value="encodeentities(g.oip)" />
</mvt:if>
<mvt:if expr="toupper(l.settings:attribute:code) EQ 'CUSTOMAP_INVOICE_NUMBER'">
<mvt:assign name="l.settings:attribute:value" value="encodeentities(g.oid)" />
</mvt:if>
</small>
Invoice Page INVC
Open the INVOICE (INVC) page and add the three custom product fields to it. If there is no place to select custom product fields go to the ITEMS tab and make sure custom fields have been assigned to the page.
Customer Confirmation Email EMAIL_ORDERCONF_CUSTOMER
This update adds a link to pay the invoice.
Find <mvt:foreach iterator="option" array="item:options"> in the ORDER CONTENTS section of the email confirmation template. Then find the closing </mvt:foreach> tag about 40 lines down (in the stock template.)
Add the following template code just above the </mvt:foreach> line.
This will add a link to the payment product.
<small><mvt:comment>
#
# CUSTOMAP to show click here link to custom ap product
#
</mvt:comment>
<mvt:if expr="l.settings:item:code EQ 'INVOICE_REQUEST' AND toupper(l.settings:option:attr_code) EQ 'CUSTOMAP_AMOUNT'">
<tr>
<td colspan="8" valign="top" style="&mvte:item_padding;">
<div class="text-3" style="color:#7a838d; font-family:Arial, sans-serif; min-width:auto !important; font-size:14px; line-height:22px; text-align:left">
&mvt:option:attr_prompt; <pre class="p-3 bg-light rounded"><mvt:comment>
#
# CUSTOMAP to show click here link to custom ap product
#
</mvt:comment>
<mvt:if expr="l.settings:item:code EQ 'INVOICE_REQUEST' AND toupper(l.settings:option:attr_code) EQ 'CUSTOMAP_AMOUNT'">
<tr>
<td colspan="8" valign="top" style="&mvte:item_padding;">
<div class="text-3" style="color:#7a838d; font-family:Arial, sans-serif; min-width:auto !important; font-size:14px; line-height:22px; text-align:left">
&mvt:option:attr_prompt; #####replaceparse3#####lt;mvt:eval expr="l.settings:option:data ROUND 2" />
Please click the link below to pay your invoice.
<a href="PRODUCT_URL?oid=&mvt:order:id;&oip=&mvt:option:data;</a>">
PRODUCT_URL?oid=&mvt:order:id&oip=&mvt:option:data;
</a>
</div>
</td>
</tr>
</mvt:if>
</pre>lt;mvt:eval expr="l.settings:option:data ROUND 2" />
Please click the link below to pay your invoice.
<a href="PRODUCT_URL?oid=&mvt:order:id;&oip=&mvt:option:data;</a>">
PRODUCT_URL?oid=&mvt:order:id&oip=&mvt:option:data;
</a>
</div>
</td>
</tr>
</mvt:if>
</small>
Important: Replace PRODUCT_URL in the code above with the URL for your Invoice Payment Product. Leave the ?oid=... stuff in place.
How to Hide the Quantity Box for an Invoice Payment
It is easy to hide the quanity box for your invoice payment product - in most cases you only want the customer to pay for the single invoice.
Find the code
<input class="c-form-input c-control-group__field u-text-center u-color-gray-40" type="tel" name="Quantity" value="1">
in the PRODUCT DISPLAY LAYOUT section of the PROD page. There might be two of them, one for subscriptions and one below for regular products.
Ignore the subscriptions.
Replace the input line with:
<small><mvt:if expr="g.product_code EQ 'INVOICE_REQUEST'">
<input type="hidden" name="quantity" value="1">
<mvt:else>
<input class="c-form-input c-control-group__field u-text-center u-color-gray-40" type="tel" name="Quantity" value="1">
</mvt:if>
</small>
How to Create an Invoice
- Admin creates an order using the Invoice Payment Request product.
- Admin sends the order confirmation email.
- Customer clicks on the link and goes to the Invoice Payment product page.
- When customer pays, module links the two orders using the custom order field created above.
General Notes
- This could be used to upsell attribute style services or products on the invoice payment.
- This module only works for positive values. If a customer enters a negative value for the price it will not be accepted as the attribute price. Note that the product will still be added to the cart and the negative value will show up in the basket option list but without a price.
- The customer may enter a $ in their amount number; the module will strip it out.
- This works for single item
ADPR add to cart. Multi add ADPM is not supported for invoice payments.