Subversion Repositories wpShopGermany4

Rev

Rev 7849 | Rev 7879 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7849 Rev 7851
Line 197... Line 197...
197
    			
197
    			
198
    		</tr>
198
    		</tr>
199
 
199
 
200
    		<tr class="wpsg_mod_productvariants_productimage_row">
200
    		<tr class="wpsg_mod_productvariants_productimage_row">
201
    			<td class="col_active">&nbsp;</td>
201
    			<td class="col_active">&nbsp;</td>
202
   				<?php 
202
   				<?php
-
 
203
 
-
 
204
                    $has_global_images = false;
203
 
205
 
204
                    if (wpsg_isSizedInt($this->view['product_id'])) {
206
                    if (wpsg_isSizedInt($this->view['product_id'])) {
205
 
207
 
-
 
208
                        $global_images = wpsg_explode(',', $this->db->fetchOne("SELECT `images` FROM `".WPSG_TBL_VARIANTS_VARI."` WHERE `id` = '".wpsg_q($vari['id'])."' "));
-
 
209
 
-
 
210
                        if (wpsg_isSizedArray($global_images)) {
-
 
211
 
-
 
212
                            $arAttachmentIDs = $global_images;
-
 
213
                            $has_global_images = true;
-
 
214
 
206
                        $arAttachmentIDs = $this->imagehandler->getAttachmentIDs($this->view['product_id'], $vari['id'], true);
215
                        } else $arAttachmentIDs = $this->imagehandler->getAttachmentIDs($this->view['product_id'], $vari['id'], true, false);
207
 
216
 
208
                    } else {
217
                    } else {
209
 
218
 
210
                        $arAttachmentIDs = $vari['images'];
219
                        $arAttachmentIDs = $vari['images'];
211
 
220
 
212
                    }
221
                    }
213
					
222
 
214
				?>
223
				?>
215
				<td class="ui-sortable" colspan="<?php echo $colspan; ?>"  id="wpsg_images_productimage_<?php echo $this->view['variant']['id']; ?>_<?php echo $vari['id']; ?>" >
224
				<td class="ui-sortable" colspan="<?php echo $colspan; ?>"  id="wpsg_images_productimage_<?php echo $this->view['variant']['id']; ?>_<?php echo $vari['id']; ?>" >
216
 
225
 
217
                    <div class="d-flex justify-content-between w-100">
226
                    <div class="d-flex justify-content-between w-100">
218
 
227
 
219
                        <div>
228
                        <div>
220
                            <?php foreach ($arAttachmentIDs as $attachment_id) { $attachment_id = intval($attachment_id); ?>
229
                            <?php foreach ($arAttachmentIDs as $attachment_id) { $attachment_id = intval($attachment_id); ?>
221
 
230
 
222
                                <?php if (wpsg_isSizedInt($this->view['product_id'])) { ?>
231
                                <?php if (wpsg_isSizedInt($this->view['product_id'])) { ?>
223
 
232
 
-
 
233
                                    <?php if ($has_global_images) { ?>
224
                                    <a href="#" class="<?php echo ((in_array($attachment_id, explode(",", $vari['images_set'])))?'mark':''); ?> pic" id="<?php echo $attachment_id; ?>" onclick="return wpsg_vp_vari_setPic(this, <?php echo $this->view['variant']['id']; ?>, <?php echo $vari['id'] ?>, '<?php echo $attachment_id; ?>', <?php echo $this->view['product_id']; ?>);">
234
 
225
                                        <?php echo wp_get_attachment_image($attachment_id, array(25, 25), true); ?>
235
                                        <?php echo wp_get_attachment_image($attachment_id, array(25, 25), true); ?>
-
 
236
 
-
 
237
                                    <?php } else { ?>
-
 
238
 
226
                                    </a>
239
                                        <a href="#" class="<?php echo ((in_array($attachment_id, explode(",", $vari['images_set'])) && !$has_global_images)?'mark':''); ?> pic" id="<?php echo $attachment_id; ?>" onclick="return wpsg_vp_vari_setPic(this, <?php echo $this->view['variant']['id']; ?>, <?php echo $vari['id'] ?>, '<?php echo $attachment_id; ?>', <?php echo $this->view['product_id']; ?>);">
-
 
240
                                            <?php echo wp_get_attachment_image($attachment_id, array(25, 25), true); ?>
-
 
241
                                        </a>
-
 
242
 
-
 
243
                                    <?php } ?>
227
 
244
 
228
                                <?php } else { ?>
245
                                <?php } else { ?>
229
 
246
 
230
                                    <a href="#" class="pic wpsg_mod_productvariants_remove_global_vari_image"
247
                                    <a href="#" class="pic wpsg_mod_productvariants_remove_global_vari_image"
231
                                        data-variant_id="<?php echo intval($_REQUEST['variant_id']); ?>"
248
                                        data-variant_id="<?php echo intval($_REQUEST['variant_id']); ?>"