Forum

Thread tagged as: Error, Shop

Shop promotions not applying in confirmation emails

Hi,

Using the Perch shop I have noticed that the promotions have not been applied in the order status emails sent out to customers, this seems to be affecting the comparison for showing the discount total and the grand_total_formatted template variable.

The code in the email template uses the same structure as the cart total displayed at the checkout stage:

cart.html

                    <perch:if id="total_discounts" match="gt" value="0.00">
                        <dd class="receipt__label">
                            Discount
                        </dd>
                        <dt class="receipt__cost">
                            - <perch:shop id="total_discounts_formatted" />
                        </dt>
                    </perch:if>

                    <dd class="receipt__label">
                        Tax
                    </dd>
                    <dt class="receipt__cost">
                        <perch:shop id="total_tax_formatted" />
                    </dt>

                    <dd class="receipt__label receipt__total">Total</dd>
                    <dt class="receipt__cost receipt__total">
                        <perch:shop id="grand_total_formatted" />
                    </dt>

order_paid.html (email)

<perch:if id="total_discounts" match="gt" value="0.00">
                                                <tr style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 14px;">
                                                    <td style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; padding: 8px 0; border-top: #D6EFEC 1px solid;">
                                                        Discount
                                                    </td>
                                                    <td class="alignright" style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; text-align: right; padding: 8px 0; border-top: #D6EFEC 1px solid;">
                                                        - <perch:shop id="total_discounts_formatted" type="hidden" />
                                                    </td>
                                                </tr>
                                            </perch:if>
                                            <tr style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 14px;">
                                                <td style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; padding: 8px 0; border-top: #D6EFEC 1px solid;">
                                                    Tax
                                                </td>
                                                <td class="alignright" style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; text-align: right; padding: 8px 0; border-top: #D6EFEC 1px solid;">
                                                    <perch:shop id="total_tax_formatted" type="hidden" />
                                                </td>
                                            </tr>
                                            <tr class="total" style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 14px;">
                                                <td class="alignright" width="80%" style="margin: 0; box-sizing: border-box; font-size: 14px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; vertical-align: top; text-align: right; padding: 8px 0; border-top: 2px solid #35AD9F; border-bottom: 2px solid #35AD9F; font-weight: 700; color: #35AD9F;">Total</td>
                                                <td class="alignright" style="margin: 0; box-sizing: border-box; font-size: 14px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; vertical-align: top; text-align: right; padding: 8px 0; border-top: 2px solid #35AD9F; border-bottom: 2px solid #35AD9F; font-weight: 700; color: #35AD9F;">
                                                    <perch:shop id="grand_total_formatted" type="hidden" />
                                                </td>
                                            </tr>

The promotion is set up to offer free shipping. The total should be displayed as £10.00 but is output as £12.95 in the email. Using the latest shop 1.0.10.

The shop is currently live and obviously this isn't ideal for customers not to be shown applied discounts.

Diagnostics:

Diagnostics report
PERCH INFORMATION

