summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhartmut <noreply@maennchen1.de>2017-06-21 14:47:36 +0000
committerhartmut <noreply@maennchen1.de>2017-06-21 14:47:36 +0000
commitd46806278e31bea3ec78e148cd1d5fa63d488466 (patch)
tree0edbccad8e390f0b54332b358b10c94cf28556da
parent5592c9c6ac321791bc589141ad88e072b2caa0d9 (diff)
Warenkorb und Produktseite responsiv
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@6340 0d5edaf7-2b12-4e95-93f4-047927463d4b
-rw-r--r--views/css/frontend.css10
-rw-r--r--views/produkttemplates/standard.phtml218
-rw-r--r--views/warenkorb/basket.phtml1
3 files changed, 116 insertions, 113 deletions
diff --git a/views/css/frontend.css b/views/css/frontend.css
index 80b9b2d..8c64a19 100644
--- a/views/css/frontend.css
+++ b/views/css/frontend.css
@@ -36,7 +36,7 @@ input.wpsg_error { border-color:red !important; }
.basket_product_wrap .basket_product_row .product_action .price { width: 39%; display:inline-block; text-align:right; }
.basket_product_wrap .basket_product_row .product_action .price_total { width: 39%; display:inline-block; font-weight:bold; text-align:right; }
.basket_product_wrap .basket_product_row .product_info { display:flex; width:100%; justify-content:space-between; align-items:center; }
-.basket_product_wrap .basket_product_row .product_info .titlep { width: 20%; display:inline-block; margin-top:0.3em; margin-bottom:0.3em; }
+.basket_product_wrap .basket_product_row .product_info .titlep { width: 20%; min-width:120px; display:inline-block; margin-top:0.3em; margin-bottom:0.3em; }
.basket_product_wrap .basket_product_row .product_info .title { width: 30%; display:inline-block; margin-top:0.3em; margin-bottom:0.3em; }
.basket_product_wrap .basket_product_row .product_info .valuel { width: 50%; display:inline-block; font-weight:normal; text-align:left; }
.basket_product_wrap .basket_product_row .product_info .valuer { width: 50%; display:inline-block; font-weight:normal; text-align:right; }
@@ -61,13 +61,13 @@ input.wpsg_error { border-color:red !important; }
.basket_sum_wrap .wpsg_mod_basketteaser_row { display:flex; width:100%; justify-content:space-between; align-items:center; }
.basket_sum_wrap .wpsg_mod_basketteaser_row .valuer { width: 20%; display:inline-block; font-weight:normal; text-align:right; }
.basket_sum_wrap .wpsg_mod_basketteaser_row .valuel { width: 20%; display:inline-block; font-weight:normal; text-align:left; }
-.basket_sum_wrap .wpsg_gutschein_add {padding:0.75em 2em;}
+.basket_sum_wrap .wpsg_gutschein_add {padding:0.75em 1em;}
/* .glyphicon {width:20px !important; text-decoration:none; position:relative; display:inline-block; font-family:'Glyphicons Halflings'; line-height:1rem;} */
.wpsg_basket .wpsg_basket_removelink { float:right; -webkit-box-shadow:none; box-shadow:none; text-decoration:none; border:0px !important; }
-.wpsg_basket .wpsg_checkoutbutton { float:right; }
+.wpsg_basket .wpsg_checkoutbutton { float:right; padding:0.75em 1em; }
.wpsg_basket .wpsg_cell_gesamtsumme_value { font-weight:bold; }
-.wpsg_basket .wpsg_refreshbutton, .wpsg_basketbutton { float:left; }
+.wpsg_basket .wpsg_refreshbutton, .wpsg_basketbutton { float:left; padding:0.75em 1em; }
.wpsg_basket .wpsg_basket_weiter_shoppen {background:#1a1a1a none repeat scroll 0 0; border:0 none; border-radius:2px; color:#fff; font-weight:700; line-height:1; text-transform:uppercase; padding:0.85em 0.875em 0.78em;}
/* Checkout + Request*/
@@ -178,6 +178,8 @@ input.wpsg_error { border-color:red !important; }
/* Produktattribute */
.wpsg_cell_produktattribute_value { text-align:right; }
+.wpsg_mod_produktattribute_label { display:inline-block; min-width:120px; }
+.wpsg_mod_produktattribute_value { display:inline-block; }
/* Bestellansicht */
.wpsg_mod_kundenverwaltung_order .wpsg_mod_kundenverwaltung_producttable { margin-top:1rem; margin-bottom:2rem; }
diff --git a/views/produkttemplates/standard.phtml b/views/produkttemplates/standard.phtml
index 34f641b..43e1a26 100644
--- a/views/produkttemplates/standard.phtml
+++ b/views/produkttemplates/standard.phtml
@@ -8,60 +8,60 @@
//wpsg_debug($this->view['data']);
// Damit keine Zubehörprodukte ausgegeben werden
- //$this->noReleatedProducts = true;
+ //$this->noReleatedProducts = true;
$arImages = $this->callMod('wpsg_mod_productvariants', 'getKombiVariImages', array($this->view['data']['product_key']));
- if (!wpsg_isSizedArray($arImages))
+ if (!wpsg_isSizedArray($arImages))
$arImages = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($this->view['data']['product_key']));
//$arImages = array();
-?>
-
+?>
+
<div class="wpsg_produkt_wrapper">
<input type="hidden" name="wpsg_post_id" value="<?php echo get_the_ID(); ?>" />
<input type="hidden" name="titleDisplayed" value="<?php echo $this->titleDisplayed; ?>" />
-
+
<div class="wpsg_produkt wpsg_product_name">
-
+
<?php if (!$this->titleDisplayed) { ?>
<h1 itemprop="name" class="wpsg_producttitle"><?php echo $this->getProductName($this->view['data']['id']); ?></h1>
- <?php } ?>
-
+ <?php } ?>
+
<?php $this->callMods('product_top_afterheadline', array(&$this->view['data']['id'], $this->getTemplateIndex())); ?>
-
+
</div>
-
+
<?php $this->callMods('product_top', array(&$this->view['data']['id'], $this->getTemplateIndex())); ?>
<div itemscope itemtype="http://schema.org/Product" class="wpsg_produkt wpsg_produkt_<?php echo $this->view['data']['id']; ?>">
-
+
<?php /* Block für die Produktbilder START */ ?>
<?php if (wpsg_isSizedArray($arImages)) { ?>
<div class="wpsg_productimages">
-
+
<div class="wpsg_produkt_produktbilder">
-
- <?php $att = wp_get_attachment_image_src($arImages[0]['post_id'], array(600, 600), false); ?>
+
+ <?php $att = wp_get_attachment_image_src($arImages[0]['post_id'], array(300, 300), false); ?>
<a rel="gallery-wpsg-<?php echo $this->getTemplateIndex(); ?>" title="<?php echo $this->getProductName($this->view['data']['id']); ?>" href="<?php echo $att[0]; ?>" class="thickbox">
- <?php echo wp_get_attachment_image($arImages[0]['post_id'], array(600, 600), false, array()); ?>
+ <?php echo wp_get_attachment_image($arImages[0]['post_id'], array(300, 300), false, array()); ?>
</a>
-
+
<?php if (sizeof($arImages) > 1) { for ($i = 1; $i < sizeof($arImages); $i ++) { ?>
- <?php $att = wp_get_attachment_image_src($arImages[$i]['post_id'], array(600, 600), false); ?>
+ <?php $att = wp_get_attachment_image_src($arImages[$i]['post_id'], array(300, 300), false); ?>
<a style="display:none;" rel="gallery-wpsg-<?php echo $this->getTemplateIndex(); ?>" title="<?php echo $this->getProductName($this->view['data']['id']); ?>" href="<?php echo $att[0]; ?>" class="thickbox">
- <?php echo wp_get_attachment_image($arImages[$i]['post_id'], array(600, 600), false, array()); ?>
+ <?php echo wp_get_attachment_image($arImages[$i]['post_id'], array(300, 300), false, array()); ?>
</a>
<?php } } ?>
-
+
</div>
-
+
</div>
<?php } ?>
<?php /* Block für die Produktbilder ENDE */ ?>
-
+
<?php if ($this->get_option('wpsg_showArticelnumber') == '1') { ?>
- <div class="wpsg_artikelnummer">
+ <div class="wpsg_artikelnummer">
<?php echo __('Artikelnummer', 'wpsg'); ?>: <span class="wpsg_anr"><?php echo wpsg_hspc($this->view['data']['anr']); ?></span><br />
<?php if (wpsg_isSizedInt($this->get_option('wpsg_mod_produktartikel_ean'))) {?>
<?php echo __('EAN','wpsg');?>:<span class="wpsg_ean"><?php echo wpsg_hspc($this->view['data']['ean']); ?></span><br />
@@ -70,16 +70,16 @@
<?php echo __('GTIN','wpsg');?>:<span class="wpsg_gtin"><?php echo wpsg_hspc($this->view['data']['gtin']); ?></span><br />
<?php }?></div>
<?php } ?>
-
- <?php /* Abfrage Preisanzeige nur für eingeloggte User aktiv und User eingeloggt START*/ ?>
+
+ <?php /* Abfrage Preisanzeige nur für eingeloggte User aktiv und User eingeloggt START*/ ?>
<?php if ($this->view['oProduct']->canDisplayPrice()) { ?>
-
+
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="wpsg_produkt_preis">
-
+
<meta itemprop="priceCurrency" content="<?php echo $this->get_option('wpsg_currency'); ?>" />
-
+
<?php echo __('Stückpreis:', 'wpsg'); ?>
-
+
<?php $oldPrice = $this->view['oProduct']->getOldPrice(); ?>
<?php if ($oldPrice !== false && $oldPrice != $this->view['oProduct']->getPrice()) { ?>
<span class="wpsg_mod_productview_price wpsg_mod_productview_current"><?php echo wpsg_ff($this->view['oProduct']->getPrice(), $this->get_option('wpsg_currency')); ?></span>
@@ -87,62 +87,62 @@
<?php } else { ?>
<span class="wpsg_mod_productview_price"><?php echo wpsg_ff($this->view['oProduct']->getPrice(), $this->get_option('wpsg_currency')); ?></span>
<?php } ?>
-
+
</div>
-
- <?php if ($this->get_option('wpsg_kleinunternehmer')) { /* Kleinunternehmerregelung aktiviert START */ ?>
-
+
+ <?php if ($this->get_option('wpsg_kleinunternehmer')) { /* Kleinunternehmerregelung aktiviert START */ ?>
+
<div class="wpsg_produkt_preishinweis">
<?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>'); ?>
</div>
-
- <?php } else { /* Kleinunternehmerregelung aktiviert ENDE */ ?>
-
- <div class="wpsg_produkt_preishinweis">
+
+ <?php } else { /* Kleinunternehmerregelung aktiviert ENDE */ ?>
+
+ <div class="wpsg_produkt_preishinweis">
<?php if ($this->getFrontendTaxview() == WPSG_NETTO) { /* Frontend = NETTO Preise */ ?>
<?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>'); ?>
<?php } else { /* Frontend = BRUTTO Preise */ ?>
<?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>'); ?>
<?php } ?>
</div>
-
+
<?php } ?>
<?php } else {?>
-
+
<?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.')); ?>
-
+
<?php }?>
- <?php /* Abfrage Preisanzeige nur für eingeloggte User aktiv und User eingeloggt ENDE */ ?>
-
- <div itemprop="description" class="wpsg_produkt_shortdescription">
+ <?php /* Abfrage Preisanzeige nur für eingeloggte User aktiv und User eingeloggt ENDE */ ?>
+
+ <div itemprop="description" class="wpsg_produkt_shortdescription">
<span><?php echo $this->view['data']['shortdesc']; ?></span>
- </div>
-
+ </div>
+
<div class="wpsg_clear"></div>
-
+
<?php /* Lagerbestand START*/?>
<?php if ($this->hasMod('wpsg_mod_stock') && $this->get_option('wpsg_mod_stock_showProduct') == '1') { ?>
<div class="wpsg_mod_produktindex_stock">
- <label><?php echo wpsg_translate(__('#1#','wpsg'), $this->view['data']['stock']); ?></label><?php echo wpsg_translate(__(' Artikel auf Lager', 'wpsg')); ?>
+ <label><?php echo wpsg_translate(__('#1#','wpsg'), $this->view['data']['stock']); ?></label><?php echo wpsg_translate(__(' Artikel auf Lager', 'wpsg')); ?>
</div>
<?php } ?>
<?php /* Lagerbestand ENDE*/?>
-
+
<?php /* Füllmengenanzeige START */ ?>
<?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
-
+
<div class="wpsg_produkt_fuellmenge">
<span class="label label_fuellmenge"><?php echo wpsg_translate(__('Füllmenge:', 'wpsg')); ?></span>
- <?php echo wpsg_translate(__('#1# (#2# / #3#)', 'wpsg'),
+ <?php echo wpsg_translate(__('#1# (#2# / #3#)', 'wpsg'),
'<span class="wpsg_fmenge">'.wpsg_ff($this->view['data']['fmenge'], '', true).'</span> '.$this->view['data']['feinheit'],
'<span class="fmenge_preis">'.wpsg_ff($this->view['data']['fmenge_preis'], $this->get_option('wpsg_currency')).'</span> ',
wpsg_ff($this->get_option('wpsg_mod_fuellmenge_bezug'), $this->view['data']['feinheit'])
); ?>
</div>
-
- <?php } ?>
+
+ <?php } ?>
<?php /* Füllmengenanzeige ENDE */ ?>
-
+
<?php /* Gewichtsanzeige START */ ?>
<?php if ($this->hasMod('wpsg_mod_weight') && $this->get_option('wpsg_mod_weight_showProduct') === '1') { ?>
<div class="wpsg_mod_weight_produkt">
@@ -151,148 +151,148 @@
</div>
<?php } ?>
<?php /* Gewichtsanzeige ENDE */ ?>
-
+
<?php /* Lieferzeit Anzeige START */ ?>
<?php if ($this->hasMod('wpsg_mod_deliverytime') && $this->get_option('wpsg_mod_deliverytime_show_product') == '1') { ?>
-
- <?php /* Produkt nur im Store, nicht im Onlineshop vorhanden */ ?>
+
+ <?php /* Produkt nur im Store, nicht im Onlineshop vorhanden */ ?>
<?php if ($this->callMod('wpsg_mod_deliverytime', 'isStoreProduct', array($this->view['data']['product_key']))) { ?>
-
+
<div class="wpsg_product_only_store"><?php echo wpsg_translate($this->get_option('wpsg_mod_deliverytime_storetext')); ?></div>
-
+
<?php if (wpsg_isSizedInt($this->get_option('wpsg_page_mod_deliverytime_storelink'))) { ?>
&nbsp;<a href="<?php echo get_permalink($this->get_option('wpsg_page_mod_deliverytime_storelink')); ?>"><?php echo __('So erreichen Sie uns.'); ?></a>
- <?php } ?>
-
+ <?php } ?>
+
<?php } else {?>
-
+
<div class="wpsg_mod_deliverytime">
<span class="label label_deliverytime"><?php echo wpsg_translate(__('Lieferzeit:', 'wpsg')); ?></span>
- <?php echo $this->callMod('wpsg_mod_deliverytime', 'displayDeliveryTime', array($this->view['data']['product_key'])); ?>
+ <?php echo $this->callMod('wpsg_mod_deliverytime', 'displayDeliveryTime', array($this->view['data']['product_key'])); ?>
</div>
-
+
<?php $strDelayNote = $this->callMod('wpsg_mod_deliverytime', 'displayDelayTime', array($this->view['data']['product_key'])); ?>
<?php if (wpsg_isSizedString($strDelayNote)) { ?>
- <div class="wpsg_mod_deliverytime_offline">
+ <div class="wpsg_mod_deliverytime_offline">
<div class="wpsg_mod_deliverytime_delay"><?php echo wpsg_hspc($strDelayNote); ?></div>
</div>
- <?php } ?>
-
+ <?php } ?>
+
<?php } ?>
<?php } ?>
<?php /* Lieferzeit Anzeige ENDE */ ?>
-
+
<?php /* Produktkurzbeschreibung START */ ?>
<div class="wpsg_product_informationarea">
-
+
<?php if (strlen(trim($this->view['data']['beschreibung'])) > 0) { ?>
<div class="wpsg_product_information_short">
<div class="wpsg_produkt_additional_information">
- <div itemprop="description" class="wpsg_produkt_shortdescription">
+ <div itemprop="description" class="wpsg_produkt_shortdescription">
<span><?php echo $this->view['data']['beschreibung']; ?></span>
</div>
</div>
</div>
<?php } ?>
-
+
</div>
<?php /* Produktkurzbeschreibung ENDE */ ?>
-
+
<?php /* Varianten START */ ?>
<div class="wpsg_produkt_varianten">
<?php echo $this->callMod('wpsg_mod_productvariants', 'renderTemplate', array($this->view['data']['product_key'])); ?>
</div>
- <?php /* Varianten ENDE */ ?>
-
+ <?php /* Varianten ENDE */ ?>
+
<div class="wpsg_product_buttonarea">
- <div class="wpsg_product_buttons_add_basket">
+ <div class="wpsg_product_buttons_add_basket">
<?php if ($this->view['oProduct']->canOrder()) { ?>
- <div class="wpsg_produkt_add_basket_wrapper">
-
+ <div class="wpsg_produkt_add_basket_wrapper">
+
<label class="wpsg_amount_label" for="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>"><?php echo __('Anzahl', 'wpsg'); ?></label>
-
+
<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" ':''); ?> />
<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]" />
-
+
<?php if (in_array($this->get_option('wpsg_afterinsert'), array('2', '3'))) { ?>
<script type="text/javascript">
-
- jQuery(document).ready(function() {
-
+
+ jQuery(document).ready(function() {
+
jQuery('.wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?>').bind('click', function() {
-
+
wpsg_blockProductTemplate(<?php echo $this->getTemplateIndex(); ?>);
-
+
jQuery.ajax( {
url: '<?php echo $this->getURL(wpsg_ShopController::URL_BASKET); ?>',
data:
{
'wpsg_form_data': jQuery('#wpsg_produktform_<?php echo $this->getTemplateIndex(); ?>').serialize(),
'wpsg[ajax]': '1',
- 'wpsg[submit]': '1'
- },
- success: function(data)
+ 'wpsg[submit]': '1'
+ },
+ success: function(data)
{
-
+
<?php if ($this->get_option('wpsg_afterinsert') == '2') { ?>
tb_show('<?php echo __('Ihr Warenkorb', 'wpsg'); ?>', '<?php echo $this->getURL(wpsg_ShopController::URL_BASKET_AJAX); ?>&height=500');
<?php } else { ?>
-
+
wpsg_unblockProductTemplate(<?php echo $this->getTemplateIndex(); ?>);
jQuery('body').append(data);
-
+
<?php } ?>
-
+
}
- } );
-
+ } );
+
return false;
-
+
} );
-
+
} );
-
+
</script>
<?php } ?>
-
+
</div>
<?php } ?>
- </div>
+ </div>
</div>
-
- <div class="wpsg_clear"></div>
-
- <?php if ($this->hasMod('wpsg_mod_request') && $this->callMod('wpsg_mod_request', 'isRequestProduct', array($this->view['data']['id']))) { ?>
+
+ <div class="wpsg_clear"></div>
+
+ <?php if ($this->hasMod('wpsg_mod_request') && $this->callMod('wpsg_mod_request', 'isRequestProduct', array($this->view['data']['id']))) { ?>
<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]" />
<?php } ?>
-
+
<?php /* Produktlangbeschreibung START */ ?>
<div class="wpsg_product_informationarea">
-
+
<?php if (strlen(trim($this->view['data']['longdescription'])) > 0) { ?>
<div class="wpsg_product_information_large">
<div class="wpsg_produkt_additional_information">
- <div itemprop="description" class="wpsg_produkt_longdescription">
+ <div itemprop="description" class="wpsg_produkt_longdescription">
<span><?php echo $this->view['data']['longdescription']; ?></span>
</div>
</div>
</div>
<?php } ?>
-
+
</div>
<?php /* Produktlangbeschreibung ENDE */ ?>
-
+
<div class="wpsg_clear"></div>
-
+
<?php /* Social Media Integration */ ?>
<div class="wpsg_product_social_media">
<?php if (is_plugin_active('plugin-directory/shariff.php')) {?>
<?php echo do_shortcode('[shariff]')?>
<?php } ?>
</div>
-
+
</div>
-
+
<?php $this->callMods('product_bottom', array(&$this->view['data']['id'], $this->getTemplateIndex())); ?>
-
+
</div> \ No newline at end of file
diff --git a/views/warenkorb/basket.phtml b/views/warenkorb/basket.phtml
index 0670534..4f41e09 100644
--- a/views/warenkorb/basket.phtml
+++ b/views/warenkorb/basket.phtml
@@ -223,6 +223,7 @@
<?php echo wpsg_translate(__('<a href="#1#">Versandkosten</a>:', 'wpsg'),
$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN)
); ?>
+ <br />
<?php if (sizeof($this->arShipping) > 1) { ?>
<select name="set_shipping" class="wpsg_form_submit set_shipping">
<option><?php echo __('Bitte wählen', 'wpsg')?></option>