Subversion Repositories wpShopGermany4

Compare Revisions

Ignore whitespace Rev 8112 → Rev HEAD

/produkttemplates/standard.phtml
37,6 → 37,7
 
<meta itemprop="name" content="<?php echo wpsg_hspc($this->getProductName($this->view['data']['id'])); ?>" />
<meta itemprop="sku" content="<?php echo wpsg_hspc($oProduct->getProductNr()); ?>" />
<meta itemprop="gtin13" content="<?php echo wpsg_hspc($oProduct->getEAN()); ?>" />
<meta itemprop="detailname" content="<?php echo wpsg_hspc($this->view['data']['detailname']); ?>" />
 
<?php /* Block für die Produktbilder START */ ?>
117,8 → 118,10
<?php } else { /* Kleinunternehmerregelung aktiviert ENDE */ ?>
 
<div class="wpsg_produkt_preishinweis">
 
<?php $fs = explode(',', $this->view['data']['allowedshipping']); ?>
<?php if ($this->getFrontendTaxview() == WPSG_NETTO) { /* Frontend = NETTO Preise */ ?>
<?php if ($this->hasMod('wpsg_mod_freeshipping') && $this->get_option('wpsg_mod_freeshipping_aktiv') == '1') { /* Versandkostenfrei aktiv */?>
<?php if ($this->hasMod('wpsg_mod_freeshipping') && $this->get_option('wpsg_mod_freeshipping_aktiv') == '1' && (array_search('500', $fs) || array_search('', $fs))) { /* Versandkostenfrei aktiv */?>
<?php if ($this->get_option('wpsg_mod_freeshipping_minvalue') > 0) { ?>
<?php echo wpsg_translate(__('(zzgl. #1#% MwSt. und <a href="#3#">ab #2# € versandkostenfrei</a>)', 'wpsg'),
134,7 → 137,7
<?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 }?>
<?php } else { /* Frontend = BRUTTO Preise */ ?>
<?php if ($this->hasMod('wpsg_mod_freeshipping') && $this->get_option('wpsg_mod_freeshipping_aktiv') == '1') { /* Versandkostenfrei aktiv */ ?>
<?php if ($this->hasMod('wpsg_mod_freeshipping') && $this->get_option('wpsg_mod_freeshipping_aktiv') == '1' && (array_search('500', $fs) || array_search('', $fs))) { /* Versandkostenfrei aktiv */ ?>
<?php if ($this->get_option('wpsg_mod_freeshipping_minvalue') > 0) { ?>
<?php echo wpsg_translate(__('(inkl. #1#% MwSt. und <a href="#3#">ab #2# € versandkostenfrei</a>)', 'wpsg'),
150,6 → 153,7
<?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 }?>
<?php } ?>
</div>
 
<?php } ?>
/admin/konfiguration.phtml
64,6 → 64,7
<?php echo wpsg_drawForm_Input('wpsg_produkte_perpage', __('Produkte pro Seite', 'wpsg'), $this->get_option('wpsg_produkte_perpage'), array('help' => 'ProduktePerPage')); ?>
<?php echo wpsg_drawForm_Input('wpsg_order_perpage', __('Bestellungen pro Seite', 'wpsg'), $this->get_option('wpsg_order_perpage'), array('help' => 'Bestellung_pro_Seite')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_showincompleteorder', __('Unvollständige Best. in Bestellverwaltung anzeigen', 'wpsg'), $this->get_option('wpsg_showincompleteorder'), array('help' => 'unvollstaendige_Bestellung')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_showvalueofgoods', __('Warenwert in Bestellverwaltung anzeigen', 'wpsg'), $this->get_option('wpsg_showvalueofgoods'), array('help' => 'Warenwert_Bestellung')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_emptyorder_clear', wpsg_translate(__('Bestellungen für 0 #1# direkt abschließen', 'wpsg'), $this->get_option('wpsg_currency')), $this->get_option('wpsg_emptyorder_clear'), array('help' => 'Bestellung_0')); ?>
<?php echo wpsg_drawForm_Select('wpsg_afterinsert', __('Nach neuem Produkt im Warenkorb', 'wpsg'), array(
'0' => __('Auf Seite bleiben', 'wpsg'),
/mods/mod_productgroups/add.phtml
4,6 → 4,15
* Template für das Anlegen/Bearbeiten einer Produktgruppe
*/
 
/** @var wpsg_productgroup|null $oProductgroup */
$oProductgroup = null;
 
if (intval($_REQUEST['edit_id']??0) > 0) {
 
$oProductgroup = wpsg_productgroup::getInstance(intval($_REQUEST['edit_id']));
 
}
 
?>
 
<div class="wpsg_productgroups" id="wpsg-bs">
61,6 → 70,78
<?php echo wpsg_drawForm_Select('template_file', __('Template', 'wpsg'), $this->view['templates'], $this->view['data']['template_file']); ?>
<?php echo wpsg_drawForm_Select('infopage', __('Info Seite', 'wpsg'), $this->view['pages'], $this->view['data']['infopage']); ?>
 
<div class="form-group form-group-sm ">
<label class="col-sm-6 control-label"><?php echo __('Produktgruppenbild', 'wpsg'); ?></label>
<div class="col-sm-6">
<div class="wpsg_field_wrap">
<div id="imageBox"><?php
 
if ($oProductgroup !== null) {
 
if ($oProductgroup->getImage() > 0) {
 
echo wp_get_attachment_image($oProductgroup->getImage(), 'full', false, [
'style' => 'max-width:100%; height:auto; margin-bottom:8px;'
]);
 
}
 
}
 
?></div>
 
<input value="Mediathek" class="button" type="button" style="text-align:center;" size="10" id="btnAddImgLink" />
<input type="hidden" name="image" value="<?php echo (($oProductgroup !== null)?$oProductgroup->getImage():0); ?>" id="image_input" />
 
<script>
 
let wpframe = undefined;
let imageBox = document.getElementById('imageBox');
let elImageInput = document.getElementById('image_input');
 
document.getElementById('btnAddImgLink').addEventListener('click', (event) => {
 
event.preventDefault();
 
if (wpframe !== undefined) { wpframe.open(); return; }
 
wpframe = wp.media.frames.file_frame = wp.media({
title: "<?php echo __('Auswählen oder Hochladen von Medien', 'wpsg'); ?>",
button: { text: "<?php echo __('Medien benutzen', 'wpsg'); ?>" },
multiple: false
});
 
wpframe.on('select', () => {
 
let attachments = wpframe.state().get('selection').map((attachment) => {
 
attachment.toJSON();
 
return attachment;
 
});
 
for (let i = 0; i < attachments.length; ++i) {
 
let attachment = attachments[i];
 
imageBox.innerHTML = '<img src="' + attachment.attributes.url + '" alt="" style="max-width:100%; margin-bottom:8px;"/>';
elImageInput.value = attachment.attributes.id;
 
}
 
});
 
wpframe.open();
 
});
 
</script>
</div>
</div>
<div class="clearfix wpsg_clear"></div>
</div>
 
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
 
</div>
/produkt/index.phtml
312,17 → 312,21
$post_terms = \get_the_terms($post_id, $this->get_option('wpsg_mod_produktartikel_pathkey_cat'));
$arTermDisplay = [];
 
if (is_array($post_terms)) {
foreach ($post_terms as $term) {
if (!in_array($term->slug, $arTermExclude)) {
foreach ($post_terms as $term) {
if ($wpsg_mod_produktartikel_cat_first_level && $term->parent !== 0) continue;
if (!in_array($term->slug, $arTermExclude)) {
if ($wpsg_mod_produktartikel_cat_first_level && $term->parent !== 0) continue;
$arTermDisplay[] = $term->name;
}
$arTermDisplay[] = $term->name;
}
 
}
asort($arTermDisplay);
/admin/versandzonen_list.phtml
4,6 → 4,23
* Template für die Liste der Versandzonen
*/
 
$arShipping = $this->arShippingAll;
$arShippingPreset = [
'0' => __('Kundenvoreinstellung', 'wpsg'),
'-1' => __('günstigste Versandart', 'wpsg'),
];
foreach ($arShipping as $s_key => $s) {
if (intval($s['deleted']??'') !== 1 && intval($s['active']??'') === 1) {
$arShippingPreset[$s_key] = $s['name'];
 
}
}
?>
<?php if (!is_array($this->view['data']) || sizeof($this->view['data']) <= 0) { ?>
<?php echo __('Bisher keine Versandzonen hinterlegt.', 'wpsg'); ?>
13,6 → 30,7
<tr>
<th class="col_name"><?php echo __('Bezeichnung', 'wpsg'); ?></th>
<th class="col_innereu"><?php echo __('Inner- gemeinschaftlich', 'wpsg'); ?></th>
<th class="col_shippingpreset"><?php echo __('Standardversandart', 'wpsg'); ?></th>
<th class="col_aktion"></th>
</tr>
</thead>
32,6 → 50,29
data-url="<?php echo html_entity_decode(wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=inlinedit&noheader=1', 'wpsg-admin-versandzonen-inline_edit-'.$vz['id'])); ?>"
<?php echo (($vz['innereu'] == '1')?'checked="checked"':''); ?> type="checkbox" value="1" name="innereu_<?php echo $vz['id']; ?>" id="innereu_<?php echo $vz['id']; ?>" />
</td>
<td class="col_shippingpreset">
<span id="vz_<?php echo $vz['id']; ?>_shippingpreset"><?php echo ($arShippingPreset[($vz['shippingpreset']??'')]??''); ?></span>
<script>
jQuery('#vz_<?php echo $vz['id']; ?>_shippingpreset').wpsg_editable('<?php
echo html_entity_decode(wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=inlinedit&noheader=1', 'wpsg-admin-versandzonen-inline_edit-'.$vz['id']));
?>', {
submitdata: {
field: 'shippingpreset',
vz_id: '<?php echo $vz['id']; ?>'
},
data: <?php echo wpsg_prepare_for_inlineEdit($arShippingPreset); ?>,
type: 'select',
submit: '<?php echo __('Speichern', 'wpsg'); ?>',
placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
});
</script>
</td>
<td class="col_aktion">
<a class="wpsg_icon_plzedit" href="#" title="<?php echo __('Versandzonen PLZ bearbeiten', 'wpsg'); ?>" onclick="return wpsg_editPLZ(<?php echo $vz['id']; ?>);">[ PLZ ]</a>
/mods/mod_productgroups/list.phtml
22,9 → 22,10
<div class="wpsg_pgruppen_list_produkte">
<?php for ($i = 0; $i < $showP && $i < sizeof($g['produkte']); $i ++) { ?>
 
<?
<?php
 
$lagerbestand = $this->callMod('wpsg_mod_stock', 'getBestand', [$g['produkte'][$i]['id']]);
if ($this->hasMod('wpsg_mod_stock')) $lagerbestand = $this->callMod('wpsg_mod_stock', 'getBestand', [$g['produkte'][$i]['id']]);
else $lagerbestand = 1;
 
?>
 
/admin/kalkulation.phtml
44,7 → 44,8
<?php echo wpsg_drawForm_Checkbox('wpsg_hideemptyshipping', __('Versandkosten bei 0 ausblenden', 'wpsg'), $this->get_option('wpsg_hideemptyshipping'), array('help' => 'Preiskalkulation_wpsg_hideemptyshipping')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_hideemptypayment', __('Zahlungskosten bei 0 ausblenden', 'wpsg'), $this->get_option('wpsg_hideemptypayment'), array('help' => 'Preiskalkulation_wpsg_hideemptypayment')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_noroundamount', __('Vor Multiplikation mit Menge nicht runden', 'wpsg'), $this->get_option('wpsg_noroundamount'), ['help' => 'Preiskalkulation_wpsg_noroundamount']); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_deliverycountrytax', __('Mwst. gemäß Lieferland berechnen', 'wpsg'), $this->get_option('wpsg_deliverycountrytax'), ['help' => 'Preiskalkulation_wpsg_deliverycountrytax']); ?>
</div>
</div>
/warenkorb/basket.phtml
10,10 → 10,10
//wpsg_debug($this->arShipping);
 
//wpsg_debug(__('Deutschland', 'wpsg'));
if ($this->getFrontendTaxView() === WPSG_BRUTTO) $display_brutto_netto = 'brutto';
else $display_brutto_netto = 'netto';
?>
<div class="wpsg wpsg_basket <?php echo ((isset($_REQUEST['wpsg_basket_ajax']))?'wpsg_basket_ajax':''); ?>">
 
237,7 → 237,7
<option <?php echo (($s['id'] == $this->view['basket']['checkout']['shipping'])?'selected="selected"':''); ?> value="<?php echo $s_id; ?>"><?php echo wpsg_hspc(__($s['name'], 'wpsg')); ?></option>
<?php } ?>
</select>
<?php } else if (!wpsg_isSizedArray($this->arShipping) || !array_key_exists($this->view['basket']['checkout']['shipping'], $this->arShipping)) { ?>
<?php } else if (!wpsg_isSizedArray($this->arShipping)) { ?>
<span><?php echo __('Keine Versandart möglich / Bitte manuell anfragen', 'wpsg'); ?></span>
<?php } else { ?>
<span><?php echo $this->arShipping[$this->view['basket']['checkout']['shipping']]['name']; ?></span>
245,7 → 245,7
<?php if ($this->get_option('wpsg_hideBasketCountrySelect') != '1') { ?>
<select name="set_land" id="set_land" class="wpsg_form_submit set_land">
<?php foreach ($this->view['arLander'] as $l_id => $l) { ?>
<option <?php echo (($l_id == $this->getFrontendCountry(true))?'selected="selected"':''); ?> value="<?php echo $l_id; ?>"><?php echo wpsg_hspc(__($l, 'wpsg')); ?></option>
<option <?php echo (($l_id == $this->getFrontendShippingCountry(true))?'selected="selected"':''); ?> value="<?php echo $l_id; ?>"><?php echo wpsg_hspc(__($l, 'wpsg')); ?></option>
<?php } ?>
</select>
<?php } else { ?>
/mods/mod_deliverynote/deliverynote_pdf.phtml
169,6 → 169,7
$filename = $this->view['filename'].".pdf";
$bKopf = false; $pnr = 1; $offset = 0; $count = 0;
 
foreach ($this->view['data']['products'] as $p)
{
232,7 → 233,7
/* Wenn Detailname nicht vorhanden, wird der Name auf dem Lieferschein verwendet*/
$produkt_text = $this->getProductName($this->getProduktID($p['p_id']), false);
 
$produktBeschreibung = trim(strip_tags($p['beschreibung']));
$produktBeschreibung = trim(strip_tags($product_data['beschreibung']));
if ($this->isOtherLang())
{
/mods/mod_abo/index.phtml
79,9 → 79,11
<div class="col-lg-6">
<select name="filter[enddate_y]" class="form-control input-sm">
<option value="-1"><?php echo __("Alle", "wpsg"); ?></option>
<?php foreach ($this->view['enddate_years'] as $y) { ?>
<option <?php echo ((wpsg_getStr($this->view['arFilter']['enddate_y']) == $y)?'selected="selected"':''); ?> value="<?php echo $y; ?>"><?php echo $y; ?></option>
<?php } ?>
<?php if(isset($this->view['enddate_years']) && !empty($this->view['enddate_years'])) {
foreach ($this->view['enddate_years'] as $y) { ?>
<option <?php echo ((wpsg_getStr($this->view['arFilter']['enddate_y']) == $y)?'selected="selected"':''); ?> value="<?php echo $y; ?>"><?php echo $y; ?></option>
<?php }
} ?>
</select>
</div>
</div>
127,7 → 129,7
<th class="col_customer wpsg_order" data-order="customer"><?php echo __('Kunde', 'wpsg'); ?></th>
<th class="col_payment wpsg_order" data-order="payment"><?php echo __('Bezahlmethode', 'wpsg'); ?></th>
<th class="col_shipping wpsg_order" data-order="shipping"><?php echo __('Versandart', 'wpsg'); ?></th>
<th class="col_products wpsg_order" data-order="products"><?php echo __('Abonnement', 'wpsg'); ?></th>
<th class="col_products wpsg_order" data-order="products"><?php echo __('Abonnement', 'wpsg'); ?></th>
<th class="col_sum wpsg_order" data-order="amount"><?php echo __('Bestellwert', 'wpsg'); ?></th>
<th class="col_time wpsg_order" data-order="expiration"><?php echo __('Laufzeit', 'wpsg'); ?></th>
<th class="col_state"><?php echo __('Status', 'wpsg'); ?></th>
/order/view_general.phtml
34,8 → 34,11
<?php echo wpsg_drawForm_Select('status', __('Neuer Status', 'wpsg'), $this->arStatus, $this->view['data']['status']); ?>
<?php echo wpsg_drawForm_Checkbox('sendMail', __('Kunden informieren', 'wpsg'), 0); ?>
 
<?php if ($this->hasMod('wpsg_mod_rechnungen')) { $db_invoice = $this->callMod('wpsg_mod_rechnungen', 'getOrderInvoice', [$this->view['oOrder']->id]); ?>
<?php if (wpsg_isSizedInt($db_invoice['id'])) { ?>
<?php if ($this->hasMod('wpsg_mod_rechnungen')) {
 
$arInvoice = \wpsg\wpsg_invoice::findByOrderId($this->view['oOrder']->id);
 
if (sizeof($arInvoice) > 0) { ?>
<script>
 
jQuery('#sendMail').on('click', function() {
/order/product_table.phtml
303,20 → 303,27
<strong><?php echo wpsg_ff($arCalculation['sum']['brutto']); ?> <?php echo $this->get_option('wpsg_currency'); ?></strong>
</td>
</tr>
<?php foreach ($arCalculation['tax'] as $tax) { if ($tax['sum'] > 0 && $tax['key'] != '0') { ?>
<tr class="wpsg_row_mwst wpsg_row_small">
<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_mwst_label">
<?php if ($this->get_option('wpsg_kleinunternehmer') == '1') { ?>
<?php echo $this->get_option('wpsg_kleinunternehmer_text'); ?>
<?php } else { ?>
<?php echo wpsg_translate(__('darin enthaltene MwSt. (#1#)', 'wpsg'), $arTax[$tax['key']]); ?>
<?php } ?>
</td>
<td class="wpsg_cell_mwst_value wpsg_cell_gesamtpreis">
<?php echo wpsg_ff($tax['sum']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
</td>
</tr>
<?php } } ?>
<?php if ($this->get_option('wpsg_kleinunternehmer') == '1') { ?>
<tr class="wpsg_row_mwst wpsg_row_small">
<td class="wpsg_cell_mwst_value wpsg_cell_gesamtpreis" colspan="<?php echo $this->view['colspan'] + 1; ?>">
<?php echo $this->get_option('wpsg_kleinunternehmer_text'); ?>
</td>
</tr>
<?php } else { ?>
<?php foreach ($arCalculation['tax'] as $tax) { if ($tax['sum'] > 0 && $tax['key'] != '0') { ?>
<tr class="wpsg_row_mwst wpsg_row_small">
<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_mwst_label">
<?php echo wpsg_translate(__('darin enthaltene MwSt. (#1#)', 'wpsg'), $arTax[$tax['key']]); ?>
</td>
<td class="wpsg_cell_mwst_value wpsg_cell_gesamtpreis">
<?php echo wpsg_ff($tax['sum']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
</td>
</tr>
<?php } } ?>
<?php } ?>
<?php } ?>
/mods/mod_abo/order_view_base.phtml
7,7 → 7,7
?>
<tr class="wpsg_<?php echo (($this->view['i'] == 0)?'odd':'even'); ?>">
<td ><?php echo __('Abo Verlängerungen', 'wpsg'); ?>:</td>
<td align="right" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'4':'3'); ?>">
<td align="right" colspan="<?php echo ((sizeof($this->view['basket']['mwst'])??0 > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'4':'3'); ?>">
<?php if (wpsg_isSizedArray($this->view['wpsg_mod_abo']['rebuy'])) { ?>
<?php foreach ($this->view['wpsg_mod_abo']['rebuy'] as $k => $v) { ?>
<?php echo wpsg_translate(__('Mit Bestellung <a href="#1#">#2#</a> um #3# Tage verlängert.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&action=view&edit_id='.$v['o_id'], $v['order']['onr'], $v['tage']); ?><br />
/mods/mod_export/profil.phtml
89,10 → 89,33
<?php echo wpsg_drawForm_Text(__('Pfad', 'wpsg'), $this->view['profil']['cron_path'], 'cron_path', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
<?php echo wpsg_drawForm_Text(__('Letzte Ausführung', 'wpsg'), (($this->view['profil']['cron_lastrun'] == '0000-00-00')?__('Noch nie', 'wpsg'):wpsg_formatTimestamp($this->view['profil']['cron_lastrun'], true)), false, array('noP' => false)); ?>
<?php echo wpsg_drawForm_Text(__('Cron URL', 'wpsg'), '<a href="'.site_url().'/?wpsg_cron=1">'.site_url().'/?wpsg_cron=1</a>', false, array('noP' => false)); ?>
<fieldset id="wpsg_mod_export_cron_url" style="display:<?php echo (($this->view['profil']['cron_interval'] !== wpsg_mod_export::CRON_ORDER)?'block':'none'); ?>;">
<?php echo wpsg_drawForm_Text(__('Cron URL', 'wpsg'), '<a href="'.site_url().'/?wpsg_cron=1">'.site_url().'/?wpsg_cron=1</a>', false, array('noP' => false)); ?>
</fieldset>
 
<?php echo wpsg_drawForm_Checkbox('wp_cron', __('Stündlich mit Wordpress Cron ausführen', 'wpsg'), ($this->view['profil']['wp_cron']??'0') === '1'); ?>
 
<script>
 
document.getElementById('wp_cron').addEventListener('change', (event) => {
 
jQuery.ajax({
url: '<?php echo $inlineEdit_url; ?>',
data: {
name: 'wp_cron',
value: ((event.target.checked === true)?'1':'0')
}
})
 
// console.log('<?php echo $inlineEdit_url; ?>');
 
});
 
</script>
 
<?php if ($this->view['profil']['export_type'] === wpsg_mod_export::TYPE_ORDER) { ?>
<fieldset id="wpsg_mod_export_orderfilter">
<fieldset id="wpsg_mod_export_orderfilter" style="display:<?php echo (($this->view['profil']['cron_interval'] !== wpsg_mod_export::CRON_ORDER)?'block':'none'); ?>;">
<legend><div class="col-sm-offset-6"><?php echo __('Bestellfilter', 'wpsg'); ?></div></legend>
105,7 → 128,7
<?php echo wpsg_drawForm_Text(__('Bestellstatus', 'wpsg'), $arOrderStatus[wpsg_getStr($this->view['profil']['orderfilter']['status'], '-1')], 'orderfilter_status', array('inlineEdit' => true, 'inlineEdit_type' => 'select', 'inlineEdit_url' => $inlineEdit_url, 'inlineEdit_source' => $arOrderStatus)); ?>
<?php $arMonth = array('-1' => __('Alle', 'wpsg')); ?>
<?php for ($i = 1; $i <= 12; $i ++) { $arMonth[str_pad($i, 2, '0', STR_PAD_LEFT)] = strftime("%B", mktime(0, 0, 0, $i, 1, 2000)); } ?>
<?php for ($i = 1; $i <= 12; $i ++) { $arMonth[str_pad($i, 2, '0', STR_PAD_LEFT)] = wpsg_strftime("%B", mktime(0, 0, 0, $i, 1, 2000)); } ?>
<?php $arYearCdate = array('-1' => __('Alle', 'wpsg')); ?>
<?php foreach ($this->view['cdate_years'] as $y) { $arYearCdate[$y] = $y; } ?>
199,7 → 222,9
<?php if ($this->hasMod('wpsg_mod_produktartikel')) { $temp = $this->callMod('wpsg_mod_produktartikel', 'getProductcategorySelect', array()); ?>
<?php $arProductCategorySelect = array(); foreach ($temp as $k => $v) $arProductCategorySelect[$v['term_id']] = $v['label']; ?>
<?php echo wpsg_drawForm_Text(__('Produktkategorie', 'wpsg'), $arProductCategorySelect[wpsg_getStr($this->view['profil']['orderfilter']['productcategory_ids'], '-1')], 'orderfilter_productcategory_ids', array('inlineEdit' => true, 'inlineEdit_type' => 'select', 'inlineEdit_url' => $inlineEdit_url, 'inlineEdit_source' => $arProductCategorySelect)); ?>
<?php $productCategoryIds = wpsg_getStr($this->view['profil']['orderfilter']['productcategory_ids'], '-1'); ?>
<?php $selectedCategory = $arProductCategorySelect['-1'] ?? ''; ?>
<?php echo wpsg_drawForm_Text(__('Produktkategorie', 'wpsg'), $arProductCategorySelect[$productCategoryIds], 'orderfilter_productcategory_ids', array('inlineEdit' => true, 'inlineEdit_type' => 'select', 'inlineEdit_url' => $inlineEdit_url, 'inlineEdit_source' => $arProductCategorySelect)); ?>
<?php } ?>
</form>
233,9 → 258,20
 
<script type="text/javascript">/* <![CDATA[ */
 
function switchCronType(response, newValue)
{
function switchCronType(response, newValue) {
if (parseInt(newValue) === parseInt("<?php echo wpsg_mod_export::CRON_ORDER; ?>")) {
jQuery('#wpsg_mod_export_cron_url').hide();
jQuery('#wpsg_mod_export_orderfilter').hide();
} else {
jQuery('#wpsg_mod_export_cron_url').show();
jQuery('#wpsg_mod_export_orderfilter').show();
}
if (newValue != "0") jQuery('.cron_interval_1').show();
else jQuery('.cron_interval_1').hide();
/produkttemplates/standard3.phtml
0,0 → 1,521
<?php
 
/*
* Template für das Produkt im Frontend Layout 3
*/
 
/** @var wpsg_product $oProduct */
$oProduct = $this->view['oProduct'];
 
$arAttachmentIDsAll = $this->imagehandler->getAttachmentIDs($this->view['data']['product_id']);
 
?>
 
<div class="wpsg_produkt_wrapper layout3">
 
<input type="hidden" name="wpsg_post_id" value="<?php echo get_the_ID(); ?>" />
<input type="hidden" name="titleDisplayed" value="<?php echo $this->titleDisplayed; ?>" />
<input type="hidden" name="wpsg[template]" value="standard3.phtml" />
 
<div class="col_wrap">
<div class="col image">
<div class="thumbnails">
 
<?php foreach ($arAttachmentIDsAll as $k => $image_id) { ?>
 
<?php echo \wp_get_attachment_image($image_id, 'small', false, [
'data-index' => $k
]); ?>
 
<?php } ?>
 
</div>
<div class="view">
<?php foreach ($arAttachmentIDsAll as $k => $image_id) { ?>
<a class="thickbox" id="<?php echo $this->getTemplateIndex(); ?>_<?php echo $k; ?>" rel="gallery-<?php echo $this->getTemplateIndex(); ?>" href="<?php echo \wp_get_attachment_image_src($image_id, 'full')[0]; ?>"></a>
<?php } ?>
<div class="wpsg_product_slider">
 
<?php foreach ($arAttachmentIDsAll as $k => $image_id) { ?>
 
<div>
<div class="ds_image_zoom" data-image-index="<?php echo $k; ?>"
onclick="document.getElementById('<?php echo $this->getTemplateIndex(); ?>_<?php echo $k; ?>').click();"
>
<?php echo \wp_get_attachment_image($image_id, 'full', false, [
'data-index' => $k,
'data-src' => \wp_get_attachment_image_src($image_id, 'full')[0]
]); ?>
</div>
</div>
 
<?php } ?>
 
</div>
</div>
</div>
<div>
 
<?php if (!$this->titleDisplayed) { ?>
<h1 itemprop="name" class="wpsg_producttitle"><?php echo $this->getProductName($this->view['data']['id']); ?></h1>
<h2 itemprop="detailname" class="wpsg_productdetailtitle"><?php echo $this->view['data']['detailname']; ?></h2>
<?php } ?>
 
<?php $this->callMods('product_top_afterheadline', array(&$this->view['data']['id'], $this->getTemplateIndex())); ?>
 
<?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 if ($this->get_option('wpsg_showArticelnumber') == '1') { ?>
<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 />
<?php } ?>
<?php if (wpsg_isSizedInt($this->get_option('wpsg_mod_produktartikel_gtin'))) {?>
<?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 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($this->view['data']['product_key'])) { ?>
<span class="wpsg_mod_productview_price wpsg_mod_productview_current"><?php echo wpsg_ff($this->view['oProduct']->getPrice($this->view['data']['product_key']), $this->get_option('wpsg_currency')); ?></span>
<span class="wpsg_mod_productview_oldprice"><?php echo wpsg_ff($oldPrice, $this->get_option('wpsg_currency')); ?></span>
<?php } else { ?>
<span class="wpsg_mod_productview_price"><?php echo wpsg_ff($this->view['oProduct']->getPrice($this->view['data']['product_key']), $this->get_option('wpsg_currency')); ?></span>
<?php } ?>
 
</div>
 
<?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 if ($this->getFrontendTaxview() == WPSG_NETTO) { /* Frontend = NETTO Preise */ ?>
<?php if ($this->hasMod('wpsg_mod_freeshipping') && $this->get_option('wpsg_mod_freeshipping_aktiv') == '1') { /* Versandkostenfrei aktiv */?>
 
<?php if ($this->get_option('wpsg_mod_freeshipping_minvalue') > 0) { ?>
<?php echo wpsg_translate(__('(zzgl. #1#% MwSt. und <a href="#3#">ab #2# € versandkostenfrei</a>)', 'wpsg'),
wpsg_ff($this->view['data']['mwst_value']),
wpsg_ff($this->get_option('wpsg_mod_freeshipping_minvalue')),
$this->getUrl(wpsg_ShopController::URL_VERSANDKOSTEN)
); ?>
<?php } else { ?>
<?php echo wpsg_translate(__('(zzgl. #1#% MwSt. und versandkostenfrei)', 'wpsg'), wpsg_ff($this->view['data']['mwst_value'])); ?>
<?php } ?>
 
<?php } else { ?>
<?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 }?>
<?php } else { /* Frontend = BRUTTO Preise */ ?>
<?php if ($this->hasMod('wpsg_mod_freeshipping') && $this->get_option('wpsg_mod_freeshipping_aktiv') == '1') { /* Versandkostenfrei aktiv */ ?>
 
<?php if ($this->get_option('wpsg_mod_freeshipping_minvalue') > 0) { ?>
<?php echo wpsg_translate(__('(inkl. #1#% MwSt. und <a href="#3#">ab #2# € versandkostenfrei</a>)', 'wpsg'),
wpsg_ff($this->view['data']['mwst_value']),
wpsg_ff($this->get_option('wpsg_mod_freeshipping_minvalue')),
$this->getUrl(wpsg_ShopController::URL_VERSANDKOSTEN)
); ?>
<?php } else { ?>
<?php echo wpsg_translate(__('(inkl. #1#% MwSt. und versandkostenfrei)', 'wpsg'), wpsg_ff($this->view['data']['mwst_value'])); ?>
<?php } ?>
 
<?php } else { ?>
<?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 }?>
<?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 class="wpsg_clear"></div>
 
<div itemprop="description" class="wpsg_produkt_shortdescription">
 
<span><?php echo $this->view['data']['shortdesc']; ?></span>
 
</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">
 
<?php if (($this->view['data']['stock']) > '0') {?>
 
<label><?php echo __('Lagerbestand', 'wpsg'); ?></label>
<?php echo wpsg_translate(__('#1# Artikel auf Lager','wpsg'), $this->view['data']['stock']); ?>
 
<?php } else { ?>
 
<label><?php echo wpsg_translate(__('', 'wpsg')); ?></label>
 
<?php } ?>
 
</div>
<?php } ?>
<?php /* Lagerbestand ENDE*/?>
 
<?php /* Füllmengenanzeige START */ ?>
<?php echo $this->callMod('wpsg_mod_fuellmenge', 'renderPriceInfo', [$oProduct->getPrice($this->view['data']['product_key']), $this->view['data']['fmenge'], $oProduct->getId()]); ?>
<?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">
 
<?php if (($this->view['data']['weight']) > '0') { ?>
<span class="label label_weight"><?php echo wpsg_translate(__('Gewicht:', 'wpsg')); ?></span>
<?php echo wpsg_translate(__('#1# #2#', 'wpsg'), '<span class="wpsg_weight" id="weight_'.$this->view['data']['id'].'">'.wpsg_ff($this->view['data']['weight']).'</span>', $this->get_option('wpsg_mod_weight_unit')); ?>
<?php } else { ?>
<label><?php wpsg_translate(__('', 'wpsg'))?></label>
<?php } ?>
</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 if ($this->callMod('wpsg_mod_deliverytime', 'isStoreProduct', array($this->view['data']['product_key']))) { ?>
 
<div class="wpsg_product_only_store"><?php echo __($this->callMod('wpsg_mod_deliverytime', 'displayStoreText', array($this->view['data']['product_key']))); ?></div>
 
<?php $stl = 0; $stl = $this->callMod('wpsg_mod_deliverytime', 'displayStoreLink', array($this->view['data']['product_key'])) ?>
<?php if (wpsg_isSizedInt($stl)) { ?>
 
&nbsp;<a href="<?php echo get_permalink($stl); ?>"><?php echo __('So erreichen Sie uns.'); ?></a>
 
<?php } ?>
 
<?php } else { ?>
 
<?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_delay"><?php echo wpsg_hspc($strDelayNote); ?></div>
 
</div>
 
<?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'])); ?>
</div>
 
<?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">
<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 $this->callMods('product_bottom', array(&$this->view['data']['product_key'], $this->getTemplateIndex())); ?>
 
 
<div class="wpsg_product_buttonarea">
<div class="wpsg_product_buttons_add_basket">
<?php if ($this->view['oProduct']->canOrder()) { ?>
<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" ':''); ?> />
 
<?php /* Urlaubsmodus aktiv */ ?>
<?php if ($this->hasMod('wpsg_mod_deliverytime') && ($this->get_option('wpsg_mod_deliverytime_holiday') == '1')) { ?>
 
<?php if ($this->callMod('wpsg_mod_deliverytime', 'holiday', array($this->view['data']['product_key']))) { ?>
 
<div class="wpsg_product_deliverytime_holiday" style="height:50px; padding:10px; width:50%; float:right; border:1px solid #ff0000;">
 
<?php echo __($this->callMod('wpsg_mod_deliverytime', 'displayHolidaytext', array($this->view['data']['product_key']))); ?>
 
</div>
 
<?php } ?>
 
<?php } else {?>
 
<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 } ?>
 
<?php if (in_array($this->get_option('wpsg_afterinsert'), array('2', '3'))) { ?>
<script type="text/javascript">
 
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_refreshBasketWidget();
 
<?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 class="wpsg_clear"></div>
 
<?php if ($this->hasMod('wpsg_mod_request') && $this->callMod('wpsg_mod_request', 'isRequestProduct', array($this->view['data']['id']))) { ?>
<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_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">
<span><?php echo $this->view['data']['longdescription']; ?></span>
</div>
</div>
</div>
<?php } ?>
 
</div>
<?php /* Produktlangbeschreibung ENDE */ ?>
 
<?php /* zusätzliche Informationen START */ ?>
<div class="wpsg_product_informationarea">
 
<?php if (strlen(trim($this->view['data']['moreinfos'])) > 0) { ?>
<div class="wpsg_product_information_large">
<div class="wpsg_produkt_additional_information">
<div itemprop="description" class="wpsg_produkt_moreinfos">
<span><?php echo $this->view['data']['moreinfos']; ?></span>
</div>
</div>
</div>
<?php } ?>
 
</div>
<?php /* zusätzliche Informationen ENDE */ ?>
 
<?php /* zusätzliche Lieferumfang START */ ?>
<div class="wpsg_product_informationarea">
 
<?php if (strlen(trim($this->view['data']['moreinfos2'])) > 0) { ?>
<div class="wpsg_product_information_large">
<div class="wpsg_produkt_additional_information">
<div itemprop="description" class="wpsg_produkt_moreinfos2">
<span><?php echo $this->view['data']['moreinfos2']; ?></span>
</div>
</div>
</div>
<?php } ?>
 
</div>
<?php /* zusätzliche Lieferumfang 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>
 
</div>
</div>
 
<?php if ($this->getTemplateIndex() === 1) { ?>
 
<link rel="stylesheet" href="<?php echo $this->getRessourceURL('css/tiny-slider.-2.9.4.min.css'); ?>">
 
<style>
 
.wpsg_produkt_wrapper.layout3 .col_wrap { display:flex; width:100%; justify-content:stretch; gap:1rem; flex-wrap:wrap; }
.wpsg_produkt_wrapper.layout3 .col_wrap > * { flex-grow:1; flex-shrink:0; width:100%; }
.wpsg_produkt_wrapper.layout3 .col_wrap > .col.image { display:flex; justify-content:stretch; gap:0.5rem; }
.wpsg_produkt_wrapper.layout3 .col_wrap > .col.image .thumbnails { width:20%; flex-shrink:0; }
.wpsg_produkt_wrapper.layout3 .col_wrap > .col.image .thumbnails img { aspect-ratio: 1 / 1; object-fit:cover; object-position:50% 50%; }
.wpsg_produkt_wrapper img { max-width:100%; height:auto; }
 
.ds_image_zoom.attached { position:relative; overflow:hidden; cursor:-webkit-zoom-in; cursor:zoom-in; }
.ds_image_zoom.attached img { all:initial; position:absolute; left:0; top:0; /* transition:width 0.3s, height 0.3s, left 0.3s, top 0.3s; */ }
 
@media screen and (min-width:993px) {
 
.wpsg_produkt_wrapper.layout3 .col_wrap { flex-wrap:nowrap; }
.wpsg_produkt_wrapper.layout3 .col_wrap > * { width:0; }
 
}
 
</style>
 
<?php } ?>
 
<?php if ($this->getTemplateIndex() === 1 && ($_REQUEST['action']??'') !== 'wpsg_productvariants_switch') { ?>
 
<script src="<?php echo $this->getRessourceURL('js/tiny-slider-2.9.2.min.js'); ?>"></script>
<script src="<?php echo $this->getRessourceURL('js/dsimagezoom.min.js'); ?>"></script>
 
<?php } ?>
 
<script>
 
if (!wpsg_standard3_slider) { var wpsg_standard3_slider = {}; }
 
if (!wpsg_standard3_load) {
 
function wpsg_standard3_load(templateIndex) {
 
if (wpsg_standard3_slider[templateIndex]) {
 
wpsg_standard3_slider[templateIndex] = wpsg_standard3_slider[templateIndex].rebuild();
 
} else {
 
wpsg_standard3_slider[templateIndex] = tns({
container: '#wpsg_produktform_' + templateIndex + ' .wpsg_product_slider',
items: 1,
slideBy: 1,
controls: false,
autoplayButton: false,
nav: false,
arrowKeys: false,
autoplayButtonOutput: false,
autoplay: false,
autoHeight: true,
onInit: () => {
 
}
});
 
}
 
wpsg_standard3_slider[templateIndex].events.on('transitionEnd', (event) => {
 
DsImageZoom.init(document.querySelectorAll('#wpsg_produktform_' + templateIndex + ' .tns-slide-active .ds_image_zoom'));
 
});
 
wpsg_standard3_slider[templateIndex].events.on('transitionStart', (event) => {
 
DsImageZoom.destroy(document.querySelectorAll('#wpsg_produktform_' + templateIndex + ' .tns-item .ds_image_zoom'));
 
});
 
for (const el_tn of document.querySelectorAll('#wpsg_produktform_' + templateIndex + ' .wpsg_produkt_wrapper.layout3 .thumbnails img')) {
 
el_tn.addEventListener('click', (event) => {
 
wpsg_standard3_slider[templateIndex].goTo(el_tn.getAttribute('data-index'));
 
});
 
}
 
wpsg_standard3_slider[templateIndex].goTo(0);
 
};
 
};
 
window.addEventListener('load', () => { wpsg_standard3_load(<?php echo $this->getTemplateIndex(); ?>); });
 
<?php if (($_REQUEST['action']??'') === 'wpsg_productvariants_switch') { ?>
 
window.setTimeout(() => {
 
wpsg_standard3_load(<?php echo $this->getTemplateIndex(); ?>);
 
}, 100);
 
<?php } ?>
 
</script>
 
</div>
/warenkorb/checkout.phtml
162,7 → 162,14
<label for="email" class="wpsg_checkout"><?php echo __("E-Mail Adresse:", "wpsg"); ?>
<?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
</label>
<input class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="email" id="email" name="wpsg[checkout][email]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['basket']['checkout']['email'])); ?>" />
<input
class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>"
type="email"
id="email"
name="wpsg[checkout][email]"
value="<?php echo htmlspecialchars(wpsg_getStr($this->view['basket']['checkout']['email'])); ?>"
autocomplete="off"
/>
</div>
<?php } ?>
172,7 → 179,14
<label for="email" class="wpsg_checkout"><?php echo __("E-Mail (Wiederholung:)", "wpsg"); ?>
<?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
</label>
<input class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="email" id="email2" name="wpsg[checkout][email2]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['basket']['checkout']['email2'])); ?>" />
<input
class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>"
type="email"
id="email2"
name="wpsg[checkout][email2]"
value="<?php echo htmlspecialchars(wpsg_getStr($this->view['basket']['checkout']['email2'])); ?>"
autocomplete="off"
/>
</div>
<?php } ?>
<?php } ?>
/mods/mod_export/fields.phtml
36,14 → 36,11
</td>
<td class="wpsg_mod_export_col_field"><div class="wpsg_editable" id="field_typ_<?php echo $f_id; ?>"><?php
foreach ($this->view['fields'] as $fieldgroup)
{
foreach ($this->view['fields'] as $fieldgroup) {
foreach ($fieldgroup['fields'] as $field_key => $field)
{
foreach ($fieldgroup['fields'] as $field_key => $field) {
if ($field_key == $f['value_key'])
{
if ($field_key == $f['value_key']) {
echo $field;
74,8 → 71,18
</td>
</tr>
<tr id="staticformat_<?php echo $f_id; ?>" style="<?php echo (($f['value_key'] != 'general_static')?'display:none;':''); ?>" class="wpsg_mod_export_row2 wpsg_tablerow wpsg_mod_export_fieldrow_<?php echo $f_id; ?> <?php echo (($i % 2 == 0)?'odd':'even'); ?>">
<td class="wpsg_mod_export_col_format_user" colspan="4">
<?php echo __('Statischer Wert', 'wpsg'); ?>:
<div class="wpsg_editable" id="field_static_<?php echo $f_id; ?>"><?php echo wpsg_hspc(wpsg_getStr($f['static'])); ?></div>
</td>
<td></td>
</tr>
<tr id="userformatrow_<?php echo $f_id; ?>" style="<?php echo (($f['format'] != 700)?'display:none;':''); ?>" class="wpsg_mod_export_row2 wpsg_tablerow wpsg_mod_export_fieldrow_<?php echo $f_id; ?> <?php echo (($i % 2 == 0)?'odd':'even'); ?>">
<td class="wpsg_mod_export_col_format_user" colspan="4">
<td class="wpsg_mod_export_col_format_user" colspan="4">
<?php echo __('Format', 'wpsg'); ?>:
94,7 → 101,13
jQuery('#field_typ_<?php echo $f_id; ?>').wpsg_editable('<?php echo $inlineEdit_url; ?>', {
'type': 'multiarray',
'data': '<?php echo addslashes(json_encode($this->view['fields'], JSON_UNESCAPED_SLASHES)); ?>'
'data': '<?php echo addslashes(json_encode($this->view['fields'], JSON_UNESCAPED_SLASHES)); ?>',
'callback': function(response, newValue) {
if (newValue === 'general_static') jQuery('#staticformat_<?php echo $f_id; ?>').show();
else jQuery('#staticformat_<?php echo $f_id; ?>').hide();
}
} );
jQuery('#field_format_<?php echo $f_id; ?>').wpsg_editable('<?php echo $inlineEdit_url; ?>', {
110,6 → 123,8
jQuery('#field_userformat_<?php echo $f_id; ?>').wpsg_editable('<?php echo $inlineEdit_url; ?>', { } );
jQuery('#field_static_<?php echo $f_id; ?>').wpsg_editable('<?php echo $inlineEdit_url; ?>', { } );
} );
/* ]]> */</script>
149,3 → 164,9
).disableSelection();
/* ]]> */</script>
 
<style>
 
.wpsg_mod_export_col_format { min-width:100px; }
</style>
/mods/mod_shippingadress/wpsg_order_view_customerdata.phtml
44,21 → 44,21
<div class="modal-body">
 
<div id="shipping_dialog_content">
<?php echo wpsg_drawForm_Input('dialog_shipping_firma', __('Firma', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_firma']); ?>
<?php echo wpsg_drawForm_Select('dialog_shipping_title', __('Anrede', 'wpsg'), $this->view['arTitles'], $this->view['wpsg_mod_shippingadress']['shipping_title'], array('noIndex' => true)); ?>
<?php echo wpsg_drawForm_Input('dialog_shipping_vname', __('Vorname', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_vname']); ?>
<?php echo wpsg_drawForm_Input('dialog_shipping_name', __('Name', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_name']); ?>
<?php echo wpsg_drawForm_Input('dialog_shipping_strasse', __('Straße', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_strasse']); ?>
<?php echo wpsg_drawForm_Input('dialog_shipping_firma', __('Firma', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_firma']??''); ?>
<?php echo wpsg_drawForm_Select('dialog_shipping_title', __('Anrede', 'wpsg'), $this->view['arTitles'], $this->view['wpsg_mod_shippingadress']['shipping_title']??'', array('noIndex' => true)); ?>
<?php echo wpsg_drawForm_Input('dialog_shipping_vname', __('Vorname', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_vname']??''); ?>
<?php echo wpsg_drawForm_Input('dialog_shipping_name', __('Name', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_name']??''); ?>
<?php echo wpsg_drawForm_Input('dialog_shipping_strasse', __('Straße', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_strasse']??''); ?>
<?php if (wpsg_getStr($this->view['pflicht']['wpsg_showNr']) === '1') { ?>
<?php echo wpsg_drawForm_Input('dialog_shipping_nr', __('Hausnummer', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_nr']); ?>
<?php echo wpsg_drawForm_Input('dialog_shipping_nr', __('Hausnummer', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_nr']??''); ?>
<?php } ?>
<?php echo wpsg_drawForm_Input('dialog_shipping_plz', __('Postleitzahl', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_plz']); ?>
<?php echo wpsg_drawForm_Input('dialog_shipping_ort', __('Ort', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_ort']); ?>
<?php echo wpsg_drawForm_Select('dialog_shipping_land', __('Land', 'wpsg'), $this->view['arCountry'], $this->view['wpsg_mod_shippingadress']['shipping_land']); ?>
<?php echo wpsg_drawForm_Input('dialog_shipping_plz', __('Postleitzahl', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_plz']??''); ?>
<?php echo wpsg_drawForm_Input('dialog_shipping_ort', __('Ort', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_ort']??''); ?>
<?php echo wpsg_drawForm_Select('dialog_shipping_land', __('Land', 'wpsg'), $this->view['arCountry'], $this->view['wpsg_mod_shippingadress']['shipping_land']??''); ?>
<br />
/mods/mod_rechnungen/order_view.phtml
34,8 → 34,15
<a target="_blank" onclick="if (!confirm('<?php echo __('Sind Sie sicher, dass Sie eine Kopie dieser Rechnung/Rechnungskorrektur erneut an den Kunden senden möchten?', 'wpsg'); ?>')) return false;" href="<?php
echo wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&mod=wpsg_mod_rechnungen&noheader=1&action=ajax&edit_id='.$this->view['data']['id'].'&r_id='.$r['id'].'&do=copy', 'wpsg-mod_invoice-order_ajax-copy-'.$this->view['data']['id']);
if ($r['o_id'] == '0') {
// Multirechnung
$r_o_ids = array_map('intval', explode(',', $r['o_ids']));
echo wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&mod=wpsg_mod_rechnungen&noheader=1&action=ajax&edit_id='.$r_o_ids[0].'&r_id='.$r['id'].'&do=copy', 'wpsg-mod_invoice-order_ajax-copy-'.$r_o_ids[0]);
} else {
// normale Rechnung
echo wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&mod=wpsg_mod_rechnungen&noheader=1&action=ajax&edit_id='.$this->view['data']['id'].'&r_id='.$r['id'].'&do=copy', 'wpsg-mod_invoice-order_ajax-copy-'.$this->view['data']['id']);
}
 
?>"><?php echo ' &nbsp;'.__("Kopie senden", "wpsg"); ?></a>&nbsp;
</div>
/mods/mod_rechnungen/invoice_pdf.phtml
6,11 → 6,13
require_once WPSG_PATH_LIB.'FPDF_1.81/fpdf.php';
require_once WPSG_PATH_LIB.'FPDI_2.2.0/autoload.php';
require_once WPSG_PATH_LIB.'wpsg_fpdf.class.php';
global $absender_left, $absender_top, $adress_left, $adress_top, $rdata_left, $rdata_top;
 
/** @var \wpsg\wpsg_invoice|null $oInvoice */
$oInvoice = $this->view['oInvoice']??null;
 
// Positionierung der Absenderadresszeile
$absender_left = 25;
$absender_top = 50;
36,12 → 38,7
else $taxdisplay = 'brutto';
// Damit die Steuer bei der Kleinunternehmerregelung nicht angezeigt wird leer ich den Array sicherheitshalber
if ($this->get_option('wpsg_kleinunternehmer') == '1')
{
unset($this->view['basket']['mwst']);
}
if ( ($this->get_option('wpsg_kleinunternehmer') == '1') || ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_SMALLBUSINESS) ) unset($this->view['basket']['mwst']);
if (!function_exists('AddRechnungPage'))
{
52,24 → 49,23
global $absender_left, $absender_top, $adress_left, $adress_top, $rdata_left, $rdata_top;
$pdf->AddPage();
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.pdf")) {
 
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_bp.pdf")) {
$pdf->setSourceFile($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.pdf");
$pdf->setSourceFile($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_bp.pdf");
$tplidx = $pdf->importPage(1, '/MediaBox');
$pdf->useTemplate($tplidx, 0, 0, 210);
} else if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.jpg")) {
} else if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_bp.jpg")) {
$pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.jpg", 0, 0, 210, 297, 'jpg');
$pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_bp.jpg", 0, 0, 210, 297, 'jpg');
}
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_logo.jpg"))
 
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_logo.jpg"))
{
list($width, $height, $type, $attr) = getimagesize($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_logo.jpg");
list($width, $height, $type, $attr) = getimagesize($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_logo.jpg");
// Umrechnung von Inch zu Pixel
$wPix = (25.4 * (int)$width) / 96;
96,7 → 92,7
if(isset($logo_pos) && $logo_pos === "right") { $abscissa = $rightPos; }
$pdf->SetAlpha($alpha);
$pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_logo.jpg", $abscissa, $ordinate, $wPix, $hPix);
$pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_logo.jpg", $abscissa, $ordinate, $wPix, $hPix);
$pdf->SetAlpha(1);
}
103,18 → 99,18
// Absenderadresszeile (Wird in der Konfiguration hinterlegt)
$pdf->SetFont('Arial', '', 6);
$pdf->Text($absender_left, $absender_top, $shop->replaceUniversalPlatzhalter(__($shop->get_option("wpsg_rechnungen_adresszeile"), 'wpsg'), $shop->view['data']['id']));
$pdf->Text($absender_left, $absender_top, $shop->replaceUniversalPlatzhalter(__($shop->get_option("wpsg_rechnungen_adresszeile"), 'wpsg'), $shop->view['data']['id']??0));
if (wpsg_getStr($shop->view['kunde']['kuerzel']) != "") $shop->view['kunde']['kuerzel'] = $shop->view['kunde']['kuerzel'].'-';
// Adresse des Kunden
$pdf->SetFont('Arial', '', 12);
$pdf->Text($adress_left, $adress_top, $shop->view['kunde']['firma']);
$pdf->Text($adress_left, $adress_top + 5, $shop->view['kunde']['vname'].' '.$shop->view['kunde']['name']);
$pdf->Text($adress_left, $adress_top + 10, $shop->view['kunde']['strasse'].' '.wpsg_getStr($shop->view['kunde']['nr']));
$pdf->Text($adress_left, $adress_top + 15, $shop->view['kunde']['plz'].' '.$shop->view['kunde']['ort']);
if ($shop->get_option("wpsg_mod_rechnungen_hideCountry") == '0')
$pdf->Text($adress_left, $adress_top + 20, strtoupper($shop->view['oOrder']->getInvoiceCountryName()));
$pdf->Text($adress_left, $adress_top, $shop->view['kunde']['firma']??'');
$pdf->Text($adress_left, $adress_top + 5, ($shop->view['kunde']['vname']??'').' '.($shop->view['kunde']['name']??''));
$pdf->Text($adress_left, $adress_top + 10, ($shop->view['kunde']['strasse']??'').' '.($shop->view['kunde']['nr']??''));
$pdf->Text($adress_left, $adress_top + 15, ($shop->view['kunde']['plz']??'').' '.($shop->view['kunde']['ort']??''));
 
if ($shop->get_option("wpsg_mod_rechnungen_hideCountry") == '0') $pdf->Text($adress_left, $adress_top + 20, strtoupper($shop->view['oOrder']->getInvoiceCountryName()));
// Rechnungsdaten
$pdf->SetFont('Arial', 'B', 16);
127,7 → 123,7
{
$pdf->Text($rdata_left + 35, $rdata_top, __("Fällig am", "wpsg"));
$pdf->Text($rdata_left + 35, $rdata_top + 6, $shop->view['faelligkeitdatum']);
$pdf->Text($rdata_left + 35, $rdata_top + 6, date("d.m.Y", strtotime($shop->view['faelligkeitdatum'])));
}
146,7 → 142,7
$pdf->Text($rdata_left + 135, $rdata_top + 6, ((trim($shop->view['data']['onr']) != '')?$shop->view['data']['onr']:$shop->view['data']['id']));
$pdf->Text($rdata_left + 155, $rdata_top, __("Datum", "wpsg"));
$pdf->Text($rdata_left + 155, $rdata_top + 6, $shop->view['rDatum']);
$pdf->Text($rdata_left + 155, $rdata_top + 6, date("d.m.Y", strtotime($shop->view['rDatum'])));
if ($shop->view['oOrder']->isInnerEu())
{
181,26 → 177,58
$pdf = new wpsg_fpdf();
$pdf->SetAutoPageBreak(true, 5);
AddRechnungPage($this, $pdf);
 
if ($this->get_option('wpsg_deliverycountrytax') === '1') {
$value = false;
$kl = $this->view['kunde']['land'];
if ( ($kl['mwst_a']) && ($kl['mwst_b']) && ($kl['mwst_c']) && ($kl['mwst_d']) == 0.0000 ) $value = true;
$deliverycountrytax = $value;
}
 
if (
( ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_B2B) && ( $this->view['oOrder']->isInnerEu() || $deliverycountrytax ) )
||
( $this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_SMALLBUSINESS )
) $bNoTax = true;
else $bNoTax = false;
 
$bTaxCol = false;
if ($this->get_option('wpsg_showMwstAlways') === '1') $bTaxCol = true;
else if (!$bNoTax) $bTaxCol = true;
 
if ($bNoTax) {
 
$discount_value = $this->view['basket']['arCalculation']['sum']['discount_netto'];
$shipping_cost = $this->view['basket']['arCalculation']['sum']['shipping_netto'];
$payment_cost = $this->view['basket']['arCalculation']['sum']['payment_netto'];
 
} else {
 
$discount_value = $this->view['basket']['arCalculation']['sum']['discount_brutto'];
$shipping_cost = $this->view['basket']['arCalculation']['sum']['shipping_brutto'];
$payment_cost = $this->view['basket']['arCalculation']['sum']['payment_brutto'];
 
}
 
$summe = 0;
 
$bKopf = false; $pnr = 1; $offset = 0; $count = 0;
foreach ($this->view['basket']['produkte'] as $p)
foreach ($this->view['basket']['arCalculation']['product'] as $p)
{
$product = wpsg_product::getInstance($p['product_id']);
 
if (!$bKopf)
{
 
$pdf->SetFont('Arial', 'B', 9);
$pdf->setXY($prod_left, $prod_top);
$pdf->Cell(10, 8, __("Nr.", "wpsg"), 1, 0, 'C');
$pdf->setXY($prod_left + 10, $prod_top);
if(is_array($this->view['basket']['mwst'])) {
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, "Name", 1, 0, 'L');
}
$pdf->Cell( (($bTaxCol)?87:102), 8, "Name", 1, 0, 'L');
 
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
if ($bTaxCol)
{
$pdf->setXY($prod_left + 97, $prod_top);
225,35 → 253,18
$pdf->SetFont('Arial', '', 9);
$pdf->setXY($prod_left, $prod_top + $offset);
if ($this->get_option('wpsg_mod_rechnungen_anr') == '1')
{
$pdf->Cell(10, 8, $p['anr'], 0, 0, 'C');
}
else
{
$pdf->Cell(10, 8, $pnr.".", 0, 0, 'C');
}
if ($this->get_option('wpsg_mod_rechnungen_anr') == '1') $pdf->Cell(10, 8, $product->getNr(), 0, 0, 'C');
else $pdf->Cell(10, 8, $pnr.".", 0, 0, 'C');
if ($this->get_option('wpsg_rechnungen_pdetailname' == '1')) {
if ($this->get_option('wpsg_rechnungen_pdetailname') == '1') $produkt_text = $this->getProductName($this->getProduktID($p['product_id']), true);
else $produkt_text = $this->getProductName($this->getProduktID($p['product_id']), false);
 
$produkt_text = $this->getProductName($this->getProduktID($p['id']), true);
 
} else {
 
$produkt_text = $this->getProductName($this->getProduktID($p['id']), false);
 
}
 
$produktBeschreibung = trim(strip_tags($p['beschreibung']));
$produktBeschreibung = trim(strip_tags($product->getShortDescription()));
if ($this->isOtherLang())
{
$trans_db = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_PRODUCTS."` WHERE `lang_parent` = '".wpsg_q($this->getProduktID($p['id']))."' AND `lang_code` = '".wpsg_q($this->getCurrentLanguageCode())."'");
$trans_db = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_PRODUCTS."` WHERE `lang_parent` = '".wpsg_q($this->getProduktID($p['product_id']))."' AND `lang_code` = '".wpsg_q($this->getCurrentLanguageCode())."'");
if (is_array($trans_db) && sizeof($trans_db) > 0)
{
269,12 → 280,12
$pdf->setXY($prod_left + 10, $prod_top + $offset);
// Produktvariablen
// Produktvariablen
if ($this->hasMod('wpsg_mod_productvars') && $this->get_option("wpsg_mod_rechnungen_showpv") == "1")
{
 
$arPV = $this->callMod('wpsg_mod_productvars', 'getAllProductVarValues', array($this->view['data']['id'], $p['product_index']));
 
if (wpsg_isSizedArray($arPV))
{
293,16 → 304,13
if ($this->get_option('wpsg_mod_rechnungen_anr') === '2')
{
$anr = $this->getProductAnr($p['productkey']);
$anr = $this->getProductAnr($product->getProductKey());
$produkt_text .= "\r\n".wpsg_translate(__('Artikelnummer: #1#', 'wpsg'), $anr);
}
$produkt_text_cell_width = 102;
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
$produkt_text_cell_width = 87;
}
if ($bTaxCol) $produkt_text_cell_width = 87;
$produkt_text_width = $pdf->GetStringWidth($produkt_text);
//$produkt_text_cell_width = (($this->arMwSt == "-1")?87:102);
315,39 → 323,32
//$height += 3 + 5 + $pdf->getY() - $height_y;
//$pdf->Cell((($this->arMwSt == "-1")?102:87), 8, $produkt_text, 0, 0, 'L');
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1') {
if ($bTaxCol) {
 
$pdf->setXY($prod_left + 97, $prod_top + $offset);
$pdf->Cell(15, 8, (($this->view['basket']['noMwSt'] == '1')?'0.00 %':wpsg_ff($p['mwst_value'], '%')), 0, 0, 'C');
$pdf->Cell(15, 8, (($bNoTax)?'0.00 %':wpsg_ff($this->view['basket']['arCalculation']['tax'][$p['tax_key']]['tax_value'], '%')), 0, 0, 'C');
 
}
$pdf->setXY($prod_left + 112, $prod_top + $offset);
$pdf->Cell(15, 8, $p['menge'], 0, 0, 'C');
$pdf->Cell(15, 8, $p['amount'], 0, 0, 'C');
if (wpsg_ShopController::get_option('wpsg_preisangaben') == WPSG_NETTO) {
$preis = $p['preis_netto'];
} else {
$preis = $p['preis_brutto'];
}
if ( ( wpsg_ShopController::get_option('wpsg_preisangaben') == WPSG_NETTO ) || $bNoTax ) $preis_single = $p['netto_calculated_single'];
else $preis_single = $p['brutto_calculated_single'];
$pdf->setXY($prod_left + 127, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($preis, $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->Cell(25, 8, wpsg_ff($preis_single, $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->setXY($prod_left + 152, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($preis * $p['menge'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->Cell(25, 8, wpsg_ff($preis_single * $p['amount'], $this->get_option('wpsg_currency')), 0, 0, 'R');
/**
* Produktbeschreibung anzeigen Ja/Nein
*/
$pBeschreibungHeight = 0;
if ($this->get_option("wpsg_rechnungen_pbeschreibung") == "1" && trim(strip_tags($p['beschreibung'])) != '')
if ($this->get_option("wpsg_rechnungen_pbeschreibung") == "1" && trim(strip_tags($product->getShortDescription())) != '')
{
 
$produktBeschreibung = nl2br($produktBeschreibung);
preg_match_all('/\<br \/\>/', $produktBeschreibung, $treffer);
$produktBeschreibung = strip_tags($produktBeschreibung);
372,11 → 373,12
if ($this->get_option('wpsg_rechnungen_produktattribute') == '1')
{
$attributeInfo = $this->callMod('wpsg_mod_produktattribute', 'getProductAttributeByProductId', array($this->getProduktId($p['id'])));
$attributeInfo = $this->callMod('wpsg_mod_produktattribute', 'getProductAttributeByProductId', array($this->getProduktId($p['product_id'])));
foreach ($attributeInfo as $pa)
{
if ($pa['value'] == "") $pa['value'] = "Keine Angabe";
$pa_text = $pa['name'].': '.$pa['value'];
$height += $pdf->wpsg_MultiCell($prod_left + 10, $prod_top + $height + $offset - 0.5, 5, $pa_text, 0, 'L', 0, $produkt_text_cell_width);
386,10 → 388,10
/**
* Variante ?
*/
if (preg_match('/pv_(.*)/', $p['productkey']))
if (preg_match('/pv_(.*)/', $p['product_key']))
{
$variInfo = $this->callMod('wpsg_mod_productvariants', 'getVariantenInfoArray', array($p['productkey']));
$variInfo = $this->callMod('wpsg_mod_productvariants', 'getVariantenInfoArray', array($p['product_key']));
$height += $pdf->wpsg_MultiCell($prod_left + 10, $prod_top + $height + $offset - 0.5, 5, wpsg_translate(__('Variante: #1#', 'wpsg'), $variInfo['key']), 0, 'L', 0, $produkt_text_cell_width);
397,7 → 399,7
}
if ($this->hasMod('wpsg_mod_deliverynote'))
if ($this->hasMod('wpsg_mod_deliverynote') && ($this->get_option('wpsg_rechnungen_deliverynote') == '1'))
{
$arDN_order = $this->callMod('wpsg_mod_deliverynote', 'loadDeliveryNotesFromOrder', array($this->view['data']['id']));
421,14 → 423,9
// Jetzt die Rahmen zeichnen
$pdf->Rect($prod_left, $prod_top + $offset, 10, $height);
$pdf->Rect($prod_left + 10, $prod_top + $offset, ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), $height);
$pdf->Rect($prod_left + 10, $prod_top + $offset, (($bTaxCol)?87:102), $height);
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
$pdf->Rect($prod_left + 97, $prod_top + $offset, 15, $height);
}
if ($bTaxCol) $pdf->Rect($prod_left + 97, $prod_top + $offset, 15, $height);
$pdf->Rect($prod_left + 112, $prod_top + $offset, 15, $height);
$pdf->Rect($prod_left + 127, $prod_top + $offset, 25, $height);
439,9 → 436,12
$pnr ++;
$count ++;
$summe += $p['price'] * $p['menge'];
if ($bNoTax) $price = $p['netto'];
else $price = $p['brutto'];
 
$summe += $price * $p['amount'];
if ($pdf->getY() > 220 || ($count >= $prod_break && sizeof($this->view['basket']['produkte']) > ($pnr - 1)))
if ($pdf->getY() > 220 || ($count >= $prod_break && sizeof($this->view['basket']['arCalculation']['product']) > ($pnr - 1)))
{
AddRechnungPage($this, $pdf);
451,56 → 451,18
} // produkte
// Gutschein
/*
if ((isset($this->view['basket']['gs'])) && abs($this->view['basket']['gs_value']) > 0)
{
$pdf->SetFont('Arial', '', 9);
$pdf->setXY($prod_left, $prod_top + $offset);
$pdf->Cell(10, 8, $pnr.'.', 1, 0, 'C'); $pnr ++;
$pdf->setXY($prod_left + 10, $prod_top + $offset);
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, wpsg_translate(__('Gutschein (#1#)', 'wpsg'), $this->view['basket']['gs']['code']), 1, 0, 'L');
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
$mwst = __('anteilig', 'wpsg');
$pdf->setXY($prod_left + 97, $prod_top + $offset);
$pdf->Cell(15, 8, $mwst, 1, 0, 'C');
}
$pdf->setXY($prod_left + 112, $prod_top + $offset);
$pdf->Cell(15, 8, '1', 1, 0, 'C');
$gs_value_einzel = '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency'));
$gs_value_gesamt = '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency'));
$pdf->setXY($prod_left + 127, $prod_top + $offset);
$pdf->Cell(25, 8, $gs_value_einzel, 1, 0, 'R');
$pdf->setXY($prod_left + 152, $prod_top + $offset);
$pdf->Cell(25, 8, $gs_value_gesamt, 1, 0, 'R');
$offset += 8;
}
*/
if (wpsg_isSizedArray($this->view['basket']['arCalculation']['voucher'])) {
foreach ($this->view['basket']['arCalculation']['voucher'] as $v) {
 
$pdf->SetFont('Arial', '', 9);
$pdf->setXY($prod_left, $prod_top + $offset);
$pdf->Cell(10, 8, $pnr.'.', 1, 0, 'C'); $pnr ++;
$pdf->setXY($prod_left + 10, $prod_top + $offset);
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, wpsg_translate(__('Gutschein (#1#)', 'wpsg'), $v['code']), 1, 0, 'L');
$pdf->Cell( (($bTaxCol)?87:102), 8, wpsg_translate(__('Gutschein (#1#)', 'wpsg'), $v['code']), 1, 0, 'L');
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
if ($bTaxCol)
{
$mwst = __('anteilig', 'wpsg');
527,9 → 489,9
}
}
 
// Versandkosten
if ($this->view['basket']['sum']['preis_shipping'] != '' && $this->view['basket']['sum']['preis_shipping'] != 0)
if ( ($shipping_cost != '') && ($shipping_cost != 0) )
{
$pdf->SetFont('Arial', '', 9);
537,26 → 499,17
$pdf->Cell(10, 8, $pnr.'.', 1, 0, 'C'); $pnr ++;
$pdf->setXY($prod_left + 10, $prod_top + $offset);
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, wpsg_translate(__('Versandkosten "#1#"', 'wpsg'), $this->view['oOrder']->getShippingLabel()), 1, 0, 'L');
$pdf->Cell( (($bTaxCol)?87:102), 8, wpsg_translate(__('Versandkosten "#1#"', 'wpsg'), $this->view['oOrder']->getShippingLabel()), 1, 0, 'L');
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
if ($bTaxCol)
{
if ($this->arShipping[$this->view['data']['type_shipping']]['mwst_null'] == '1' && $this->view['basket']['noMwSt'] == '1')
{
 
if ($this->arShipping[$this->view['data']['type_shipping']]['mwst_null'] == '1' && $bNoTax) $mwst = wpsg_ff(0.00, '%');
else {
$mwst = 0;
}
else
{
if ($this->view['basket']['arCalculation']['shipping'][0]['tax_key'] === '0') {
$mwst = _('anteilig');
} else {
if ($this->view['basket']['arCalculation']['shipping'][0]['tax_key'] === '0') $mwst = _('anteilig');
else {
 
$mwst = wpsg_ff($this->view['basket']['arCalculation']['shipping'][0]['tax'], '%');
$mwst = wpsg_ff($this->view['basket']['arCalculation']['tax'][$this->view['basket']['arCalculation']['shipping'][0]['tax_key']]['tax_value'], '%');
573,58 → 526,17
$pdf->Cell(15, 8, '1', 1, 0, 'C');
$pdf->setXY($prod_left + 127, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($this->view['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency')), 1, 0, 'R');
$pdf->Cell(25, 8, wpsg_ff($shipping_cost, $this->get_option('wpsg_currency')), 1, 0, 'R');
$pdf->setXY($prod_left + 152, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($this->view['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency')), 1, 0, 'R');
$pdf->Cell(25, 8, wpsg_ff($shipping_cost, $this->get_option('wpsg_currency')), 1, 0, 'R');
$offset += 8;
$offset += 8;
// Zusammengesetzte Versandarten darstellen
/*
if (wpsg_isSizedArray($this->view['basket']['shipping']['methods'])) {
foreach ($this->view['basket']['shipping']['methods'] as $shipping) {
$pdf->SetFont('Arial', '', 9);
$pdf->setXY($prod_left, $prod_top + $offset);
$pdf->Cell(10, 8, '', 1, 0, 'C'); $pnr ++;
$pdf->setXY($prod_left + 10, $prod_top + $offset);
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, $this->getShippingName($shipping), 1, 0, 'L');
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
if ($this->view['basket']['shipping'][$shipping]['tax_rata'] == 1) { $mwst = __('Anteilig', 'wpsg'); }
else { $mwst = wpsg_ff($this->view['basket']['shipping'][$shipping]['mwst'], '%'); }
$pdf->setXY($prod_left + 97, $prod_top + $offset);
$pdf->Cell(15, 8, $mwst, 1, 0, 'C');
}
$pdf->setXY($prod_left + 112, $prod_top + $offset);
$pdf->Cell(15, 8, '1', 1, 0, 'C');
$pdf->setXY($prod_left + 127, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($this->view['basket']['shipping'][$shipping]['preis_shipping_brutto'], $this->get_option('wpsg_currency')), 1, 0, 'R');
$pdf->setXY($prod_left + 152, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($this->view['basket']['shipping'][$shipping]['preis_shipping_brutto'], $this->get_option('wpsg_currency')), 1, 0, 'R');
$offset += 8;
}
}
*/
}
// Zahlungskosten
if ($this->view['basket']['sum']['preis_payment'] != '' && $this->view['basket']['sum']['preis_payment'] != 0)
if ( ($payment_cost != '') && ($payment_cost != 0) )
{
$pdf->SetFont('Arial', '', 9);
632,31 → 544,31
$pdf->Cell(10, 8, $pnr.'.', 1, 0, 'C'); $pnr ++;
$pdf->setXY($prod_left + 10, $prod_top + $offset);
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, $this->arPayment[$this->view['data']['type_payment']]['name'], 1, 0, 'L');
$pdf->Cell( (($bTaxCol)?87:102), 8, $this->arPayment[$this->view['data']['type_payment']]['name'], 1, 0, 'L');
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
if ($bTaxCol)
{
if ($this->arPayment[$this->view['data']['type_payment']]['mwst_null'] == '1' && $this->view['basket']['noMwSt'] == '1')
if ($this->arPayment[$this->view['data']['type_payment']]['mwst_null'] == '1' && $bNoTax)
{
$mwst = 0;
}
else
{
 
$mwst = wpsg_ff(0.00, '%');
 
} else {
if ($this->view['basket']['arCalculation']['payment'][0]['tax_key'] === '0') {
 
$mwst = _('anteilig');
 
} else {
 
$mwst = wpsg_ff($this->view['basket']['arCalculation']['payment'][0]['tax'], '%');
$mwst = wpsg_ff($this->view['basket']['arCalculation']['tax'][$this->view['basket']['arCalculation']['payment'][0]['tax_key']]['tax_value'], '%');
}
}
 
$pdf->setXY($prod_left + 97, $prod_top + $offset);
$pdf->Cell(15, 8, $mwst, 1, 0, 'C');
666,10 → 578,10
$pdf->Cell(15, 8, '1', 1, 0, 'C');
$pdf->setXY($prod_left + 127, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($this->view['basket']['sum']['preis_payment'], $this->get_option('wpsg_currency')), 1, 0, 'R');
$pdf->Cell(25, 8, wpsg_ff($payment_cost, $this->get_option('wpsg_currency')), 1, 0, 'R');
$pdf->setXY($prod_left + 152, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($this->view['basket']['sum']['preis_payment'], $this->get_option('wpsg_currency')), 1, 0, 'R');
$pdf->Cell(25, 8, wpsg_ff($payment_cost, $this->get_option('wpsg_currency')), 1, 0, 'R');
$offset += 8;
688,22 → 600,13
if (strpos($this->view['storno_fee'], '%') !== false) $label .= ' ('.wpsg_ff($this->view['storno_fee'], '%').')';
$pdf->setXY($prod_left + 10, $prod_top + $offset);
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, $label, 1, 0, 'L');
$pdf->Cell( (($bTaxCol)?87:102), 8, $label, 1, 0, 'L');
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
if ($bTaxCol)
{
if ($this->view['basket']['noMwSt'] == '1')
{
$mwst = 0;
}
else
{
$mwst = wpsg_ff($this->view['storno_fee_tax_value'], '%');
}
if ($bNoTax) $mwst = wpsg_ff(0.00, '%');
else $mwst = wpsg_ff($this->view['storno_fee_tax_value'], '%');
$pdf->setXY($prod_left + 97, $prod_top + $offset);
$pdf->Cell(15, 8, $mwst, 1, 0, 'C');
733,65 → 636,102
$pdf->Cell(37, 8, $this->view['kunde']['ustidnr'], 0, 0, 'R');
}
$offset += 10;
if ($this->get_option('wpsg_kleinunternehmer'))
$offset += 10; // Abstand zwischen Tabelle und Auswertung
 
if ( ($this->get_option('wpsg_kleinunternehmer') == '1') || ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_SMALLBUSINESS) )
{
$pdf->Text($prod_left, $prod_top + $offset, __("Es ergibt sich folgender Gesamtbetrag", "wpsg").':');
$pdf->Text($prod_left + 80, $prod_top + $offset, __("Summe", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'] + $this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$offset += 5;
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['brutto'] + $this->view['basket']['arCalculation']['sum']['discount_brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
if ( !$bNoTax || ($arCalculation['sum']['topay_brutto'] != $arCalculation['sum']['brutto']) ) $offset += 5;
 
} else {
}
else
{
if ($this->view['basket']['noMwSt'] == '1')
if ($bNoTax)
{
$pdf->Text($prod_left, $prod_top + $offset, __("Es ergibt sich folgender Gesamtbetrag", "wpsg").':');
$pdf->Text($prod_left + 80, $prod_top + $offset, __("BRUTTOBETRAG", "wpsg"));
$pdf->Text($prod_left + 80, $prod_top + $offset, __("Summe", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_netto'] + $this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['brutto'] + $this->view['basket']['arCalculation']['sum']['discount_brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
//if ( !$bNoTax || ($arCalculation['sum']['topay_brutto'] != $arCalculation['sum']['brutto']) )
$offset += 5;
 
if ( !(($this->view['oOrder']->isInnerEu() || $deliverycountrytax) && ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_B2B)) ) {
 
if (sizeof($this->view['basket']['arCalculation']['tax']) >= 1)
{
 
$mw_count = 0;
foreach ($this->view['basket']['arCalculation']['tax'] as $mw)
{
 
if ( $mw['tax_value'] > 0 && $mw['sum'] > 0 ) {
 
$offset += 5;
$pdf->Text($prod_left + 80, $prod_top + $offset, __("MwSt. ", "wpsg").wpsg_ff($mw['tax_value'], '%'));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($mw['sum'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$mw_count++;
 
}
 
}
}
if ($mw_count >= 2)
{
$offset += 5;
$pdf->Text($prod_left + 80, $prod_top + $offset, __("MwSt. GESAMT", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['brutto'] - $this->view['basket']['arCalculation']['sum']['netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
}
$pdf->Text($prod_left + 80, $prod_top + $offset, __("MwSt. GESAMT", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff(0, $this->get_option('wpsg_currency')), 0, 0, 'R');
} else if ( !($arCalculation['sum']['topay_brutto'] != $arCalculation['sum']['brutto']) ) $offset -= 5;
 
} else {
 
$pdf->Text($prod_left, $prod_top + $offset, __("Der Gesamtbetrag setzt sich wie folgt zusammen", "wpsg").':');
}
else
{
$pdf->Text($prod_left, $prod_top + $offset, __("Der Gesamtbetrag setzt sich wie folgt zusammen", "wpsg"));
$pdf->Text($prod_left + 80, $prod_top + $offset, __("NETTOBETRAG", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_netto'] + $this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['netto'] + $this->view['basket']['arCalculation']['sum']['discount_netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
if (sizeof($this->view['basket']['mwst']) >= 1)
if (sizeof($this->view['basket']['arCalculation']['tax']) >= 1)
{
foreach ($this->view['basket']['mwst'] as $mw)
 
$mw_count = 0;
foreach ($this->view['basket']['arCalculation']['tax'] as $mw)
{
 
if ( $mw['tax_value'] > 0 && $mw['sum'] > 0) {
 
$offset += 5;
$pdf->Text($prod_left + 80, $prod_top + $offset, __("MwSt. ", "wpsg").wpsg_ff($mw['tax_value'], '%'));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($mw['sum'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$offset += 5;
$pdf->Text($prod_left + 80, $prod_top + $offset, __("MwSt. ", "wpsg").wpsg_ff($mw['value'], '%'));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($mw['sum'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$mw_count++;
 
}
 
}
}
if (sizeof($this->view['basket']['mwst']) > 1)
if ($mw_count >= 2)
{
$offset += 5;
$pdf->Text($prod_left + 80, $prod_top + $offset, __("MwSt. GESAMT", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'] - $this->view['basket']['sum']['preis_gesamt_netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['brutto'] - $this->view['basket']['arCalculation']['sum']['netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
}
800,28 → 740,31
}
// Rabatt
if ($this->view['basket']['sum']['preis_rabatt'] > 0)
if ($discount_value > 0)
{
$offset += 5;
$pdf->Text($prod_left + 80, $prod_top + $offset, __("Rabatt", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, '-'.wpsg_ff($this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->Cell(37, 8, '-'.wpsg_ff($discount_value, $this->get_option('wpsg_currency')), 0, 0, 'R');
}
 
// Wertgutschein
if ($arCalculation['sum']['topay_brutto'] !== $arCalculation['sum']['brutto']) {
if ( $arCalculation['sum']['topay_brutto'] != $arCalculation['sum']['brutto'] ) {
 
if (!$bNoTax) {
$offset += 5;
$pdf->Text($prod_left + 80, $prod_top + $offset, __("Bruttobetrag", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$offset += 5;
$pdf->Text($prod_left + 80, $prod_top + $offset, __("SUMME", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->setFont('Arial', '', '9');
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->setFont('Arial', '', '9');
$pdf->setFont('Arial', '', '9');
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->setFont('Arial', '', '9');
} else if (!($mw_count >= 2)) $offset -= 5;
 
foreach ($arCalculation['coupon'] as $c) {
$offset += 5;
847,79 → 790,80
} else {
$offset += 5;
$pdf->Text($prod_left + 80, $prod_top + $offset, __("SUMME", "wpsg"));
$pdf->setFont('Arial', 'B', '9');
$pdf->Text($prod_left + 80, $prod_top + $offset, __("GESAMTSUMME", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
 
/* Endbetrag wird fett ausgegeben */
$pdf->setFont('Arial', 'B', '9');
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->Cell(37, 8, wpsg_ff($arCalculation['sum']['topay_brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->setFont('Arial', '', '9');
}
if ($this->get_option('wpsg_kleinunternehmer') == '1')
if (($this->get_option('wpsg_kleinunternehmer') == '1') || ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_SMALLBUSINESS) )
{
 
$offset += 3;
$pdf->setFont('Arial', '', '8');
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset, 5, '('.$this->get_option('wpsg_kleinunternehmer_text').')');
$offset += 8;
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset + 5, 5, $this->get_option('wpsg_kleinunternehmer_text'));
$offset += 15;
}
 
$offset += 5;
if ($this->hasMod('wpsg_mod_deliverynote'))
if ($this->hasMod('wpsg_mod_deliverynote') && ($this->get_option('wpsg_rechnungen_deliverynote') == '1'))
{
$arDN_order = $this->callMod('wpsg_mod_deliverynote', 'loadDeliveryNotesFromOrder', array($this->view['data']['id']));
$delivery_date = $this->callMod('wpsg_mod_deliverynote', 'getDeliveryTime', array($this->view['data']['id']));
 
// Wenn es ein Gesamtlieferdatum gibt und nur einen Lieferschein, dann unter der Bestellung anzeigen
if ($delivery_date !== false && sizeof($arDN_order) == 1)
{
$offset += 10;
$pdf->setFont('Arial', 'B', '9');
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset, 5, __('Lieferung:', 'wpsg'));
$pdf->setFont('Arial', '', '9');
$pdf->wpsg_MultiCell($prod_left + 16, $prod_top + $offset, 5, wpsg_translate(__('#1#', 'wpsg'), date('d.m.Y', $delivery_date)));
$offset += 8;
$pdf->wpsg_MultiCell($prod_left, $prod_top + $offset, 5, wpsg_translate(__('Lieferung: #1#', 'wpsg'), date('d.m.Y', $delivery_date)));
$offset += 5;
}
}
$offset += 5;
if ($this->view['fussText'] != "")
{
//$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset, 5, utf8_encode($this->view['fussText']));
$pdf->setFont('Arial', '', '9');
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset, 5, $this->view['fussText']);
$pdf->SetFont('Arial', 'B', 9);
$offset += 10;
$offset += 8;
}
$offset += 10;
 
$shipping_adress = false;
if ($this->hasMod('wpsg_mod_shippingadress') && $this->callMod('wpsg_mod_shippingadress', 'check_different_shippingadress', array('k_id' => $this->view['data']['k_id'], 'o_id' => $this->view['data']['id']))) {
$pdf->setFont('Arial', 'B', 9);
$pdf->Text($prod_left, $prod_top + $offset, __("Lieferanschrift", "wpsg").":");
$offset += 5;
$offset += 2;
$pdf->setFont('Arial', '', 9);
$shipping_adress = "";
if ($this->view['data']['shipping_firma'] != "")
{
$shipping_adress .= $this->view['data']['shipping_firma']."\r\n";
}
$shipping_adress .= $this->view['data']['shipping_vname'].' '.$this->view['data']['shipping_name']."\r\n";
$shipping_adress .= $this->view['data']['shipping_strasse'].' '.$this->view['data']['shipping_nr']."\r\n";
//$shipping_adress .= $this->view['data']['shipping_land']['kuerzel'].'-';
$shipping_adress = "";
if ($this->view['data']['shipping_firma'] != "")
{
$shipping_adress .= $this->view['data']['shipping_firma']."\r\n";
}
$shipping_adress .= $this->view['data']['shipping_vname'].' '.$this->view['data']['shipping_name']."\r\n";
$shipping_adress .= $this->view['data']['shipping_strasse'].' '.$this->view['data']['shipping_nr']."\r\n";
// $shipping_adress .= $this->view['data']['shipping_land']['kuerzel'].'-';
$shipping_adress .= $this->view['data']['shipping_plz'].' '.$this->view['data']['shipping_ort']."\r\n";
$shipping_adress .= $this->view['data']['shipping_land']['name'];
$shipping_adress .= $this->view['data']['shipping_plz'].' '.$this->view['data']['shipping_ort']."\r\n";
$shipping_adress .= $this->view['data']['shipping_land']['name'];
$start = $pdf->getY();
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset, 5, $shipping_adress, 0, 'L', 0, 100);
$offset += $pdf->getY() - $start;
928,54 → 872,46
}
$offset += 5;
// Bestellvariablen
if ($this->hasMod('wpsg_mod_ordervars') && $this->get_option('wpsg_mod_rechnungen_showov') == '1')
{
 
$pdf->SetFont('Arial', 'B', 9);
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset - 7, 5, __("Angaben während der Bestellung", "wpsg").":");
$bvars = @unserialize($this->view['data']['bvars']);
if (!is_array($bvars)) $bvars = array();
$strBVars = "";
foreach ($bvars as $bvars_id => $bvars_value)
{
$pdf->SetFont('Arial', '', 9);
 
$bvars = @unserialize($this->view['data']['bvars']);
if (!is_array($bvars)) $bvars = array();
$bvars = $this->db->fetchRow("SELECT * FROM `".wpsg_q(WPSG_TBL_ORDERVARS)."` WHERE `id` = '".wpsg_q($bvars_id)."' ORDER BY `pos` ASC, `id` ASC ");
if ($bvars['typ'] == "1") // Auswahl
$strBVars = "";
foreach ($bvars as $bvars_id => $bvars_value)
{
if ($bvars_value <= 0) $bvars_value = __("Keine Angabe", "wpsg");
$bvars = $this->db->fetchRow("SELECT * FROM `".wpsg_q(WPSG_TBL_ORDERVARS)."` WHERE `id` = '".wpsg_q($bvars_id)."' ORDER BY `pos` ASC, `id` ASC ");
if ($bvars['typ'] == "1") // Auswahl
{
if ($bvars_value <= 0) $bvars_value = __("Keine Angabe", "wpsg");
}
else if ($bvars['typ'] == "2") // Texteingabe
{
if (trim($bvars_value) == "") $bvars_value = __("Keine Angabe", "wpsg");
}
else if ($bvars['typ'] == "3") // Checkbox
{
if ($bvars_value <= 0) $bvars_value = __("Keine Angabe", "wpsg");
}
$bvars_name = $this->callMod('wpsg_mod_ordervars', 'getNameById', array($bvars_id));
$strBVars .= "\r\n".$bvars_name.": ".$bvars_value;
}
else if ($bvars['typ'] == "2") // Texteingabe
{
if (trim($bvars_value) == "") $bvars_value = __("Keine Angabe", "wpsg");
}
else if ($bvars['typ'] == "3") // Checkbox
{
if ($bvars_value <= 0) $bvars_value = __("Keine Angabe", "wpsg");
}
$bvars_name = $this->callMod('wpsg_mod_ordervars', 'getNameById', array($bvars_id));
$strBVars .= "\r\n".$bvars_name.": ".$bvars_value;
}
$pdf->SetFont('Arial', 'B', 9);
$pdf->Text($prod_left, $prod_top + $offset, __("Angaben während der Bestellung", "wpsg").":");
$pdf->SetFont('Arial', '', 9);
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset, 5, $strBVars);
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset - 6, 5, $strBVars);
 
}
if (!file_exists($this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id']))))
{
mkdir($this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id'])), 0777, true);
}
$this->callMods('wpsg_mod_rechnungen_pdf', array(&$pdf, &$this->view['data']['id'], &$this->view['preview'], &$this->view['invoice']));
$filename = $this->view['filename'].".pdf";
988,7 → 924,7
} else {
$pdf->Output($this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id'])).$filename, 'F');
$pdf->Output($oInvoice->getFilePath(), 'F');
// Hier wird der Dateiname an FPD übergeben. Er soll sich aus der Rechnungsnummer ergeben, auch wenn das Dokument über die ID gespeichert ist.
if ($this->view['output'] === true) $pdf->Output($this->view['filename_out'], 'I');
995,4 → 931,3
}
 
?>
/mods/mod_rechnungen/accounting_pdf.phtml
9,7 → 9,10
require_once WPSG_PATH_LIB.'wpsg_fpdf.class.php';
global $absender_left, $absender_top, $adress_left, $adress_top, $rdata_left, $rdata_top;
 
/** @var wpsg\wpsg_invoice|null $oInvoice */
$oInvoice = $this->view['oInvoice'];
 
// Positionierung der Absenderadresszeile
$absender_left = 25;
$absender_top = 50;
33,14 → 36,9
if ($this->getFrontendTaxView() === WPSG_NETTO) $taxdisplay = 'netto';
else $taxdisplay = 'brutto';
 
// Damit die Steuer bei der Kleinunternehmerregelung nicht angezeigt wird leer ich den Array sicherheitshalber
if ($this->get_option('wpsg_kleinunternehmer') == '1')
{
unset($this->view['basket']['mwst']);
}
if ( ($this->get_option('wpsg_kleinunternehmer') == '1') || ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_SMALLBUSINESS) ) unset($this->view['basket']['mwst']);
if (!function_exists('AddRechnungPage'))
{
52,24 → 50,24
$pdf->AddPage();
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.pdf"))
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_bp.pdf"))
{
$pagecount = $pdf->setSourceFile($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.pdf");
$pagecount = $pdf->setSourceFile($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_bp.pdf");
$tplidx = $pdf->importPage(1, '/MediaBox');
$pdf->useTemplate($tplidx, 0, 0, 210);
}
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.jpg"))
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_bp.jpg"))
{
$pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.jpg", 0, 0, 210, 297, 'jpg');
$pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_bp.jpg", 0, 0, 210, 297, 'jpg');
}
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_logo.jpg"))
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_logo.jpg"))
{
list($width, $height, $type, $attr) = getimagesize($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_logo.jpg");
list($width, $height, $type, $attr) = getimagesize($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_logo.jpg");
//wpsg_debug($width.":".$height);
76,7 → 74,7
$wPix = (25.4 * $width) / 96;
$hPix = (25.4 * $height) / 96;
$pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_logo.jpg", 210 - $wPix, 0, $wPix, $hPix);
$pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_logo.jpg", 210 - $wPix, 0, $wPix, $hPix);
}
106,7 → 104,7
{
$pdf->Text($rdata_left + 35, $rdata_top, __("Fällig am", "wpsg"));
$pdf->Text($rdata_left + 35, $rdata_top + 6, $shop->view['faelligkeitdatum']);
$pdf->Text($rdata_left + 35, $rdata_top + 6, date("d.m.Y", strtotime($shop->view['faelligkeitdatum'])));
}
125,7 → 123,7
$pdf->Text($rdata_left + 135, $rdata_top + 6, ((trim($shop->view['data']['onr']) != '')?$shop->view['data']['onr']:$shop->view['data']['id']));
$pdf->Text($rdata_left + 155, $rdata_top, __("Datum", "wpsg"));
$pdf->Text($rdata_left + 155, $rdata_top + 6, $shop->view['rDatum']);
$pdf->Text($rdata_left + 155, $rdata_top + 6, date("d.m.Y", strtotime($shop->view['rDatum'])));
if ($shop->view['oOrder']->isInnerEu())
{
163,16 → 161,41
}
}
//wpsg_debug($this->view); die();
 
$pdf = new wpsg_fpdf();
$pdf->SetAutoPageBreak(true, 5);
AddRechnungPage($this, $pdf);
 
if ( ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_B2B && $this->view['oOrder']->isInnerEu())
|| ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_SMALLBUSINESS)
) $bNoTax = true;
else $bNoTax = false;
 
$bTaxCol = false;
if ($this->get_option('wpsg_showMwstAlways') === '1') $bTaxCol = true;
else if (!$bNoTax) $bTaxCol = true;
 
 
if ($bNoTax) {
 
$discount_value = $this->view['basket']['arCalculation']['sum']['discount_netto'];
$shipping_cost = $this->view['basket']['arCalculation']['sum']['shipping_netto'];
$payment_cost = $this->view['basket']['arCalculation']['sum']['payment_netto'];
 
} else {
 
$discount_value = $this->view['basket']['arCalculation']['sum']['discount_brutto'];
$shipping_cost = $this->view['basket']['arCalculation']['sum']['shipping_brutto'];
$payment_cost = $this->view['basket']['arCalculation']['sum']['payment_brutto'];
 
}
$summe = 0;
$bKopf = false; $pnr = 1; $offset = 0; $count = 0;
foreach ($this->view['basket']['produkte'] as $p)
foreach ($this->view['basket']['arCalculation']['product'] as $p)
{
$product = wpsg_product::getInstance($p['product_id']);
if (!$bKopf)
{
182,9 → 205,9
$pdf->Cell(10, 8, __("Nr.", "wpsg"), 1, 0, 'C');
 
$pdf->setXY($prod_left + 10, $prod_top);
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, "Name", 1, 0, 'L');
$pdf->Cell( (($bTaxCol)?87:102), 8, "Name", 1, 0, 'L');
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
if ($bTaxCol)
{
$pdf->setXY($prod_left + 97, $prod_top);
209,31 → 232,18
$pdf->SetFont('Arial', '', 9);
$pdf->setXY($prod_left, $prod_top + $offset);
if ($this->get_option('wpsg_mod_rechnungen_anr') == '1')
{
$pdf->Cell(10, 8, $p['anr'], 0, 0, 'C');
}
else
{
$pdf->Cell(10, 8, $pnr.".", 0, 0, 'C');
}
if ($this->get_option('wpsg_mod_rechnungen_anr') == '1') $pdf->Cell(10, 8, $product->getNr(), 0, 0, 'C');
else $pdf->Cell(10, 8, $pnr.".", 0, 0, 'C');
 
/* Wenn Detailname vorhanden, wird der Detailname auf Rechnung verwendet */
$produkt_text = $this->getProductName($this->getProduktID($p['id']), true);
if ($this->get_option('wpsg_rechnungen_pdetailname') == '1') $produkt_text = $this->getProductName($this->getProduktID($p['product_id']), true);
else $produkt_text = $this->getProductName($this->getProduktID($p['product_id']), false);
/* Falls Detailname vorhanden, wird jetzt der Produktname verwendet */
/* $produkt_text = $this->getProductName($this->getProduktID($p['id']), false); */
$produktBeschreibung = trim(strip_tags($product->getShortDescription()));
$produktBeschreibung = trim(strip_tags($p['beschreibung']));
if ($this->isOtherLang())
{
$trans_db = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_PRODUCTS."` WHERE `lang_parent` = '".wpsg_q($this->getProduktID($p['id']))."' AND `lang_code` = '".wpsg_q($this->getCurrentLanguageCode())."'");
$trans_db = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_PRODUCTS."` WHERE `lang_parent` = '".wpsg_q($this->getProduktID($p['product_id']))."' AND `lang_code` = '".wpsg_q($this->getCurrentLanguageCode())."'");
if (is_array($trans_db) && sizeof($trans_db) > 0)
{
273,16 → 283,13
if ($this->get_option('wpsg_mod_rechnungen_anr') === '2')
{
 
$anr = $this->getProductAnr($p['productkey']);
$anr = $this->getProductAnr($product->getProductKey());
$produkt_text .= "\r\n".wpsg_translate(__('Artikelnummer: #1#', 'wpsg'), $anr);
 
}
 
$produkt_text_cell_width = 102;
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
$produkt_text_cell_width = 87;
}
if ($bTaxCol) $produkt_text_cell_width = 87;
$produkt_text_width = $pdf->GetStringWidth($produkt_text);
//$produkt_text_cell_width = (($this->arMwSt == "-1")?87:102);
295,39 → 302,30
//$height += 3 + 5 + $pdf->getY() - $height_y;
//$pdf->Cell((($this->arMwSt == "-1")?102:87), 8, $produkt_text, 0, 0, 'L');
 
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
if ($bTaxCol) {
$pdf->setXY($prod_left + 97, $prod_top + $offset);
$pdf->Cell(15, 8, (($this->view['basket']['noMwSt'] == '1')?'0.00 %':wpsg_ff($p['mwst_value'], '%')), 0, 0, 'C');
$pdf->Cell(15, 8, (($bNoTax)?'0.00 %':wpsg_ff($this->view['basket']['arCalculation']['tax'][$p['tax_key']]['tax_value'], '%')), 0, 0, 'C');
}
$pdf->setXY($prod_left + 112, $prod_top + $offset);
$pdf->Cell(15, 8, $p['menge'], 0, 0, 'C');
$pdf->Cell(15, 8, $p['amount'], 0, 0, 'C');
if (wpsg_ShopController::get_option('wpsg_preisangaben') == WPSG_NETTO)
{
$preis = $p['preis_netto'];
//TODO
}
else
{
$preis = $p['preis_brutto'];
}
if ( ( wpsg_ShopController::get_option('wpsg_preisangaben') == WPSG_NETTO ) || $bNoTax ) $preis_single = $p['netto_calculated_single'];
else $preis_single = $p['brutto_calculated_single'];
$pdf->setXY($prod_left + 127, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($preis, $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->Cell(25, 8, wpsg_ff($preis_single, $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->setXY($prod_left + 152, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($preis * $p['menge'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->Cell(25, 8, wpsg_ff($preis_single * $p['amount'], $this->get_option('wpsg_currency')), 0, 0, 'R');
 
/**
* Produktbeschreibung anzeigen Ja/Nein
*/
$pBeschreibungHeight = 0;
if ($this->get_option("wpsg_rechnungen_pbeschreibung") == "1" && trim(strip_tags($p['beschreibung'])) != '')
if ($this->get_option("wpsg_rechnungen_pbeschreibung") == "1" && trim(strip_tags($product->getShortDescription())) != '')
{
$produktBeschreibung = nl2br($produktBeschreibung);
353,12 → 351,13
*/
if ($this->get_option('wpsg_rechnungen_produktattribute') == '1')
{
$attributeInfo = $this->callMod('wpsg_mod_produktattribute', 'getProductAttributeByProductId', array($this->getProduktId($p['id'])));
 
$attributeInfo = $this->callMod('wpsg_mod_produktattribute', 'getProductAttributeByProductId', array($this->getProduktId($p['product_id'])));
foreach ($attributeInfo as $pa)
{
 
if ($pa['value'] == "") $pa['value'] = "Keine Angabe";
$pa_text = $pa['name'].': '.$pa['value'];
$height += $pdf->wpsg_MultiCell($prod_left + 10, $prod_top + $height + $offset - 0.5, 5, $pa_text, 0, 'L', 0, $produkt_text_cell_width);
368,10 → 367,10
/**
* Variante ?
*/
if (preg_match('/pv_(.*)/', $p['productkey']))
if (preg_match('/pv_(.*)/', $p['product_key']))
{
$variInfo = $this->callMod('wpsg_mod_productvariants', 'getVariantenInfoArray', array($p['productkey']));
$variInfo = $this->callMod('wpsg_mod_productvariants', 'getVariantenInfoArray', array($p['product_key']));
 
$height += $pdf->wpsg_MultiCell($prod_left + 10, $prod_top + $height + $offset - 0.5, 5, wpsg_translate(__('Variante: #1#', 'wpsg'), $variInfo['key']), 0, 'L', 0, $produkt_text_cell_width);
379,7 → 378,7
}
if ($this->hasMod('wpsg_mod_deliverynote'))
if ($this->hasMod('wpsg_mod_deliverynote') && ($this->get_option('wpsg_rechnungen_deliverynote') == '1'))
{
$arDN_order = $this->callMod('wpsg_mod_deliverynote', 'loadDeliveryNotesFromOrder', array($this->view['data']['id']));
403,15 → 402,10
// Jetzt die Rahmen zeichnen
$pdf->Rect($prod_left, $prod_top + $offset, 10, $height);
$pdf->Rect($prod_left + 10, $prod_top + $offset, ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), $height);
$pdf->Rect($prod_left + 10, $prod_top + $offset, (($bTaxCol)?87:102), $height);
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
if ($bTaxCol) $pdf->Rect($prod_left + 97, $prod_top + $offset, 15, $height);
$pdf->Rect($prod_left + 97, $prod_top + $offset, 15, $height);
}
$pdf->Rect($prod_left + 112, $prod_top + $offset, 15, $height);
$pdf->Rect($prod_left + 127, $prod_top + $offset, 25, $height);
$pdf->Rect($prod_left + 152, $prod_top + $offset, 25, $height);
421,9 → 415,12
$pnr ++;
$count ++;
$summe += $p['price'] * $p['menge'];
if ($bNoTax) $price = $p['netto'];
else $price = $p['brutto'];
 
$summe += $price * $p['amount'];
if ($pdf->getY() > 220 || ($count >= $prod_break && sizeof($this->view['basket']['produkte']) > ($pnr - 1)))
if ($pdf->getY() > 220 || ($count >= $prod_break && sizeof($this->view['basket']['arCalculation']['product']) > ($pnr - 1)))
{
AddRechnungPage($this, $pdf);
433,44 → 430,6
} // produkte
// Gutschein
/*
if ((isset($this->view['basket']['gs'])) && ($this->view['basket']['gs_value'] > 0))
{
$pdf->SetFont('Arial', '', 9);
$pdf->setXY($prod_left, $prod_top + $offset);
$pdf->Cell(10, 8, $pnr.'.', 1, 0, 'C'); $pnr ++;
 
$pdf->setXY($prod_left + 10, $prod_top + $offset);
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, wpsg_translate(__('Gutschein (#1#)', 'wpsg'), $this->view['basket']['gs']['code']), 1, 0, 'L');
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
$mwst = __('anteilig', 'wpsg');
$pdf->setXY($prod_left + 97, $prod_top + $offset);
$pdf->Cell(15, 8, $mwst, 1, 0, 'C');
}
$pdf->setXY($prod_left + 112, $prod_top + $offset);
$pdf->Cell(15, 8, '1', 1, 0, 'C');
$gs_value_einzel = '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency'));
$gs_value_gesamt = '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency'));
$pdf->setXY($prod_left + 127, $prod_top + $offset);
$pdf->Cell(25, 8, $gs_value_einzel, 1, 0, 'R');
$pdf->setXY($prod_left + 152, $prod_top + $offset);
$pdf->Cell(25, 8, $gs_value_gesamt, 1, 0, 'R');
$offset += 8;
}
*/
if (wpsg_isSizedArray($this->view['basket']['arCalculation']['voucher'])) {
foreach ($this->view['basket']['arCalculation']['voucher'] as $v) {
480,9 → 439,9
$pdf->Cell(10, 8, $pnr.'.', 1, 0, 'C'); $pnr ++;
$pdf->setXY($prod_left + 10, $prod_top + $offset);
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, wpsg_translate(__('Gutschein (#1#)', 'wpsg'), $v['code']), 1, 0, 'L');
$pdf->Cell( (($bTaxCol)?87:102), 8, wpsg_translate(__('Gutschein (#1#)', 'wpsg'), $v['code']), 1, 0, 'L');
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
if ($bTaxCol)
{
$mwst = __('anteilig', 'wpsg');
511,7 → 470,7
}
// Versandkosten
if ($this->view['basket']['sum']['preis_shipping'] != '' && $this->view['basket']['sum']['preis_shipping'] != 0)
if ( ($shipping_cost != '') && ($shipping_cost != 0) )
{
$pdf->SetFont('Arial', '', 9);
519,26 → 478,17
$pdf->Cell(10, 8, $pnr.'.', 1, 0, 'C'); $pnr ++;
 
$pdf->setXY($prod_left + 10, $prod_top + $offset);
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, wpsg_translate(__('Versandkosten "#1#"', 'wpsg'), $this->view['oOrder']->getShippingLabel()), 1, 0, 'L');
$pdf->Cell( (($bTaxCol)?87:102), 8, wpsg_translate(__('Versandkosten "#1#"', 'wpsg'), $this->view['oOrder']->getShippingLabel()), 1, 0, 'L');
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
if ($bTaxCol)
{
if ($this->arShipping[$this->view['data']['type_shipping']]['mwst_null'] == '1' && $this->view['basket']['noMwSt'] == '1')
{
if ($this->arShipping[$this->view['data']['type_shipping']]['mwst_null'] == '1' && $bNoTax) $mwst = wpsg_ff(0.00, '%');
else {
$mwst = 0;
}
else
{
if ($this->view['basket']['arCalculation']['shipping'][0]['tax_key'] === '0') {
if ($this->view['basket']['arCalculation']['shipping'][0]['tax_key'] === '0') $mwst = _('anteilig');
else {
$mwst = _('anteilig');
} else {
$mwst = wpsg_ff($this->view['basket']['arCalculation']['shipping'][0]['tax'], '%');
$mwst = wpsg_ff($this->view['basket']['arCalculation']['tax'][$this->view['basket']['arCalculation']['shipping'][0]['tax_key']]['tax_value'], '%');
555,58 → 505,17
$pdf->Cell(15, 8, '1', 1, 0, 'C');
$pdf->setXY($prod_left + 127, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($this->view['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency')), 1, 0, 'R');
$pdf->Cell(25, 8, wpsg_ff($shipping_cost, $this->get_option('wpsg_currency')), 1, 0, 'R');
$pdf->setXY($prod_left + 152, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($this->view['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency')), 1, 0, 'R');
$pdf->Cell(25, 8, wpsg_ff($shipping_cost, $this->get_option('wpsg_currency')), 1, 0, 'R');
$offset += 8;
 
// Zusammengesetzte Versandarten darstellen
/*
if (wpsg_isSizedArray($this->view['basket']['shipping']['methods'])) {
foreach ($this->view['basket']['shipping']['methods'] as $shipping) {
$pdf->SetFont('Arial', '', 9);
$pdf->setXY($prod_left, $prod_top + $offset);
$pdf->Cell(10, 8, '', 1, 0, 'C'); $pnr ++;
$pdf->setXY($prod_left + 10, $prod_top + $offset);
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, $this->getShippingName($shipping), 1, 0, 'L');
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
if ($this->view['basket']['shipping'][$shipping]['tax_rata'] == 1) { $mwst = __('Anteilig', 'wpsg'); }
else { $mwst = wpsg_ff($this->view['basket']['shipping'][$shipping]['mwst'], '%'); }
$pdf->setXY($prod_left + 97, $prod_top + $offset);
$pdf->Cell(15, 8, $mwst, 1, 0, 'C');
}
$pdf->setXY($prod_left + 112, $prod_top + $offset);
$pdf->Cell(15, 8, '1', 1, 0, 'C');
$pdf->setXY($prod_left + 127, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($this->view['basket']['shipping'][$shipping]['preis_shipping_brutto'], $this->get_option('wpsg_currency')), 1, 0, 'R');
$pdf->setXY($prod_left + 152, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($this->view['basket']['shipping'][$shipping]['preis_shipping_brutto'], $this->get_option('wpsg_currency')), 1, 0, 'R');
$offset += 8;
}
}
*/
}
// Zahlungskosten
if ($this->view['basket']['sum']['preis_payment'] != '' && $this->view['basket']['sum']['preis_payment'] != 0)
if ( ($payment_cost != '') && ($payment_cost != 0) )
{
$pdf->SetFont('Arial', '', 9);
614,17 → 523,17
$pdf->Cell(10, 8, $pnr.'.', 1, 0, 'C'); $pnr ++;
 
$pdf->setXY($prod_left + 10, $prod_top + $offset);
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, $this->arPayment[$this->view['data']['type_payment']]['name'], 1, 0, 'L');
$pdf->Cell( (($bTaxCol)?87:102), 8, $this->arPayment[$this->view['data']['type_payment']]['name'], 1, 0, 'L');
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
if ($bTaxCol)
{
if ($this->arPayment[$this->view['data']['type_payment']]['mwst_null'] == '1' && $this->view['basket']['noMwSt'] == '1')
if ($this->arPayment[$this->view['data']['type_payment']]['mwst_null'] == '1' && $bNoTax)
{
$mwst = 0;
}
else
{
 
$mwst = wpsg_ff(0.00, '%');
 
} else {
if ($this->view['basket']['arCalculation']['payment'][0]['tax_key'] === '0') {
648,10 → 557,10
$pdf->Cell(15, 8, '1', 1, 0, 'C');
$pdf->setXY($prod_left + 127, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($this->view['basket']['sum']['preis_payment'], $this->get_option('wpsg_currency')), 1, 0, 'R');
$pdf->Cell(25, 8, wpsg_ff($payment_cost, $this->get_option('wpsg_currency')), 1, 0, 'R');
$pdf->setXY($prod_left + 152, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($this->view['basket']['sum']['preis_payment'], $this->get_option('wpsg_currency')), 1, 0, 'R');
$pdf->Cell(25, 8, wpsg_ff($payment_cost, $this->get_option('wpsg_currency')), 1, 0, 'R');
$offset += 8;
670,22 → 579,13
if (strpos($this->view['storno_fee'], '%') !== false) $label .= ' ('.wpsg_ff($this->view['storno_fee'], '%').')';
$pdf->setXY($prod_left + 10, $prod_top + $offset);
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, $label, 1, 0, 'L');
$pdf->Cell( (($bTaxCol)?87:102), 8, $label, 1, 0, 'L');
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
if ($bTaxCol)
{
if ($this->view['basket']['noMwSt'] == '1')
{
$mwst = 0;
}
else
{
$mwst = wpsg_ff($this->view['storno_fee_tax_value'], '%');
}
if ($bNoTax) $mwst = wpsg_ff(0.00, '%');
else $mwst = wpsg_ff($this->view['storno_fee_tax_value'], '%');
$pdf->setXY($prod_left + 97, $prod_top + $offset);
$pdf->Cell(15, 8, $mwst, 1, 0, 'C');
715,95 → 615,135
$pdf->Cell(37, 8, $this->view['kunde']['ustidnr'], 0, 0, 'R');
}
$offset += 10;
if ($this->get_option('wpsg_kleinunternehmer'))
$offset += 10; // Abstand zwischen Tabelle und Auswertung
 
if ( ($this->get_option('wpsg_kleinunternehmer') == '1') || ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_SMALLBUSINESS) )
{
 
$pdf->Text($prod_left, $prod_top + $offset, __("Es ergibt sich folgender Gesamtbetrag", "wpsg").':');
$pdf->Text($prod_left + 80, $prod_top + $offset, __("Summe", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'] + $this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$offset += 5;
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['brutto'] + $this->view['basket']['arCalculation']['sum']['discount_brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
if ( !$bNoTax || ($arCalculation['sum']['topay_brutto'] != $arCalculation['sum']['brutto']) ) $offset += 5;
 
} else {
}
else
{
if ($this->view['basket']['noMwSt'] == '1')
if ($bNoTax)
{
$pdf->Text($prod_left, $prod_top + $offset, __("Es ergibt sich folgender Gesamtbetrag", "wpsg").':');
$pdf->Text($prod_left + 80, $prod_top + $offset, __("BRUTTOBETRAG", "wpsg"));
$pdf->Text($prod_left + 80, $prod_top + $offset, __("Summe", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['brutto'] + $this->view['basket']['arCalculation']['sum']['discount_brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
//if ( !$bNoTax || ($arCalculation['sum']['topay_brutto'] != $arCalculation['sum']['brutto']) )
$offset += 5;
$pdf->Text($prod_left + 80, $prod_top + $offset, __("MwSt. GESAMT", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff(0, $this->get_option('wpsg_currency')), 0, 0, 'R');
 
if ( !(($this->view['oOrder']->isInnerEu()) && ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_B2B)) ) {
 
if (sizeof($this->view['basket']['arCalculation']['tax']) >= 1)
{
 
$mw_count = 0;
foreach ($this->view['basket']['arCalculation']['tax'] as $mw)
{
 
if ( $mw['tax_value'] > 0 && $mw['sum'] > 0 ) {
 
$offset += 5;
$pdf->Text($prod_left + 80, $prod_top + $offset, __("MwSt. ", "wpsg").wpsg_ff($mw['tax_value'], '%'));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($mw['sum'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$mw_count++;
 
}
 
}
}
else
{
$pdf->Text($prod_left, $prod_top + $offset, __("Der Gesamtbetrag setzt sich wie folgt zusammen", "wpsg"));
$pdf->Text($prod_left + 80, $prod_top + $offset, __("NETTOBETRAG", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
if (sizeof($this->view['basket']['mwst']) >= 1)
{
}
foreach ($this->view['basket']['mwst'] as $mw)
if ($mw_count >= 2)
{
$offset += 5;
$pdf->Text($prod_left + 80, $prod_top + $offset, __("MwSt. ", "wpsg").wpsg_ff($mw['value'], '%'));
$pdf->Text($prod_left + 80, $prod_top + $offset, __("MwSt. GESAMT", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($mw['sum'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['brutto'] - $this->view['basket']['arCalculation']['sum']['netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
}
} else if ( !($arCalculation['sum']['topay_brutto'] != $arCalculation['sum']['brutto']) ) $offset -= 5;
 
} else {
$pdf->Text($prod_left, $prod_top + $offset, __("Der Gesamtbetrag setzt sich wie folgt zusammen", "wpsg").':');
$pdf->Text($prod_left + 80, $prod_top + $offset, __("NETTOBETRAG", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['netto'] + $this->view['basket']['arCalculation']['sum']['discount_netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
if (sizeof($this->view['basket']['arCalculation']['tax']) >= 1)
{
 
$mw_count = 0;
foreach ($this->view['basket']['arCalculation']['tax'] as $mw)
{
 
if ( $mw['tax_value'] > 0 && $mw['sum'] > 0) {
 
$offset += 5;
$pdf->Text($prod_left + 80, $prod_top + $offset, __("MwSt. ", "wpsg").wpsg_ff($mw['tax_value'], '%'));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($mw['sum'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$mw_count++;
 
}
 
}
}
if (sizeof($this->view['basket']['mwst']) > 1)
if ($mw_count >= 2)
{
$offset += 5;
$pdf->Text($prod_left + 80, $prod_top + $offset, __("MwSt. GESAMT", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'] - $this->view['basket']['sum']['preis_gesamt_netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['brutto'] - $this->view['basket']['arCalculation']['sum']['netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
}
}
}
}
}
// Rabatt
if ($this->view['basket']['sum']['preis_rabatt'] > 0)
if ($discount_value > 0)
{
$offset += 5;
$pdf->Text($prod_left + 80, $prod_top + $offset, __("Rabatt", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, '-'.wpsg_ff($this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->Cell(37, 8, '-'.wpsg_ff($discount_value, $this->get_option('wpsg_currency')), 0, 0, 'R');
}
 
// Wertgutschein
if ($arCalculation['sum']['topay_brutto'] !== $arCalculation['sum']['brutto']) {
if ( $arCalculation['sum']['topay_brutto'] != $arCalculation['sum']['brutto'] ) {
 
if (!$bNoTax) {
$offset += 5;
$pdf->Text($prod_left + 80, $prod_top + $offset, __("Bruttobetrag", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$offset += 5;
$pdf->Text($prod_left + 80, $prod_top + $offset, __("SUMME", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->setFont('Arial', '', '9');
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->setFont('Arial', '', '9');
$pdf->setFont('Arial', '', '9');
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->setFont('Arial', '', '9');
} else if (!($mw_count >= 2)) $offset -= 5;
 
foreach ($arCalculation['coupon'] as $c) {
$offset += 5;
818,7 → 758,7
$offset += 5;
$pdf->setFont('Arial', 'B', '9');
$pdf->Text($prod_left + 80, $prod_top + $offset, __("SUMME", "wpsg"));
$pdf->Text($prod_left + 80, $prod_top + $offset, __("ZU ZAHLEN", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
/* Endbetrag wird fett ausgegeben */
827,85 → 767,82
$pdf->setFont('Arial', '', '9');
} else {
 
$offset += 5;
$pdf->Text($prod_left + 80, $prod_top + $offset, __("SUMME", "wpsg"));
$pdf->setFont('Arial', 'B', '9');
$pdf->Text($prod_left + 80, $prod_top + $offset, __("GESAMTSUMME", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
 
/* Endbetrag wird fett ausgegeben */
$pdf->setFont('Arial', 'B', '9');
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->Cell(37, 8, wpsg_ff($arCalculation['sum']['topay_brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->setFont('Arial', '', '9');
/* Endbetrag wird normal ausgegeben */
//$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
}
if ($this->get_option('wpsg_kleinunternehmer') == '1')
if ( ($this->get_option('wpsg_kleinunternehmer') == '1') || ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_SMALLBUSINESS) )
{
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset + 5, 5, $this->get_option('wpsg_kleinunternehmer_text'));
$offset += 15;
 
$offset += 3;
$pdf->setFont('Arial', '', '8');
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset, 5, '('.$this->get_option('wpsg_kleinunternehmer_text').')');
$offset += 8;
}
 
$offset += 5;
if ($this->hasMod('wpsg_mod_deliverynote'))
if ($this->hasMod('wpsg_mod_deliverynote') && ($this->get_option('wpsg_rechnungen_deliverynote') == '1'))
{
$arDN_order = $this->callMod('wpsg_mod_deliverynote', 'loadDeliveryNotesFromOrder', array($this->view['data']['id']));
$delivery_date = $this->callMod('wpsg_mod_deliverynote', 'getDeliveryTime', array($this->view['data']['id']));
 
// Wenn es ein Gesamtlieferdatum gibt und nur einen Lieferschein, dann unter der Bestellung anzeigen
if ($delivery_date !== false && sizeof($arDN_order) == 1)
{
$offset += 10;
$pdf->setFont('Arial', 'B', '9');
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset, 5, __('Lieferung:', 'wpsg'));
$pdf->setFont('Arial', '', '9');
$pdf->wpsg_MultiCell($prod_left + 16, $prod_top + $offset, 5, wpsg_translate(__('#1#', 'wpsg'), date('d.m.Y', $delivery_date)));
$offset += 8;
$pdf->wpsg_MultiCell($prod_left, $prod_top + $offset, 5, wpsg_translate(__('Lieferung: #1#', 'wpsg'), date('d.m.Y', $delivery_date)));
 
$offset += 5;
}
}
$offset += 5;
 
if ($this->view['fussText'] != "")
{
//$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset, 5, utf8_encode($this->view['fussText']));
$pdf->setFont('Arial', '', '9');
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset, 5, $this->view['fussText']);
$pdf->SetFont('Arial', 'B', 9);
$offset += 10;
$offset += 8;
}
$offset += 10;
 
$shipping_adress = false;
 
if ($this->hasMod('wpsg_mod_shippingadress') && $this->callMod('wpsg_mod_shippingadress', 'check_different_shippingadress', array('k_id' => $this->view['data']['k_id'], 'o_id' => $this->view['data']['id'])))
{
if ($this->hasMod('wpsg_mod_shippingadress') && $this->callMod('wpsg_mod_shippingadress', 'check_different_shippingadress', array('k_id' => $this->view['data']['k_id'], 'o_id' => $this->view['data']['id']))) {
$pdf->setFont('Arial', 'B', 9);
$pdf->Text($prod_left, $prod_top + $offset, __("Lieferanschrift", "wpsg").":");
$offset += 5;
$offset += 2;
$pdf->setFont('Arial', '', 9);
$pdf->setFont('Arial', '', 9);
$shipping_adress = "";
if ($this->view['data']['shipping_firma'] != "")
{
$shipping_adress .= $this->view['data']['shipping_firma']."\r\n";
}
$shipping_adress .= $this->view['data']['shipping_vname'].' '.$this->view['data']['shipping_name']."\r\n";
$shipping_adress .= $this->view['data']['shipping_strasse']."\r\n";
//$shipping_adress .= $this->view['data']['shipping_land']['kuerzel'].'-';
$shipping_adress = "";
if ($this->view['data']['shipping_firma'] != "")
{
$shipping_adress .= $this->view['data']['shipping_firma']."\r\n";
}
$shipping_adress .= $this->view['data']['shipping_vname'].' '.$this->view['data']['shipping_name']."\r\n";
$shipping_adress .= $this->view['data']['shipping_strasse'].' '.$this->view['data']['shipping_nr']."\r\n";
// $shipping_adress .= $this->view['data']['shipping_land']['kuerzel'].'-';
$shipping_adress .= $this->view['data']['shipping_plz'].' '.$this->view['data']['shipping_ort']."\r\n";
$shipping_adress .= $this->view['data']['shipping_land']['name'];
$shipping_adress .= $this->view['data']['shipping_plz'].' '.$this->view['data']['shipping_ort']."\r\n";
$shipping_adress .= $this->view['data']['shipping_land']['name'];
$start = $pdf->getY();
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset, 5, $shipping_adress, 0, 'L', 0, 100);
$offset += $pdf->getY() - $start;
913,55 → 850,47
$shipping_adress = true;
}
$offset += 5;
// Bestellvariablen
if ($this->hasMod('wpsg_mod_ordervars') && $this->get_option('wpsg_mod_rechnungen_showov') == '1')
{
 
$pdf->SetFont('Arial', 'B', 9);
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset - 7, 5, __("Angaben während der Bestellung", "wpsg").":");
$bvars = @unserialize($this->view['data']['bvars']);
if (!is_array($bvars)) $bvars = array();
$strBVars = "";
foreach ($bvars as $bvars_id => $bvars_value)
{
$bvars = $this->db->fetchRow("SELECT * FROM `".wpsg_q(WPSG_TBL_ORDERVARS)."` WHERE `id` = '".wpsg_q($bvars_id)."' ORDER BY `pos` ASC, `id` ASC ");
$pdf->SetFont('Arial', '', 9);
 
$bvars = @unserialize($this->view['data']['bvars']);
if (!is_array($bvars)) $bvars = array();
if ($bvars['typ'] == "1") // Auswahl
$strBVars = "";
foreach ($bvars as $bvars_id => $bvars_value)
{
if ($bvars_value <= 0) $bvars_value = __("Keine Angabe", "wpsg");
$bvars = $this->db->fetchRow("SELECT * FROM `".wpsg_q(WPSG_TBL_ORDERVARS)."` WHERE `id` = '".wpsg_q($bvars_id)."' ORDER BY `pos` ASC, `id` ASC ");
if ($bvars['typ'] == "1") // Auswahl
{
if ($bvars_value <= 0) $bvars_value = __("Keine Angabe", "wpsg");
}
else if ($bvars['typ'] == "2") // Texteingabe
{
if (trim($bvars_value) == "") $bvars_value = __("Keine Angabe", "wpsg");
}
else if ($bvars['typ'] == "3") // Checkbox
{
if ($bvars_value <= 0) $bvars_value = __("Keine Angabe", "wpsg");
}
$bvars_name = $this->callMod('wpsg_mod_ordervars', 'getNameById', array($bvars_id));
$strBVars .= "\r\n".$bvars_name.": ".$bvars_value;
}
else if ($bvars['typ'] == "2") // Texteingabe
{
if (trim($bvars_value) == "") $bvars_value = __("Keine Angabe", "wpsg");
}
else if ($bvars['typ'] == "3") // Checkbox
{
if ($bvars_value <= 0) $bvars_value = __("Keine Angabe", "wpsg");
}
$bvars_name = $this->callMod('wpsg_mod_ordervars', 'getNameById', array($bvars_id));
$strBVars .= "\r\n".$bvars_name.": ".$bvars_value;
}
$pdf->SetFont('Arial', 'B', 9);
$pdf->Text($prod_left, $prod_top + $offset, __("Angaben während der Bestellung", "wpsg").":");
$pdf->SetFont('Arial', '', 9);
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset, 5, $strBVars);
}
if (!file_exists($this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id']))))
{
mkdir($this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id'])), 0777, true);
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset - 6, 5, $strBVars);
 
}
 
$this->callMods('wpsg_mod_rechnungen_pdf', array(&$pdf, &$this->view['data']['id'], &$this->view['preview'], &$this->view['invoice']));
$filename = $this->view['filename'].".pdf";
974,10 → 903,11
} else {
$pdf->Output($this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id'])).$filename, 'F');
$pdf->Output($oInvoice->getFilePath(), 'F');
// Hier wird der Dateiname an FPD übergeben. Er soll sich aus der Rechnungsnummer ergeben, auch wenn das Dokument über die ID gespeichert ist.
$pdf->Output($this->view['filename_out'], 'I');
}
 
?>
/mods/mod_rechnungen/multi_invoice_pdf.phtml
9,7 → 9,7
require_once WPSG_PATH_LIB.'wpsg_fpdf.class.php';
global $absender_left, $absender_top, $adress_left, $adress_top, $rdata_left, $rdata_top, $rhead_left, $rhead_top, $sum_multi_offset, $pdf;
global $absender_left, $absender_top, $adress_left, $adress_top, $rdata_left, $rdata_top, $rhead_left, $rhead_top, $sum_multi_offset, $pdf, $data;
// Positionierung der Absenderadresszeile
$absender_left = 25;
33,11 → 33,17
// Anzahl an Produkten pro Seite
$prod_break = $this->get_option('wpsg_rechnungen_pdfperpage');
$arCalculation = $this->view['basket']['arCalculation'];
 
/*
$arCalculation = $this->view['basket']['arCalculation'];
$data = $this->view['multi_data']['orders'][0]['data'];
$sum = $this->view['multi_data']['orders'][0]['sum'];
*/
 
$arCalculation = array_values($this->view['multi_data']['order_data'])[0]['arCalculation'];
$data = $this->view['data'];
$sum = $arCalculation['sum'];
 
if ($this->getFrontendTaxView() === WPSG_NETTO) $taxdisplay = 'netto';
else $taxdisplay = 'brutto';
45,28 → 51,28
function AddRechnungPage($shop, $pdf) {
 
global $absender_left, $absender_top, $adress_left, $adress_top, $rdata_left, $rdata_top, $offset, $sum_multi_offset;
global $absender_left, $absender_top, $adress_left, $adress_top, $rdata_left, $rdata_top, $offset, $sum_multi_offset, $data;
$pdf->AddPage();
$sum_multi_offset = 0;
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.pdf")) {
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_bp.pdf")) {
$pdf->setSourceFile($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.pdf");
$pdf->setSourceFile($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_bp.pdf");
$tplidx = $pdf->importPage(1, '/MediaBox');
$pdf->useTemplate($tplidx, 0, 0, 210);
} else if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.jpg")) {
} else if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_bp.jpg")) {
$pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.jpg", 0, 0, 210, 297, 'jpg');
$pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_bp.jpg", 0, 0, 210, 297, 'jpg');
}
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_logo.jpg"))
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_logo.jpg"))
{
list($width, $height, $type, $attr) = getimagesize($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_logo.jpg");
list($width, $height, $type, $attr) = getimagesize($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_logo.jpg");
// Umrechnung von Inch zu Pixel
$wPix = (25.4 * (int)$width) / 96;
93,12 → 99,12
if(isset($logo_pos) && $logo_pos === "right") { $abscissa = $rightPos; }
$pdf->SetAlpha($alpha);
$pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_logo.jpg", $abscissa, $ordinate, $wPix, $hPix);
$pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_logo.jpg", $abscissa, $ordinate, $wPix, $hPix);
$pdf->SetAlpha(1);
}
// Absenderadresszeile (Wird in der Konfiguration hinterlegt)
 
// Absenderadresszeile (Wird in der Konfiguration hinterlegt)
$pdf->SetFont('Arial', '', 6);
$pdf->Text($absender_left, $absender_top, $shop->replaceUniversalPlatzhalter(__($shop->get_option("wpsg_rechnungen_adresszeile"), 'wpsg'), $data['id']));
188,11 → 194,11
$rhead_count = 1;
$sum_multi_offset = 0;
$orders = $this->view['multi_data']['orders'];
// $orders = $this->view['multi_data']['orders'];
 
// noMwSt
$head_data = array_values($this->view['multi_data']['order_data'])[0];
if ( ($head_data['oCalculation']->getTaxMode() === wpsg_calculation::TAXMODE_B2B) && ($head_data['oOrder']->isInnerEu()) ) {
if ( ($head_data['oCalculation']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_B2B) && ($head_data['oOrder']->isInnerEu()) ) {
$bNoTax = true;
} else {
$bNoTax = false;
237,8 → 243,6
// Bestellnummer anzeigen
$pdf->Text($rhead_left + 155, $rhead_top + $sum_multi_offset, __("Best. Nr.", "wpsg"));
$pdf->Text($rhead_left + 155, $rhead_top + $sum_multi_offset + 6, $oOrder->getNr());
$summe = 0;
 
$bKopf = false; $pnr = 1; $offset = 0; $count = 0;
380,7 → 384,7
* Produktbeschreibung anzeigen Ja/Nein
*/
$pBeschreibungHeight = 0;
if ($this->get_option("wpsg_rechnungen_pbeschreibung") == "1" && trim(strip_tags($oOrderProduct->getShortDescription())) != '') {
if ($this->get_option("wpsg_rechnungen_pbeschreibung") == "1" && trim(strip_tags($oOrderProduct->getProduct()->getShortDescription())) != '') {
$produktBeschreibung = nl2br($produktBeschreibung);
preg_match_all('/\<br \/\>/', $produktBeschreibung, $treffer);
468,9 → 472,7
$pnr ++;
$count ++;
$summe += $p['price'] * $p['menge'];
 
if ($pdf->getY() > 220 || ($count >= $prod_break && sizeof($oOrder->getOrderProducts()) > ($pnr - 1))) {
AddRechnungPage($this, $pdf);
785,19 → 787,6
$pdf->setXY($prod_left + 140, $prod_top + $offset + 10 - 5);
$pdf->Cell(37, 8, wpsg_ff($arCalculation['sum']['netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
// if (sizeof($arCalculation['tax']) >= 1) {
// foreach ($arCalculation['tax'] as $k => $mw) {
// if ($k === 0) continue;
// $offset += 5;
// $pdf->Text($prod_left + 80, $prod_top + $offset + 10, __("MwSt. ", "wpsg").wpsg_ff($mw['tax_value'], '%'));
// $pdf->setXY($prod_left + 140, $prod_top + $offset + 10 - 5);
// $pdf->Cell(37, 8, wpsg_ff($mw['sum'], $this->get_option('wpsg_currency')), 0, 0, 'R');
// }
// }
if (sizeof($arCalculation['tax']) > 1) {
$offset += 5;
910,7 → 899,6
if ($this->view['preview']) {
 
//$pdf->Output($this->callMod('wpsg_mod_rechnungen', 'getFilePath', array('multi')).$filename, 'F');
$pdf->Output();
exit;
/mods/mod_rechnungen/order_view_orderdata_after.phtml
202,11 → 202,11
}
if (ok) {
 
if (event.target.getAttribute("id") === 'invoice_wpsg_rechnungen_submit') {
window.setTimeout(function() { location.href = '<?php
window.setTimeout(function() { location.href = '<?php
 
echo wpsg_admin_url('Order', 'view', ['edit_id' => $oOrder->getId()]);
?>'; }, 1000);
/mods/mod_rechnungen/settings_edit.phtml
196,12 → 196,16
<?php if ($this->hasMod('wpsg_mod_produktattribute') == '1') {?>
<?php echo wpsg_drawForm_Checkbox('wpsg_rechnungen_produktattribute', __('Produktattribute auf der Rechnung anzeigen', 'wpsg'), $this->get_option('wpsg_rechnungen_produktattribute'), array('help' => 'wpsg_rechnungen_produktattribute')); ?>
<?php }?>
<?php if ($this->hasMod('wpsg_mod_deliverynote') == '1') {?>
<?php echo wpsg_drawForm_Checkbox('wpsg_rechnungen_deliverynote', __('Lieferdatum auf der Rechnung anzeigen', 'wpsg'), $this->get_option('wpsg_rechnungen_deliverynote'), array('help' => 'wpsg_rechnungen_deliverynote')); ?>
<?php }?>
 
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_rechnungen_showgutschriftrechnung', __('Rechnungsnummer auf Rechnungskorrektur anzeigen', 'wpsg'), $this->get_option('wpsg_mod_rechnungen_showgutschriftrechnung'), array('help' => 'wpsg_mod_rechnungen_showgutschriftrechnung')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_rechnungen_showpv', __('Produktvariablen auf Rechnung anzeigen', 'wpsg'), $this->get_option('wpsg_mod_rechnungen_showpv'), array('help' => 'wpsg_mod_rechnungen_showpv')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_rechnungen_showov', __('Bestellvariablen auf Rechnung anzeigen', 'wpsg'), $this->get_option('wpsg_mod_rechnungen_showov'), array('help' => 'wpsg_mod_rechnungen_showov')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_rechnungen_hideCountry', __('Land auf Rechnung verbergen', 'wpsg'), $this->get_option('wpsg_mod_rechnungen_hideCountry'), array('help' => 'wpsg_mod_rechnungen_hideCountry')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_rechnungen_customermail', __('Mail an Bestellbestätigung anhängen', 'wpsg'), $this->get_option('wpsg_mod_rechnungen_customermail'), ['help' => 'wpsg_mod_rechnungen_customermail']); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_rechnungen_customermail', __('Rechnung/PDF an Bestellbestätigungsmail anhängen', 'wpsg'), $this->get_option('wpsg_mod_rechnungen_customermail'), ['help' => 'wpsg_mod_rechnungen_customermail']); ?>
<?php echo wpsg_drawForm_Input('wpsg_rechnungen_start', __('Startnummer (Rechnungen)', 'wpsg'), $this->get_option('wpsg_rechnungen_start'), array('help' => 'wpsg_rechnungen_start')); ?>
<?php echo wpsg_drawForm_Input('wpsg_gutschrift_start', __('Startnummer (Rechnungskorrektur)', 'wpsg'), $this->get_option('wpsg_gutschrift_start'), array('help' => 'wpsg_gutschrift_start')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_rechnungen_gutschrifttax', __('Mehrwertsteuersatz für Bearbeitungsgebühr', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_rechnungen_gutschrifttax'), array('help' => 'wpsg_mod_rechnungen_gutschrifttax')); ?>
/mods/mod_productvariants/admin_edit.phtml
303,7 → 303,7
});
 
</script>
 
<?php if (intval($this->view['product_id']) <= 0) { ?>
<span style="padding-left:15px;">
<span style="display:inline-block; margin-right:5px;"><?php echo __('Für alle Downloadplus Produkte:', 'wpsg'); ?></span>
316,6 → 316,25
</div>
<?php } ?>
<?php if (wpsg_isSizedInt($this->view['product_id'])) { ?>
<div style="margin-top:0.25rem;">
<span>EAN:
<span title="<?php echo __('EAN der Produktvariation', 'wpsg'); ?>" class="wpsg_editable" id="productvariation_ean_<?php echo $vari['id']; ?>"><?php echo $vari['ean']??''; ?></span>
</span>
<script>
 
jQuery('#productvariation_ean_<?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: 'ean',
product_id: <?php echo $this->view['product_id']; ?>,
field_id: '<?php echo $vari['id']; ?>'
}
});
</script>
</div>
<?php } ?>
<script>
 
function wpsg_mod_downloadplus_setProducts(vari_id, active) {
/mods/mod_kundenverwaltung/order.phtml
22,14 → 22,26
<div class="wpsg_inner wpsg_order_<?php echo $order['id']; ?>">
<strong><?php echo __('Bestellstatus', 'wpsg'); ?>:</strong>&nbsp;
<?php echo $this->arStatus[$order['status']]; ?>
<?php if ($this->hasMod('wpsg_mod_rechnungen')) { ?>
<?php if ($r = $this->callMod('wpsg_mod_rechnungen', 'getOrderInvoice', array($order['id']))) { ?>
<a href="<?php echo $this->callMod('wpsg_mod_rechnungen', 'getFrontendLink', array($r['id'])); ?>"><?php echo wpsg_translate(__('Rechnung #1#', 'wpsg'), $r['rnr']); ?></a>
<?php } else if ($r = $this->callMod('wpsg_mod_rechnungen', 'getOrderCredit', array($order['id']))) { ?>
<a href="<?php echo $this->callMod('wpsg_mod_rechnungen', 'getFrontendLink', array($r['id'])); ?>"><?php echo wpsg_translate(__('Rechnungskorrektur #1#', 'wpsg'), $r['gnr']); ?></a>
<?php } ?>
<?php if ($this->hasMod('wpsg_mod_rechnungen')) {
 
$arInvoice = \wpsg\wpsg_invoice::findByOrderId(intval($order['id']));
 
?>
 
<?php foreach ($arInvoice as $oInvoice) { ?>
 
<?php if ($oInvoice->isInvoice()) { ?>
 
<a href="<?php echo $this->callMod('wpsg_mod_rechnungen', 'getFrontendLink', [$oInvoice->getId()]); ?>"><?php echo wpsg_translate(__('Rechnung #1#', 'wpsg'), $oInvoice->getNr()); ?></a>
 
<?php } else if ($oInvoice->isStorno()) { ?>
 
<a href="<?php echo $this->callMod('wpsg_mod_rechnungen', 'getFrontendLink', [$oInvoice->getId()]); ?>"><?php echo wpsg_translate(__('Rechnungskorrektur #1#', 'wpsg'), $oInvoice->getNr()); ?></a>
 
<?php } ?>
 
<?php } ?>
 
<?php } ?>
<br />
<strong><?php echo __('Rechnungsbetrag', 'wpsg'); ?>:</strong> <?php echo wpsg_ff($order['price_gesamt'], $this->get_option('wpsg_currency')); ?><br />
/mods/mod_kundenverwaltung/settings_edit.phtml
70,11 → 70,12
</div>
 
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_recaptcha_register', __('reCaptcha V2 für Registrierung', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_recaptcha_register')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_recaptcha_register', __('reCaptcha V2 für Registrierung', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_recaptcha_register'), array('help' => 'wpsg_mod_kundenverwaltung_recaptcha_register')); ?>
<div id="wpsg_mod_kundenverwaltung_register_recaptcha_layer" style="display:none;">
<?php echo wpsg_drawForm_Input('wpsg_mod_kundenveraltung_recaptcha_key', __('Websiteschlüssel', 'wpsg'), $this->get_option('wpsg_mod_kundenveraltung_recaptcha_key')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_kundenveraltung_recaptcha_secretkey', __('Geheimer Schlüssel', 'wpsg'), $this->get_option('wpsg_mod_kundenveraltung_recaptcha_secretkey')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_recaptcha_dsgvo_layer', __('DSGVO Layer für das Recaptcha', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_recaptcha_dsgvo_layer')); ?>
</div>
 
/mods/mod_kundenverwaltung/edit.phtml
224,7 → 224,7
 
var password = jQuery(this).val();
 
if (password.length < 6)
if (password.length < 8)
{
 
jQuery('#wpsg_pwd_length').removeClass('valid').addClass('invalid');
/mods/mod_kundenverwaltung/profil.phtml
1,6 → 1,6
<?php
 
/**
/**
* Seite für das Profil eines Kunden
*/
 
50,7 → 50,7
 
var password = jQuery(this).val();
if (password.length < 6) {
if (password.length < 8) {
jQuery('#wpsg_pwd_length').removeClass('valid').addClass('invalid');
 
193,7 → 193,15
<label for="email" class="wpsg_checkout"><?php echo __("E-Mail Adresse", "wpsg"); ?>
<?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
</label>
<input class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="email" id="email" name="wpsg[profil][email]" value="<?php echo htmlspecialchars($this->view['data']['email']); ?>" />
<input
class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?>
wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>"
type="email"
id="email"
name="wpsg[profil][email]"
value="<?php echo htmlspecialchars($this->view['data']['email']); ?>"
autocomplete="off"
/>
</div>
<?php } ?>
202,7 → 210,15
<label for="email" class="wpsg_checkout"><?php echo __("E-Mail Adresse (Wiederholung)", "wpsg"); ?>
<?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
</label>
<input class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="email" id="email2" name="wpsg[profil][email2]" value="<?php echo htmlspecialchars($this->view['data']['email2']); ?>" />
<input
class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?>
wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>"
type="email"
id="email2"
name="wpsg[profil][email2]"
value="<?php echo htmlspecialchars($this->view['data']['email2']); ?>"
autocomplete="off"
/>
</div>
<?php } ?>
324,7 → 340,14
<label for="wpsg_mod_kundenverwaltung_pwd1"><?php echo __("Passwort", "wpsg"); ?>
<?php if ($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwang') == '1') { ?><span class="wpsg_required">*</span><?php } ?>:
</label>
<input class="wpsg_checkout <?php echo ((in_array("mod_kundenverwaltung_pwd1", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="wpsg_mod_kundenverwaltung_pw1" name="wpsg[mod_kundenverwaltung][register_pwd1]" value="" /><span id="wpsg_mod_kundenverwaltung_password_result"></span>
<input
class="wpsg_checkout <?php echo ((in_array("mod_kundenverwaltung_pwd1", (array)$this->view['error']))?'wpsg_error':''); ?>"
type="password"
id="wpsg_mod_kundenverwaltung_pw1"
name="wpsg[mod_kundenverwaltung][register_pwd1]"
value=""
autocomplete="off"
/><span id="wpsg_mod_kundenverwaltung_password_result"></span>
</div>
<div class="wpsg_checkoutblock">
331,7 → 354,14
<label for="wpsg_mod_kundenverwaltung_pwd2"><?php echo __("Passwort wiederholen", "wpsg"); ?>
<?php if ($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwang') == '1') { ?><span class="wpsg_required">*</span><?php } ?>:
</label>
<input class="wpsg_checkout <?php echo ((in_array("mod_kundenverwaltung_pwd2", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="wpsg_mod_kundenverwaltung_pwd2" name="wpsg[mod_kundenverwaltung][register_pwd2]" value="" />
<input
class="wpsg_checkout <?php echo ((in_array("mod_kundenverwaltung_pwd2", (array)$this->view['error']))?'wpsg_error':''); ?>"
type="password"
id="wpsg_mod_kundenverwaltung_pwd2"
name="wpsg[mod_kundenverwaltung][register_pwd2]"
value=""
autocomplete="off"
/>
</div>
<div id="wpsg_pwd_info">
/mods/mod_kundenverwaltung/register.phtml
12,50 → 12,49
 
<?php if ($this->get_option('wpsg_form_validation') == '1') { ?>
 
if (typeof jQuery.validationEngine == "object")
{
jQuery("#form-step2").validationEngine('attach', {promptPosition : "centerRight", scroll: false});
jQuery('.wpsg_mod_kundenverwaltung_login').bind('click', function(){
jQuery("#form-step2").validationEngine('detach');
});
if (typeof jQuery.validationEngine == "object")
{
jQuery("#form-step2").validationEngine('attach', {promptPosition : "centerRight", scroll: false});
jQuery('.wpsg_mod_kundenverwaltung_login').bind('click', function(){
jQuery("#form-step2").validationEngine('detach');
});
 
}
}
<?php } else if ($this->get_option('wpsg_form_validation') == '2') { ?>
 
jQuery.validator.addMethod("cRequired", jQuery.validator.methods.required, "<?php echo __('Dieses Feld ist ein Pflichtfeld.', 'wpsg'); ?>");
jQuery.validator.addClassRules('validate[required]', { cRequired: true } );
jQuery("#form-step2").validate( {
ignore: '',
errorClass: 'wpsg_error',
onsubmit: false,
showErrors: function(errorMap, errorList) {
jQuery.validator.addMethod("cRequired", jQuery.validator.methods.required, "<?php echo __('Dieses Feld ist ein Pflichtfeld.', 'wpsg'); ?>");
jQuery.validator.addClassRules('validate[required]', { cRequired: true } );
jQuery("#form-step2").validate( {
ignore: '',
errorClass: 'wpsg_error',
onsubmit: false,
showErrors: function(errorMap, errorList) {
 
this.defaultShowErrors();
this.defaultShowErrors();
 
}
} );
}
} );
 
jQuery('.wpsg_registerButton').bind('click', function() {
jQuery('.wpsg_registerButton').bind('click', function() {
 
var bReturn = jQuery('#form-step2').validate().form();
if (jQuery('#form-step2 input.wpsg_error').length > 0) jQuery('#form-step2 input.wpsg_error')[0].focus();
return bReturn;
} );
var bReturn = jQuery('#form-step2').validate().form();
if (jQuery('#form-step2 input.wpsg_error').length > 0) jQuery('#form-step2 input.wpsg_error')[0].focus();
return bReturn;
} );
<?php } ?>
 
// Visualisierung der Passwortstärke
 
// Visualisierung der Passwortstärke
jQuery('input[type=password]').keyup(function(){
 
var password = jQuery(this).val();
if (password.length < 6) {
if (password.length < 8) {
jQuery('#wpsg_pwd_length').removeClass('valid').addClass('invalid');
 
104,11 → 103,9
jQuery('#wpsg_pwd_speziell').removeClass('valid').addClass('invalid');
}
 
jQuery('#wpsg_pwd_info').show();
 
 
jQuery(this).blur(function(){
 
jQuery('#wpsg_pwd_info').hide();
116,15 → 113,14
});
});
 
// Validierung Spam
<?php
if (isset($_GET["wpsg_spam_email"]) && $_GET["wpsg_spam_email"] != "") {
echo "<p>Sie haben ein Feld ausgefüllt, das frei bleiben muss.</p>";
exit;
}
?>
// Validierung Spam
<?php
if (isset($_GET["wpsg_spam_email"]) && $_GET["wpsg_spam_email"] != "") {
echo "<p>Sie haben ein Feld ausgefüllt, das frei bleiben muss.</p>";
exit;
}
?>
 
});
 
144,9 → 140,18
 
<div class="wpsg wpsg_checkout wpsg_register">
<?php echo $this->writeFrontendMessage(); ?>
<style>
.placeholder { display: none !important; }
.m1_dsgvo_layer { position:relative; width:100%; height:100px; margin-bottom: 30px; }
.m1_dsgvo_layer > .placeholder_text { height:100px; font-size: small; position:relative; left:0; top:0; z-index:2; background-color:rgba(0, 0, 0, 0.75); display:flex; justify-content:center; align-items:center; color:#FFFFFF; flex-direction:column; padding:1rem; text-align:center; }
.m1_dsgvo_layer > .placeholder_text > button { color: rgba(0, 0, 0, 0.75); margin-top: 1rem;}
</style>
<form id="form-step2" method="post" action="<?php echo $this->callMod('wpsg_mod_kundenverwaltung', 'getRegisterURL'); ?>">
 
<?php echo $this->writeFrontendMessage(); ?>
<h2><?php echo __('Registrierung', 'sto'); ?></h2>
<?php if ($this->view['pflicht']['firma'] != '2') { ?>
<div class="wpsg_checkoutblock">
193,7 → 198,13
<label for="email" class="wpsg_register"><?php echo __("E-Mail Adresse", "wpsg"); ?>
<?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
</label>
<input class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="email" id="email" name="wpsg[register][email]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['data']['email'])); ?>" />
<input
class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>"
type="email" id="email"
name="wpsg[register][email]"
value="<?php echo htmlspecialchars(wpsg_getStr($this->view['data']['email'])); ?>"
autocomplete="off"
/>
</div>
<?php } ?>
202,7 → 213,14
<label for="email2" class="wpsg_register"><?php echo __("E-Mail Adresse (Wiederholung)", "wpsg"); ?>
<?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
</label>
<input class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="email" id="email2" name="wpsg[register][email2]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['data']['register']['email2'])); ?>" />
<input
class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>"
type="email"
id="email2"
name="wpsg[register][email2]"
value="<?php echo htmlspecialchars(wpsg_getStr($this->view['data']['register']['email2'])); ?>"
autocomplete="off"
/>
</div>
<?php } ?>
210,7 → 228,14
<label for="pwd1" class="wpsg_register"><?php echo __("Passwort", "wpsg"); ?>
<?php if (wpsg_getStr($this->view['pflicht']['pwd1']) != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
</label>
<input class="<?php echo ((wpsg_getStr($this->view['pflicht']['pwd1']) != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("mod_kundenverwaltung_pwd1", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="pwd1" name="wpsg[register][register_pwd1]" value="" /><span id="wpsg_checkoutblock_password_result"></span>
<input
class="<?php echo ((wpsg_getStr($this->view['pflicht']['pwd1']) != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("mod_kundenverwaltung_pwd1", (array)$this->view['error']))?'wpsg_error':''); ?>"
type="password"
id="pwd1"
name="wpsg[register][register_pwd1]"
autocomplete="off"
value=""
/><span id="wpsg_checkoutblock_password_result"></span>
</div>
<div class="wpsg_checkoutblock">
217,7 → 242,14
<label for="pwd2" class="wpsg_register"><?php echo __("Passwort (Wiederholung)", "wpsg"); ?>
<?php if (wpsg_getStr($this->view['pflicht']['pwd2']) != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
</label>
<input class="<?php echo ((wpsg_getStr($this->view['pflicht']['pwd2']) != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("mod_kundenverwaltung_pwd2", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="pwd2" name="wpsg[register][register_pwd2]" value="" />
<input
class="<?php echo ((wpsg_getStr($this->view['pflicht']['pwd2']) != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("mod_kundenverwaltung_pwd2", (array)$this->view['error']))?'wpsg_error':''); ?>"
type="password"
id="pwd2"
name="wpsg[register][register_pwd2]"
value=""
autocomplete="off"
/>
</div>
<div id="wpsg_pwd_info">
285,13 → 317,13
<?php } ?>
<?php } ?>
 
<?php if ($this->view['pflicht']['plz'] != '2') { ?>
<div class="wpsg_checkoutblock">
<label for="plz" class="wpsg_register"><?php echo __("Postleitzahl", "wpsg"); ?>
<?php if ($this->view['pflicht']['plz'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
<?php if ($this->view['pflicht']['plz'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
</label>
<input class="wpsg_input_text <?php echo (($this->view['pflicht']['plz'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("plz", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="plz" name="wpsg[register][plz]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['data']['plz'])); ?>" />
<input class="<?php echo (($this->view['pflicht']['plz'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("plz", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="plz" name="wpsg[register][plz]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['data']['plz'])); ?>" />
</div>
<?php } ?>
298,7 → 330,7
<?php if ($this->view['pflicht']['ort'] != '2') { ?>
<div class="wpsg_checkoutblock">
<label for="ort" class="wpsg_register"><?php echo __("Ort", "wpsg"); ?>
<?php if ($this->view['pflicht']['ort'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
<?php if ($this->view['pflicht']['ort'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
</label>
<input class="<?php echo (($this->view['pflicht']['ort'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("ort", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="ort" name="wpsg[register][ort]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['data']['ort'])); ?>" />
</div>
307,7 → 339,7
<?php if ($this->view['pflicht']['land'] != '2') { ?>
<div class="wpsg_checkoutblock">
<label for="wpsg_land" class="wpsg_register"><?php echo __("Land", "wpsg"); ?>
<?php if ($this->view['pflicht']['land'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
<?php if ($this->view['pflicht']['land'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
</label>
<select name="wpsg[register][land]" class="<?php echo (($this->view['pflicht']['land'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("land", (array)$this->view['error']))?'wpsg_error':''); ?>" id="wpsg_land">
<option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
321,7 → 353,7
<?php if ($this->view['pflicht']['ustidnr'] != '2') { ?>
<div class="wpsg_checkoutblock">
<label for="wpsg_ustidnr" class="wpsg_register"><?php echo __("UStIdNr.", "wpsg"); ?>
<?php if ($this->view['pflicht']['ustidnr'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
<?php if ($this->view['pflicht']['ustidnr'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
</label>
<input class="<?php echo (($this->view['pflicht']['ustidnr'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("ustidnr", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="wpsg_ustidnr" name="wpsg[register][ustidnr]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['data']['ustidnr'])); ?>" />
</div>
354,54 → 386,68
<?php /* Automatische Einbindung der benutzerdefinierten Kundenfelder ENDE */ ?>
<div class="wpsg_clear"></div>
 
<?php if ($this->get_option('wpsg_mod_kundenverwaltung_recaptcha_register') === '1') { ?>
<div class="wpsg_checkoutblock">
<label>
<?php echo __('SPAM Schutz Abfrage'); ?> <span class="wpsg_required">*</span>:
<div class="g-recaptcha" data-sitekey="<?php echo $this->get_option('wpsg_mod_kundenveraltung_recaptcha_key'); ?>"></div>
</label>
</div>
<div class="wpsg_clear"></div>
<?php } ?>
<?php if ($this->get_option('wpsg_mod_kundenverwaltung_mathcaptcha') === '1') {
$number1 = rand(0, 9);
$number2 = rand(0, 10);
$arOperator = ['+', '-', '*']; $operator = $arOperator[array_rand($arOperator)];
$time = time();
switch ($operator) {
case '+': $captcha_result = $number1 + $number2; break;
case '-': $captcha_result = $number1 - $number2; break;
case '*': $captcha_result = $number1 * $number2; break;
default: throw new \Exception();
}
\set_transient('wpsg_mod_kundenverwaltung_mathcaptcha_result', $captcha_result);
?>
<div class="wpsg_checkoutblock">
<label for="wpsg_mod_kundenverwaltung_mathcaptcha" class="wpsg_register"><?php echo wpsg_translate(
__("Ergebnis aus #1# #2# #3#", "wpsg"),
$number1, $operator, $number2
); ?>:
<span class="wpsg_required">*</span>
</label>
<input
class="validate[required] wpsg_register <?php echo ((in_array("wpsg_mod_kundenverwaltung_mathcaptcha", (array)$this->view['error']))?'wpsg_error':''); ?>"
type="text" id="wpsg_mod_kundenverwaltung_mathcaptcha" name="wpsg_mod_kundenverwaltung_mathcaptcha"
placeholder="SPAM Schutz"
value="" />
</div>
<?php } ?>
<?php if ($this->get_option('wpsg_mod_kundenverwaltung_recaptcha_register') === '1') { ?>
<div class="wpsg_checkoutblock">
<label class="recaptcha_v2_checkout ">
 
<?php echo __('SPAM Schutz Abfrage'); ?> <span class="wpsg_required">*</span>:
 
<?php if ($this->get_option('wpsg_mod_kundenverwaltung_recaptcha_dsgvo_layer') != '1') { ?>
<div class="g-recaptcha" data-sitekey="<?php echo $this->get_option('wpsg_mod_kundenveraltung_recaptcha_key'); ?>"></div>
<?php } else { ?>
<div class="wpsg_recaptcha placeholder"> <!-- Platzhalter für das Google ReCAPTCHA --> </div>
<div class="m1_dsgvo_layer ">
<div class="placeholder_text">
<strong>Datenschutz ist uns wichtig!</strong>
Daher wird das Google ReCAPTCHA erst geladen, wenn sie der Verwendung des Drittanbieters "Google LLC" zustimmen durch den möglicherweise Cookies gesetzt werden.<br />
<button class="layer_link wpsg_required">Ich bin damit einverstanden.</button>
</div>
</div>
<?php } ?>
 
</label>
</div>
<div class="wpsg_clear"></div>
<?php } ?>
<?php if ($this->get_option('wpsg_mod_kundenverwaltung_mathcaptcha') === '1') {
$number1 = rand(0, 9);
$number2 = rand(0, 10);
$arOperator = ['+', '-', '*']; $operator = $arOperator[array_rand($arOperator)];
$time = time();
switch ($operator) {
case '+': $captcha_result = $number1 + $number2; break;
case '-': $captcha_result = $number1 - $number2; break;
case '*': $captcha_result = $number1 * $number2; break;
default: throw new \Exception();
}
\set_transient('wpsg_mod_kundenverwaltung_mathcaptcha_result', $captcha_result);
?>
<div class="wpsg_checkoutblock">
<label for="wpsg_mod_kundenverwaltung_mathcaptcha" class="wpsg_register"><?php echo wpsg_translate(
__("Ergebnis aus #1# #2# #3#", "wpsg"),
$number1, $operator, $number2
); ?>:
<span class="wpsg_required">*</span>
</label>
<input
class="validate[required] wpsg_register <?php echo ((in_array("wpsg_mod_kundenverwaltung_mathcaptcha", (array)$this->view['error']))?'wpsg_error':''); ?>"
type="text" id="wpsg_mod_kundenverwaltung_mathcaptcha" name="wpsg_mod_kundenverwaltung_mathcaptcha"
placeholder="SPAM Schutz"
value="" />
</div>
<?php } ?>
<div class="wpsg_mandatoryfield_hint">
<?php echo wpsg_translate(__('Mit #1# gekennzeichnete Felder sind Pflichtfelder.', 'wpsg'), '<span class="wpsg_required">*</span>'); ?>
</div>
408,11 → 454,11
<?php /* versteckte Sicherheitsabfrage als Bot-Schutz START*/ ?>
<span style="display:none">
<label for="wpsg_spam_email">Das Feld muss frei bleiben:</label>
<input type="text" name="wpsg_spam_email" id="wpsg_spam_email" title=" dieses Feld muss frei bleiben " />
<label for="wpsg_spam_email">Das Feld muss frei bleiben:</label>
<input type="text" name="wpsg_spam_email" id="wpsg_spam_email" title=" dieses Feld muss frei bleiben " />
</span>
<?php /* versteckte Sicherheitsabfrage als Bot-Schutz ENDE*/ ?>
<br />
<input type="submit" class="wpsg_button wpsg_registerButton" value="<?php echo __('Registrieren', 'wpsg'); ?>" name="wpsg_mod_kundenverwaltung_register" />
421,4 → 467,29
<div class="wpsg_clear"></div>
</form>
 
<script>
// DSGVO Layer Script
document.querySelector('.layer_link').addEventListener('click', function() {
 
const recaptcha = document.createElement("div");
const a = document.createAttribute("data-sitekey");
const b = document.createAttribute("style");
a.value = "<?php echo $this->get_option('wpsg_mod_kundenveraltung_recaptcha_key'); ?>";
b.value = "float: left !important;";
recaptcha.classList.add("g-recaptcha");
recaptcha.setAttributeNode(a);
recaptcha.setAttributeNode(b);
 
document.querySelector('.wpsg_recaptcha').appendChild(recaptcha);
(function(){var w=window,C='___grecaptcha_cfg',cfg=w[C]=w[C]||{},N='grecaptcha';var gr=w[N]=w[N]||{};gr.ready=gr.ready||function(f){(cfg['fns']=cfg['fns']||[]).push(f);};w['__recaptcha_api']='https://www.google.com/recaptcha/api2/';(cfg['render']=cfg['render']||[]).push('onload');w['__google_recaptcha_client']=true;var d=document,po=d.createElement('script');po.type='text/javascript';po.async=true;po.src='https://www.gstatic.com/recaptcha/releases/vP4jQKq0YJFzU6e21-BGy3GP/recaptcha__de.js';po.crossOrigin='anonymous';po.integrity='sha384-xxpEMChSTl1oMpSrXrILE1mQOlVQNv6OGibce0r0HX1HeHF72bSDheOIehafBC9Y';var e=d.querySelector('script[nonce]'),n=e&&(e['nonce']||e.getAttribute('nonce'));if(n){po.setAttribute('nonce',n);}var s=d.getElementsByTagName('script')[0];s.parentNode.insertBefore(po, s);})();
 
document.querySelector('.m1_dsgvo_layer').classList.add('placeholder');
document.querySelector('.wpsg_recaptcha').classList.remove('placeholder');
 
event.preventDefault();
 
});
</script>
 
</div>
/mods/mod_kundenverwaltung/checkout_login.phtml
11,13 → 11,27
<div class="wpsg_checkoutblock">
<label for="wpsg_mod_kundenverwaltung_email"><?php echo __("E-Mail Adresse", "wpsg"); ?>:
</label>
<input class="wpsg_checkout <?php echo ((in_array("wpsg_mod_kundenverwaltung_email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="wpsg_mod_kundenverwaltung_email" name="wpsg[mod_kundenverwaltung][email]" value="" />
<input
class="wpsg_checkout <?php echo ((in_array("wpsg_mod_kundenverwaltung_email", (array)$this->view['error']))?'wpsg_error':''); ?>"
type="text"
id="wpsg_mod_kundenverwaltung_email"
name="wpsg[mod_kundenverwaltung][email]"
value=""
autocomplete="off"
/>
</div>
<div class="wpsg_checkoutblock">
<label for="wpsg_mod_kundenverwaltung_password"><?php echo __("Passwort", "wpsg"); ?>:
</label>
<input class="wpsg_checkout <?php echo ((in_array("wpsg_mod_kundenverwaltung_password", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="wpsg_mod_kundenverwaltung_password" name="wpsg[mod_kundenverwaltung][password]" value="" />
<input
class="wpsg_checkout <?php echo ((in_array("wpsg_mod_kundenverwaltung_password", (array)$this->view['error']))?'wpsg_error':''); ?>"
type="password"
id="wpsg_mod_kundenverwaltung_password"
name="wpsg[mod_kundenverwaltung][password]"
value=""
autocomplete="off"
/>
</div>
<br />
/mods/mod_kundenverwaltung/login.phtml
18,12 → 18,25
<div class="wpsg_block wpsg_checkoutblock">
<label for="wpsg_mod_kundenverwaltung_email"><?php echo __("E-Mail Adresse", "wpsg"); ?>:</label>
<input class="wpsg_checkout" type="text" id="wpsg_mod_kundenverwaltung_email" name="wpsg[mod_kundenverwaltung][email]" value="<?php echo wpsg_getStr($this->view['wpsg_mod_kundenverwaltung']['email']); ?>" />
<input
class="wpsg_checkout"
type="text"
autocomplete="off"
id="wpsg_mod_kundenverwaltung_email"
name="wpsg[mod_kundenverwaltung][email]"
value="<?php echo wpsg_getStr($this->view['wpsg_mod_kundenverwaltung']['email']); ?>" />
</div>
<div class="wpsg_block wpsg_checkoutblock">
<label for="wpsg_mod_kundenverwaltung_password"><?php echo __("Passwort", "wpsg"); ?>:</label>
<input class="wpsg_checkout" type="password" id="wpsg_mod_kundenverwaltung_password" name="wpsg[mod_kundenverwaltung][password]" value="" />
<input
class="wpsg_checkout"
type="password"
id="wpsg_mod_kundenverwaltung_password"
name="wpsg[mod_kundenverwaltung][password]"
value=""
autocomplete="off"
/>
</div>
<br />
/mods/mod_kundenverwaltung/widget.phtml
31,8 → 31,21
<h2 class="widget-title widgettitle"><?php echo __('Login', 'wpsg'); ?></h2>
<input type="text" value="<?php echo __('E-Mail', 'wpsg'); ?>" id="wpsg_mod_kundenverwaltung_widget_email" name="wpsg[mod_kundenverwaltung][email]" />
<input type="password" value="<?php echo __('Passwort', 'wpsg'); ?>" id="wpsg_mod_kundenverwaltung_widget_passwort" name="wpsg[mod_kundenverwaltung][password]" />
<input
type="text"
value="<?php echo __('E-Mail', 'wpsg'); ?>"
id="wpsg_mod_kundenverwaltung_widget_email"
name="wpsg[mod_kundenverwaltung][email]"
autocomplete="off"
/>
<input
type="password"
value="<?php echo __('Passwort', 'wpsg'); ?>"
id="wpsg_mod_kundenverwaltung_widget_passwort"
name="wpsg[mod_kundenverwaltung][password]"
autocomplete="off"
/>
<br /><br />
/mods/mod_productgroups/show_2.phtml
0,0 → 1,86
<?php
 
/** Template für die Anzeige von Produktgruppen Layout 2 */
 
namespace wpsg;
 
$page_url = \get_permalink(\get_the_ID());
$page_url .= ((strpos($page_url, '?') === false)?'?':'&');
 
if (isset($_REQUEST['show'])) {
 
$oProductgroup = \wpsg_productgroup::getInstance(intval($_REQUEST['show']));
$arProducts = $oProductgroup->findProducts();
$view = 'products';
 
} else {
 
$arProductgroups = \wpsg_productgroup::find();
$view = 'productgroups';
 
}
 
?>
 
<div class="wpsg_mod_productgroup_layout2_wrap">
<?php if ($view === 'products') { ?>
 
<div class="wpsg_mod_productgroup_layout2 products">
 
<?php foreach ($arProducts as $oProduct) { ?>
 
<?php echo $this->renderProdukt($oProduct->getId(), $oProductgroup->getTemplate()); ?>
 
<?php } ?>
 
<br />
 
<a href="<?php echo $page_url; ?>"><?php echo __('Zurück zur Übersicht', 'wpsg'); ?></a>
</div>
 
<?php } else if ($view === 'productgroups') { ?>
 
<div class="wpsg_mod_productgroup_layout2 productgroups">
 
<?php foreach ($arProductgroups as $k => $oProductgroup) { ?>
 
<a href="<?php
 
if (intval($oProductgroup->__get('infopage')) > 0) echo \get_permalink(intval($oProductgroup->__get('infopage')));
else echo $page_url.'show='.$oProductgroup->getId();
 
?>" class="productgroup">
 
<div class="title"><?php echo $oProductgroup->getLabel(); ?></div>
 
<?php echo \wp_get_attachment_image($oProductgroup->getImage(), [462, 462], false, [
'class' => 'bg'
]); ?>
 
</a>
 
<?php } ?>
 
</div>
 
<style>
 
.wpsg_mod_productgroup_layout2.productgroups { all:revert; width:100%; display:grid; grid-template-columns:repeat(2, 1fr); grid-template-rows:repeat(10, 1fr); grid-column-gap:1rem; grid-row-gap:1rem; }
.wpsg_mod_productgroup_layout2.productgroups > .productgroup { grid-column:span 2; padding-top:100%; text-decoration:none; position:relative; overflow:hidden; transition:all 0.3s ease; overflow:hidden width:100%; }
.wpsg_mod_productgroup_layout2.productgroups > .productgroup .bg { position:absolute; left:0; top:0; object-position:50% 50%; background-color:#DEDEDE; width:100%; height:100%; object-fit:cover; z-index:1; }
.wpsg_mod_productgroup_layout2.productgroups > .productgroup .title { z-index:2; border-radius:2px; transition:all 0.3s ease; position:absolute; left:1rem; top:1rem; background-color:#000000; color:#FFFFFF; padding:0 0.5rem; }
.wpsg_mod_productgroup_layout2.productgroups > .productgroup:hover .title { background-color:#FFFFFF; color:#000000; }
 
@media screen and (min-width:768px) {
 
.wpsg_mod_productgroup_layout2.productgroups > .productgroup { padding-top:initial; grid-column:initial; }
.wpsg_mod_productgroup_layout2.productgroups > .productgroup:nth-child(6n + 1),
.wpsg_mod_productgroup_layout2.productgroups > .productgroup:nth-child(6n + 5) { grid-row:span 2; padding-top:100%; }
 
}
 
</style>
 
<?php } ?>
</div>
/mods/mod_productgroups/index.phtml
80,6 → 80,7
<table class="table wpsg-table-order table-bordered table-hover table-striped wpsg-table-customer">
<thead>
<tr>
<th class="wpsg_pic_col"></th>
<th class="wpsg_order col_name" data-order="nr"><?php echo __("Name", 'wpsg'); ?></th>
<th class="wpsg_order col_template" data-order="template"><?php echo __("Template", 'wpsg'); ?></th>
<th class="wpsg_order col_products" data-order="products"><?php echo __("Produkte", 'wpsg'); ?></th>
86,10 → 87,21
</tr>
</thead>
<tbody>
<?php foreach ($this->view['arData'] as $pg) { ?>
<?php foreach ($this->view['arData'] as /** @var wpsg_productgroup */ $pg) { ?>
<tr>
<td class="wpsg_pic_col">
<?php if ($pg->getImage() > 0) { ?>
 
<?php echo \wp_get_attachment_image($pg->getImage(), [75, 75]); ?>
 
<?php } ?>
</td>
<td class="col_name">
<strong><a title="<?php echo __("Diese Produktgruppe bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Productgroups&wpsg_mod_action=edit&edit_id=<?php echo $pg->id; ?>" class="row-title"><?php echo $pg->name; ?></a></strong>
<strong><a title="<?php echo __("Diese Produktgruppe bearbeiten", "wpsg"); ?>" href="<?php
 
echo wpsg_admin_url('Productgroups', '', ['wpsg_mod_action' => 'edit', 'edit_id' => $pg->id]);
 
?>" class="row-title"><?php echo $pg->name; ?></a></strong>
<div class="row-actions">
<span class="edit"><a title="<?php echo __("Diese Produktgruppe bearbeiten", "wpsg"); ?>" href="<?php
/mods/mod_productgroups/settings_edit.phtml
6,6 → 6,10
 
?>
<?php echo wpsg_drawForm_Select('wpsg_productgroups_page', __('Produktgruppenübersichtsseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_productgroups_page'), array('help' => 'wpsg_mod_productgroups_page')); ?>
<?php echo wpsg_drawForm_Select('wpsg_productgroups_page_layout', __('Layout der Übersichtsseite', 'wpsg'), [
'0' => 'Layout 1 (show.phtml)',
'1' => 'Layout 2 (show_2.phml)'
], $this->get_option('wpsg_productgroups_page_layout'), ['help' => 'wpsg_productgroups_page_layout']); ?>
<?php echo wpsg_drawForm_Select('wpsg_productgroups_order', __('Sortierung innerhalb der Gruppe', 'wpsg'), array(
'id' => __('Nach ID', 'wpsg'),
'alphabetisch' => __('Alphabetisch', 'wpsg'),
/mods/mod_deliverytime/product_bottom.phtml
18,14 → 18,18
 
<?php if ($days_between <= 1) { ?>
 
<div class="wpsg_mod_deliverytime_product_bottom">
<?php echo __('sofort Lieferbar', 'wpsg') ;?>
<div class="wpsg_mod_deliverytime wpsg_mod_deliverytime_product_bottom">
<span class="fa fa-calendar-minus-o"></span>
<span class="label label_deliverytime_product">Verfügbarkeit: </span>
<span class="label_deliverytime"><?php echo __('sofort Verfügbar', 'wpsg') ;?></span>
</div>
<?php } else { ?>
 
<div class="wpsg_mod_deliverytime_product_bottom">
<?php echo wpsg_translate(__('Lieferbar in #1# Tagen', 'wpsg'), $days_between); ?>
<div class="wpsg_mod_deliverytime wpsg_mod_deliverytime_product_bottom">
<span class="fa fa-calendar-minus-o"></span>
<span class="label label_deliverytime_product">Verfügbarkeit: </span>
<span class="label_deliverytime"><?php echo wpsg_translate(__('Lieferbar in #1# Tagen', 'wpsg'), $days_between); ?></span>
</div>
 
<?php } ?>
/order/index.phtml
248,6 → 248,7
<th class="col_payment wpsg_order" data-order="payment"><?php echo __('Bezahlmethode', 'wpsg'); ?></th>
<th class="col_shipping wpsg_order" data-order="shipping"><?php echo __('Versandart', 'wpsg'); ?></th>
<th class="col_products wpsg_order" data-order="products"><?php echo __('Produkte', 'wpsg'); ?></th>
<?php if ($this->get_option('wpsg_showvalueofgoods')) { ?><th class="col_productsum wpsg_order" data-order="productsum"><?php echo __('Warenwert', 'wpsg'); ?></th><?php } ?>
<th class="col_sum wpsg_order" data-order="amount"><?php echo __('Bestellwert', 'wpsg'); ?></th>
<th class="col_state wpsg_order" data-order="state"><?php echo __('Status', 'wpsg'); ?></th>
</tr>
408,6 → 409,18
<?php } ?>
 
</td>
<?php if ($this->get_option('wpsg_showvalueofgoods')) { ?>
<td class="col_productsum">
 
<?php $oOrderProducts = $oOrder->getOrderProducts(); ?>
<?php foreach ($oOrderProducts as $oOrderProduct) { ?>
<?php $product_sum += $oOrderProduct->getPriceSum($this->getBackendTaxview()); ?>
<?php } ?>
<?php echo wpsg_ff($product_sum, $this->get_option('wpsg_currency')); ?>
<?php $product_sum = 0; ?>
 
</td>
<?php } ?>
<td class="col_sum">
<?php echo wpsg_ff($oOrder->getAmount(), $this->get_option('wpsg_currency')); ?>
</td>
/order/view_dev.phtml
31,6 → 31,24
</div>
</div>
</div>
 
<div class="panel panel-default">
<div class="panel-heading" data-toggle="collapse" href="#collapse_calculation" style="cursor:pointer;">
<h4 class="panel-title"><?php echo __('Kalkulation (live from Db)', 'wpsg'); ?></h4>
</div>
<div id="collapse_calculation" class="panel-collapse collapse">
<div class="panel-body">
<pre><?php
$oCalculaiton = \wpsg\wpsg_calculation::getOrderCalculation($_REQUEST['edit_id'], true);
$arCalculation = $oCalculaiton->getCalculationArray(true);
wpsg_debug($arCalculation);
?></pre>
</div>
</div>
</div>
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
 
/produkttemplates/standard2.phtml
12,6 → 12,14
 
$oProduct = $this->view['oProduct'];
 
$var_info = [];
if ($this->callMod('wpsg_mod_productvariants', 'isVariantsProductKey', [$oProduct->getProductKey()])) {
$var_info = $this->callMod('wpsg_mod_productvariants', 'getVariantenInfoArray', [$oProduct->getProductKey()]);
}
?>
 
<div class="wpsg_produkt_wrapper wpsg_produkt_wrapper2">
22,8 → 30,10
<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>
<h2 itemprop="detailname" class="wpsg_productdetailtitle"><?php echo $this->view['data']['detailname']; ?></h2>
<h1 class="wpsg_producttitle"><?php echo $this->getProductName($this->view['data']['id']); ?></h1>
<?php if ($this->getProductName($this->view['data']['id']) !== $this->view['data']['detailname']) { ?>
<h2 class="wpsg_productdetailtitle"><?php echo $this->view['data']['detailname']; ?></h2>
<?php } ?>
<?php } ?>
 
<?php $this->callMods('product_top_afterheadline', array(&$this->view['data']['id'], $this->getTemplateIndex())); ?>
34,6 → 44,11
 
<div itemscope itemtype="http://schema.org/Product" class="wpsg_produkt wpsg_produkt_<?php echo $this->view['data']['id']; ?>">
 
<meta itemprop="url" content="<?php echo $oProduct->getProductURL().'?test'; ?>" />
<meta itemprop="name" content="<?php echo wpsg_hspc($this->getProductName($this->view['data']['id'])); ?>" />
<meta itemprop="detailname" content="<?php echo wpsg_hspc($this->getProductName($this->view['data']['id']).' / '.rtrim(($var_info['key']??''), ' /')); ?>" />
<meta itemprop="sku" content="<?php echo wpsg_hspc($oProduct->getEAN()); ?>" />
<?php /* Block für die Produktbilder START */ ?>
<?php
/js/dsimagezoom.min.js
0,0 → 1,0
class DsImageZoom{static destroy(t){void 0===t&&(t=document.getElementsByClassName("ds_image_zoom"));for(const e of t){const t=e.getElementsByTagName("img")[0];e.classList.remove("attached"),e.setAttribute("style",""),t.setAttribute("style","")}}static init(t){void 0===t&&(t=document.getElementsByClassName("ds_image_zoom"));for(const e of t){const t=e.getElementsByTagName("img")[0];t.onload=()=>{const s=t.getBoundingClientRect().width,i=t.getBoundingClientRect().height,a=.5*s;e.setAttribute("data-image-width",s),e.setAttribute("data-image-height",i),e.setAttribute("data-factor",a),e.style.width=s+"px",e.style.height=i+"px",t.style.width=s+"px",t.style.height=i+"px",e.classList.add("attached"),e.addEventListener("mousemove",(o=>{t.style.width=s+a+"px",t.style.height=i+a+"px";const n=(o.x-e.getBoundingClientRect().x)/s,d=(o.y-e.getBoundingClientRect().y)/s;t.style.left=-1*a*n+"px",t.style.top=-1*a*d+"px"})),e.addEventListener("mousein",(t=>{})),e.addEventListener("mouseout",(e=>{t.style.width=s+"px",t.style.height=i+"px",t.style.left="0px",t.style.top="0px"}))},t.setAttribute("src",t.getAttribute("data-src"))}}}