Perch Runway: 2.8.32
Production mode: Production (100)
Installed apps: content (2.8.32), assets (2.8.32), categories (2.8.32), root_analytics (1.0.1), perch_forms (1.8.3), perch_shop_orders (1.0.10), perch_shop_products (1.0.10), perch_shop (1.0.10), perch_members (1.5), root_artithmetic (1), root_breadcrumbs (1.0), perch_mailchimp (3.0.1)
DB driver: PDO
DB tables: perch2_backup_plans (0), perch2_backup_resources (0), perch2_backup_runs (0), perch2_categories (29), perch2_category_counts (0), perch2_category_sets (4), perch2_collection_index (0), perch2_collection_items (0), perch2_collection_revisions (0), perch2_collections (0), perch2_content_index (2013), perch2_content_items (252), perch2_content_regions (45), perch2_forms (2), perch2_forms_responses (1), perch2_mailchimp_campaigns (0), perch2_mailchimp_imports (0), perch2_mailchimp_lists (1), perch2_mailchimp_subscribers (1), perch2_mailchimp_subscriptions (1), perch2_mailchimp_webhooks (1), perch2_members (1), perch2_members_forms (1), perch2_members_member_tags (0), perch2_members_sessions (1), perch2_members_tags (0), perch2_navigation (4), perch2_navigation_pages (19), perch2_page_routes (6), perch2_page_templates (28), perch2_pages (32), perch2_resource_log (2011), perch2_resource_tags (8), perch2_resources (1750), perch2_resources_to_tags (64), perch2_root_analytics_cache (3), perch2_scheduled_tasks (11), perch2_settings (37), perch2_shop_addresses (8), perch2_shop_admin_index (126), perch2_shop_brands (6), perch2_shop_cart (2577), perch2_shop_cart_data (36), perch2_shop_cart_items (11), perch2_shop_countries (250), perch2_shop_currencies (152), perch2_shop_customers (1), perch2_shop_emails (2), perch2_shop_index (23150), perch2_shop_option_values (20), perch2_shop_options (1), perch2_shop_order_items (3), perch2_shop_order_promotions (0), perch2_shop_order_statuses (9), perch2_shop_orders (3), perch2_shop_orders_meta (0), perch2_shop_product_files (0), perch2_shop_product_option_values (541), perch2_shop_product_options (125), perch2_shop_product_tags (0), perch2_shop_products (688), perch2_shop_promotions (0), perch2_shop_search (285), perch2_shop_shipping_zone_countries (1), perch2_shop_shipping_zones (2), perch2_shop_shippings (4), perch2_shop_tax_exhibits (6), perch2_shop_tax_group_rates (1), perch2_shop_tax_groups (1), perch2_shop_tax_locations (1), perch2_shop_tax_rates (1), perch2_shop_variants (541), perch2_user_passwords (1), perch2_user_privileges (74), perch2_user_role_privileges (16), perch2_user_roles (2), perch2_users (1)
Users: 1
App runtimes:
<?php
$apps_list = [
    'content',
    'categories',
    'perch_forms',
    'perch_members',
    'perch_shop',
    'perch_mailchimp',
    'root_breadcrumbs',
    'root_arithmetic',
];
Scheduled tasks for perch_mailchimp: import_data (1 mins)
Scheduled tasks for root_analytics: root_analytics_fetch_comparisons (1440 mins)
Editor plug-ins: markitup, redactor
H1: 08bfd0c44a6a60ae38bf35a9268e0a07
L1: 48729459af5dd8f62aba38d76e6c3aa1
F1: 2edba60ed1f613d6dd804feb202456a2
headerColour: #23AE9F
content_singlePageEdit: 1
helpURL: mailto:design@rootstudio.co.uk
siteURL: /
hideBranding: 1
content_collapseList: 1
lang: en-gb
update_2.8.31: done
perch_shop_update: 1.0.10
headerScheme: dark
update_runway_2.8.31: done
latest_version: 2.8.15
on_sale_version: 2.8.32
dashboard: 1
hide_pwd_reset: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
logoPath: /admin/resources/little-puds-and-co-logo-with-stars.png
perch_members_login_page: /account?r={returnURL}
perch_shop_price_tax_mode: exc
perch_shop_trade_price_tax_mode: exc
perch_shop_site_url: 
perch_shop_product_url: /shop/product/{slug}
perch_shop_default_currency: 47
perch_shop_reporting_currency: 47
perch_shop_invoice_number_format: Order #%d
perch_members_update: 1.4
update_runway_2.8.32: done
perch_mailchimp_api_key: 
perch_mailchimp_campaign_url: /mailchimp/campaign/{campaignSlug}
perch_mailchimp_secret: 20e37ed
root_analytics_namespace: Little Puds & Co
root_analytics_view_id: 
root_analytics_credentials_json: 
root_analytics_time_period: 90
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_SITEPATH: /home/suzanne/public_html
PERCH_DB_USERNAME: suzanne_perchu
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: suzanne_perch_shop
PERCH_DB_PREFIX: perch2_
PERCH_PRODUCTION_MODE: 100
PERCH_DEBUG:
PERCH_EMAIL_FROM: james@rootstudio.co.uk
PERCH_EMAIL_FROM_NAME: Root Studio
PERCH_LOGINPATH: /admin
PERCH_PATH: /home/suzanne/public_html/admin
PERCH_CORE: /home/suzanne/public_html/admin/core
PERCH_RESFILEPATH: /home/suzanne/public_html/admin/resources
PERCH_RESPATH: /admin/resources
PERCH_HTML5: 1
PERCH_TZ: UTC
PERCH_RUNWAY: 1
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_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /home/suzanne/public_html/admin/templates
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
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.10
PERCH_APPS_EDITOR_PLUGIN: markitup
PERCH_APPS_EDITOR_MARKUP_LANGUAGE: textile
HOSTING SETTINGS

PHP: 5.6.26
Zend: 2.6.0
OS: Linux
SAPI: cgi-fcgi
Safe mode: not detected
MySQL client: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $
MySQL server: 5.6.34
Free disk space: 80.76 GB
Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bcmath, calendar, ctype, curl, dom, fileinfo, filter, ftp, gd, hash, iconv, SPL, intl, json, mbstring, mcrypt, session, standard, mysqlnd, Phar, posix, Reflection, mysql, SimpleXML, sockets, imap, tokenizer, xml, xmlreader, xmlwriter, cgi-fcgi, PDO, pdo_sqlite, imagick, pdo_mysql
GD: Yes
ImageMagick: Yes
PHP max upload size: 200M
PHP max form post size: 12M
PHP memory limit: 256M
Total max uploadable file size: 12M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: Yes
CONTEXT_DOCUMENT_ROOT: /home/suzanne/public_html
DOCUMENT_ROOT: /home/suzanne/public_html
GATEWAY_INTERFACE: CGI/1.1
HTTPS: on
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: en-gb
HTTP_CONNECTION: keep-alive
HTTP_COOKIE: _ga=GA1.3.875184230.1479730398; PHPSESSID=64381520a7e050bd454cbf14252dff6d; cpsession=suzanne%3aFd4M1qUYgGPv7tJr%2ccd6028ead345fbfbf92e531688a7fa02; timezone=Europe/London; cmsa=1; cmssb=0; p_m=856c543c74da4490b1c4c0441724ca47c9395c7d; cookieconsent_dismissed=yes
HTTP_HOST: 
HTTP_REFERER: 
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12) AppleWebKit/602.1.50 (KHTML, like Gecko) Version/10.0 Safari/602.1.50
PATH: /bin:/usr/bin
QUERY_STRING: extended
REDIRECT_STATUS: 200
REMOTE_ADDR: 81.130.131.129
REMOTE_PORT: 51476
REQUEST_METHOD: GET
REQUEST_SCHEME: https
REQUEST_URI: /admin/core/settings/diagnostics/?extended
SCRIPT_FILENAME: /home/suzanne/public_html/admin/core/settings/diagnostics/index.php
SCRIPT_NAME: /admin/core/settings/diagnostics/index.php
SERVER_ADDR: 162.251.83.56
SERVER_ADMIN: 
SERVER_NAME: 
SERVER_PORT: 443
SERVER_PROTOCOL: HTTP/1.1
SERVER_SOFTWARE: Apache
SSL_TLS_SNI: 
UNIQUE_ID: 
PHP_SELF: /admin/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1479745901.66
REQUEST_TIME: 1479745901
argc: 1
James Wigger

James Wigger 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Are the discount values shown in the template?

The full output of <perch:showall/> shows:


