diff options
Diffstat (limited to 'views/mods')
| -rw-r--r-- | views/mods/mod_productvariants/admin_edit.phtml | 41 | ||||
| -rw-r--r-- | views/mods/mod_productvariants/produkt.phtml | 27 | ||||
| -rw-r--r-- | views/mods/mod_productvars/renderTemplate.phtml | 2 |
3 files changed, 55 insertions, 15 deletions
diff --git a/views/mods/mod_productvariants/admin_edit.phtml b/views/mods/mod_productvariants/admin_edit.phtml index d69b05e..cf5a021 100644 --- a/views/mods/mod_productvariants/admin_edit.phtml +++ b/views/mods/mod_productvariants/admin_edit.phtml @@ -250,6 +250,45 @@ <?php } ?>
</div>
+
+ <?php if ($this->hasMod('wpsg_mod_downloadplus')) { ?>
+ <div>
+
+ <?php
+
+ $arTemplates = $this->callMod('wpsg_mod_downloadplus', 'getTemplate', []);
+ $arTemplatesLabel = [
+ 0 => __('Unverändert', 'wpsg')
+ ];
+
+ foreach ($arTemplates as $t) $arTemplatesLabel[intval($t['id'])] = $t['name'];
+
+ ?>
+
+ <span title="<?php echo __('Templatevorgabe für PDF Anpassungen mit DownloadPlus', 'wpsg'); ?>" class="wpsg_editable" id="productvariation_template_<?php echo $vari['id']; ?>"><?php
+
+ $template_id = intval($vari['template_id']);
+
+ if ($template_id > 0 && isset($arTemplatesLabel[$template_id])) echo $arTemplatesLabel[$template_id];
+ else __('Unverändert', 'wpsg');
+
+ ?></span>
+
+ <script>
+
+ jQuery('#productvariation_template_<?php echo $vari['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_inlineEdit&noheader=1', {
+ submitdata: {
+ field: 'template_id',
+ field_id: '<?php echo $vari['id']; ?>'
+ },
+ data: <?php echo wpsg_prepare_for_inlineEdit($arTemplatesLabel); ?>,
+ type: 'select'
+ });
+
+ </script>
+
+ </div>
+ <?php } ?>
<script>
@@ -464,7 +503,7 @@ });
</script>
-
+
<?php if (!wpsg_isSizedInt($this->view['product_id'])) { ?>
<p class="wpsg_hinweis"><?php echo __('Reihenfolge kann mittels Drag&Drop verändert werden.', 'wpsg'); ?></p>
<?php } ?>
diff --git a/views/mods/mod_productvariants/produkt.phtml b/views/mods/mod_productvariants/produkt.phtml index a1ed798..ee6999c 100644 --- a/views/mods/mod_productvariants/produkt.phtml +++ b/views/mods/mod_productvariants/produkt.phtml @@ -75,8 +75,8 @@ <?php $simulated_product_key = $this->callMod('wpsg_mod_productvariants', 'getSimulatedVariKey', array($this->view['data']['product_key'], $var['id'], $vari['variation_id'])); ?>
<?php $attachmentID = $this->imagehandler->getAttachmentID($simulated_product_key); ?>
-
- <a data-wpsg-id="<?php echo $kv; ?>" class="wpsg_vp_update_image image <?php echo ((wpsg_getStr($this->view['vp_info'][$k]['vari_id']) == $vari['id'])?'akt':''); ?>" href="#">
+
+ <a data-wpsg-id="<?php echo $kv; ?>" class="wpsg_vp_update_image image <?php echo ((wpsg_getStr($this->view['vp_info'][$k]['vari_id']) == $vari['variation_id'])?'akt':''); ?>" href="#">
<?php echo wp_get_attachment_image($attachmentID, 'thumbnail'); ?>
</a>
@@ -127,22 +127,23 @@ <?php } /* foreach ($this->view['vp_data'] as $k => $var) */ ?>
<?php } /* $vAktiv = false; ENDE */ ?>
- <script type="text/javascript">/* <![CDATA[ */
-
+ <script>
+
jQuery(document).ready(function() {
-
- jQuery('.wpsg_vp_update').off('change').on('change', wpsg_mod_productvariants_reload);
- jQuery('.wpsg_vp_update_image').on('click', function(event) {
+ jQuery('.wpsg_vp_update').off('change').on('change', wpsg_mod_productvariants_reload);
+
+ jQuery('#wpsg_mod_productvariants_product_wrap_<?php echo $GLOBALS['wpsg_produkt_index']; ?> .wpsg_vp_update_image').on('click', function(event) {
jQuery(this).closest('span').find('input').val(jQuery(this).data('wpsg-id'));
wpsg_mod_productvariants_reload(event);
-
+
return false;
-
- } );
-
+
+ } );
+
} );
-
- /* ]]> */</script>
+
+ </script>
+
</div>
\ No newline at end of file diff --git a/views/mods/mod_productvars/renderTemplate.phtml b/views/mods/mod_productvars/renderTemplate.phtml index bea2820..8c349af 100644 --- a/views/mods/mod_productvars/renderTemplate.phtml +++ b/views/mods/mod_productvars/renderTemplate.phtml @@ -5,7 +5,7 @@ */
?>
-
+
<div class="wpsg_mod_productvars">
<?php foreach ($this->view['wpsg_mod_productvars']['data'] as $pv) { ?>
<div class="wpsg_mod_productvars_row">
|
