Forum

Thread tagged as: Question, Shop

New input customer create form

I have creted new input in customer_create_passwordless.html template. But this one in not passed to admin panel. How I can add new field to Customer Address, which I will be able pass to emails sent after transaction?

<perch:label for="phone">Numer telefonu do kontaktu*</perch:label>
<perch:input type="text" id="phone" required="true" label="Numer telefonu" />
<perch:error for="phone" type="required"><span class="error">Podaj numer telefonu</span></perch:error>
Maciej Pieńczewski

Maciej Pieńczewski 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Have you added the fields to the customer.html master template?

Yes. my customers/customer.html template

<perch:shop id="first_name" type="text" label="First name" required="true" />
<perch:shop id="last_name" type="text" label="Last name" required="true" />
<perch:shop id="email" type="email" label="Email" required="true" />
<perch:shop id="phone" type="text" label="Telefon" required="true" />

and this one is my customer_create_passwordless.html template

<div class="single-input">    
<perch:label for="phone">Numer telefonu do kontaktu*</perch:label>
<perch:input type="text" id="phone" required="true" label="Numer telefonu" />
<perch:error for="phone" type="required"><span class="error">Podaj numer telefonu</span></perch:error>
</div>
Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you me your diagnostics report?

Diagnostics report
HEALTH CHECK

Perch is up to date
PHP 5.6.23-dh101cl is up to date
MySQL 5.5.5-10.0.25-MariaDB-cll-lve is up to date
Image processing available
SUMMARY INFORMATION

Perch: 2.8.31, PHP: 5.6.23-dh101cl, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $, with PDO
Server OS: Linux, litespeed
Installed apps: content (2.8.31), assets (2.8.31), categories (2.8.31), perch_blog (5.0), perch_shop_orders (1.0), perch_shop_products (1.0), perch_shop (1.0.1), perch_members (1.5)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', 'perch_members', 'perch_shop', ); ?>
PERCH_LOGINPATH: /perch
PERCH_PATH: /home/klient.dhosting.pl/beeeco/bee-eco.pl/public_html/perch
PERCH_CORE: /home/klient.dhosting.pl/beeeco/bee-eco.pl/public_html/perch/core
PERCH_RESFILEPATH: /home/klient.dhosting.pl/beeeco/bee-eco.pl/public_html/perch/resources
Image manipulation: GD
PHP limits: Max upload 200M, Max POST 32M, Memory: 2048M, Total max file upload: 32M
F1: 2edba60ed1f613d6dd804feb202456a2
Resource folder writeable: Yes
HTTP_HOST: bee-eco.pl
DOCUMENT_ROOT: /home/klient.dhosting.pl/beeeco/bee-eco.pl/public_html
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php

I did an perch shop update to the lastest version, but stil the same problem.

Diagnostics report
PERCH INFORMATION

Perch: 2.8.31
Production mode: Production (100)
Installed apps: content (2.8.31), assets (2.8.31), categories (2.8.31), perch_blog (5.0), perch_shop_orders (1.0.8), perch_shop_products (1.0.8), perch_shop (1.0.8), perch_members (1.5)
DB driver: PDO
DB tables: perch2_blog_authors (2), perch2_blog_comments (0), perch2_blog_index (201), perch2_blog_posts (2), perch2_blog_posts_to_tags (0), perch2_blog_sections (1), perch2_blog_tags (0), perch2_blogs (1), perch2_categories (13), perch2_category_counts (0), perch2_category_sets (2), perch2_content_index (149), perch2_content_items (50), perch2_content_regions (10), perch2_members (12), perch2_members_forms (1), perch2_members_member_tags (0), perch2_members_sessions (2), perch2_members_tags (0), perch2_navigation (0), perch2_navigation_pages (0), perch2_page_templates (1), perch2_pages (7), perch2_resource_log (956), perch2_resource_tags (1), perch2_resources (1266), perch2_resources_to_tags (6), perch2_settings (33), perch2_shop_addresses (1168), perch2_shop_admin_index (128), perch2_shop_brands (1), perch2_shop_cart (1807), perch2_shop_cart_data (497), perch2_shop_cart_items (226), perch2_shop_countries (248), perch2_shop_currencies (152), perch2_shop_customers (271), perch2_shop_emails (2), perch2_shop_index (4673), perch2_shop_option_values (8), perch2_shop_options (2), perch2_shop_order_items (732), perch2_shop_order_promotions (16), perch2_shop_order_statuses (9), perch2_shop_orders (318), perch2_shop_orders_meta (1), perch2_shop_product_files (0), perch2_shop_product_option_values (34), perch2_shop_product_options (19), perch2_shop_product_tags (0), perch2_shop_products (149), perch2_shop_promotions (0), perch2_shop_search (121), perch2_shop_shipping_zone_countries (1), perch2_shop_shipping_zones (1), perch2_shop_shippings (4), perch2_shop_tax_exhibits (651), perch2_shop_tax_group_rates (0), perch2_shop_tax_groups (1), perch2_shop_tax_locations (1), perch2_shop_tax_rates (1), perch2_shop_variants (52), perch2_user_passwords (0), perch2_user_privileges (74), perch2_user_role_privileges (30), perch2_user_roles (2), perch2_users (3)
Users: 3
App runtimes:
<?php
    $apps_list = array(
        'content',
        'categories',
        'perch_blog',
        'perch_members',
        'perch_shop',
    );
