summaryrefslogtreecommitdiff
path: root/views/warenkorb
diff options
context:
space:
mode:
authorDaniel Schmitzer <noreply@maennchen1.de>2017-06-06 15:10:54 +0000
committerDaniel Schmitzer <noreply@maennchen1.de>2017-06-06 15:10:54 +0000
commiteb4343b2485dc88cbb4d4f1e5d53b03711b54e9f (patch)
tree825a716cd298def8a29470eb2c245edfce661f80 /views/warenkorb
parenteb44c5e8ab1ac2c85d2dc6f30c6d44f9ccae961c (diff)
- Aufräumen / Funktionen in Produktansicht ohne Theme überarbeitet
- Basket ohne Tabellen angefangen git-svn-id: https://[internal]/wordpress/plugins/wpsg4@6314 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/warenkorb')
-rw-r--r--views/warenkorb/ajaxDialog.phtml217
-rw-r--r--views/warenkorb/basket.phtml50
-rw-r--r--views/warenkorb/messageDialog.phtml42
3 files changed, 153 insertions, 156 deletions
diff --git a/views/warenkorb/ajaxDialog.phtml b/views/warenkorb/ajaxDialog.phtml
index d029faf..4ac5c4f 100644
--- a/views/warenkorb/ajaxDialog.phtml
+++ b/views/warenkorb/ajaxDialog.phtml
@@ -4,151 +4,98 @@
* Template für den Dialog wenn im Backend "Lightbox Meldung" eingestellt ist
*/
- // $this->view['error'] // Steht auf true wenn ein Fehler produziert und angezeigt werden soll
// $this->view['product_key'] // Der ProduktSchlüssel des hinzugefügten Produktes
// $this->view['amount_add'] // So oft wurde das Produkt hinzugefügt
// $this->view['amount_basket'] // So oft befindet sich das hinzugefügte Produkt im Warenkorb
// $this->view['product_data'] // Array mit Produktdaten
// $this->view['product_index'] // Index des Produktes im Warenkorb
-?><div id="wpsg_basket_ajax_message">
-
- <div class="wpsg_basket_ajax_message_content">
-
- <?php if ($this->view['error'] === true) { ?>
+ $arImages = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($this->view['product_data']['product_id']));
+ if (!wpsg_isSizedArray($arImages)) $arImages = array();
- <h3><?php echo __('Es sind folgende Fehler aufgetreten:', 'wpsg'); ?></h3>
+ $arBasket = $this->basket->toArray();
- <?php echo $this->writeFrontendMessage(); ?>
-
- <div class="wpsg_button_wrap">
- <button class="wpsg_button wpsg_button_continue_shopping" onclick="return wpsg_basket_ajax_message_close();"><?php echo __('Weiter Einkaufen', 'wpsg'); ?></button>
- </div>
-
- <div class="wpsg_clear"></div>
-
- <?php } else { ?>
-
- <div class="wpsg_basket_ajax_message_content_left">
- <?php if ($this->hasMod('wpsg_mod_produktbilder')) { ?>
- <?php $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($this->getProduktId($this->view['product_data']['id']))); ?>
- <?php if (wpsg_isSizedArray($arBilder)) { ?>
- <?php $href = wp_get_attachment_image_src($arBilder[0]['post_id'], Array(30, 30)); ?>
- <?php $imgtag = wp_get_attachment_image($arBilder[0]['post_id'], Array(30, 30)); ?>
- <img src="<?php echo $href[0]; ?>" width="30" height="30" alt="" />
- <?php } ?>
- <?php } ?>
- </div>
-
- <div class="wpsg_basket_ajax_message_content_right">
- <?php if ($this->view['error'] === true) { echo $this->writeFrontendMessage(); } else { ?>
-
- <span class="wpsg_basket_ajax_message_content_success">
- <?php echo wpsg_translate(
- __('Es wurde #1#x "#2#" in den Warenkorb gelegt.', 'wpsg'),
- $this->view['amount_add'],
- $this->getProductName($this->view['product_data']['id'], true)); ?>
- </span>
- <?php } ?>
- <div class="wpsg_clear"></div>
-
- <?php /* Preisanzeige Start */ ?>
- <div class=wpsg_ajaxdialog_form>
- <?php echo __('Der Preis für das Produkt beträgt:','wpsg')?>
- <?php echo wpsg_ff($this->view['product_data']['preis'], $this->get_option('wpsg_currency')); ?>
- </div>
- <div class="wpsg_clear"></div>
- <?php /* Preisanzeige ENDE */ ?>
+?>
+
+<div class="product_add_layer">
+ <?php if (wpsg_isSizedArray($arImages)) { ?>
+ <div class="wpsg_productimages">
+ <?php echo wp_get_attachment_image($arImages[0]['post_id'], array(600, 600), false, array()); ?>
+ </div>
+ <?php } ?>
+
+ <div class="wpsg_basket_ajax_message_content_right">
+
+ <?php /* Preisanzeige Start */ ?>
+ <div class=wpsg_ajaxdialog_form>
+ <?php echo wpsg_translate(
+ __('Der Preis für das Produkt beträgt #1#.', 'wpsg'),
+ wpsg_ff($this->view['product_data']['preis'], $this->get_option('wpsg_currency'))
+ ); ?>
+ <br />
+ <?php echo wpsg_translate(
+ __('Im Warenkorb befinden sich jetzt #1# Produkt(e) zu #2#.', 'wpsg'),
+ $arBasket['menge'],
+ wpsg_ff($arBasket['sum']['preis_gesamt'], $this->get_option('wpsg_currency'))
+ ); ?>
+ </div>
+ <div class="wpsg_clear"></div>
+ <?php /* Preisanzeige ENDE */ ?>
+
+ <?php /* Füllmengenanzeige START */ ?>
+ <?php if ($this->hasMod('wpsg_mod_fuellmenge') && $this->get_option('wpsg_mod_fuellmenge_showAjaxDialog') === '1') { ?>
+ <div class="wpsg_ajaxdialog_form">
+ <?php echo wpsg_translate(__('Füllmenge: #1# #2#', 'wpsg'),'<span class="wpsg_fmenge">'.wpsg_ff($this->view['product_data']['fmenge']).'</span>', $this->view['product_data']['feinheit']); ?>
+ </div>
+ <?php } ?>
+ <div class="wpsg_clear"></div>
+ <?php /* Füllmengenanzeige ENDE */ ?>
+
+ <?php /* Gewichtsanzeige Start */ ?>
+ <?php if ($this->hasMod('wpsg_mod_weight') && $this->get_option('wpsg_mod_weight_showAjaxDialog') === '1') { ?>
+ <div class="wpsg_ajaxdialog_form">
+ <?php echo wpsg_translate(__('Gewicht: #1# #2#', 'wpsg'), '<span class="wpsg_weight"">'.wpsg_ff($this->view['product_data']['weight']).'</span>', $this->view['product_data']['weight_unit']); ?>
+ </div>
+ <?php } ?>
+ <div class="wpsg_clear"></div>
+ <?php /* Gewichtsanzeige ENDE */ ?>
+
+ </div>
+
+ <div class="wpsg_clear"></div>
+
+ <?php /* Zubehörprodukte START */?>
+ <?php if ($this->hasMod('wpsg_mod_relatedproducts') && $this->get_option('wpsg_mod_relatedproducts_showAjaxDialog') === '1') { ?>
+ <?php $arRelatedProducts = $this->callMod('wpsg_mod_relatedproducts', 'getRelatedProducts', array($this->getProduktID($this->view['product_key']))); ?>
+ <?php if (wpsg_isSizedArray($arRelatedProducts)) { ?>
+ <div class="wpsg_ajaxdialog_relatedproducts">
+ <h3><?php echo __('Das könnte Ihnen auch gefallen:', 'wpsg'); ?></h3>
- <?php /* Füllmengenanzeige START */ ?>
- <?php if ($this->hasMod('wpsg_mod_fuellmenge') && $this->get_option('wpsg_mod_fuellmenge_showAjaxDialog') === '1') { ?>
- <div class="wpsg_ajaxdialog_form">
- <?php echo wpsg_translate(__('Füllmenge: #1# #2#', 'wpsg'),'<span class="wpsg_fmenge">'.wpsg_ff($this->view['product_data']['fmenge']).'</span>', $this->view['product_data']['feinheit']); ?>
- </div>
- <?php } ?>
- <div class="wpsg_clear"></div>
- <?php /* Füllmengenanzeige ENDE */ ?>
-
- <?php /* Gewichtsanzeige Start */ ?>
- <?php if ($this->hasMod('wpsg_mod_weight') && $this->get_option('wpsg_mod_weight_showAjaxDialog') === '1') { ?>
- <div class="wpsg_ajaxdialog_form">
- <?php echo wpsg_translate(__('Gewicht: #1# #2#', 'wpsg'), '<span class="wpsg_weight"">'.wpsg_ff($this->view['product_data']['weight']).'</span>', $this->view['product_data']['weight_unit']); ?>
- </div>
- <?php } ?>
<div class="wpsg_clear"></div>
- <?php /* Gewichtsanzeige ENDE */ ?>
- </div>
-
- <div class="wpsg_clear"></div>
-
- <?php /* Zubehörprodukte START */?>
- <?php if ($this->hasMod('wpsg_mod_relatedproducts') && $this->get_option('wpsg_mod_relatedproducts_showAjaxDialog') === '1') { ?>
- <?php $arRelatedProducts = $this->callMod('wpsg_mod_relatedproducts', 'getRelatedProducts', array($this->getProduktID($this->view['product_key']))); ?>
- <?php if (wpsg_isSizedArray($arRelatedProducts)) { ?>
- <div class="wpsg_ajaxdialog_relatedproducts">
- <h3><?php echo __('Das könnte Ihnen auch gefallen:', 'wpsg'); ?></h3>
-
- <div class="wpsg_clear"></div>
-
- <?php foreach ($arRelatedProducts as $rp_data) { $product_data = $this->loadProduktArray($rp_data['product_id']); ?>
-
- <div class="wpsg_ajaxdialog_productrow">
- <h4><?php echo $this->getProductName($rp_data['product_id']); ?></h4>
- <a href="<?php echo $this->getProduktLink($rp_data['product_id']); ?>">
- <?php if ($this->hasMod('wpsg_mod_produktbilder')) { ?>
- <?php $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($this->getProduktId($this->view['product_data']['id']))); ?>
- <?php if (wpsg_isSizedArray($arBilder)) { ?>
- <?php $href = wp_get_attachment_image_src($arBilder[0]['post_id'], Array(30, 30)); ?>
- <?php $imgtag = wp_get_attachment_image($arBilder[0]['post_id'], Array(30, 30)); ?>
- <img src="<?php echo $href[0]; ?>" width="30" height="30" alt="" />
- <?php } ?>
- <?php } ?>
- </a>
- </div>
-
+ <?php foreach ($arRelatedProducts as $rp_data) { $product_data = $this->loadProduktArray($rp_data['product_id']); ?>
+
+ <div class="wpsg_ajaxdialog_productrow">
+ <h4><?php echo $this->getProductName($rp_data['product_id']); ?></h4>
+ <a href="<?php echo $this->getProduktLink($rp_data['product_id']); ?>">
+ <?php if ($this->hasMod('wpsg_mod_produktbilder')) { ?>
+ <?php $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($this->getProduktId($this->view['product_data']['id']))); ?>
+ <?php if (wpsg_isSizedArray($arBilder)) { ?>
+ <?php $href = wp_get_attachment_image_src($arBilder[0]['post_id'], Array(30, 30)); ?>
+ <?php $imgtag = wp_get_attachment_image($arBilder[0]['post_id'], Array(30, 30)); ?>
+ <img src="<?php echo $href[0]; ?>" width="30" height="30" alt="" />
<?php } ?>
- </div>
- <?php }?>
- <?php } ?>
-
- <div class="wpsg_clear"></div>
- <?php /* Zubehörprodukte ENDE*/?>
-
- <div class="wpsg_button_wrap">
- <button class="wpsg_button wpsg_button_continue_shopping" onclick="return wpsg_basket_ajax_message_close();"><?php echo __('Weiter Einkaufen', 'wpsg'); ?></button>
- <a href="<?php echo $this->getUrl(wpsg_ShopController::URL_BASKET); ?>"><button class="wpsg_button wpsg_button_basket"><?php echo __('Zum Warenkorb', 'wpsg'); ?></button></a>
- <div class="wpsg_clear"></div>
- </div>
-
- <?php } ?>
-
- <?php $this->clearFrontendMessage(); ?>
-
- </div>
-
-</div><div id="wpsg_basket_ajax_layer"></div>
-
-<script type="text/javascript">/* <![CDATA[ */
-
- function wpsg_basket_ajax_message_close()
- {
-
- jQuery('#wpsg_basket_ajax_message').remove();
- jQuery('#wpsg_basket_ajax_layer').remove();
-
- return false;
-
- }
-
- jQuery(document).ready(function() {
-
- jQuery('#wpsg_basket_ajax_layer').bind('click', function() {
+ <?php } ?>
+ </a>
+ </div>
+
+ <?php } ?>
+ </div>
+ <?php }?>
+ <?php } ?>
+ <?php /* Zubehörprodukte ENDE*/?>
+
+ <div class="wpsg_clear"></div>
+</div>
- wpsg_basket_ajax_message_close();
-
- } );
-
- } );
-
-/* ]]> */</script> \ No newline at end of file
+ \ No newline at end of file
diff --git a/views/warenkorb/basket.phtml b/views/warenkorb/basket.phtml
index f004133..d61fb57 100644
--- a/views/warenkorb/basket.phtml
+++ b/views/warenkorb/basket.phtml
@@ -35,6 +35,56 @@
<div class="wpsg_spacer"></div>
+ <div class="basket_product_wrap">
+
+ <?php foreach ($this->view['basket']['produkte'] as $k => $product_data) { ?>
+ <div class="basket_product_row">
+
+ <?php $arImages = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($product_data['product_id'])); if (!wpsg_isSizedArray($arImages)) $arImages = array(); ?>
+ <?php if (wpsg_isSizedArray($arImages)) { ?>
+ <div class="productimage">
+
+ <?php echo wp_get_attachment_image($arImages[0]['post_id'], array(300, 300), false, array()); ?>
+
+ </div>
+ <?php } ?>
+
+ <div class="product_content">
+
+ <div class="product_name">
+ <?php if ($this->getProduktLink($product_data)) { ?>
+ <a href="<?php echo $this->getProduktLink($product_data); ?>"><?php echo wpsg_hspc((($product_data['detailname'] != '')?$product_data['detailname']:$product_data['name'])); ?></a>
+ <?php } else { ?>
+ <?php echo wpsg_hspc((($product_data['detailname'] != '')?$product_data['detailname']:$product_data['name'])); ?>
+ <?php } ?>
+
+ <?php if (wpsg_isSizedString($product_data['shortdesc'])) { ?>
+ <div class="product_shortdesc"><?php echo $product_data['shortdesc']; ?></div>
+ <?php } ?>
+
+ </div>
+
+ <div class="product_action">
+ <div class="amount">
+
+ <input class="wpsg_form_submit_return" type="text" name="wpsg[menge][<?php echo $product_data['product_index']; ?>]" <?php echo ((wpsg_isTrue($product_data['oneOnly']) || wpsg_isSizedInt($product_data['basket_multiple'], 4))?'readonly="readonly"':''); ?> value="<?php echo wpsg_hspc($product_data['menge']); ?>" size="3" />
+
+ </div>
+ <div class="price">
+ <?php echo wpsg_ff($product_data['preis'], $this->get_option('wpsg_currency')); ?>
+ </div>
+ <div class="price_total">
+ <?php echo wpsg_ff($product_data['menge'] * $product_data['preis'], $this->get_option('wpsg_currency')); ?>
+ </div>
+ </div>
+
+ </div>
+
+ </div>
+ <?php } ?>
+ </div>
+
+
<table>
<tr class="wpsg_kopf">
<th class="wpsg_cell_number">&nbsp;</th>
diff --git a/views/warenkorb/messageDialog.phtml b/views/warenkorb/messageDialog.phtml
index 96ca5c1..1a2ee6b 100644
--- a/views/warenkorb/messageDialog.phtml
+++ b/views/warenkorb/messageDialog.phtml
@@ -7,27 +7,27 @@
?>
-<div id="wpsg_basket_ajax_message_wrap">
- <div id="wpsg_basket_ajax_message">
- <div class="wpsg_basket_ajax_message_content">
- <?php echo $this->writeFrontendMessage(); $this->clearFrontendMessage(); ?>
- <br />
- <input type="button" id="wpsg_basket_messageDialog_closeButton" value="<?php echo __('Schließen', 'wpsg'); ?>" />
- </div>
- </div>
- <div id="wpsg_basket_ajax_layer"></div></div>
+<div id="wpsg_ajax_layer">
+
+ <div class="wpsg_ajax_message_content">
+ <?php echo $this->writeFrontendMessage(); $this->clearFrontendMessage(); ?>
+ <?php echo wpsg_getStr($this->view['content']); ?>
+ <br />
+ <input type="button" id="wpsg_basket_messageDialog_closeButton" value="<?php echo __('Schließen', 'wpsg'); ?>" />
+ </div>
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_basket_messageDialog_closeButton, #wpsg_ajax_layer').bind('click', function() {
+
+ jQuery('#wpsg_ajax_layer').remove();
-<script type="text/javascript">/* <![CDATA[ */
-
- jQuery(document).ready(function() {
-
- jQuery('#wpsg_basket_messageDialog_closeButton, #wpsg_basket_ajax_layer').bind('click', function() {
-
- jQuery('#wpsg_basket_ajax_message').remove();
- jQuery('#wpsg_basket_ajax_layer').remove();
+ } );
} );
-
- } );
-
-/* ]]> */</script> \ No newline at end of file
+
+ /* ]]> */</script>
+
+</div> \ No newline at end of file