ID Value perch_page_path /basket/pay http_host little-puds.local _status paid orderID 2 orderStatus paid orderInvoiceNumber Order #17 orderGateway stripe orderTotal 10.00 orderItemsSubtotal 10.00 orderItemsTax 0.00 orderItemsTotal 10 orderShippingSubtotal 2.95 orderShippingDiscounts 2.95 orderShippingTax 0.00 orderShippingTaxDiscounts 0.00 orderShippingTotal 2.95 orderDiscountsTotal 2.95 orderTaxDiscountsTotal 0.00 orderSubtotal 7.05 orderTaxTotal 0.00 orderItemsRefunded 0 orderTaxRefunded 0 orderShippingRefunded 0 orderTotalRefunded 0 currencyID 47 orderShippingWeight 0.00 customerID 4 shippingID 1 orderShippingTaxRate 0.00 orderShippingAddress 22 orderBillingAddress 22 orderGatewayRef ch_19IymHJoHXCXLbKYpfdShULV orderPricing standard orderDynamicFields {"status":"paid"} orderCreated 2016-11-23 11:19:00 orderUpdated 2016-11-23 11:19:01 perch__status paid statusID 3 statusKey paid statusTitle Paid statusEditable 0 statusIndex 100 statusDynamicFields [] statusCreated 0000-00-00 00:00:00 statusUpdated 2016-02-26 12:42:00 statusActive 1 name Order Paid subject Thank you for your order sender_name Little Puds & Co sender_email noreply@littlepudsandco.co.uk enabled 1 logo /admin/resources/emails/little-puds-co.png intro Thank you for placing your order emailID 1 emailTitle Order Paid emailSlug order_paid emailFor customer_bcc emailRecipient littlepudsandco@gmail.com emailStatus 3 emailTemplate order_paid.html emailActive 1 emailDynamicFields {"name":"Order Paid","subject":"Thank you for your order","sender_name":"Little Puds &{...} emailCreated 0000-00-00 00:00:00 emailUpdated 2016-10-14 09:50:33 perch_name Order Paid perch_subject Thank you for your order perch_sender_name Little Puds & Co perch_sender_email noreply@littlepudsandco.co.uk perch_enabled 1 perch_logo /admin/resources/emails/little-puds-co.png perch_intro Thank you for placing your order first_name James last_name Wigger email james@rootstudio.co.uk customerFirstName James customerLastName Wigger customerEmail james@rootstudio.co.uk customerDynamicFields {"first_name":"James","last_name":"Wigger","email":"james@rootstudio.co.uk"} customerCreated 2016-11-23 09:37:55 customerUpdated 2016-11-23 11:18:39 memberID 5 customerTaxIDStatus unchecked perch_first_name James perch_last_name Wigger perch_email james@rootstudio.co.uk memberAuthType native memberAuthID 5 memberEmail james@rootstudio.co.uk memberPassword $P$BqY83JURYZWyMqiXyBdicWDBG/eU5Z0 memberStatus active memberCreated 2016-11-23 10:40:07 shipping_first_name James shipping_last_name Wigger shipping_address_1 8 shipping_address_2 cecil street shipping_postcode ln1 3au shipping_country 236 shipping_company false shipping_city lincoln shipping_customer 4 shipping_phone false shipping_county shipping_instructions false shipping_addressID 22 shipping_addressTitle 11-23-nov-2016 shipping_addressSlug 11-23-nov-2016 shipping_addressFirstName James shipping_addressLastName Wigger shipping_addressCompany shipping_addressLine1 8 shipping_addressDynamicFields {"first_name":"James","last_name":"Wigger","address_1":"8","address_2":"cecil{...} shipping_addressCreated 2016-11-23 09:39:37 shipping_addressUpdated 2016-11-23 11:15:06 shipping_customerID 4 shipping_countryID 236 shipping_orderID 2 shipping_country_name United Kingdom billing_first_name James billing_last_name Wigger billing_address_1 8 billing_address_2 cecil street billing_postcode ln1 3au billing_country 236 billing_company false billing_city lincoln billing_customer 4 billing_phone false billing_county billing_instructions false billing_addressID 22 billing_addressTitle 11-23-nov-2016 billing_addressSlug 11-23-nov-2016 billing_addressFirstName James billing_addressLastName Wigger billing_addressCompany billing_addressLine1 8 billing_addressDynamicFields {"first_name":"James","last_name":"Wigger","address_1":"8","address_2":"cecil{...} billing_addressCreated 2016-11-23 09:39:37 billing_addressUpdated 2016-11-23 11:15:06 billing_customerID 4 billing_countryID 236 billing_orderID 2 billing_country_name United Kingdom items Array ( [0] => Array ( [_title] => Christmas Pudding Leggings [_variant_opts] => 0-6 Months|193,6-12 Months|194,1-2 Years|195 [age_size] => Array ( [0] => 55 [1] => 56 ) [brand] => 2 [catalog_only] => 0 [category] => Array ( [0] => 25 ) [depth] => [description] => Array ( [_flang] => html [raw] => These gorgeous Blade & Rose Christmas Pudding leggings are proving incredibly popular and we’re delighted to have them in, in time for the festive season this year. They make a gorgeous gift or a perfect festive treat for your own little pudding. Fantastic quality, super comfy and downright adorable, we hope you love them as much as we do! [processed] => These gorgeous Blade & Rose Christmas Pudding leggings are proving incredibly popular and we’re delighted to have them in, in time for the festive season this year. They make a gorgeous gift or a perfect festive treat for your own little pudding. Fantastic quality, super comfy and downright adorable, we hope you love them as much as we do! ) [discount] => 0.00 [favourite] => 1 [has_variants] => 1 [height] => [identifier] => 3 [itemDiscount] => 0.00 [itemDynamicFields] => [itemID] => 3 [itemPrice] => 10.00 [itemQty] => 1 [itemTax] => 0.00 [itemTaxDiscount] => 0.00 [itemTaxRate] => 0.00 [itemTotal] => 10.00 [itemType] => product [max_in_cart] => [meta_description] => Array ( [_flang] => plain [raw] => These gorgeous Blade & Rose Christmas Pudding leggings are proving incredibly popular and we’re delighted to have them in, making a gorgeous gift or a festive treat for your own little pudding. [processed] => These gorgeous Blade & Rose Christmas Pudding leggings are proving incredibly popular and we’re delighted to have them in, making a gorgeous gift or a festive treat for your own little pudding. ) [on_sale] => [options] => Array ( [0] => Array ( [title] => Size [precendence] => 1 [optionID] => 1 [optionTitle] => Size [optionPrecendence] => 1 [optionDynamicFields] => {"title":"Size","precendence":"1"} [optionCreated] => 2016-09-23 10:27:13 [optionUpdated] => 2016-10-11 11:56:00 [optionDeleted] => [perch_title] => Size [perch_precendence] => 1 [options] => Array ( [0] => Array ( [id] => 1 [title] => Newborn [skucode] => NWB ) [1] => Array ( [id] => 3 [title] => 0-3 Months [skucode] => 0-3M ) [2] => Array ( [id] => 16 [title] => 0-6 Months [skucode] => 0-6M ) [3] => Array ( [id] => 19 [title] => 0-12 Months [skucode] => 0-12M ) [4] => Array ( [id] => 4 [title] => 3-6 Months [skucode] => 3-6M ) [5] => Array ( [id] => 5 [title] => 6-9 Months [skucode] => 6-9M ) [6] => Array ( [id] => 6 [title] => 6-12 Months [skucode] => 6-12M ) [7] => Array ( [id] => 7 [title] => 9-12 Months [skucode] => 9-12M ) [8] => Array ( [id] => 8 [title] => 12-18 Months [skucode] => 12-18M ) [9] => Array ( [id] => 9 [title] => 12-24 Months [skucode] => 12-24M ) [10] => Array ( [id] => 10 [title] => 18-24 Months [skucode] => 18-24M ) [11] => Array ( [id] => 11 [title] => 1-2 Years [skucode] => 1-2Y ) [12] => Array ( [id] => 20 [title] => 1-3 Years [skucode] => 1-3Y ) [13] => Array ( [id] => 12 [title] => 2-3 Years [skucode] => 2-3Y ) [14] => Array ( [id] => 18 [title] => 2-4 Years [skucode] => 2-4Y ) [15] => Array ( [id] => 17 [title] => 2-5 Years [skucode] => 2-5Y ) [16] => Array ( [id] => 13 [title] => 3-4 Years [skucode] => 3-4Y ) [17] => Array ( [id] => 14 [title] => 4-5 Years [skucode] => 4-5Y ) [18] => Array ( [id] => 15 [title] => 6-7 Years [skucode] => 6-7Y ) ) [productvalues] => Array ( [0] => Array ( [prodoptID] => 139 [optionID] => 1 [valueID] => 16 [optionTitle] => Size [valueTitle] => 0-6 Months [valueSKUCode] => 0-6M [valueOrder] => 3 [valueDynamicFields] => {} [valueCreated] => 2016-10-07 13:05:20 [valueUpdated] => 2016-10-11 11:56:15 [valueDeleted] => ) [1] => Array ( [prodoptID] => 140 [optionID] => 1 [valueID] => 6 [optionTitle] => Size [valueTitle] => 6-12 Months [valueSKUCode] => 6-12M [valueOrder] => 7 [valueDynamicFields] => {} [valueCreated] => 2016-09-23 10:27:13 [valueUpdated] => 2016-10-11 11:56:15 [valueDeleted] => ) [2] => Array ( [prodoptID] => 141 [optionID] => 1 [valueID] => 11 [optionTitle] => Size [valueTitle] => 1-2 Years [valueSKUCode] => 1-2Y [valueOrder] => 12 [valueDynamicFields] => {} [valueCreated] => 2016-09-23 10:27:13 [valueUpdated] => 2016-10-11 11:56:15 [valueDeleted] => ) ) ) ) [orderID] => 2 [parentID] => 192 [perch__title] => Christmas Pudding Leggings [perch_age_size] => Array ( [0] => 55 [1] => 56 ) [perch_brand] => 2 [perch_catalog_only] => 0 [perch_category] => Array ( [0] => 25 ) [perch_depth] => [perch_description] => Array ( [_flang] => html [raw] => These gorgeous Blade & Rose Christmas Pudding leggings are proving incredibly popular and we’re delighted to have them in, in time for the festive season this year. They make a gorgeous gift or a perfect festive treat for your own little pudding. Fantastic quality, super comfy and downright adorable, we hope you love them as much as we do! [processed] => These gorgeous Blade & Rose Christmas Pudding leggings are proving incredibly popular and we’re delighted to have them in, in time for the festive season this year. They make a gorgeous gift or a perfect festive treat for your own little pudding. Fantastic quality, super comfy and downright adorable, we hope you love them as much as we do! ) [perch_favourite] => 1 [perch_height] => [perch_max_in_cart] => [perch_meta_description] => Array ( [_flang] => plain [raw] => These gorgeous Blade & Rose Christmas Pudding leggings are proving incredibly popular and we’re delighted to have them in, making a gorgeous gift or a festive treat for your own little pudding. [processed] => These gorgeous Blade & Rose Christmas Pudding leggings are proving incredibly popular and we’re delighted to have them in, making a gorgeous gift or a festive treat for your own little pudding. ) [perch_on_sale] => [perch_price] => Array ( [47] => 10.00 [_default] => 10.00 ) [perch_product_image_thumb] => Array ( [assetID] => 609 [title] => Christmas Pudding Leggings [_default] => /admin/resources/shop/christmas-pudding-leggings-.jpg [bucket] => shop [path] => christmas-pudding-leggings-.jpg [size] => 74748 [w] => 1024 [h] => 682 [mime] => image/jpeg [sizes] => Array ( [thumb] => Array ( [w] => 150 [h] => 99 [target_w] => 150 [target_h] => 150 [density] => 2 [path] => christmas-pudding-leggings--thumb@2x.jpg [size] => 14643 [mime] => [assetID] => 610 ) [w200h200c1] => Array ( [w] => 200 [h] => 200 [target_w] => 200 [target_h] => 200 [crop] => true [density] => 1 [path] => christmas-pudding-leggings--w200h200.jpg [size] => 10900 [mime] => [assetID] => 611 ) [w512h512c1] => Array ( [w] => 512 [h] => 512 [target_w] => 512 [target_h] => 512 [crop] => true [density] => 1 [path] => christmas-pudding-leggings--w512h512.jpg [size] => 46577 [mime] => [assetID] => 612 ) [w58h58c1] => Array ( [w] => 58 [h] => 58 [target_w] => 58 [target_h] => 58 [crop] => true [density] => 1 [path] => christmas-pudding-leggings--w58h58.jpg [size] => 2181 [mime] => [assetID] => 613 ) ) ) [perch_product_image_thumb_alt] => [perch_product_images] => Array ( [0] => Array ( [product_image_main] => Array ( [assetID] => 609 [title] => Christmas Pudding Leggings [_default] => /admin/resources/shop/christmas-pudding-leggings-.jpg [bucket] => shop [path] => christmas-pudding-leggings-.jpg [size] => 74748 [w] => 1024 [h] => 682 [mime] => image/jpeg [sizes] => Array ( [thumb] => Array ( [w] => 150 [h] => 99 [target_w] => 150 [target_h] => 150 [density] => 2 [path] => christmas-pudding-leggings--thumb@2x.jpg [size] => 14643 [mime] => [assetID] => 610 ) [w415h415c1] => Array ( [w] => 415 [h] => 415 [target_w] => 415 [target_h] => 415 [crop] => true [density] => 1 [path] => christmas-pudding-leggings--w415h415.jpg [size] => 33383 [mime] => [assetID] => 614 ) [w1024h1024c0] => Array ( [w] => 1024 [h] => 682 [target_w] => 1024 [target_h] => 1024 [crop] => [density] => 1 [path] => christmas-pudding-leggings--w1024h1024.jpg [size] => 74748 [mime] => [assetID] => 615 ) ) ) [product_image_caption] => ) ) [perch_range] => Array ( [0] => 6 [1] => 7 ) [perch_requires_shipping] => 1 [perch_sale_price] => Array ( [47] => [_default] => ) [perch_slug] => christmas-pudding-leggings-br0033 [perch_special] => [perch_status] => [perch_stock_location] => 0 [perch_stock_status] => 0 [perch_tax_group] => 1 [perch_trade_price] => Array ( [47] => [_default] => ) [perch_weight] => [perch_width] => [price] => Array ( [47] => 10.00 [_default] => 10.00 ) [price_with_tax] => 10.00 [price_with_tax_formatted] => £10.00 [price_without_tax] => 10.00 [price_without_tax_formatted] => £10.00 [productCreated] => 2016-10-10 10:52:23 [productDeleted] => [productDynamicFields] => {"stock_location":"0","status":false} [productHasVariants] => 0 [productID] => 193 [productOrder] => 1 [productSlug] => [productStatus] => 0 [productStockOnParent] => 0 [productTemplate] => product.html [productUpdated] => 2016-11-22 09:08:38 [productVariantDesc] => 0-6 Months [product_image_thumb] => Array ( [assetID] => 609 [title] => Christmas Pudding Leggings [_default] => /admin/resources/shop/christmas-pudding-leggings-.jpg [bucket] => shop [path] => christmas-pudding-leggings-.jpg [size] => 74748 [w] => 1024 [h] => 682 [mime] => image/jpeg [sizes] => Array ( [thumb] => Array ( [w] => 150 [h] => 99 [target_w] => 150 [target_h] => 150 [density] => 2 [path] => christmas-pudding-leggings--thumb@2x.jpg [size] => 14643 [mime] => [assetID] => 610 ) [w200h200c1] => Array ( [w] => 200 [h] => 200 [target_w] => 200 [target_h] => 200 [crop] => true [density] => 1 [path] => christmas-pudding-leggings--w200h200.jpg [size] => 10900 [mime] => [assetID] => 611 ) [w512h512c1] => Array ( [w] => 512 [h] => 512 [target_w] => 512 [target_h] => 512 [crop] => true [density] => 1 [path] => christmas-pudding-leggings--w512h512.jpg [size] => 46577 [mime] => [assetID] => 612 ) [w58h58c1] => Array ( [w] => 58 [h] => 58 [target_w] => 58 [target_h] => 58 [crop] => true [density] => 1 [path] => christmas-pudding-leggings--w58h58.jpg [size] => 2181 [mime] => [assetID] => 613 ) ) ) [product_image_thumb_alt] => [product_images] => Array ( [0] => Array ( [product_image_main] => Array ( [assetID] => 609 [title] => Christmas Pudding Leggings [_default] => /admin/resources/shop/christmas-pudding-leggings-.jpg [bucket] => shop [path] => christmas-pudding-leggings-.jpg [size] => 74748 [w] => 1024 [h] => 682 [mime] => image/jpeg [sizes] => Array ( [thumb] => Array ( [w] => 150 [h] => 99 [target_w] => 150 [target_h] => 150 [density] => 2 [path] => christmas-pudding-leggings--thumb@2x.jpg [size] => 14643 [mime] => [assetID] => 610 ) [w415h415c1] => Array ( [w] => 415 [h] => 415 [target_w] => 415 [target_h] => 415 [crop] => true [density] => 1 [path] => christmas-pudding-leggings--w415h415.jpg [size] => 33383 [mime] => [assetID] => 614 ) [w1024h1024c0] => Array ( [w] => 1024 [h] => 682 [target_w] => 1024 [target_h] => 1024 [crop] => [density] => 1 [path] => christmas-pudding-leggings--w1024h1024.jpg [size] => 74748 [mime] => [assetID] => 615 ) ) ) [product_image_caption] => ) ) [quantity] => 1 [range] => Array ( [0] => 6 [1] => 7 ) [requires_shipping] => 1 [sale_price] => Array ( [47] => [_default] => ) [shippingID] => [sku] => BR0033-0-6M [slug] => christmas-pudding-leggings-br0033 [special] => [status] => [stock_level] => [stock_location] => 0 [stock_status] => 0 [tax] => 0.00 [tax_discount] => 0.00 [tax_formatted] => £0.00 [tax_group] => 1 [tax_rate] => 0.00 [title] => Christmas Pudding Leggings [total_tax] => 0.00 [total_tax_formatted] => £0.00 [total_with_tax] => 10.00 [total_with_tax_formatted] => £10.00 [total_without_tax] => 10.00 [total_without_tax_formatted] => £10.00 [trade_price] => Array ( [47] => [_default] => ) [variant_desc] => 0-6 Months [weight] => [width] => ) ) shipping_method Standard shipping true shipping_without_tax 2.95 shipping_without_tax_formatted £2.95 shipping_tax 0.00 shipping_tax_formatted £0.00 shipping_tax_rate 0.00 shipping_with_tax 2.95 shipping_with_tax_formatted £2.95 shipping_id 1 total_items 10.00 total_items_formatted £10.00 total_items_tax 0.00 total_items_tax_formatted £0.00 total_shipping 2.95 total_shipping_formatted £2.95 total_shipping_tax 0.00 total_shipping_tax_formatted £0.00 total_items_with_shipping 12.95 total_items_with_shipping_formatted £12.95 total_tax 0.00 total_tax_formatted £0.00 total_items_discount 0.00 total_items_discount_formatted £0.00 total_items_tax_discount 0.00 total_items_tax_discount_formatted £0.00 total_items_discounted 10.00 total_items_discounted_formatted £10.00 total_items_discounted_with_tax 10.00 total_items_discounted_with_tax_formatted £10.00 total_shipping_discount 0.00 total_shipping_discount_formatted £0.00 total_shipping_tax_discount 0.00 total_shipping_tax_discount_formatted £0.00 total_tax_discount 0.00 total_tax_discount_formatted £0.00 total_discounts 0.00 total_discounts_formatted £0.00 total_discounts_with_tax 0.00 total_discounts_with_tax_formatted £0.00 grand_total 12.95 grand_total_formatted £12.95 shipping_weight 0.00 tax_rate_totals Array ( [0] => Array ( [exchange_rate] => unknown [tax_rate] => 0.00 [tax_rate_formatted] => 0 % [total_tax] => 0.00 [total_tax_formatted] => £0.00 [total_value] => 12.95 [total_value_formatted] => £12.95 [reporting_tax] => 0.00 [reporting_tax_formatted] => £0.00 [reporting_value] => 12.95 [reporting_value_formatted] => £12.95 ) ) currencyCode GBP currencyNumber 826 currencyTitle Pound sterling currencySymbol £ currencySymbolPosition before currencyDecimals 2 currencyDecimalSeparator . currencyThousandsSeparator , currencyRate 1.0000 currencyActive 1 currencyIsCommon 1 invoice_number Order #17 perch_item_first true perch_item_last true perch_item_zero_index 0 perch_item_index 1 perch_item_rev_index 1 perch_item_rev_zero_index 0 perch_item_odd perch_item_count 1 perch_namespace perch:shop

