Subversion Repositories wpShopGermany4

Rev

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