?>
Scheduled tasks for perch_blog: delete_spam_comments (1440 mins)
Editor plug-ins: markitup, redactor
H1: d1406189caa7f2b79e7ee0b1ccb49203
L1: 177ec0db7992f29090329cc1964db512
F1: 2edba60ed1f613d6dd804feb202456a2
headerColour: #f0f8f7
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 0
content_collapseList: 1
lang: en-gb
update_2.8.29: done
latest_version: 2.8.15
on_sale_version: 2.8.31
headerScheme: light
perch_members_login_page: /members/login.php?r={returnURL}
perch_shop_price_tax_mode: inc
perch_shop_site_url: https://bee-eco.pl/
perch_shop_product_url: /shop/products/{slug}
perch_shop_invoice_number_format: %d
dashboard: 0
hide_pwd_reset: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
perch_shop_default_currency: 110
perch_shop_reporting_currency: 110
perch_members_update: 1.4
perch_blog_update: 5.0.1
perch_blog_post_url: /blog/post.php?s={postSlug}
perch_blog_site_name:
perch_blog_slug_format: %Y-%m-%d-{postTitle}
perch_blog_akismet_key:
perch_blog_max_spam_days: 0
perch_blog_comment_notify: 0
logoPath: /perch/resources/logo-black-1.png
update_2.8.31: done
perch_shop_update: 1.0.8
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: pa7moh_beeecopl
PERCH_DB_SERVER: beeeco.mysql.dhosting.pl
PERCH_DB_DATABASE: chie9s_beeecopl
PERCH_DB_PREFIX: perch2_
PERCH_TZ: UTC
PERCH_EMAIL_FROM: maciej.pienczewski@gmail.com
PERCH_EMAIL_FROM_NAME: Maciej Pienczewski
PERCH_LOGINPATH: /perch
PERCH_PATH: /home/klient.dhosting.pl/beeeco/bee-eco.pl/public_html/perch
PERCH_CORE: /home/klient.dhosting.pl/beeeco/bee-eco.pl/public_html/perch/core
PERCH_RESFILEPATH: /home/klient.dhosting.pl/beeeco/bee-eco.pl/public_html/perch/resources
PERCH_RESPATH: /perch/resources
PERCH_HTML5: 1
PERCH_RUNWAY:
PERCH_ERROR_MODE: DIE
PERCH_DATE_LONG: %d %B %Y
PERCH_DATE_SHORT: %d %b %Y
PERCH_TIME_SHORT: %H:%M
PERCH_TIME_LONG: %H:%M:%S
PERCH_RUNWAY_ROUTED:
PERCH_STRONG_PASSWORDS:
PERCH_DEBUG:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /home/klient.dhosting.pl/beeeco/bee-eco.pl/public_html/perch/templates
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_RWD:
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_PARANOID:
PERCH_FORCE_SECURE_COOKIES:
PERCH_PASSWORD_MIN_LENGTH: 6
PERCH_MAX_FAILED_LOGINS: 10
PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR
PERCH_VERIFY_UPLOADS:
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
PERCH_SESSION_TIMEOUT_MINS: 20
PERCH_SHOP_VERSION: 1.0.8
PERCH_APPS_EDITOR_PLUGIN: markitup
PERCH_APPS_EDITOR_MARKUP_LANGUAGE: textile
HOSTING SETTINGS

