Navigation Menu

Skip to content

Commit

Permalink
Added mailcatcher and checkout temporary fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
vlunov-spryker committed Nov 4, 2018
1 parent b21a0b1 commit 0bbb3e4
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -52,6 +52,7 @@ install:
- chmod -R a+x config/Shared/ci/travis/
- composer install --optimize-autoloader --no-interaction
- config/Shared/ci/travis/install_elasticsearch.sh
- config/Shared/ci/travis/install_mailcatcher.sh

before_script:
- nvm install 8
Expand Down
6 changes: 6 additions & 0 deletions config/Shared/ci/travis/config_ci.php
Expand Up @@ -15,6 +15,7 @@
use Spryker\Shared\Newsletter\NewsletterConstants;
use Spryker\Shared\ProductManagement\ProductManagementConstants;
use Spryker\Shared\Propel\PropelConstants;
use Spryker\Shared\Quote\QuoteConstants;
use Spryker\Shared\RabbitMq\RabbitMqEnv;
use Spryker\Shared\Search\SearchConstants;
use Spryker\Shared\Session\SessionConstants;
Expand Down Expand Up @@ -162,3 +163,8 @@
$config[ApplicationConstants::HOST_ZED],
'localhost',
];

// ---------- Guest cart
$config[QuoteConstants::GUEST_QUOTE_LIFETIME] = 'P01M';

$config[MailConstants::SMTP_PORT] = 1025;
6 changes: 6 additions & 0 deletions config/Shared/ci/travis/install_mailcatcher.sh
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -e

gem install mailcatcher
mailcatcher
@@ -0,0 +1,55 @@
{% extends model('component') %}

{% define config = {
name: 'summary-item',
tag: 'div'
} %}

{% define data = {
name: required,
quantity: required,
price: 0,
options: [],
bundleItems: [],
quantitySalesUnit: null,
amountSalesUnit: null,
amount: 0
} %}

{% block body %}
{% if widgetExists('SummaryProductPackagingUnitWidgetPlugin') %}
{{ widget('SummaryProductPackagingUnitWidgetPlugin', data) }} {# @deprecated Use molecule('summary-product-packaging-unit', 'ProductPackagingUnitWidget') instead. #}
{% else %}
{% include [
molecule('summary-product-packaging-unit', 'ProductPackagingUnitWidget'),
molecule('summary-product-packaging-unit-default', 'CheckoutPage')
] ignore missing with {
data: {
name: data.name,
quantity: data.quantity,
amount: data.amount,
price: data.price,
quantitySalesUnit: data.quantitySalesUnit,
amountSalesUnit: data.amountSalesUnit
}
} only %}
{% endif %}

{% if data.bundleItems is not empty %}
<ul>
<li>{{ 'checkout.summary.item.bundle.description' | trans }}</li>
{% for item in data.bundleItems %}
<li> - {{ item.quantity }} x {{ item.name }} </li>
{% endfor %}
</ul>
{% endif %}

{% if data.options is not empty %}
<ul>
<li>{{ 'checkout.summary.item.option.description' | trans }}</small></li>
{% for option in data.options %}
<li> + {{ option.value | trans }} <strong>{{ option.sumPrice | default(0) | money }}</strong></li>
{% endfor %}
</ul>
{% endif %}
{% endblock %}

0 comments on commit 0bbb3e4

Please sign in to comment.