Forum

Thread tagged as: Problem, Error, Shop

No Selectable Shipping Method

Once the user clicks the checkout button on the cart page and fills in the passwordless account form, they are re-directed to the shipping method selection page where I call perch_shop_shipping_method_form();.

I have configured my Shipping Zone/Method according to the documentation, but the method is not available to select in the shipping method form, instead an empty option is shown.

Full diagnostic report

Perch: 3.0.8
Production mode: Production (100)
Installed apps: content (3.0.8), assets (3.0.8), categories (3.0.8), perch_blog (5.6.1), perch_events (1.9.5), perch_gallery (2.8.9), perch_shop_orders (1.2.4), perch_shop_products (1.2.4), perch_shop (1.2.4), perch_members (1.6.2)
DB driver: PDO
DB tables: perch3_blog_authors (0), perch3_blog_comments (0), perch3_blog_index (0), perch3_blog_posts (0), perch3_blog_posts_to_tags (0), perch3_blog_sections (1), perch3_blog_tags (0), perch3_blog_webmention_queue (0), perch3_blogs (1), perch3_categories (23), perch3_category_counts (0), perch3_category_sets (5), perch3_content_index (4863), perch3_content_items (448), perch3_content_regions (22), perch3_events (3), perch3_events_categories (2), perch3_events_to_categories (2), perch3_gallery_albums (2), perch3_gallery_image_versions (280), perch3_gallery_images (55), perch3_members (2), perch3_members_forms (1), perch3_members_member_tags (0), perch3_members_sessions (5), perch3_members_tags (0), perch3_menu_items (15), perch3_navigation (0), perch3_navigation_pages (0), perch3_page_templates (1), perch3_pages (16), perch3_resource_log (1356), perch3_resource_tags (0), perch3_resources (192), perch3_resources_to_tags (0), perch3_settings (43), perch3_shop_addresses (6), perch3_shop_admin_index (124), perch3_shop_brands (1), perch3_shop_cart (4), perch3_shop_cart_data (19), perch3_shop_cart_items (4), perch3_shop_countries (250), perch3_shop_currencies (152), perch3_shop_customers (2), perch3_shop_emails (1), perch3_shop_index (939), perch3_shop_option_values (2), perch3_shop_options (1), perch3_shop_order_items (0), perch3_shop_order_promotions (0), perch3_shop_order_statuses (9), perch3_shop_orders (0), perch3_shop_orders_meta (1), perch3_shop_product_files (0), perch3_shop_product_option_values (6), perch3_shop_product_options (3), perch3_shop_product_tags (0), perch3_shop_products (3), perch3_shop_promotions (0), perch3_shop_sales (0), perch3_shop_search (11), perch3_shop_shipping_zone_countries (1), perch3_shop_shipping_zones (1), perch3_shop_shippings (1), perch3_shop_tax_exhibits (0), perch3_shop_tax_group_rates (1), perch3_shop_tax_groups (1), perch3_shop_tax_locations (1), perch3_shop_tax_rates (1), perch3_shop_variants (4), perch3_user_passwords (0), perch3_user_privileges (80), perch3_user_role_privileges (15), perch3_user_roles (2), perch3_users (7)
Users: 7
App runtimes:
<?php
    $apps_list = [
    'perch_gallery',
    'perch_events',
    'perch_blog',
    'perch_members',
    'perch_shop',
    ];
