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

fix: shopping cart -> Setting for “(de)activate article link”

Related: #12
Übergeordneter 08eca671
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. 12607 mit Warnungen bestanden
......@@ -36,7 +36,8 @@ define('package/quiqqer/order-simple-checkout/bin/frontend/controls/SimpleChecko
loadHashFromUrl: false,
showPayToOrderBtn: true,
showOrderSuccessInfo: true,
disableAddress: false
disableAddress: false,
disableProductLink: false
},
initialize: function(options) {
......
......@@ -61,18 +61,26 @@
<section class="articleList-entry">
<div class="articleList-entry__image">
{if $disableProductLinks}
<a href="{$Product->getUrl()}">
{/if}
<img src="{$Product->getImage()->getSizeCacheUrl(160, 160)}" width="80" height="160"
alt="{$Article->getAttribute('title')|escape:'html'}"
class="articleList-entry__img" style="width: var(--_imgWidth);"
/>
{if $disableProductLinks}
</a>
{/if}
</div>
<div class="articleList-entry__data">
<div class="articleData__title">
{if $disableProductLinks}
<a href="{$Product->getUrl()}">
{$Article->getAttribute('title')|escape:'html'}
</a>
{else}
{$Article->getAttribute('title')|escape:'html'}
{/if}
</div>
<div class="articleData__artNo text-muted">
......
......@@ -46,10 +46,20 @@ public function getBody(): string
$UniqueArticles = $Articles->toUniqueList();
$UniqueArticles->hideHeader();
$basketHtml = $UniqueArticles->toHTML(dirname(__FILE__) . '/Basket.ArticleList.html');
$Engine->assign('disableProductLinks', $this->Checkout->getAttribute('disableProductLinks'));
$basketHtml = $UniqueArticles->toHTML(
dirname(__FILE__) . '/Basket.ArticleList.html',
false,
$Engine
);
if ($this->getAttribute('basketForHeader')) {
$basketHtml = $UniqueArticles->toHTML(dirname(__FILE__) . '/Basket.ForHeader.html');
$basketHtml = $UniqueArticles->toHTML(
dirname(__FILE__) . '/Basket.ForHeader.html',
false,
$Engine
);
}
$Engine->assign([
......
......@@ -31,10 +31,14 @@ class Checkout extends QUI\Control
*/
public function __construct(array $attributes = [])
{
// @todo product links global setting
$this->setAttributes([
'orderHash' => false,
'template' => false,
'disableAddress' => false,
'disableProductLinks' => 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