From f1850f51a088c4892e215f9eb963d435f45767e4 Mon Sep 17 00:00:00 2001 From: Daniel Schmitzer Date: Tue, 28 Apr 2020 06:26:31 +0000 Subject: - Upload zu Produkten - Flächenprodukt umbenannt in "Druckerei" inter mod_printshop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://[internal]/wordpress/plugins/wpsg4@7706 0d5edaf7-2b12-4e95-93f4-047927463d4b --- views/mods/mod_paypalapi/settings_edit.phtml | 17 +- views/mods/mod_printshop/basket_row.phtml | 48 +++ views/mods/mod_printshop/basket_row_before.phtml | 34 ++ views/mods/mod_printshop/mail_row.phtml | 17 + views/mods/mod_printshop/mail_row_html.phtml | 19 + views/mods/mod_printshop/order_view_row.phtml | 46 +++ views/mods/mod_printshop/overview_row.phtml | 38 ++ views/mods/mod_printshop/overview_row_before.phtml | 34 ++ views/mods/mod_printshop/product.phtml | 227 +++++++++++ views/mods/mod_printshop/producttemplate.phtml | 449 +++++++++++++++++++++ .../mod_printshop/produkt_addedit_content.phtml | 236 +++++++++++ views/mods/mod_printshop/settings_edit.phtml | 11 + 12 files changed, 1174 insertions(+), 2 deletions(-) create mode 100644 views/mods/mod_printshop/basket_row.phtml create mode 100644 views/mods/mod_printshop/basket_row_before.phtml create mode 100644 views/mods/mod_printshop/mail_row.phtml create mode 100644 views/mods/mod_printshop/mail_row_html.phtml create mode 100644 views/mods/mod_printshop/order_view_row.phtml create mode 100644 views/mods/mod_printshop/overview_row.phtml create mode 100644 views/mods/mod_printshop/overview_row_before.phtml create mode 100644 views/mods/mod_printshop/product.phtml create mode 100644 views/mods/mod_printshop/producttemplate.phtml create mode 100644 views/mods/mod_printshop/produkt_addedit_content.phtml create mode 100644 views/mods/mod_printshop/settings_edit.phtml (limited to 'views/mods') diff --git a/views/mods/mod_paypalapi/settings_edit.phtml b/views/mods/mod_paypalapi/settings_edit.phtml index 7d6678a..e6ae1ef 100644 --- a/views/mods/mod_paypalapi/settings_edit.phtml +++ b/views/mods/mod_paypalapi/settings_edit.phtml @@ -6,6 +6,7 @@ ?> + 'V1', 'v2' => 'V2'], $this->get_option('wpsg_mod_paypalapi_version'), []); ?> get_option('wpsg_mod_paypalapi_clientid'), array('hint' => __('Erhalten Sie im PayPal Account.', 'wpsg'), 'help' => 'wpsg_mod_paypal_clientid', 'hint' => wpsg_translate('nohspc_'.__('Erhalten Sie im PayPal Developer Interface.', 'wpsg'), 'https://developer.paypal.com/'))); ?> get_option('wpsg_mod_paypalapi_secret'), array('hint' => __('Erhalten Sie im PayPal Account.', 'wpsg'), 'help' => 'wpsg_mod_paypal_secret', 'hint' => wpsg_translate('nohspc_'.__('Erhalten Sie im PayPal Developer Interface.', 'wpsg'), 'https://developer.paypal.com/'))); ?> get_option('wpsg_mod_paypalapi_sandbox'), array('help' => 'wpsg_mod_paypal_sandbox')); ?> @@ -98,10 +99,22 @@ get_option('wpsg_mod_paypalapi_paypalexpress_subject'), array('help' => 'wpsg_mod_paypal_subject')); ?> get_option('wpsg_mod_paypalapi_plus_hint'), array('help' => 'wpsg_shippay_hint')); ?> - \ No newline at end of file + \ No newline at end of file diff --git a/views/mods/mod_printshop/basket_row.phtml b/views/mods/mod_printshop/basket_row.phtml new file mode 100644 index 0000000..c48a14b --- /dev/null +++ b/views/mods/mod_printshop/basket_row.phtml @@ -0,0 +1,48 @@ +view['wpsg_mod_printshop']; + +?> + +
+
+ +
+ + 1)?'multiple':''); ?> /> + +
+
+ + + +
    + $f) { ?> +
  • + + + + + <?php echo __('Löschen', 'wpsg'); ?> +
  • + +
+ + + +

+ + + +
+
\ No newline at end of file diff --git a/views/mods/mod_printshop/basket_row_before.phtml b/views/mods/mod_printshop/basket_row_before.phtml new file mode 100644 index 0000000..f596d70 --- /dev/null +++ b/views/mods/mod_printshop/basket_row_before.phtml @@ -0,0 +1,34 @@ +view['wpsg_mod_printshop']; + +?> + +
+
+ +
+
+ get_option('wpsg_currency').'/'.$view['unit_price'].'²'); ?> +
+
+ +
+
+ + + ( x ) + +
+
+ +
+
diff --git a/views/mods/mod_printshop/mail_row.phtml b/views/mods/mod_printshop/mail_row.phtml new file mode 100644 index 0000000..fd98b6c --- /dev/null +++ b/views/mods/mod_printshop/mail_row.phtml @@ -0,0 +1,17 @@ +view['wpsg_mod_printshop']; + + // 150,55 m x 1,5 m = 225,83 m² + $strOut = wpsg_ff($view['width'], $view['unit_price'], true, 0).' x '.wpsg_ff($view['length'], $view['unit_price'], true, 0).' = '.wpsg_ff($view['area'], $view['unit_price'].'²'); + + // (1 m² ≅ 1,00 EUR) + $strOut .= '('.wpsg_ff($view['price_onepice'], $this->get_option('wpsg_currency').' / '.$view['unit_price'].'²').')'; + + echo wpsg_pad_left(__('Größe:', 'wpsg').' ', 12); ?> diff --git a/views/mods/mod_printshop/mail_row_html.phtml b/views/mods/mod_printshop/mail_row_html.phtml new file mode 100644 index 0000000..5762585 --- /dev/null +++ b/views/mods/mod_printshop/mail_row_html.phtml @@ -0,0 +1,19 @@ +view['wpsg_mod_printshop']; + +?> + + +   + + :  x = + (1 ² ≅ get_option('wpsg_currency')); ?>) + + diff --git a/views/mods/mod_printshop/order_view_row.phtml b/views/mods/mod_printshop/order_view_row.phtml new file mode 100644 index 0000000..233eeb3 --- /dev/null +++ b/views/mods/mod_printshop/order_view_row.phtml @@ -0,0 +1,46 @@ +view['wpsg_mod_printshop']; + $arCalculation = $this->view['arCalculation']; + +?> + + + + + + + x = + (1 ² ≅ get_option('wpsg_currency')); ?>) + + + + + + + + + + + 'download', 'mod' => 'wpsg_mod_printshop', 'noheader' => '1', 'order_id' => $view['order_id'], 'product_index' => $view['product_index'], 'file' => rawurlencode(basename($f))]); + + $arFileLinks[] = ''.basename($f).''; + + } echo implode(', ', $arFileLinks); ?> + + + + + +view['wpsg_mod_printshop']; + +?> + +
+
+ +
+ +
+
+ + $f) { + + $arFiles[] = ''.$f['file_name'].''; + + } + + echo implode(', ', $arFiles); + + } ?> + +
+
diff --git a/views/mods/mod_printshop/overview_row_before.phtml b/views/mods/mod_printshop/overview_row_before.phtml new file mode 100644 index 0000000..f596d70 --- /dev/null +++ b/views/mods/mod_printshop/overview_row_before.phtml @@ -0,0 +1,34 @@ +view['wpsg_mod_printshop']; + +?> + +
+
+ +
+
+ get_option('wpsg_currency').'/'.$view['unit_price'].'²'); ?> +
+
+ +
+
+ + + ( x ) + +
+
+ +
+
diff --git a/views/mods/mod_printshop/product.phtml b/views/mods/mod_printshop/product.phtml new file mode 100644 index 0000000..628a795 --- /dev/null +++ b/views/mods/mod_printshop/product.phtml @@ -0,0 +1,227 @@ +view['ap']; + + $pi = $this->view['product_index']; + + /** @var wpsg_product $oProduct */ + $oProduct = $this->view['oProduct']; + + if ($ap['mode'] === wpsg_mod_printshop::MODE_AREA) { + + $width = ''; + $length = ''; + + } else if ($ap['mode'] === wpsg_mod_printshop::MODE_AREA_SELECT) { + + $arWidth = []; + $arLength = []; + + for ($i = intval($ap['width_min']); $i <= intval($ap['width_max']); $i += intval($ap['width_step'])) { + + $arWidth[] = $i; + + } + + for ($i = intval($ap['length_min']); $i <= intval($ap['length_max']); $i += intval($ap['length_step'])) { + + $arLength[] = $i; + + } + + $width = $arWidth[0]; + $length = $arLength[0]; + + } else if ($ap['mode'] === wpsg_mod_printshop::MODE_LFM) { + + $width = $ap['width']; + $length = ''; + + } else if ($ap['mode'] === wpsg_mod_printshop::MODE_LFM_SELECT) { + + for ($i = intval($ap['length_min']); $i <= intval($ap['length_max']); $i += intval($ap['length_step'])) { + + $arLength[] = $i; + + } + + $width = $ap['width']; + $length = $arLength[0]; + + } + +?> + +
+ + + + + +
+ + +
+ +
+ +
+ + +
+ + + +
+ +
+ + + + x + + + +
+
+ + + +
+ + +
+ +
+ +
+ + +
+ + + +
+ + +
+ +
+ +
+ + +
+ + + +
+ +
+ + +
+ +
+ +
+ + + + \ No newline at end of file diff --git a/views/mods/mod_printshop/producttemplate.phtml b/views/mods/mod_printshop/producttemplate.phtml new file mode 100644 index 0000000..4092bb5 --- /dev/null +++ b/views/mods/mod_printshop/producttemplate.phtml @@ -0,0 +1,449 @@ +view['oProduct']; + + $ap = [ + 'set' => intval($oProduct->getMeta('wpsg_mod_printshop_set')), + 'mode' => intval($oProduct->getMeta('wpsg_mod_printshop_mode')), + 'price_unit' => sanitize_text_field($oProduct->getMeta('wpsg_mod_printshop_unit_price')), + 'width' => wpsg_tf($oProduct->getMeta('wpsg_mod_printshop_width')), + 'width_step' => intval($oProduct->getMeta('wpsg_mod_printshop_width_step')), + 'width_min' => intval($oProduct->getMeta('wpsg_mod_printshop_width_min')), + 'width_max' => intval($oProduct->getMeta('wpsg_mod_printshop_width_max')), + 'length_step' => intval($oProduct->getMeta('wpsg_mod_printshop_length_step')), + 'length_min' => intval($oProduct->getMeta('wpsg_mod_printshop_length_min')), + 'length_max' => intval($oProduct->getMeta('wpsg_mod_printshop_length_max')) + ]; + + $this->view['ap'] = $ap; + +?> + +
+ + + + +
+ + titleDisplayed) { ?> +

getProductName($this->view['data']['id']); ?>

+

view['data']['detailname']; ?>

+ + + callMods('product_top_afterheadline', array(&$this->view['data']['id'], $this->getTemplateIndex())); ?> + +
+ + callMods('product_top', array(&$this->view['data']['id'], $this->getTemplateIndex())); ?> + +
+ + + imagehandler->getAttachmentID($this->view['data']['product_key']); + + /* Array mit allen AttachmentIDs der Produktbilder */ + $arAttachmentIDsAll = $this->imagehandler->getAttachmentIDs($this->view['data']['product_id']); + + ?> + + +
+ + + +
+ + + + get_option('wpsg_showArticelnumber') == '1') { ?> +
+ : view['data']['anr']); ?>
+ get_option('wpsg_mod_produktartikel_ean'))) {?> + :view['data']['ean']); ?>
+ + get_option('wpsg_mod_produktartikel_gtin'))) {?> + :view['data']['gtin']); ?>
+
+ + + + view['oProduct']->canDisplayPrice()) { ?> + +
+ + + + + + view['oProduct']->getOldPrice(); ?> + + view['oProduct']->getPrice($this->view['data']['product_key'])) { ?> + view['oProduct']->getPrice($this->view['data']['product_key']), $this->get_option('wpsg_currency')); ?> + get_option('wpsg_currency')); ?> + + view['oProduct']->getPrice($this->view['data']['product_key']), $this->get_option('wpsg_currency')); ?> + + +
+ + get_option('wpsg_kleinunternehmer')) { /* Kleinunternehmerregelung aktiviert START */ ?> + +
+ getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'', 'Endpreis'); ?> +
+ + + +
+ getFrontendTaxview() == WPSG_NETTO) { /* Frontend = NETTO Preise */ ?> + hasMod('wpsg_mod_freeshipping') && $this->get_option('wpsg_mod_freeshipping_aktiv') == '1') { /* Versandkostenfrei aktiv */?> + + get_option('wpsg_mod_freeshipping_minvalue') > 0) { ?> + ab #2# € versandkostenfrei)', 'wpsg'), + wpsg_ff($this->view['data']['mwst_value']), + wpsg_ff($this->get_option('wpsg_mod_freeshipping_minvalue')), + $this->getUrl(wpsg_ShopController::URL_VERSANDKOSTEN) + ); ?> + + view['data']['mwst_value'])); ?> + + + + view['data']['mwst_value']), ''.__('Versandkosten', 'wpsg').''); ?> + + + hasMod('wpsg_mod_freeshipping') && $this->get_option('wpsg_mod_freeshipping_aktiv') == '1') { /* Versandkostenfrei aktiv */ ?> + + get_option('wpsg_mod_freeshipping_minvalue') > 0) { ?> + ab #2# € versandkostenfrei)', 'wpsg'), + wpsg_ff($this->view['data']['mwst_value']), + wpsg_ff($this->get_option('wpsg_mod_freeshipping_minvalue')), + $this->getUrl(wpsg_ShopController::URL_VERSANDKOSTEN) + ); ?> + + view['data']['mwst_value'])); ?> + + + + view['data']['mwst_value']), ''.__('Versandkosten', 'wpsg').''); ?> + + +
+ + + + + + getURL(wpsg_ShopController::URL_PROFIL).'">hier bitte ein, um zu bestellen.')); ?> + + + + +
+ + view['data']['shortdesc']; ?> + +
+ +
+ + + hasMod('wpsg_mod_stock') && $this->get_option('wpsg_mod_stock_showProduct') == '1') { ?> + +
+ + view['data']['stock']) > '0') {?> + + + view['data']['stock']); ?> + + + + + + + +
+ + + + + hasMod('wpsg_mod_fuellmenge')) { ?> + +
+ + view['data']['fmenge']) > '0') { ?> + + + + '.wpsg_ff($this->view['data']['fmenge'], '', true).' '.$this->view['data']['feinheit'], + ''.wpsg_ff($this->view['data']['fmenge_preis'], $this->get_option('wpsg_currency')).' ', + wpsg_ff($this->get_option('wpsg_mod_fuellmenge_bezug'), $this->view['data']['feinheit']) + ); ?> + + + + + + + +
+ + + + + + hasMod('wpsg_mod_weight') && $this->get_option('wpsg_mod_weight_showProduct') === '1') { ?> +
+ + view['data']['weight']) > '0') { ?> + + view['data']['id'].'">'.wpsg_ff($this->view['data']['weight']).'', $this->get_option('wpsg_mod_weight_unit')); ?> + + + +
+ + + + + hasMod('wpsg_mod_deliverytime') && $this->get_option('wpsg_mod_deliverytime_show_product') == '1') { ?> + + + callMod('wpsg_mod_deliverytime', 'isStoreProduct', array($this->view['data']['product_key']))) { ?> + +
callMod('wpsg_mod_deliverytime', 'displayStoreText', array($this->view['data']['product_key']))); ?>
+ + callMod('wpsg_mod_deliverytime', 'displayStoreLink', array($this->view['data']['product_key'])) ?> + + +   + + + + + + callMod('wpsg_mod_deliverytime', 'displayDelayTime', array($this->view['data']['product_key'])); ?> + + +
+ +
+ +
+ + + +
+ + callMod('wpsg_mod_deliverytime', 'displayDeliveryTime', array($this->view['data']['product_key'])); ?> +
+ + + + + + + + + +
+ + view['data']['beschreibung'])) > 0) { ?> +
+
+
+ view['data']['beschreibung']; ?> +
+
+
+ + +
+ + + +
+ callMod('wpsg_mod_productvariants', 'renderTemplate', array($this->view['data']['product_key'])); ?> +
+ + + callMods('product_bottom', array(&$this->view['data']['product_key'], $this->getTemplateIndex())); ?> + + + + render(WPSG_PATH_VIEW.'mods/mod_printshop/product.phtml'); ?> + + +
+
+ view['oProduct']->canOrder()) { ?> +
+ + + + view['data']['basket_multiple'] == 4)?' readonly="readonly" ':''); ?> /> + + + hasMod('wpsg_mod_deliverytime') && ($this->get_option('wpsg_mod_deliverytime_holiday') == '1')) { ?> + + callMod('wpsg_mod_deliverytime', 'holiday', array($this->view['data']['product_key']))) { ?> + +
+ + callMod('wpsg_mod_deliverytime', 'displayHolidaytext', array($this->view['data']['product_key']))); ?> + +
+ + + + + + + + + + get_option('wpsg_afterinsert'), array('2', '3'))) { ?> + + + +
+ +
+
+ +
+ + hasMod('wpsg_mod_request') && $this->callMod('wpsg_mod_request', 'isRequestProduct', array($this->view['data']['id']))) { ?> + + view['data']['basket_multiple'] == 4)?' readonly="readonly" ':''); ?> /> + + + + + +
+ + view['data']['longdescription'])) > 0) { ?> +
+
+
+ view['data']['longdescription']; ?> +
+
+
+ + +
+ + + +
+ + view['data']['moreinfos'])) > 0) { ?> +
+
+
+ view['data']['moreinfos']; ?> +
+
+
+ + +
+ + + +
+ + view['data']['moreinfos2'])) > 0) { ?> +
+
+
+ view['data']['moreinfos2']; ?> +
+
+
+ + +
+ + +
+ + +
+ + + +
+ +
+ +
\ No newline at end of file diff --git a/views/mods/mod_printshop/produkt_addedit_content.phtml b/views/mods/mod_printshop/produkt_addedit_content.phtml new file mode 100644 index 0000000..20f2a8c --- /dev/null +++ b/views/mods/mod_printshop/produkt_addedit_content.phtml @@ -0,0 +1,236 @@ +view['wpsg_mod_printshop']; + + $arMode = [ + wpsg_mod_printshop::MODE_AREA => __('Flächenprodukt, freie Eingabe von Breite/Länge im Frontend', 'wpsg'), + wpsg_mod_printshop::MODE_AREA_SELECT => __('Flächenprodukt, definierte Auswahl von Breite/Länge im Frontend', 'wpsg'), + wpsg_mod_printshop::MODE_LFM => __('Flächenprodukt, freie Eingabe der Laufmeter im Frontend', 'wpsg'), + wpsg_mod_printshop::MODE_LFM_SELECT => __('Flächenprodukt, definierte Auswahl der Laufmeter im Frontend', 'wpsg') + ]; + + if (!isset($view['mode'])) $view['mode'] = wpsg_mod_printshop::MODE_AREA; + if (!isset($view['unit_price'])) $view['unit_price'] = 'm'; + + if (!isset($view['width_step'])) $view['width_step'] = 10; else $view['width_step'] = $view['width_step']; + if (!isset($view['width_min'])) $view['width_min'] = 10; else $view['width_min'] = $view['width_min']; + if (!isset($view['width_max'])) $view['width_max'] = 100; else $view['width_max'] = $view['width_max']; + + if (!isset($view['length_step'])) $view['length_step'] = 10; else $view['length_step'] = $view['length_step']; + if (!isset($view['length_min'])) $view['length_min'] = 10; else $view['length_min'] = $view['length_min']; + if (!isset($view['length_max'])) $view['length_max'] = 100; else $view['length_max'] = $view['length_max']; + + if (!isset($view['width'])) $view['width'] = 1000; else $view['width'] = wpsg_tf($view['width']); + +?> + + + + + + + + + + + + \ No newline at end of file diff --git a/views/mods/mod_printshop/settings_edit.phtml b/views/mods/mod_printshop/settings_edit.phtml new file mode 100644 index 0000000..eb3229e --- /dev/null +++ b/views/mods/mod_printshop/settings_edit.phtml @@ -0,0 +1,11 @@ +