Scheduled tasks for perch_blog: delete_spam_comments (1440 mins), publish_posts (1 mins), process_webmentions (1 mins)
Editor plug-ins:
H1: 8b8000697b666fc707c48d8cfe25da48
L1: 7e5f8580a45e1174c43656baade581da
F1: 0c66c2e1f82f9e0b7617b2cb8270f2c7
headerColour: #ffffff
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 0
content_collapseList: 1
lang: en-gb
installedAt: 3.0.8
update_3.0.8: done
latest_version:
on_sale_version:
headerScheme: light
dashboard: 0
hide_pwd_reset: 0
keyboardShortcuts: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
content_skip_region_list: 0
logoPath: /edit/resources/waa-logo-small.svg
perch_gallery_update: 2.8.5
perch_gallery_bucket_mode: dynamic
perch_gallery_bucket: default
perch_gallery_basicUpload: 0
perch_blog_site_name:
perch_blog_post_url: /news/post.php?s={postSlug}
perch_blog_slug_format: %Y-%m-%d-{postTitle}
perch_blog_akismet_key:
perch_blog_max_spam_days: 0
perch_events_detail_url: /events/detail.php?s={eventSlug}
perch_members_login_page: /members/login.php?r={returnURL}
perch_shop_price_tax_mode: inc
perch_shop_site_url: https://
perch_shop_invoice_number_format: Invoice%d
perch_blog_comment_notify: 0
perch_blog_webmention_tx: 0
perch_blog_webmention_rx: 0
perch_shop_update: 1.2.4
perch_shop_default_currency: 142
perch_shop_reporting_currency: 142
perch_events_update: 1.8
perch_blog_update: 5.6
perch_shop_product_url: /shop/product.php?s={slug}
perch_members_update: 1.4
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: db-user
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: waa-perch
PERCH_DB_PREFIX: perch3_
PERCH_TZ: UTC
PERCH_EMAIL_FROM: elliot@picturethiswebcenter.com
PERCH_EMAIL_FROM_NAME: Elliot Berg
PERCH_LOGINPATH: /edit
PERCH_PATH: E:\vhosts\washington-art-assoc\edit
PERCH_CORE: E:\vhosts\washington-art-assoc\edit\core
PERCH_RESFILEPATH: E:\vhosts\washington-art-assoc\edit\resources
PERCH_RESPATH: /edit/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_ASSET_VERSION: 5163d57ff611b3cf853b
PERCH_DEBUG:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: E:\vhosts\washington-art-assoc\edit\templates
PERCH_TEMPLATE_FILTERS:
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_XHTML_MARKUP:
PERCH_RWD: 1
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_PARANOID:
PERCH_FORCE_SECURE_COOKIES:
PERCH_DEFAULT_BUCKET: default
PERCH_TRANSLATION_ASSIST:
PERCH_PASSWORD_MIN_LENGTH: 6
PERCH_MAX_FAILED_LOGINS: 10
PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR
PERCH_VERIFY_UPLOADS:
PERCH_PRIV_ASSIST:
PERCH_CUSTOM_EDITOR_CONFIGS:
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
PERCH_SHOP_VERSION: 1.2.4
PERCH_APPS_EDITOR_PLUGIN: markitup
PERCH_APPS_EDITOR_MARKUP_LANGUAGE: markdown
Hosting settings

PHP: 5.6.14
Zend: 2.6.0
OS: WINNT
SAPI: apache2handler
Safe mode: not detected
MySQL client: mysqlnd 5.0.11-dev - 20120503 - $Id: 3c688b6bbc30d36af3ac34fdd4b7b5b787fe5555 $
MySQL server: 5.5.5-10.1.8-MariaDB
Free disk space: 168.77 GB
Extensions: Core, bcmath, calendar, ctype, date, ereg, filter, ftp, hash, iconv, json, mcrypt, SPL, odbc, pcre, Reflection, session, standard, mysqlnd, tokenizer, zip, zlib, libxml, dom, PDO, bz2, SimpleXML, wddx, xml, xmlreader, xmlwriter, apache2handler, openssl, curl, mbstring, exif, gd, gettext, mysql, mysqli, Phar, pdo_mysql, pdo_sqlite, soap, sockets, sqlite3, xmlrpc, xsl, fileinfo, mhash
GD: Yes
ImageMagick: No
PHP max upload size: 2M
PHP max form post size: 8M
PHP memory limit: 128M
Total max uploadable file size: 2M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: No
MIBDIRS: C:/xampp/php/extras/mibs
MYSQL_HOME: \xampp\mysql\bin
OPENSSL_CONF: C:/xampp/apache/bin/openssl.cnf
PHP_PEAR_SYSCONF_DIR: \xampp\php
PHPRC: \xampp\php
TMP: \xampp\tmp
HTTP_HOST: local.waa.com
HTTP_CONNECTION: keep-alive
HTTP_UPGRADE_INSECURE_REQUESTS: 1
HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
HTTP_REFERER: http://local.waa.com/edit/core/settings/diagnostics/
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8
HTTP_COOKIE: cmsa=1; p_m=ae138c7ee8f669694b1b9278e843ec6d86ddff23; PHPSESSID=rtm7lhv3pc4r7grvvs4d1fn6a1
PATH: C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\nodejs\;C:\Users\elliot\AppData\Local\.meteor;C:\xampp\php;C:\ProgramData\ComposerSetup\bin;C:\Ruby23-x64\bin;C:\Users\elliot\AppData\Local\Programs\Git\cmd;C:\Users\elliot\AppData\Local\.meteor\;C:\Users\elliot\AppData\Roaming\npm;C:\Users\elliot\AppData\Local\Microsoft\WindowsApps;C:\Users\elliot\AppData\Roaming\Composer\vendor\bin;
SystemRoot: C:\WINDOWS
COMSPEC: C:\WINDOWS\system32\cmd.exe
PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
WINDIR: C:\WINDOWS
SERVER_SIGNATURE: <address>Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.6.14 Server at local.waa.com Port 80</address>
SERVER_SOFTWARE: Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.6.14
SERVER_NAME: local.waa.com
SERVER_ADDR: 127.0.0.1
SERVER_PORT: 80
REMOTE_ADDR: 127.0.0.1
DOCUMENT_ROOT: E:/vhosts/washington-art-assoc/
REQUEST_SCHEME: http
CONTEXT_DOCUMENT_ROOT: E:/vhosts/washington-art-assoc/
SERVER_ADMIN: postmaster@localhost
SCRIPT_FILENAME: E:/vhosts/washington-art-assoc/edit/core/settings/diagnostics/index.php
REMOTE_PORT: 62957
GATEWAY_INTERFACE: CGI/1.1
SERVER_PROTOCOL: HTTP/1.1
REQUEST_METHOD: GET
QUERY_STRING: extended
REQUEST_URI: /edit/core/settings/diagnostics/?extended
SCRIPT_NAME: /edit/core/settings/diagnostics/index.php
PHP_SELF: /edit/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1505233136.294
REQUEST_TIME: 1505233136

