Template - Product Renders $1

Permalink Browser Info Environment
I have developed a registration form and template. When somebody submits the registration form then the template is called to email them a receipt/email. They have separate product options one product at $325 - {{ field_35 }} and another product at $425 - {{ field_36}}. The field(s) that are pulled into the template are {{ field_35 }} or {{ field_36}} for the selected product amount. The email generated only renders "1" for {{ field_35 }} or {{ field_36}} in the email notification not the total price of $325 or $425. The 1 seems to be coming from "increment" not "price" or "total" of purchase. What would be the {{ something }} to get the total to render in the email notification.

Thank you

Type: Discussion
Status: In Progress
tracyb
View Replies:
PhilYoung replied on at Permalink Reply
PhilYoung
Hi,
I am not sure I understand exactly what you want to do here but you can add two fields by this liquid template structure

{{ field_35 | plus: field_36 }}

Hmm, okay I think i understand what you are saying, what does

{{ field_35 | times:1 }} output?

Best
Phil
PhilYoung replied on at Permalink Reply
PhilYoung
Hi,
I ran some tests and it is to do with the nature of the product type field it records the value as 1 or 0 in the record after submission.

Assuming a customer is only selecting a single product from 2 possibles If you change the product to a radio button with a single value under options and specify manually as $325. When the customer checks that box it will come through with the value in the template.

PS. That does not work properly but I just realised you just use

{{ field_35 | times: 325 }}

Best
Phil
PhilYoung replied on at Permalink Reply
PhilYoung
Better still

$ {{ field_35 | times: 325 }}
tracyb replied on at Permalink Reply
tracyb
Phil,
Thank you. This worked

concrete5 Environment Information

# concrete5 Version
Core Version - 8.4.0
Version Installed - 8.4.0
Database Version - 20180524000000

# concrete5 Packages
Cookies Notice (1.3.2), Formify (3.1), Page Redirect (2.0), Page Selector Attribute (2.0), Pixel Theme (2.1.0)

# concrete5 Overrides
None

# concrete5 Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache

# Server API
cgi-fcgi

# PHP Version
5.6.37

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imagick, imap, intl, ionCube Loader, json, libxml, magickwand, mbstring, mcrypt, mhash, mysql, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, Reflection, session, SimpleXML, snmp, soap, sockets, SPL, sqlite3, standard, tidy, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend Guard Loader, Zend OPcache, zip, zlib

# PHP Settings
max_execution_time - 180
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 600
max_input_vars - 8000
memory_limit - 256M
post_max_size - 256M
sql.safe_mode - Off
upload_max_filesize - 32M
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
pgsql.max_links - Unlimited
pgsql.max_persistent - Unlimited
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
opcache.max_accelerated_files - 7963
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5
zend_optimizerplus.max_accelerated_files - 2000
zend_optimizerplus.max_file_size - 0
zend_optimizerplus.max_wasted_percentage - 5

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.