I can see there are order shipping discounts here:

orderShippingSubtotal   2.95
orderShippingDiscounts  2.95
orderShippingTax    0.00
orderShippingTaxDiscounts   0.00
orderShippingTotal  2.95
orderDiscountsTotal 2.95

Though grand total is still outputting the wrong value:

grand_total 12.95
grand_total_formatted   £12.95

and the overall discounts are not counted:

total_discounts 0.00
total_discounts_formatted   £0.00
total_discounts_with_tax    0.00
total_discounts_with_tax_formatted  £0.00

Sorry to bump, customers are currently placing orders and a few have queried the lack of discount on the emails they are receiving - is there anything we can do to quickly patch this our side?

Drew McLellan

Drew McLellan 2638 points
Perch Support

That's interesting. And this was showing the correct values before going live?

Hi Drew,

I'd not tested this particular promotion configuration prior to going live as this is something the client has added post-launch. Previously I had discounted product price only and the emails did display correctly, so I think it may only be affecting 'Free Shipping' promotions. The <perch:showall/> logs in my previous post were taken from my development environment but the issue is affecting both.

I'll post a screenshot of the current setup to see if you can replicate what's happening: https://www.dropbox.com/s/agmvbddrvp41z3p/Screen%20Shot%202016-11-24%20at%2009.12.04.png?dl=0

Edit: also, thanks for the replies - the forum seems pretty busy at the moment so your help is very much appreciated!

Drew McLellan

Drew McLellan 2638 points
Perch Support

I'll see if I can reproduce it.

Hi Drew,

Have you been able to reproduce this issue?

Drew McLellan

Drew McLellan 2638 points
Perch Support

No, I've not had a chance to look at it yet.

Ok - thanks for the reply.