Shipping Method select form page

<?php
require_once '../../edit/runtime.php';
$bodyClass='sho';
require_once '../../includes/header.php';
?>

<div class="pg-spacer">
  <div class="container">

    <div class="shop-header">
      <?php include_once '../../includes/shop-nav.php'; ?>

      <h1 class="pg-heading all-caps">Checkout</h1>
    </div>

    <?php perch_shop_shipping_method_form(); ?>

  </div>
</div>

<?php
require_once '../../includes/footer.php';
?>

Shipping method form template

<perch:form id="shipping_method" method="post" app="perch_shop">
    <h4>Shipping method</h4>

    <perch:error for="all" type="login">
        <p class="error">Sorry, there was a problem.</p>
    </perch:error>

    <div>
        <perch:label for="shipping">Method</perch:label>
        <perch:input type="select" options="<perch:shop id="shippings_list" />" id="shipping" required="true" placeholder="Please choose"  />
        <perch:error for="shipping" type="required">Required</perch:error>
    </div>
    <div>
        <perch:input type="submit" id="submit" value="OK!" />
        <perch:input type="hidden" id="r" />
    </div>

</perch:form>
Evan Dobos

Evan Dobos 0 points

  • 1 week ago
Drew McLellan

Drew McLellan 2339 points
Perch Support

If you view source on the field in the browser, what HTML output is shown?

How many shipping methods do you have defined, and how many should apply here?

So far it seems like we will only be selling digital products so I have one Zone, "Global" set as the default zone, and one shipping method, "Admissions/Fees/Digital Products", with no cost or weight constraints set. The method is meant to apply to all transactions.

Here's the html of the shipping method form,

<form id="form2_shipping_method" action="/shop/checkout/shipping.php" method="post">
  <h4>Shipping method</h4>

  <div>
    <label for="form2_shipping">Method</label>
      <select id="form2_shipping" name="shipping" placeholder="Please choose" required="required">
        <option disabled="disabled" selected="selected" value="">Please choose</option>
        <option selected="selected" value=""></option>
      </select>     
  </div>

  <div>
    <input id="form2_submit" name="submit" value="OK!" type="submit"><input type="hidden" name="cms-form" value="c2hpcHBpbmdfbWV0aG9kOnBlcmNoX3Nob3A6XHRlbXBsYXRlc1xzaG9wXHNoaXBwaW5nc1xtZXRob2RfZm9ybS5odG1sOjE1MDUzMTI3NTk=">
    <input id="form2_r" name="r" type="hidden">
  </div>

</form>
Drew McLellan

Drew McLellan 2339 points
Perch Support

Is it set as the default? If there's no shipping, you don't need to display the field. It's not required.

Ok I figured out the problem!

The products and their variants were not set to require shipping, my mistake on that part.

Is there a way I can check if an order has any products that require shipping? I would like to be able to present the shipping method form in that case.

Drew McLellan

Drew McLellan 2339 points
Perch Support

I think you can use perch_shop_value_of_shipped_goods() to get the value of the shippable items in the cart.

The perch_shop_value_of_shipped_goods() method always returns 0 whether the products require shipping or not.

Drew McLellan

Drew McLellan 2339 points
Perch Support

Ok, what can you tell me?