summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhartmut <noreply@maennchen1.de>2017-03-09 08:45:29 +0000
committerhartmut <noreply@maennchen1.de>2017-03-09 08:45:29 +0000
commit5fb9093213e7da1be064fdc84aba75768e951474 (patch)
tree59b250ad5d7363897a8bb0b205e1c106539d195f
parent6f86d7415201cbc8e9563e328f05e327751a6aa6 (diff)
Korrektur Produktbilder und Adressen
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@6104 0d5edaf7-2b12-4e95-93f4-047927463d4b
-rw-r--r--views/mods/mod_productindex/layouts/grid.phtml13
-rw-r--r--views/mods/mod_productindex/layouts/list.phtml13
-rw-r--r--views/mods/mod_shippingadress/wpsg_order_view_customerdata.phtml2
-rw-r--r--views/mods/mod_stock/settings_edit.phtml2
-rw-r--r--views/order/view_customerdata.phtml2
-rw-r--r--views/produkt/index.phtml4
-rw-r--r--views/produkttemplates/standard_mt.phtml2
7 files changed, 24 insertions, 14 deletions
diff --git a/views/mods/mod_productindex/layouts/grid.phtml b/views/mods/mod_productindex/layouts/grid.phtml
index ff5f973..64680d6 100644
--- a/views/mods/mod_productindex/layouts/grid.phtml
+++ b/views/mods/mod_productindex/layouts/grid.phtml
@@ -95,12 +95,17 @@
<div class="wpsg_mod_productindex_product <?php echo (($i == sizeof($this->view['arProducts']))?'wpsg_mod_productindex_product_last':''); ?> <?php echo (($i == 1)?'wpsg_mod_productindex_product_first':''); ?>" style="width:<?php echo round((100 / $col), 2) ?>%;">
<div class="wpsg_mod_productindex_product_inner">
- <?php if ($this->hasMod('wpsg_mod_produktbilder')) { $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder', array($p['id'])); ?>
+ <?php if ($this->hasMod('wpsg_mod_produktbilder')) { $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($p['id'])); ?>
<div class="wpsg_mod_productindex_pic">
- <?php if (wpsg_isSizedArray($arBilder)) { ?>
+ <?php if (wpsg_isSizedArray($arBilder)) { ?>
<a title="<?php echo __('Zur Detailseite des Produkts', 'wpsg'); ?>" href="<?php echo wpsg_url($p['url']); ?>">
<?php if ($nPicRand === true) $nPicIndex = array_rand($arBilder); else $nPicIndex = 0; ?>
- <img src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($p['id'], $arBilder[$nPicIndex], $nPicWidth, $nPicHeight, $bPicMode)); ?>" alt="<?php wpsg_hspc($p['name']); ?>" />
+
+ <?php
+ $href = wp_get_attachment_image_src($arBilder[$nPicIndex]['post_id'], Array(800, 600));
+ $imgtag = wp_get_attachment_image($arBilder[$nPicIndex]['post_id'], Array($nPicWidth, $nPicHeight));
+ ?>
+ <?php echo $imgtag; ?>
</a>
<?php } ?>
</div>
@@ -132,7 +137,7 @@
wpsg_ff($p['fmenge_preis'], $this->get_option('wpsg_currency')),
wpsg_ff($this->get_option('wpsg_mod_fuellmenge_bezug'), $p['feinheit'])
); ?>
- <?php } ?>
+ <?php } ?>
</div>
</div>
diff --git a/views/mods/mod_productindex/layouts/list.phtml b/views/mods/mod_productindex/layouts/list.phtml
index ca8d962..0b44b2a 100644
--- a/views/mods/mod_productindex/layouts/list.phtml
+++ b/views/mods/mod_productindex/layouts/list.phtml
@@ -89,12 +89,17 @@
<?php $i = 0; foreach ($this->view['arProducts'] as $p) { $i ++; ?>
<div class="wpsg_mod_productindex_product <?php echo (($i % 2 == 0)?'odd':'even'); ?> <?php echo (($i == sizeof($this->view['arProducts']))?'wpsg_mod_productindex_product_last':''); ?> <?php echo (($i == 1)?'wpsg_mod_productindex_product_first':''); ?>">
- <?php if ($this->hasMod('wpsg_mod_produktbilder')) { $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder', array($p['id'])); ?>
+ <?php if ($this->hasMod('wpsg_mod_produktbilder')) { $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($p['id'])); ?>
<div class="wpsg_mod_productindex_pic">
- <?php if (wpsg_isSizedArray($arBilder)) { ?>
+ <?php if (wpsg_isSizedArray($arBilder)) { ?>
<a title="<?php echo __('Zur Detailseite des Produkts', 'wpsg'); ?>" href="<?php echo wpsg_url($p['url']); ?>">
<?php if ($nPicRand === true) $nPicIndex = array_rand($arBilder); else $nPicIndex = 0; ?>
- <img src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($p['id'], $arBilder[$nPicIndex], $nPicWidth, $nPicHeight, $bPicMode)); ?>" alt="<?php wpsg_hspc($p['name']); ?>" />
+
+ <?php
+ $href = wp_get_attachment_image_src($arBilder[$nPicIndex]['post_id'], Array(800, 600));
+ $imgtag = wp_get_attachment_image($arBilder[$nPicIndex]['post_id'], Array($nPicWidth, $nPicHeight));
+ ?>
+ <?php echo $imgtag; ?>
</a>
<?php } ?>
</div>
@@ -129,7 +134,7 @@
wpsg_ff($p['fmenge_preis'], $this->get_option('wpsg_currency')),
wpsg_ff($this->get_option('wpsg_mod_fuellmenge_bezug'), $p['feinheit'])
); ?>
- <?php } ?>
+ <?php } ?>
</div>
</div>
<div class="wpsg_mod_productindex_title">
diff --git a/views/mods/mod_shippingadress/wpsg_order_view_customerdata.phtml b/views/mods/mod_shippingadress/wpsg_order_view_customerdata.phtml
index c091272..d27f09a 100644
--- a/views/mods/mod_shippingadress/wpsg_order_view_customerdata.phtml
+++ b/views/mods/mod_shippingadress/wpsg_order_view_customerdata.phtml
@@ -68,7 +68,7 @@
<?php
if (wpsg_isSizedString($this->view['wpsg_mod_shippingadress']['shipping_title']) && $this->view['wpsg_mod_shippingadress']['shipping_title'] != '-1')
- echo $this->view['wpsg_mod_shippingadress']['shipping_title'];
+ echo $this->view['arTitles'][$this->view['wpsg_mod_shippingadress']['shipping_title']];
?> <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_vname']); ?> <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_name']); ?><br />
<?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_strasse']); ?><br />
diff --git a/views/mods/mod_stock/settings_edit.phtml b/views/mods/mod_stock/settings_edit.phtml
index b384b79..60f55db 100644
--- a/views/mods/mod_stock/settings_edit.phtml
+++ b/views/mods/mod_stock/settings_edit.phtml
@@ -14,7 +14,7 @@
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_stock_notemplateswitch', __('Template nicht wechseln', 'wpsg'), $this->get_option('wpsg_mod_stock_notemplateswitch'), array('help' => 'wpsg_mod_stock_notemplateswitch')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_stock_allow', __('Bestellungen bei negativen Bestand verhindern', 'wpsg'), $this->get_option('wpsg_mod_stock_allow'), array('help' => 'wpsg_mod_stock_allow')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_stock_showBackendStock', __('Bestand in Produktübersicht (Backend) anzeigen', 'wpsg'), $this->get_option('wpsg_mod_stock_showBackendStock'), array('help' => 'wpsg_mod_stock_showBackendStock')); ?>
-<?php if ($this->hasMod('wpsg_mod_productindex')) { ?>
+<?php if ($this->hasMod('wpsg_mod_productindex')) { ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_stock_showProductindex', __('Bestand in Produktübersicht (Frontend) anzeigen', 'wpsg'), $this->get_option('wpsg_mod_stock_showProductindex'), array('help' => 'wpsg_mod_stock_showProductindex')); ?>
<?php } ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_stock_showProduct', __('Bestand in Produkt (Frontend) anzeigen', 'wpsg'), $this->get_option('wpsg_mod_stock_showProduct'), array('help' => 'wpsg_mod_stock_showProduct')); ?>
diff --git a/views/order/view_customerdata.phtml b/views/order/view_customerdata.phtml
index 24faf4b..317339e 100644
--- a/views/order/view_customerdata.phtml
+++ b/views/order/view_customerdata.phtml
@@ -57,7 +57,7 @@
<?php if (trim($this->view['data']['firma']) != '') { ?>
<?php echo wpsg_hspc($this->view['data']['firma']); ?><br />
<?php } ?>
- <?php echo (($this->view['data']['title'] != '' && $this->view['data']['title'] != '-1')?wpsg_hspc($this->view['data']['title']).' ':''); ?><?php echo wpsg_hspc($this->view['data']['vname']); ?> <?php echo wpsg_hspc($this->view['data']['name']); ?><br />
+ <?php echo (($this->view['data']['title'] != '' && $this->view['data']['title'] != '-1')?wpsg_hspc($this->view['arTitles'][$this->view['data']['title']]).' ':''); ?><?php echo wpsg_hspc($this->view['data']['vname']); ?> <?php echo wpsg_hspc($this->view['data']['name']); ?><br />
<?php echo wpsg_hspc($this->view['data']['strasse']); ?><br />
<?php echo wpsg_hspc($this->view['data']['plz']); ?> <?php echo wpsg_hspc($this->view['data']['ort']); ?> <?php echo wpsg_hspc($this->view['country']['kuerzel']); ?><br />
diff --git a/views/produkt/index.phtml b/views/produkt/index.phtml
index c791e60..ee1de2e 100644
--- a/views/produkt/index.phtml
+++ b/views/produkt/index.phtml
@@ -114,13 +114,13 @@
<td class="post-title wpsg_pic_col">
<?php
- $img = $this->callMod('wpsg_mod_produktbilder', 'getProductImage', array($d['id'], 40, 40, 'c'));
+ $img = $this->callMod('wpsg_mod_produktbilder', 'getProductImage_MT', array($d['id'], 40, 40, 'c'));
if ($img !== false)
{
echo '<a href="'.WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Produkt&amp;action=edit&amp;edit_id='.$d['id'].'" title="'.wpsg_translate(__('Produkt für Sprache #1# bearbeiten.', 'wpsg'), $d['name']).'">';
- echo '<img src="'.$img.'" alt="" />';
+ echo '<img src="'.$img.'" alt="" width="40px" height="40px" />';
echo '</a>';
}
diff --git a/views/produkttemplates/standard_mt.phtml b/views/produkttemplates/standard_mt.phtml
index d310391..41bff33 100644
--- a/views/produkttemplates/standard_mt.phtml
+++ b/views/produkttemplates/standard_mt.phtml
@@ -34,7 +34,7 @@ if (!function_exists('is_plugin_active'))
$pbw = $this->get_option('wpsg_mod_produktbilder_width');
$pbh = $this->get_option('wpsg_mod_produktbilder_height');
$pbm = $this->get_option('wpsg_mod_produktbilder_mode');
- $pbArr = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder2', array($this->view['data']['id']));
+ $pbArr = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($this->view['data']['id']));
?>
<?php if (sizeof($pbArr)) { ?>
<?php $i = 0; foreach ($pbArr as $b) { $i ++; ?>