Skip to content
Code-Schnipsel Gruppen Projekte
Bestätigt Commit 0ee6c9e2 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

fix: missing events and text article are considered

Coupons were incompatible with simple checkout. Since coupons insert text articles into the order.
However, text articles destroyed the basket.
Übergeordneter d54b1eb4
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
2 Merge Requests!44fix: missing events and text article are considered,!33Update 'next-3.x' with latest changes from 'main'
Pipeline-Nr. 12429 bestanden
......@@ -13,15 +13,47 @@
{/if}
{foreach $articles as $Article}
{if $Article->getAttribute('id') == -1}
<!-- text article -->
<section class="articleList-entry">
<div class="articleList-entry__image">
<!-- PLACEHOLDER BILD -->
</div>
<div class="articleList-entry__data">
<div class="articleData__title">
{$Article->getAttribute('title')|escape:'html'}
</div>
<div class="articleData__price">
<div class="quantity">
{$Article->getAttribute('quantity')} {$Article->getQuantityUnit()} x
{$Currency->format($calc.basisPrice)}
</div>
<div class="articleData__sum">
<span class="articleData__sumValue fw-bolder">{$Currency->format($calc.sum)}</span>
{if !empty($vatArray)}
<div class="articleData__vat text-muted">
{locale group="quiqqer/erp" var="article.list.articles.header.vat" Locale=$Locale}
{$Article->getAttribute('vat')}%
</div>
{/if}
</div>
</div>
</div>
</section>
{else}
<!-- real products -->
{assign var=Product value=\QUI\ERP\Products\Handler\Products::getProduct($Article->getAttribute('id'))}
{assign var=calc value=$Article->getAttribute('calculated')}
{* open html tags for hidden articles *}
<!-- open html tags for hidden articles -->
{if $hideProducts && $counter == $initialVisible}
<div class="articleList__hidden" style="height: 0; overflow: hidden;">
<div class="articleList__hiddenInner">
{/if}
{* END open html tags for hidden articles *}
<!-- END open html tags for hidden articles -->
<section class="articleList-entry">
<div class="articleList-entry__image">
......@@ -96,13 +128,14 @@
</div>
</section>
{* close html tags for hidden articles *}
<!-- close html tags for hidden articles -->
{if $hideProducts && $counter == $max - 1}
</div>
</div>
{/if}
{* END close html tags for hidden articles *}
<!-- END close html tags for hidden articles -->
{/if}
{assign var=counter value=$counter+1}
{/foreach}
......
......@@ -11,8 +11,14 @@
<div class="quiqqer-simple-checkout-basket-articles">
<div class="articleList">
<br>
<br />
{foreach $articles as $Article}
{if $Article->getAttribute('id') == -1}
<!-- text article -->
{else}
<!-- real products -->
{assign var=Product value=\QUI\ERP\Products\Handler\Products::getProduct($Article->getAttribute('id'))}
{assign var=calc value=$Article->getAttribute('calculated')}
<section class="articleList-entry">
......@@ -29,9 +35,9 @@
</div>
<div class="articleData__artNo text-muted">
<span>
{locale group="quiqqer/erp" var="article.list.articles.header.articleNo" Locale=$Locale}
</span>
<span>
{locale group="quiqqer/erp" var="article.list.articles.header.articleNo" Locale=$Locale}
</span>
<span>{$Article->getAttribute('articleNo')}</span>
</div>
......@@ -88,6 +94,7 @@
</div>
</section>
{/if}
{/foreach}
</div>
</div>
\ No newline at end of file
......@@ -96,10 +96,14 @@
</section>
<section class="quiqqer-simple-checkout-basket">
{template_event name="quiqqer::simple::order::basket::begin" Order=$Order}
<div class="quiqqer-simple-checkout-basket__inner">
{$Basket->create()}
</div>
{template_event name="quiqqer::simple::order::basket::middle" Order=$Order}
<div class="quiqqer-simple-checkout-basket__pay">
<div class="quiqqer-order-step-checkout-notice">
<label>
......@@ -112,6 +116,8 @@
{locale group="quiqqer/order" var="ordering.btn.pay.to.order"}
</button>
</div>
{template_event name="quiqqer::simple::order::basket::end" Order=$Order}
</section>
</div>
</form>
\ No newline at end of file
......@@ -35,6 +35,7 @@ public function __construct(array $attributes = [])
'orderHash' => false,
'template' => false,
'data-qui' => 'package/quiqqer/order-simple-checkout/bin/frontend/controls/SimpleCheckout',
'data-name' => 'quiqqer-simple-checkout',
'data-qui-load-hash-from-url' => 0
]);
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren