Subversion Repositories wpShopGermany4

Rev

Rev 8196 | Rev 8200 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1067 daniel 1
<?php
2
 
3
	/*
8195 daniel 4
	 * Template für das Produkt im Frontend Layout 3
1067 daniel 5
	 */
6
 
7649 daniel 7
	/** @var wpsg_product $oProduct */
8
	$oProduct = $this->view['oProduct'];
7849 daniel 9
 
8195 daniel 10
    $arAttachmentIDsAll = $this->imagehandler->getAttachmentIDs($this->view['data']['product_id']);
11
 
6340 hartmut 12
?>
13
 
8195 daniel 14
<div class="wpsg_produkt_wrapper layout3">
6314 daniel 15
 
8195 daniel 16
    <input type="hidden" name="wpsg_post_id" value="<?php echo get_the_ID(); ?>" />
6314 daniel 17
	<input type="hidden" name="titleDisplayed" value="<?php echo $this->titleDisplayed; ?>" />
8199 daniel 18
	<input type="hidden" name="wpsg[template]" value="standard3.phtml" />
6340 hartmut 19
 
8195 daniel 20
    <div class="col_wrap">
21
        <div class="col image">
22
            <div class="thumbnails">
6340 hartmut 23
 
8195 daniel 24
                <?php foreach ($arAttachmentIDsAll as $k => $image_id) { ?>
6340 hartmut 25
 
8195 daniel 26
                    <?php echo \wp_get_attachment_image($image_id, 'small', false, [
27
                        'data-index' => $k
28
                    ]); ?>
6340 hartmut 29
 
8195 daniel 30
                <?php } ?>
6314 daniel 31
 
8195 daniel 32
            </div>
33
            <div class="view">
8199 daniel 34
                <?php foreach ($arAttachmentIDsAll as $k => $image_id) { ?>
35
                    <a class="thickbox" id="<?php echo $this->getTemplateIndex(); ?>_<?php echo $k; ?>" rel="gallery-<?php echo $this->getTemplateIndex(); ?>" href="<?php echo \wp_get_attachment_image_src($image_id, 'full')[0]; ?>"></a>
36
                <?php } ?>
8195 daniel 37
                <div class="wpsg_product_slider">
6340 hartmut 38
 
8195 daniel 39
                    <?php foreach ($arAttachmentIDsAll as $k => $image_id) { ?>
7904 daniel 40
 
8195 daniel 41
                        <div>
8199 daniel 42
                            <div class="ds_image_zoom" data-image-index="<?php echo $k; ?>"
43
                                onclick="document.getElementById('<?php echo $this->getTemplateIndex(); ?>_<?php echo $k; ?>').click();"
44
                            >
8195 daniel 45
                                <?php echo \wp_get_attachment_image($image_id, 'full', false, [
46
                                    'data-index' => $k
47
                                ]); ?>
48
                            </div>
49
                        </div>
7842 daniel 50
 
8195 daniel 51
                    <?php } ?>
6491 hartmut 52
 
8195 daniel 53
                </div>
54
            </div>
55
        </div>
56
        <div>
8196 daniel 57
 
58
            <?php if (!$this->titleDisplayed) { ?>
59
                <h1 itemprop="name" class="wpsg_producttitle"><?php echo $this->getProductName($this->view['data']['id']); ?></h1>
60
                <h2 itemprop="detailname" class="wpsg_productdetailtitle"><?php echo $this->view['data']['detailname']; ?></h2>
61
            <?php } ?>
62
 
63
            <?php $this->callMods('product_top_afterheadline', array(&$this->view['data']['id'], $this->getTemplateIndex())); ?>
64
 
65
            <?php $this->callMods('product_top', array(&$this->view['data']['id'], $this->getTemplateIndex())); ?>
66
 
67
            <div itemscope itemtype="http://schema.org/Product" class="wpsg_produkt wpsg_produkt_<?php echo $this->view['data']['id']; ?>">
68
 
69
                <?php if ($this->get_option('wpsg_showArticelnumber') == '1') { ?>
70
                    <div class="wpsg_artikelnummer">
71
                        <?php echo __('Artikelnummer', 'wpsg'); ?>: <span class="wpsg_anr"><?php echo wpsg_hspc($this->view['data']['anr']); ?></span><br />
72
                        <?php if (wpsg_isSizedInt($this->get_option('wpsg_mod_produktartikel_ean'))) {?>
73
                            <?php echo __('EAN','wpsg');?>:<span class="wpsg_ean"><?php echo wpsg_hspc($this->view['data']['ean']); ?></span><br />
74
                        <?php } ?>
75
                        <?php if (wpsg_isSizedInt($this->get_option('wpsg_mod_produktartikel_gtin'))) {?>
76
                            <?php echo __('GTIN','wpsg');?>:<span class="wpsg_gtin"><?php echo wpsg_hspc($this->view['data']['gtin']); ?></span><br />
77
                        <?php }?>
78
                    </div>
79
                <?php } ?>
80
 
81
                <?php /* Abfrage Preisanzeige nur für eingeloggte User aktiv und User eingeloggt START*/ ?>
82
                <?php if ($this->view['oProduct']->canDisplayPrice()) { ?>
83
 
84
                    <div itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="wpsg_produkt_preis">
85
 
86
                        <meta itemprop="priceCurrency" content="<?php echo $this->get_option('wpsg_currency'); ?>" />
87
 
88
                        <?php echo __('Stückpreis:', 'wpsg'); ?>
89
 
90
                        <?php $oldPrice = $this->view['oProduct']->getOldPrice();  ?>
91
 
92
                        <?php if ($oldPrice !== false && $oldPrice != $this->view['oProduct']->getPrice($this->view['data']['product_key'])) { ?>
93
                            <span class="wpsg_mod_productview_price wpsg_mod_productview_current"><?php echo wpsg_ff($this->view['oProduct']->getPrice($this->view['data']['product_key']), $this->get_option('wpsg_currency')); ?></span>
94
                            <span class="wpsg_mod_productview_oldprice"><?php echo wpsg_ff($oldPrice, $this->get_option('wpsg_currency')); ?></span>
95
                        <?php } else { ?>
96
                            <span class="wpsg_mod_productview_price"><?php echo wpsg_ff($this->view['oProduct']->getPrice($this->view['data']['product_key']), $this->get_option('wpsg_currency')); ?></span>
97
                        <?php } ?>
98
 
99
                    </div>
100
 
101
                    <?php if ($this->get_option('wpsg_kleinunternehmer')) { /* Kleinunternehmerregelung aktiviert START */ ?>
102
 
103
                        <div class="wpsg_produkt_preishinweis">
104
                            <?php echo wpsg_translate(__('#2# zzgl. #1#', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>', '<a href="#kkhint" title="'.wpsg_hspc($this->get_option('wpsg_kleinunternehmer_text')).'">Endpreis</a>'); ?>
105
                        </div>
106
 
107
                    <?php } else { /* Kleinunternehmerregelung aktiviert ENDE */ ?>
108
 
109
                        <div class="wpsg_produkt_preishinweis">
110
                            <?php if ($this->getFrontendTaxview() == WPSG_NETTO) { /* Frontend = NETTO Preise */ ?>
111
                                <?php if ($this->hasMod('wpsg_mod_freeshipping') && $this->get_option('wpsg_mod_freeshipping_aktiv') == '1') { /* Versandkostenfrei aktiv */?>
112
 
113
                                    <?php if ($this->get_option('wpsg_mod_freeshipping_minvalue') > 0) { ?>
114
                                        <?php echo wpsg_translate(__('(zzgl. #1#% MwSt. und <a href="#3#">ab #2# € versandkostenfrei</a>)', 'wpsg'),
115
                                            wpsg_ff($this->view['data']['mwst_value']),
116
                                            wpsg_ff($this->get_option('wpsg_mod_freeshipping_minvalue')),
117
                                            $this->getUrl(wpsg_ShopController::URL_VERSANDKOSTEN)
118
                                        ); ?>
119
                                    <?php } else { ?>
120
                                        <?php echo wpsg_translate(__('(zzgl. #1#% MwSt. und versandkostenfrei)', 'wpsg'), wpsg_ff($this->view['data']['mwst_value'])); ?>
121
                                    <?php } ?>
122
 
123
                                <?php } else { ?>
124
                                    <?php echo wpsg_translate(__('(zzgl. #1#% MwSt. und zzgl. #2#)', 'wpsg'), wpsg_ff($this->view['data']['mwst_value']), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>
125
                                <?php }?>
126
                            <?php } else { /* Frontend = BRUTTO Preise */ ?>
127
                                <?php if ($this->hasMod('wpsg_mod_freeshipping') && $this->get_option('wpsg_mod_freeshipping_aktiv') == '1') { /* Versandkostenfrei aktiv */ ?>
128
 
129
                                    <?php if ($this->get_option('wpsg_mod_freeshipping_minvalue') > 0) { ?>
130
                                        <?php echo wpsg_translate(__('(inkl. #1#% MwSt. und <a href="#3#">ab #2# € versandkostenfrei</a>)', 'wpsg'),
131
                                            wpsg_ff($this->view['data']['mwst_value']),
132
                                            wpsg_ff($this->get_option('wpsg_mod_freeshipping_minvalue')),
133
                                            $this->getUrl(wpsg_ShopController::URL_VERSANDKOSTEN)
134
                                        ); ?>
135
                                    <?php } else { ?>
136
                                        <?php echo wpsg_translate(__('(inkl. #1#% MwSt. und versandkostenfrei)', 'wpsg'), wpsg_ff($this->view['data']['mwst_value'])); ?>
137
                                    <?php } ?>
138
 
139
                                <?php } else { ?>
140
                                    <?php echo wpsg_translate(__('(inkl. #1#% MwSt. und zzgl. #2#)', 'wpsg'), wpsg_ff($this->view['data']['mwst_value']), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>
141
                                <?php }?>
142
                            <?php } ?>
143
                        </div>
144
 
145
                    <?php } ?>
146
 
147
                <?php } else {?>
148
 
149
                    <?php echo wpsg_translate(__('Die Produktpreise werden nur eingeloggten Benutzern angezeigt. Loggen Sie sich <a href="'.$this->getURL(wpsg_ShopController::URL_PROFIL).'">hier</a> bitte ein, um zu bestellen.')); ?>
150
 
151
                <?php }?>
152
                <?php /* Abfrage Preisanzeige nur für eingeloggte User aktiv und User eingeloggt ENDE */ ?>
153
 
154
                <div class="wpsg_clear"></div>
155
 
156
                <div itemprop="description" class="wpsg_produkt_shortdescription">
157
 
158
                    <span><?php echo $this->view['data']['shortdesc']; ?></span>
159
 
160
                </div>
161
 
162
                <?php /* Lagerbestand START*/?>
163
                <?php if ($this->hasMod('wpsg_mod_stock') && $this->get_option('wpsg_mod_stock_showProduct') == '1') { ?>
164
 
165
                <div class="wpsg_mod_produktindex_stock">
166
 
167
                    <?php if (($this->view['data']['stock']) > '0') {?>
168
 
169
                        <label><?php echo __('Lagerbestand', 'wpsg'); ?></label>
170
                        <?php echo wpsg_translate(__('#1# Artikel auf Lager','wpsg'), $this->view['data']['stock']);  ?>
171
 
172
                    <?php } else { ?>
173
 
174
                        <label><?php echo wpsg_translate(__('', 'wpsg')); ?></label>
175
 
176
                    <?php } ?>
177
 
178
                </div>
179
                <?php } ?>
180
                <?php /* Lagerbestand ENDE*/?>
181
 
182
                <?php /* Füllmengenanzeige START */ ?>
183
                <?php echo $this->callMod('wpsg_mod_fuellmenge', 'renderPriceInfo', [$oProduct->getPrice($this->view['data']['product_key']), $this->view['data']['fmenge'], $oProduct->getId()]); ?>
184
                <?php /* Füllmengenanzeige ENDE */ ?>
185
 
186
                <?php /* Gewichtsanzeige START */ ?>
187
                <?php if ($this->hasMod('wpsg_mod_weight') && $this->get_option('wpsg_mod_weight_showProduct') === '1') { ?>
188
                <div class="wpsg_mod_weight_produkt">
189
 
190
                    <?php if (($this->view['data']['weight']) > '0') { ?>
191
                        <span class="label label_weight"><?php echo wpsg_translate(__('Gewicht:', 'wpsg')); ?></span>
192
                        <?php echo wpsg_translate(__('#1# #2#', 'wpsg'), '<span class="wpsg_weight" id="weight_'.$this->view['data']['id'].'">'.wpsg_ff($this->view['data']['weight']).'</span>', $this->get_option('wpsg_mod_weight_unit')); ?>
193
                    <?php } else { ?>
194
                        <label><?php wpsg_translate(__('', 'wpsg'))?></label>
195
                    <?php } ?>
196
                </div>
197
                <?php } ?>
198
                <?php /* Gewichtsanzeige ENDE */ ?>
199
 
200
                <?php /* Lieferzeit Anzeige START */ ?>
201
                <?php if ($this->hasMod('wpsg_mod_deliverytime') && $this->get_option('wpsg_mod_deliverytime_show_product') == '1') { ?>
202
 
203
                    <?php /* Produkt nur im Store, nicht im Onlineshop vorhanden */ ?>
204
                    <?php if ($this->callMod('wpsg_mod_deliverytime', 'isStoreProduct', array($this->view['data']['product_key']))) { ?>
205
 
206
                        <div class="wpsg_product_only_store"><?php echo __($this->callMod('wpsg_mod_deliverytime', 'displayStoreText', array($this->view['data']['product_key']))); ?></div>
207
 
208
                        <?php $stl = 0; $stl = $this->callMod('wpsg_mod_deliverytime', 'displayStoreLink', array($this->view['data']['product_key'])) ?>
209
                        <?php if (wpsg_isSizedInt($stl)) { ?>
210
 
211
                            &nbsp;<a href="<?php echo get_permalink($stl); ?>"><?php echo __('So erreichen Sie uns.'); ?></a>
212
 
213
                        <?php } ?>
214
 
215
                    <?php } else { ?>
216
 
217
                        <?php $strDelayNote = $this->callMod('wpsg_mod_deliverytime', 'displayDelayTime', array($this->view['data']['product_key'])); ?>
218
                        <?php if (wpsg_isSizedString($strDelayNote)) { ?>
219
 
220
                            <div class="wpsg_mod_deliverytime_offline">
221
 
222
                                <div class="wpsg_mod_deliverytime_delay"><?php echo wpsg_hspc($strDelayNote); ?></div>
223
 
224
                            </div>
225
 
226
                        <?php } else { ?>
227
 
228
                        <div class="wpsg_mod_deliverytime">
229
                            <span class="label label_deliverytime"><?php echo wpsg_translate(__('Lieferzeit:', 'wpsg')); ?></span>
230
                            <?php echo $this->callMod('wpsg_mod_deliverytime', 'displayDeliveryTime', array($this->view['data']['product_key'])); ?>
231
                        </div>
232
 
233
                        <?php } ?>
234
 
235
                    <?php } ?>
236
 
237
                <?php } ?>
238
                <?php /* Lieferzeit Anzeige ENDE */ ?>
239
 
240
                <?php /* Produktkurzbeschreibung START */ ?>
241
                <div class="wpsg_product_informationarea">
242
 
243
                    <?php if (strlen(trim($this->view['data']['beschreibung'])) > 0) { ?>
244
                    <div class="wpsg_product_information_short">
245
                        <div class="wpsg_produkt_additional_information">
246
                            <div itemprop="description" class="wpsg_produkt_shortdescription">
247
                                <span><?php echo $this->view['data']['beschreibung']; ?></span>
248
                            </div>
249
                        </div>
250
                    </div>
251
                    <?php } ?>
252
 
253
                </div>
254
                <?php /* Produktkurzbeschreibung ENDE */ ?>
255
 
256
                <?php /* Varianten START */ ?>
257
                <div class="wpsg_produkt_varianten">
258
                    <?php echo $this->callMod('wpsg_mod_productvariants', 'renderTemplate', array($this->view['data']['product_key'])); ?>
259
                </div>
260
                <?php /* Varianten ENDE */ ?>
261
 
262
                <?php $this->callMods('product_bottom', array(&$this->view['data']['product_key'], $this->getTemplateIndex())); ?>
263
 
264
 
265
                <div class="wpsg_product_buttonarea">
266
                    <div class="wpsg_product_buttons_add_basket">
267
                        <?php if ($this->view['oProduct']->canOrder()) { ?>
268
                        <div class="wpsg_produkt_add_basket_wrapper">
269
 
270
                            <label class="wpsg_amount_label" for="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>"><?php echo __('Anzahl', 'wpsg'); ?></label>
271
 
272
                            <input type="text" value="<?php echo ((wpsg_isSizedInt($this->view['data']['menge']))?$this->view['data']['menge']:'1'); ?>" name="wpsg[menge]" class="wpsg_menge" id="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>" <?php echo (($this->view['data']['basket_multiple'] == 4)?' readonly="readonly" ':''); ?> />
273
 
274
                            <?php /* Urlaubsmodus aktiv */ ?>
275
                            <?php if ($this->hasMod('wpsg_mod_deliverytime') && ($this->get_option('wpsg_mod_deliverytime_holiday') == '1')) { ?>
276
 
277
                                <?php if ($this->callMod('wpsg_mod_deliverytime', 'holiday', array($this->view['data']['product_key']))) { ?>
278
 
279
                                    <div class="wpsg_product_deliverytime_holiday" style="height:50px; padding:10px; width:50%; float:right; border:1px solid #ff0000;">
280
 
281
                                        <?php echo __($this->callMod('wpsg_mod_deliverytime', 'displayHolidaytext', array($this->view['data']['product_key']))); ?>
282
 
283
                                    </div>
284
 
285
                                <?php } ?>
286
 
287
                            <?php } else {?>
288
 
289
                                <input class="wpsg_button wpsg_add_basket wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?>" type="submit" value="<?php echo __('In den Warenkorb', 'wpsg'); ?>" name="wpsg[submit]" />
290
 
291
                            <?php } ?>
292
 
293
                            <?php if (in_array($this->get_option('wpsg_afterinsert'), array('2', '3'))) { ?>
294
                            <script type="text/javascript">
295
 
296
                                jQuery(document).ready(function() {
297
 
298
                                    jQuery('.wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?>').bind('click', function() {
299
 
300
                                        wpsg_blockProductTemplate(<?php echo $this->getTemplateIndex(); ?>);
301
 
302
                                        jQuery.ajax( {
303
                                            url: '<?php echo $this->getURL(wpsg_ShopController::URL_BASKET); ?>',
304
                                            data:
305
                                            {
306
                                                'wpsg_form_data': jQuery('#wpsg_produktform_<?php echo $this->getTemplateIndex(); ?>').serialize(),
307
                                                'wpsg[ajax]': '1',
308
                                                'wpsg[submit]': '1'
309
                                            },
310
                                            success: function(data)
311
                                            {
312
 
313
                                                wpsg_refreshBasketWidget();
314
 
315
                                                <?php if ($this->get_option('wpsg_afterinsert') == '2') { ?>
316
                                                tb_show('<?php echo __('Ihr Warenkorb', 'wpsg'); ?>', '<?php echo $this->getURL(wpsg_ShopController::URL_BASKET_AJAX); ?>&height=500');
317
                                                <?php } else { ?>
318
 
319
                                                wpsg_unblockProductTemplate(<?php echo $this->getTemplateIndex(); ?>);
320
                                                jQuery('body').append(data);
321
 
322
                                                <?php } ?>
323
 
324
                                            }
325
                                        } );
326
 
327
                                        return false;
328
 
329
                                    } );
330
 
331
                                } );
332
 
333
                            </script>
334
                            <?php } ?>
335
 
336
                        </div>
337
                        <?php } ?>
338
                    </div>
339
                </div>
340
 
341
                <div class="wpsg_clear"></div>
342
 
343
                <?php if ($this->hasMod('wpsg_mod_request') && $this->callMod('wpsg_mod_request', 'isRequestProduct', array($this->view['data']['id']))) { ?>
344
                    <label class="wpsg_amount_label" for="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>"><?php echo __('Anzahl', 'wpsg'); ?></label>
345
                    <input type="text" value="<?php echo ((wpsg_isSizedInt($this->view['data']['menge']))?$this->view['data']['menge']:'1'); ?>" name="wpsg[menge]" class="wpsg_menge" id="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>" <?php echo (($this->view['data']['basket_multiple'] == 4)?' readonly="readonly" ':''); ?> />
346
 
347
                    <input class="wpsg_button wpsg_add_requestlist" id="wpsg_add_requestlist_<?php echo $this->getTemplateIndex(); ?>" type="submit" value="<?php echo __('Auf die Anfrageliste', 'wpsg'); ?>" name="wpsg[submit_request]" />
348
                <?php } ?>
349
 
350
                <?php /* Produktlangbeschreibung START */ ?>
351
                <div class="wpsg_product_informationarea">
352
 
353
                    <?php if (strlen(trim($this->view['data']['longdescription'])) > 0) { ?>
354
                    <div class="wpsg_product_information_large">
355
                        <div class="wpsg_produkt_additional_information">
356
                            <div itemprop="description" class="wpsg_produkt_longdescription">
357
                                <span><?php echo $this->view['data']['longdescription']; ?></span>
358
                            </div>
359
                        </div>
360
                    </div>
361
                    <?php } ?>
362
 
363
                </div>
364
                <?php /* Produktlangbeschreibung ENDE */ ?>
365
 
366
                <?php /* zusätzliche Informationen START */ ?>
367
                <div class="wpsg_product_informationarea">
368
 
369
                    <?php if (strlen(trim($this->view['data']['moreinfos'])) > 0) { ?>
370
                    <div class="wpsg_product_information_large">
371
                        <div class="wpsg_produkt_additional_information">
372
                            <div itemprop="description" class="wpsg_produkt_moreinfos">
373
                                <span><?php echo $this->view['data']['moreinfos']; ?></span>
374
                            </div>
375
                        </div>
376
                    </div>
377
                    <?php } ?>
378
 
379
                </div>
380
                <?php /* zusätzliche Informationen ENDE */ ?>
381
 
382
                <?php /* zusätzliche Lieferumfang START */ ?>
383
                <div class="wpsg_product_informationarea">
384
 
385
                    <?php if (strlen(trim($this->view['data']['moreinfos2'])) > 0) { ?>
386
                    <div class="wpsg_product_information_large">
387
                        <div class="wpsg_produkt_additional_information">
388
                            <div itemprop="description" class="wpsg_produkt_moreinfos2">
389
                                <span><?php echo $this->view['data']['moreinfos2']; ?></span>
390
                            </div>
391
                        </div>
392
                    </div>
393
                    <?php } ?>
394
 
395
                </div>
396
                <?php /* zusätzliche Lieferumfang ENDE */ ?>
397
 
398
                <div class="wpsg_clear"></div>
399
 
400
                <?php /* Social Media Integration */ ?>
401
                <div class="wpsg_product_social_media">
402
                    <?php if (is_plugin_active('plugin-directory/shariff.php')) {?>
403
                        <?php echo do_shortcode('[shariff]')?>
404
                    <?php } ?>
405
                </div>
406
 
407
            </div>
408
 
8195 daniel 409
        </div>
410
    </div>
6340 hartmut 411
 
8196 daniel 412
    <?php if ($this->getTemplateIndex() === 1) { ?>
6340 hartmut 413
 
8199 daniel 414
        <link rel="stylesheet" href="<?php echo $this->getRessourceURL('css/tiny-slider.-2.9.4.min.css'); ?>">
415
 
8196 daniel 416
        <style>
7904 daniel 417
 
8196 daniel 418
            .wpsg_produkt_wrapper.layout3 .col_wrap { display:flex; width:100%; justify-content:stretch; gap:1rem; }
419
            .wpsg_produkt_wrapper.layout3 .col_wrap > * { flex-grow:1; flex-shrink:0; width:0; }
420
            .wpsg_produkt_wrapper.layout3 .col_wrap > .col.image { display:flex; justify-content:stretch; gap:0.5rem; }
421
            .wpsg_produkt_wrapper.layout3 .col_wrap > .col.image .thumbnails { width:20%; flex-shrink:0; }
422
            .wpsg_produkt_wrapper.layout3 .col_wrap > .col.image .thumbnails img { aspect-ratio: 1 / 1; object-fit:cover; object-position:50% 50%; }
423
            .wpsg_produkt_wrapper img { max-width:100%; height:auto; }
7904 daniel 424
 
8196 daniel 425
            .ds_image_zoom.attached { position:relative; overflow:hidden; cursor:-webkit-zoom-in; cursor:zoom-in; }
426
            .ds_image_zoom.attached img { all:initial; position:absolute; left:0; top:0; /* transition:width 0.3s, height 0.3s, left 0.3s, top 0.3s; */ }
7904 daniel 427
 
8196 daniel 428
        </style>
6734 daniel 429
 
8199 daniel 430
    <?php } ?>
431
 
432
    <?php if ($this->getTemplateIndex() === 1 && ($_REQUEST['action']??'') !== 'wpsg_productvariants_switch') { ?>
433
 
8196 daniel 434
        <script src="<?php echo $this->getRessourceURL('js/tiny-slider-2.9.2.min.js'); ?>"></script>
435
        <script src="<?php echo $this->getRessourceURL('js/dsimagezoom.min.js'); ?>"></script>
436
 
437
    <?php } ?>
438
 
8195 daniel 439
    <script>
6340 hartmut 440
 
8199 daniel 441
        if (!wpsg_standard3_slider) { var wpsg_standard3_slider = {}; }
6340 hartmut 442
 
8199 daniel 443
        if (!wpsg_standard3_load) {
6340 hartmut 444
 
8199 daniel 445
            function wpsg_standard3_load(templateIndex) {
6340 hartmut 446
 
8199 daniel 447
                if (wpsg_standard3_slider[templateIndex]) {
6340 hartmut 448
 
8199 daniel 449
                    wpsg_standard3_slider[templateIndex] = wpsg_standard3_slider[templateIndex].rebuild();
6340 hartmut 450
 
8199 daniel 451
                } else {
6340 hartmut 452
 
8199 daniel 453
                    wpsg_standard3_slider[templateIndex] = tns({
454
                        container: '#wpsg_produktform_' + templateIndex + ' .wpsg_product_slider',
455
                        items: 1,
456
                        slideBy: 1,
457
                        controls: false,
458
                        autoplayButton: false,
459
                        nav: false,
460
                        arrowKeys: false,
461
                        autoplayButtonOutput: false,
462
                        autoplay: false,
463
                        autoHeight: true,
464
                        onInit: () => {
6340 hartmut 465
 
8199 daniel 466
                        }
467
                    });
6340 hartmut 468
 
8199 daniel 469
                }
6340 hartmut 470
 
8199 daniel 471
                wpsg_standard3_slider[templateIndex].events.on('transitionEnd', (event) => {
6340 hartmut 472
 
8199 daniel 473
                    DsImageZoom.init(document.querySelectorAll('#wpsg_produktform_' + templateIndex + ' .tns-slide-active .ds_image_zoom'));
6340 hartmut 474
 
8199 daniel 475
                });
6340 hartmut 476
 
8199 daniel 477
                wpsg_standard3_slider[templateIndex].events.on('transitionStart', (event) => {
6340 hartmut 478
 
8199 daniel 479
                    DsImageZoom.destroy(document.querySelectorAll('#wpsg_produktform_' + templateIndex + ' .tns-item .ds_image_zoom'));
6340 hartmut 480
 
8199 daniel 481
                });
6340 hartmut 482
 
8199 daniel 483
                for (const el_tn of document.querySelectorAll('#wpsg_produktform_' + templateIndex + ' .wpsg_produkt_wrapper.layout3 .thumbnails img')) {
484
 
485
                    el_tn.addEventListener('click', (event) => {
486
 
487
                        wpsg_standard3_slider[templateIndex].goTo(el_tn.getAttribute('data-index'));
488
 
489
                    });
490
 
491
                }
492
 
493
                wpsg_standard3_slider[templateIndex].goTo(0);
494
 
495
            };
496
 
497
        };
498
 
499
        window.addEventListener('load', () => { wpsg_standard3_load(<?php echo $this->getTemplateIndex(); ?>); });
500
 
501
        <?php if (($_REQUEST['action']??'') === 'wpsg_productvariants_switch') { ?>
502
 
503
            window.setTimeout(() => {
504
 
505
                wpsg_standard3_load(<?php echo $this->getTemplateIndex(); ?>);
506
 
507
            }, 100);
508
 
509
        <?php } ?>
510
 
8195 daniel 511
    </script>
6340 hartmut 512
 
6314 daniel 513
</div>