PHP: 5.6.23-dh101cl
Zend: 2.6.0
OS: Linux
SAPI: litespeed
Safe mode: not detected
MySQL client: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $
MySQL server: 5.5.5-10.0.25-MariaDB-cll-lve
Free disk space: 1.81 TB
Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, gettext, SPL, iconv, session, interbase, intl, json, ldap, mbstring, mcrypt, mssql, standard, mysqlnd, mysqli, odbc, mysql, PDO, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, Reflection, imap, shmop, SimpleXML, snmp, soap, sockets, exif, sybase_ct, sysvmsg, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, litespeed, dba, geoip, mailparse, memcache, memcached, mhash, ionCube Loader, Zend OPcache
GD: Yes
ImageMagick: No
PHP max upload size: 200M
PHP max form post size: 32M
PHP memory limit: 2048M
Total max uploadable file size: 32M
Resource folder writeable: Yes
Session timeout: 16.65 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: Yes
TMPDIR: /home/klient.dhosting.pl/beeeco/.tmp
PHPRC: /home/klient.dhosting.pl/beeeco/.settings/
LANG: pl_PL.UTF-8
PATH: /bin:/usr/bin:/usr/local/bin
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch
HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8,de;q=0.6,fr;q=0.4
HTTP_CONNECTION: keep-alive
HTTP_COOKIE: cmsa=1; p_m=; PHPSESSID=c4be648e1efdda7164c61c53177d1948
HTTP_HOST: bee-eco.pl
HTTP_REFERER: https://bee-eco.pl/perch/core/settings/diagnostics/
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36
HTTP_UPGRADE_INSECURE_REQUESTS: 1
DOCUMENT_ROOT: /home/klient.dhosting.pl/beeeco/bee-eco.pl/public_html
REMOTE_ADDR: 109.241.184.20
REMOTE_PORT: 59570
SERVER_ADDR: 109.95.156.6
SERVER_NAME: bee-eco.pl
SERVER_ADMIN: admin@demonek.com
SERVER_PORT: 80
REQUEST_URI: /perch/core/settings/diagnostics/?extended
SCRIPT_FILENAME: /home/klient.dhosting.pl/beeeco/bee-eco.pl/public_html/perch/core/settings/diagnostics/index.php
QUERY_STRING: extended
SCRIPT_URI: https://bee-eco.pl/perch/core/settings/diagnostics/
SCRIPT_URL: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
SERVER_PROTOCOL: HTTP/1.1
SERVER_SOFTWARE: LiteSpeed
REQUEST_METHOD: GET
X-LSCACHE: 1
PHP_SELF: /perch/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1472482893.5966
REQUEST_TIME: 1472482893
argc: 1

Will be thankfull for any suggestions.

Drew McLellan

Drew McLellan 2638 points
Perch Support

I don't have any suggestions - it's something I'll need to replicate.

Hi Drew, I bet Maciej is talking about Order view in Admin. That one (addons/apps/perch_shop_orders_modes/order.detail.post.php) is hardcoded and doesn't show any additional fields apart orderDynamicFields :( I need to see Customer's phone number here, too :'(

Drew did You succeed to replicate this?

Drew McLellan

Drew McLellan 2638 points
Perch Support

I've not any success yet, but I'm working on Shop again today.

Hi Drew, any news? :)

For me this is quite important, because I had a first problem with this one. Customer bought something, but because phone number field does not work, I could not fill the phone number for delivery slip. Customer was not at home, and courier could not contact the customer to arrange new delivery time :(

Will be very thankfull If You will find some time to look at this.

I've also been trying to get a telephone number to submit through to the order admin. I was requesting it from the customer when entering a new address via: <?php perch_shop_edit_address_form?>

Then I added this to my order_address_form.html template for use with <?php perch_shop_order_address_form(); ?> when selecting billing / shipping addresses:

<perch:input type="hidden" id="telephone_shipping" value="<perch:address id="telephone" />" cart-property="telephone_shipping"  />

I thought that perhaps by submitting the value with a cart-property, the cart-property would apply to this address field even though it was an old address.

I didn't get anywhere with the above, but I was able to apply a cart-property to the telephone number which appears on the order admin under "Additional Information." It only worked when a new address was being submitted as a part of the order. Understandably "cart-property" is not saved to old addresses. Something like this could work for shops that don't want to offer customers a choice of saved addresses. In the add / edit address template:

<perch:input type="text" id="telephone" required="true" label="telephone" cart-property="telephone"/>

Thanks Olympia! It is working!