diff options
| author | daniel <noreply@maennchen1.de> | 2026-09-30 13:12:16 +0200 |
|---|---|---|
| committer | daniel <noreply@maennchen1.de> | 2026-09-30 13:12:37 +0200 |
| commit | ea77830018e15ab662fb0cfb2958857e3b3de532 (patch) | |
| tree | 9634013e7a45c0f9da6891dd6bf0541801f6e3a2 | |
| parent | ee163b01c6bdf3da7c2a8f3ee1be25b02cb760b4 (diff) | |
- Amazon Modul vereinheitlicht und moderniesiert
21 files changed, 322 insertions, 708 deletions
diff --git a/views/css/frontend.css b/views/css/frontend.css index c64bc52..0806613 100644 --- a/views/css/frontend.css +++ b/views/css/frontend.css @@ -17,7 +17,7 @@ .wpsg_error { border-color:#DD3D36; }
.wpsg { }
.wpsg h2 { }
-.wpsg_checkout label.wpsg_error { background-color:white; }
+.wpsg_checkout label.wpsg_error { background-color:white; }
label.wpsg_error { position:absolute; right:2px; top:-2px; color:#DD3D36; }
input.wpsg_error { border-color:red !important; border:1px solid red; }
.wpsg_spacer { width:100%; height:1px; background-color:#EAEAEA; margin-bottom:1rem; }
@@ -32,27 +32,27 @@ input.wpsg_error { border-color:red !important; border:1px solid red; } /* GARAN Label */
.wpsg_product_garan_wrap { padding:5px 0; margin-bottom:2rem; font-family:'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
- .wpsg_product_garan { border:1px solid black; display:inline-block; padding:5px 50px 5px 5px; position:relative; height:30px; white-space:nowrap; cursor:pointer; text-decoration:none;
+ .wpsg_product_garan { border:1px solid black; display:inline-block; padding:5px 50px 5px 5px; position:relative; height:30px; white-space:nowrap; cursor:pointer; text-decoration:none;
& > .years { font-size:30px; height:30px; line-height:30px; font-weight:bold; padding-right:35px; position:relative; border-right:1px solid black;
- &:after { position:absolute; right:10px; bottom:8px; content:' '; width:16px; height:16px; background-image:url('/wp-content/plugins/wpshopgermany-free/views/gfx/garan/garan_year.svg'); background-size:contain; background-repeat:no-repeat; }
+ &:after { position:absolute; right:10px; bottom:8px; content:' '; width:16px; height:16px; background-image:url('../gfx/garan/garan_year.svg'); background-size:contain; background-repeat:no-repeat; }
}
& > .title { padding-left:5px; font-size:22px; font-weight:bold; padding-right:20px; position:relative;
- &:after { position:absolute; right:0; bottom:2px; content:' '; width:16px; height:16px; background-image:url('/wp-content/plugins/wpshopgermany-free/views/gfx/garan/garan_checkmark.svg'); background-size:contain; background-repeat:no-repeat; }
+ &:after { position:absolute; right:0; bottom:2px; content:' '; width:16px; height:16px; background-image:url('../gfx/garan/garan_checkmark.svg'); background-size:contain; background-repeat:no-repeat; }
}
- &:after { position:absolute; right:5px; top:0; content:' '; width:28px; height:40px; background-image:url('/wp-content/plugins/wpshopgermany-free/views/gfx/garan/garan_eu.svg'); background-size:contain; background-repeat:no-repeat; }
+ &:after { position:absolute; right:5px; top:0; content:' '; width:28px; height:40px; background-image:url('../gfx/garan/garan_eu.svg'); background-size:contain; background-repeat:no-repeat; }
& > .tooltip { position:absolute; opacity:0; pointer-events:none; top:40px; left:-1px; padding:5px 5px 5px 0; transition:all 0.5s;
& > .inner { width:300px; min-height:300px; display:flex; flex-direction:column; gap:5px; background-color:white; padding:5px; border:1px solid black;
& > .border { border:1px solid black; display:flex; flex-direction:column; padding:5px;
.top { width:100%; border-bottom:2px solid black; padding-bottom:5px; position:relative;
& > .title { font-size:50px; font-weight:bold; padding-right:40px; position:relative; display:inline-block; line-height:50px; letter-spacing:1px;
- &:after { position:absolute; right:0; bottom:5px; content:' '; width:32px; height:32px; background-image:url('/wp-content/plugins/wpshopgermany-free/views/gfx/garan/garan_checkmark.svg'); background-size:contain; background-position:right bottom; background-repeat:no-repeat; }
+ &:after { position:absolute; right:0; bottom:5px; content:' '; width:32px; height:32px; background-image:url('../gfx/garan/garan_checkmark.svg'); background-size:contain; background-position:right bottom; background-repeat:no-repeat; }
}
- &:after { position:absolute; right:0; top:-11px; content:' '; width:36px; height:51px; background-image:url('/wp-content/plugins/wpshopgermany-free/views/gfx/garan/garan_eu.svg'); background-size:contain; background-repeat:no-repeat; }
+ &:after { position:absolute; right:0; top:-11px; content:' '; width:36px; height:51px; background-image:url('../gfx/garan/garan_eu.svg'); background-size:contain; background-repeat:no-repeat; }
}
& > .flexline { display:flex; justify-content:space-between; gap:5px; align-items:flex-start; padding:5px 0; font-size:16px; }
& > .line { display:flex; justify-content:space-between; gap:5px; align-items:flex-end; padding:5px 0;
& > .years { font-size:85px; height:85px; line-height:85px; font-weight:bold; padding-right:60px; position:relative;
- &:after { position:absolute; right:10px; bottom:8px; content:' '; width:35px; height:35px; background-image:url('/wp-content/plugins/wpshopgermany-free/views/gfx/garan/garan_year.svg'); background-size:contain; background-repeat:no-repeat; }
+ &:after { position:absolute; right:10px; bottom:8px; content:' '; width:35px; height:35px; background-image:url('../gfx/garan/garan_year.svg'); background-size:contain; background-repeat:no-repeat; }
}
& > img { transform:translateY(-8px); }
}
@@ -100,9 +100,9 @@ html body .wpsg_product_garan_wrap a.wpsg_product_garan .tooltip .inner, html body .wpsg_product_garan_wrap a.wpsg_product_garan .tooltip .flexline { line-height:1.2; }
html body .wpsg_product_garan_wrap a.wpsg_product_garan .tooltip .trans_wrap { line-height:1.4; }
html body .wpsg_product_garan_wrap a.wpsg_product_garan img { display:block; max-width:none; height:auto; margin:0; border:0; box-shadow:none; }
-
+
/* Basket Widget */
-.wpsg_basket_widget .wpshopgermany_linktokasse { float:right; margin-top:1rem; }
+.wpsg_basket_widget .wpshopgermany_linktokasse { float:right; margin-top:1rem; }
/* Basket */
.basket_product_wrap {}
@@ -117,7 +117,7 @@ html body .wpsg_product_garan_wrap a.wpsg_product_garan img { display:block; max .basket_product_wrap .basket_product_row .product_action .price { width: 39%; display:inline-block; text-align:right; }
.basket_product_wrap .basket_product_row .product_action .price_total { width: 39%; display:inline-block; font-weight:bold; text-align:right; }
.basket_product_wrap .basket_product_row .product_info { display:flex; width:100%; justify-content:space-between; align-items:center; margin-bottom:0.25rem; }
-.basket_product_wrap .basket_product_row .product_upload { }
+.basket_product_wrap .basket_product_row .product_upload { }
.basket_product_wrap .basket_product_row .product_upload .wpsg_mod_orderupload_target { margin-left:15px; flex-grow:1; }
.basket_product_wrap .basket_product_row .product_upload .wpsg_mod_orderupload_target ul { margin:0px; }
.basket_product_wrap .basket_product_row .product_upload .wpsg_mod_orderupload_target li { display:flex; justify-content:space-between; }
@@ -185,8 +185,8 @@ html body .wpsg_product_garan_wrap a.wpsg_product_garan img { display:block; max .wpsg_checkout .wpsg_checkoutblock input.wpsg_input_text,
.wpsg_checkout .wpsg_checkoutblock input[type="tel"],
.wpsg_checkout .wpsg_checkoutblock input[type="fax"],
-.wpsg_checkout .wpsg_checkoutblock input[type="text"],
-.wpsg_checkout .wpsg_checkoutblock input[type="number"],
+.wpsg_checkout .wpsg_checkoutblock input[type="text"],
+.wpsg_checkout .wpsg_checkoutblock input[type="number"],
.wpsg_checkout .wpsg_checkoutblock input[type="password"] { margin-bottom:5px; box-sizing:border-box; width:100%; }
.wpsg_checkout .wpsg_checkoutblock input[type="checkbox"] { width:auto; margin-right:5px; }
.wpsg_checkout .wpsg_checkoutblock select { box-sizing:border-box; width:100%; margin-bottom:5px; }
@@ -202,8 +202,8 @@ html body .wpsg_product_garan_wrap a.wpsg_product_garan img { display:block; max .wpsg_checkout #wpsg_streetnr.wpsg_checkoutblock, .wpsg_checkout #wpsg_shipping_streetnr.wpsg_checkoutblock { display:flex; flex-direction:row; width:100%; }
.wpsg_checkout #wpsg_streetnr.wpsg_checkoutblock .street, .wpsg_checkout #wpsg_shipping_streetnr.wpsg_checkoutblock .street { flex-grow:1; padding-right:15px; }
.wpsg_checkout #wpsg_streetnr.wpsg_checkoutblock .nr input, .wpsg_checkout #wpsg_shipping_streetnr.wpsg_checkoutblock .nr input {width: 100%;}
-
- /* Checkout2 */
+
+ /* Checkout2 */
.shippay_wrap { margin-top:40px; width:100%; font-family:Arial; padding-right:10px; }
.wpsg_payment .wpsg_payment_textwrap { margin-top:40px; }
.shippay_wrap .shippay_item_wrap { position:relative; border-top:1px solid #DFDFDF; cursor:pointer; padding-left:8px; }
@@ -338,7 +338,7 @@ html body .wpsg_product_garan_wrap a.wpsg_product_garan img { display:block; max .wpsg_mod_autodebit label { width:100%; line-height:36px; }
.wpsg_mod_autodebit input { float:right; margin-bottom:3px; }
-/* Versandadresse */
+/* Versandadresse */
.wpsg_checkout .wpsg_mod_shippingadress { margin-bottom:1rem; }
/* Produkttemplate */
@@ -350,7 +350,7 @@ html body .wpsg_product_garan_wrap a.wpsg_product_garan img { display:block; max .product_wrap .productdetails .oldprice { text-decoration:line-through; }
.wpsg_productform .wpsg_produkt_wrapper .wpsg_mod_productview_price { font-weight:bold; }
.wpsg_productform .wpsg_produkt_wrapper .wpsg_produkt_shortdescription { margin-top:0.75em; margin-bottom:0.75em; }
-.wpsg_productform .wpsg_produkt_wrapper .wpsg_product_only_store { margin-top:0.75em; margin-bottom:0.75em; }
+.wpsg_productform .wpsg_produkt_wrapper .wpsg_product_only_store { margin-top:0.75em; margin-bottom:0.75em; }
.wpsg_productform .wpsg_produkt_wrapper .wpsg_mod_productvariants_product_wrap { margin-top:0.75em; margin-bottom:0.75em; }
.wpsg_productform .wpsg_produkt_wrapper .wpsg_mod_productvariants_product_wrap select { width:100%; box-sizing:border-box; padding:0.75em; line-height:1.5em; }
.wpsg_productform .wpsg_produkt_wrapper .wpsg_product_informationarea { margin-top:1.5em; margin-bottom:1.5em; }
@@ -363,17 +363,18 @@ html body .wpsg_product_garan_wrap a.wpsg_product_garan img { display:block; max .wpsg_productform .wpsg_produkt_wrapper .wpsg_mod_productvars_check { display:flex; align-items:center; gap:0.5em; font-weight:normal; cursor:pointer; }
.wpsg_productform .wpsg_mod_productvars_check input[type="checkbox"] { flex:0 0 auto; margin:0; }
.wpsg_productform .wpsg_mod_productvars .wpsg_required { color:#b3261e; margin-left:0.15em; }
-.wpsg_productform .wpsg_produkt_wrapper label { font-weight:bold; }
+.wpsg_productform .wpsg_produkt_wrapper label { font-weight:bold; }
+.wpsg_productform .wpsg_produkt_wrapper .wpsg_product_buttonarea { margin-top:1rem; }
.wpsg_productform .wpsg_produkt_wrapper .wpsg_product_buttonarea input[type="text"] { box-sizing:border-box; padding:0.7em; line-height:1.5em; font-size:1rem; }
.wpsg_productform .wpsg_produkt_wrapper .wpsg_product_buttonarea input[type="submit"] { font-family:inherit; cursor:pointer; float:right; box-sizing: border-box; padding:0.25rem 1rem; line-height:1.5em; font-size:inherit; border:1px solid black; }
.wpsg_productform .wpsg_product_layer { position:absolute; left:0px; top:0px; width:100%; height:100%; background-color:rgba(0, 0, 0, 0.25); padding:0.75em; margin:-0.75em; box-sizing:content-box; }
.wpsg_productform .wpsg_product_layer img { position:absolute; left:50%; margin-left:-8px; top:50%; margin-top:-5px; }
.wpsg_productform .wpsg_produkt_produktbilder { max-width:200px; }
.wpsg_productform label {
- color: #333;
- display: block;
- font-weight: 800;
- margin-bottom: 0.5em;
+ color: #333;
+ display: block;
+ font-weight: 800;
+ margin-bottom: 0.5em;
}
.wpsg_product_deliverytime_holiday { height:50px; padding:10px; width:50%; float:right; border:1px solid #ff0000; }
.wpsg_produkt_add_basket_wrapper { display:flex; align-items:stretch; justify-content:flex-start; gap:1rem;
@@ -395,26 +396,26 @@ html body .wpsg_product_garan_wrap a.wpsg_product_garan img { display:block; max .wpsg_productform .sto_carousel .right { position:absolute; right:0px; top:0px; height:95px; line-height:95px; width:20px; display:block; text-align:right; font-size:2rem; }
@media (max-width:400px) {
-
+
.wpsg_productform .wpsg_produkt_wrapper .wpsg_product_buttonarea input[type="text"] { width:28%; }
.wpsg_productform .wpsg_produkt_wrapper .wpsg_product_buttonarea input[type="submit"] { width:68%; }
-
+
/* Produktdetailansicht */
.wpsg_productform .wpsg_produkt_shortdescription { display:none; }
.wpsg_productform .wpsg_mod_produktindex_stock { margin:10px 0; }
.wpsg_productform .wpsg_mod_produktindex_stock label { margin-bottom:0em; float:left; margin-right:10px; }
-
+
/* Produktübersicht */
.wpsg_mod_productindex_order span{ float:left; }
.wpsg_mod_productindex .wpsg_mod_productindex_viewselect { margin-top:6px !important; }
.wpsg_mod_productindex .wpsg_mod_productindex_order { width:90%; }
.wpsg_mod_productindex_grid .wpsg_mod_productindex_product { width:45% !important; }
.wpsg_mod_productindex_grid img { max-width:100%; height:auto; }
- .wpsg_mod_productindex .wpsg_mod_productindex_order select { width:65%; margin: 2px 0 0 10px; height:20px; }
+ .wpsg_mod_productindex .wpsg_mod_productindex_order select { width:65%; margin: 2px 0 0 10px; height:20px; }
.wpsg_mod_productindex .wpsg_mod_productindex_toolbar_bottom .wpsg_mod_productindex_order { display:none }
.wpsg_mod_productindex .wpsg_mod_productindex_toolbar_bottom .wpsg_mod_productindex_viewselect { display:none}
.wpsg_mod_productindex .wpsg_mod_productindex_toolbar_bottom { border-top:0px !important; }
-
+
.wpsg_mod_productindex_grid .wpsg_mod_productindex_product .wpsg_mod_productindex_content .wpsg_mod_productindex_title { font-size:1.5em; }
.wpsg_mod_productindex_grid .wpsg_mod_productindex_product .wpsg_mod_productindex_content .wpsg_mod_productindex_infos,
.wpsg_mod_productindex_grid .wpsg_mod_productindex_product .wpsg_mod_productindex_content .wpsg_mod_produktindex_stock,
@@ -422,7 +423,7 @@ html body .wpsg_product_garan_wrap a.wpsg_product_garan img { display:block; max .wpsg_mod_productindex_grid .wpsg_mod_productindex_product .wpsg_mod_productindex_content .wpsg_mod_productindex_button { border:1px solid #ccc; }
.wpsg_mod_productindex_grid .wpsg_mod_productindex_product .wpsg_mod_productindex_content .wpsg_mod_productindex_button a { font-size:1.2em; }
.wpsg_mod_productindex_grid .wpsg_mod_productindex_product .wpsg_mod_productindex_content .wpsg_mod_productview_price { font-size:1.2em; }
-
+
.wpsg_mod_productindex_list .wpsg_mod_productindex_product { width:100% !important; }
.wpsg_mod_productindex_list .wpsg_mod_productindex_product .wpsg_mod_productindex_content .wpsg_mod_productindex_infos,
.wpsg_mod_productindex_list .wpsg_mod_productindex_product .wpsg_mod_productindex_content .wpsg_mod_produktindex_stock,
@@ -446,7 +447,7 @@ html body .wpsg_product_garan_wrap a.wpsg_product_garan img { display:block; max /* Checkout */
.wpsg_checkout .wpsg_button { width:100%; margin:0 0 10px 0; }
.wpsg_checkout2 .wpsg_button { width:100%; margin:0 0 10px 0; }
-
+
/* Overview */
.wpsg_overview .wpsg_checkoutbutton,
.wpsg_overview .wpsg_orderbutton { width:100%; margin: 0 0 10px 0; }
@@ -461,12 +462,12 @@ html body .wpsg_product_garan_wrap a.wpsg_product_garan img { display:block; max .wpsg_productform .wpsg_productimages { width:100%; }
.wpsg_productform .wpsg_produkt_produktbilder { max-width:100%; }
-
+
}
@media (max-width:900px) {
-
-
+
+
}
/* Varianten */
@@ -525,7 +526,7 @@ html body .wpsg_product_garan_wrap a.wpsg_product_garan img { display:block; max #wpsg_calc_layer #customerquestion_ok_button { width:100%; }
#wpsg_calc_layer .country { clear:both; margin-top:20px; }
#wpsg_calc_layer .country h2 { font-size:22px; font-weight:normal; width:150px; float:left; line-height:28px; }
-#wpsg_calc_layer .country select { width:350px; font-size:22px; height:auto; float:left; margin-top:10px; }
+#wpsg_calc_layer .country select { width:350px; font-size:22px; height:auto; float:left; margin-top:10px; }
#wpsg_calc_layer input[type="radio"] { height:auto; margin-right:10px; }
#wpsg_calc_layer .button_wrap { width:100%; clear:both; padding-top:20px; }
#wpsg_calc_layer input[type="submit"] { float:right; padding-left:50px; padding-right:50px; }
@@ -572,7 +573,7 @@ html body .wpsg_product_garan_wrap a.wpsg_product_garan img { display:block; max .wpsg_progress span.step { width:25%; display:block; float:left; list-style:none; position:relative; }
.wpsg_progress span.step > .text { margin-top:30px; text-align:center; width:100%; display:block; }
.wpsg_progress span.step > .dot { position:absolute; z-index:2; background-color:#C5C5C5; width:20px; height:20px; left:50%; top:0%; margin-left:-14px; margin-top:-4px; border-radius:10px; }
-.wpsg_progress span.step:before { border:1px solid #C5C5C5; position:absolute; z-index:2; left:50%; margin-left:-20px; text-align:center; line-height:40px; background-color:#F2F2F2; content:" "; display:block; width:30px; height:30px; border-radius:25px; margin-top:-10px; }
+.wpsg_progress span.step:before { border:1px solid #C5C5C5; position:absolute; z-index:2; left:50%; margin-left:-20px; text-align:center; line-height:40px; background-color:#F2F2F2; content:" "; display:block; width:30px; height:30px; border-radius:25px; margin-top:-10px; }
.wpsg_progress span.step1:before { content:""; }
.wpsg_progress span.step2:before { content:""; }
.wpsg_progress span.step3:before { content:""; }
@@ -583,12 +584,12 @@ html body .wpsg_product_garan_wrap a.wpsg_product_garan img { display:block; max .wpsg_progress span.done > .dot {background-color:#F2F2F2; }
.wpsg_progress span.current:after,
.wpsg_progress span.done:after { content:" "; background-color:#C5C5C5; width:100%; height:10px; display:block; top:0px; position:absolute; }
-.wpsg_progress span.current:after { width:50%; }
-
+.wpsg_progress span.current:after { width:50%; }
+
/* Modul "CrowdFunding" */
.wpsg_mod_funding_progress .wpsg_mod_funding_state { border:1px solid #C5C5C5; margin-bottom:1rem; box-sizing:border-box; width:100%; height:25px; line-height:25px; }
-.wpsg_mod_funding_progress .wpsg_mod_funding_state > .bar { width:90%; float:left; height:100%; display:table; }
-.wpsg_mod_funding_progress .wpsg_mod_funding_state > .bar > .value { background-color:#484C51; height:100%; width:0%; }
+.wpsg_mod_funding_progress .wpsg_mod_funding_state > .bar { width:90%; float:left; height:100%; display:table; }
+.wpsg_mod_funding_progress .wpsg_mod_funding_state > .bar > .value { background-color:#484C51; height:100%; width:0%; }
.wpsg_mod_funding_progress .wpsg_mod_funding_state > .value { width:10%; height:100%; border-left:1px solid #C5C5C5; float:right; text-align:center; }
/* Modul "Produktansichten" */
@@ -604,7 +605,7 @@ html body .wpsg_product_garan_wrap a.wpsg_product_garan img { display:block; max .wpsg_mod_productview-order { font-size:14px; color:#9B9B9B; }
.wpsg_mod_productview-order .glyphicon { margin-left:10px; margin-right:5px; }
.wpsg_mod_productview-order strong { color:#29556E; font-weight:bold; float:right; }
-.wpsg_mod_productview_image { position:relative; }
+.wpsg_mod_productview_image { position:relative; }
.wpsg_mod_productview_image img { max-width:100%; height:auto; border:1px solid #E4F3F8; }
.wpsg_productview_pager { width:100%; border-top:1px solid #E4F3F8; border-bottom:1px solid #E4F3F8; margin-bottom:25px; margin-top:10px; padding-top:25px; padding-bottom:25px; text-align:center; }
.wpsg_productview_pager .wpsg_productview_pager_wrap { display:inline-block; margin:auto; }
@@ -616,10 +617,10 @@ html body .wpsg_product_garan_wrap a.wpsg_product_garan img { display:block; max .wpsg_productview_product .wpsg_mod_productview_bottom .wpsg_mod_productview_description { color:#436980; line-height:20px; font-size:14px; margin-bottom:5px; }
.wpsg_productview_product .wpsg_mod_productview_bottom .wpsg_mod_productview_button { left:50%; margin-left:-90px; width:180px; position:absolute; bottom:0px; white-space:nowrap; padding:5px 25px 5px 25px; border:1px solid #A6DAE8; font-weight:bold; text-transform:uppercase; color:#29556E; }
.wpsg_productview_product .wpsg_mod_productview_bottom .wpsg_mod_productview_button:hover { text-decoration:none; background-color:#29556E; color:#FFFFFF; }
-.wpsg_productview_product .wpsg_mod_productview_bottom .wpsg_mod_productview_button .fa { margin-left:10px; }
+.wpsg_productview_product .wpsg_mod_productview_bottom .wpsg_mod_productview_button .fa { margin-left:10px; }
.wpsg_productview_product .wpsg_mod_productview_go { display:none; position:absolute; left:0px; top:0px; width:100%; height:100%; background-color:rgba(228, 243, 248, 0.75); text-align:center; }
.wpsg_productview_product .wpsg_mod_productview_go .wpsg_mod_productview_price_wrap { color:#0F303F; width:100%; position:absolute; left:50%; margin-left:-50%; top:30%; font-size:20px; line-height:125%; font-weight:bold; }
-.wpsg_productview_product .wpsg_mod_productview_go .wpsg_mod_productview_price_wrap .wpsg_mod_productview_oldprice,
+.wpsg_productview_product .wpsg_mod_productview_go .wpsg_mod_productview_price_wrap .wpsg_mod_productview_oldprice,
.product_wrap .productdetails .oldprice { text-decoration:line-through; }
.wpsg_productview_product .wpsg_mod_productview_go .wpsg_mod_productview_price_wrap .wpsg_mod_productview_current { color:red; }
.wpsg_productview_product .wpsg_mod_productview_go .wpsg_mod_productview_tax_wrap { color:#565656; width:100%; position:absolute; left:50%; margin-left:-50%; top:60%; font-size:14px; line-height:125%; }
@@ -629,7 +630,7 @@ html body .wpsg_product_garan_wrap a.wpsg_product_garan img { display:block; max .wpsg_productview_product_grid .wpsg_mod_productview_name h2 { margin-top:0px; }
.wpsg_mod_productview_loading { width:100%; height:100%; background-color:rgba(249, 252, 253, 0.75); position:absolute; left:0px; top:0px; }
.wpsg_mod_productview_filter #wpsg_mod_productview_filter_price-range { position:relative; margin-right:16px; }
-.wpsg_mod_productview_filter #wpsg_mod_productview_filter_price-range .ui-slider-handle { cursor:pointer; width:16px; height:16px; background-color:#787878; position:absolute; }
+.wpsg_mod_productview_filter #wpsg_mod_productview_filter_price-range .ui-slider-handle { cursor:pointer; width:16px; height:16px; background-color:#787878; position:absolute; }
.wpsg_mod_productview_filter #wpsg_mod_productview_filter_price-range .ui-slider-bg { margin-left:16px; background-color:#E1E1E1; width:100%; height:2px; position:absolute; top:8px; }
.wpsg_mod_productview-order { position:relative; cursor:pointer; }
.wpsg_mod_productview-order-layer { position:absolute; width:100%; display:none; margin-top:5px; left:0px; z-index:1; }
@@ -642,16 +643,16 @@ html body .wpsg_product_garan_wrap a.wpsg_product_garan img { display:block; max /* Produktübersicht */
.wpsg_mod_productview_oldprice { font-size:0.9em; color:#ff0000; text-decoration:line-through; }
.wpsg_mod_productview_newprice { font-size:1em; font-weight:bold; }
-
+
/* Dialog für Meldungen wenn nicht auf einer Shop Seite / Warenkorbmeldung BEGIN */
#wpsg_ajax_layer { position:fixed; z-index:1000; left:0px; top:0px; width:100%; height:100%; background-color:rgba(0, 0, 0, 0.75); display:flex; justify-content:center; align-items:center; }
#wpsg_ajax_layer .wpsg_ajax_message_content { background-color:#FFFFFF; padding:1.5rem; text-align:center; }
#wpsg_ajax_layer .wpsg_ajax_message_content li { list-style:none; }
@media screen and (max-width: 320px) {
-
+
#wpsg_ajax_layer .wpsg_ajax_message_content { width:300px; }
-
+
}
/* Dialog für Meldungen wenn nicht auf einer Shop Seite / Warenkorbmeldung ENDE */
@@ -665,7 +666,7 @@ html body .wpsg_product_garan_wrap a.wpsg_product_garan img { display:block; max .wpsg_produkt_wrapper2 .wpsg_produkt_produktbilder img { width:230px !important; height:230px; object-fit:cover; object-position:50% 50%; max-width:none; float:left; }
.wpsg_produkt_wrapper2 .wpsg_produkt_produktbilder { width:260px; max-width:260px; }
.wpsg_produkt_wrapper2 .wpsg_productimages { margin-right:0px !important; }
-.wpsg_produkt_wrapper2 .bigimg img { margin:0 15px 15px 15px; width:100px; height:auto; float:left; }
+.wpsg_produkt_wrapper2 .bigimg img { margin:0 15px 15px 15px; width:100px; height:auto; float:left; }
/* wpsg_mod_amazon_v2 */
#AmazonPayButton_wrap { text-align:right; margin-bottom:2rem; width:100%; justify-content:flex-end; display:flex; }
diff --git a/views/mods/mod_amazon/basket_inner_prebutton.phtml b/views/mods/mod_amazon/basket_inner_prebutton.phtml index 5a1afcf..6b01b78 100644 --- a/views/mods/mod_amazon/basket_inner_prebutton.phtml +++ b/views/mods/mod_amazon/basket_inner_prebutton.phtml @@ -1,139 +1,16 @@ <?php
- /**
- * Template für die Integration von "Bezahlen mit Amazon" in den Warenkorb
- */
+ /**
+ * Button "Amazon Pay" im Warenkorb
+ *
+ * Den Button zeichnet checkout.js von Amazon in das Element #AmazonPayButton, die Konfiguration bindet
+ * wpsg_mod_amazon::basket_inner_prebutton() ein.
+ */
-?>
-
-<div id="LoginWithAmazon"></div>
-
-<div class="wpsg_amazonhandler" id="addressBookWidgetDiv"></div>
-<div class="wpsg_amazonhandler" id="walletWidgetDiv"></div>
-
-<style type="text/css">
-
- #addressBookWidgetDiv{ width:auto; height:228px; margin:15px 0; }
- #walletWidgetDiv { width:100%; height:228px; margin:15px 0; }
- #walletWidgetDiv iframe,
- #addressBookWidgetDiv iframe { max-width:100%; border:0px !important; }
- #LoginWithAmazon { float:right; }
- .wpsg_mod_paypalapi_button_wrap { float:left; }
-
-</style>
-
-<input type="hidden" name="amazon[OrderReference]" id="wpsg_mod_amazon_OrderReference" value="" />
-
-<div class="wpsg_clear"></div>
-
-<script>
-
- var authRequest;
-
- OffAmazonPayments.Button('LoginWithAmazon', '<?php echo $this->get_option('wpsg_mod_amazon_seller_id'); ?>', {
-
- type: "PwA",
- color: "Gold",
- size: "small",
- language: "de-DE",
-
- authorization: function() {
-
- loginOptions = {
- scope: "profile payments:widget payments:shipping_address payments:billing_address",
- popup: true
- };
-
- authRequest = amazon.Login.authorize(loginOptions, "<?php echo $this->view['wpsg_mod_amazon']['redirectURL']; ?>");
-
- },
-
- onError: function(error) {
-
- //console.log("Login: Es ist folgender Fehler aufgetreten: " + error.getErrorCode() + ' - ' + error.getErrorMessage());
- alert("Login: Es ist folgender Fehler aufgetreten: " + error.getErrorCode() + ' - ' + error.getErrorMessage());
-
- }
-
- } );
-
- <?php if (wpsg_isSizedString($this->view['wpsg_mod_amazon']['amazon_last_authorization_reference_id']) && $this->view['basket']['checkout']['payment'] == 3140) { ?>
-
- jQuery(document).ready(function() {
-
- jQuery('.wpsg_checkoutbutton').hide();
- jQuery('.wpsg_amazonhandler').show();
- jQuery('#LoginWithAmazon').hide();
-
- new OffAmazonPayments.Widgets.AddressBook( {
-
- sellerId: '<?php echo $this->get_option('wpsg_mod_amazon_seller_id'); ?>',
-
- onOrderReferenceCreate: function(orderReference) {
-
- var oID = orderReference.getAmazonOrderReferenceId();
+ if (!defined('ABSPATH')) exit;
- jQuery('#wpsg_mod_amazon_OrderReference').val(oID);
- jQuery('.wpsg_checkoutbutton').show();
-
- },
-
- onAddressSelect: function(orderReference) {
-
- // Replace the following code with the action that you want to perform
- // after the address is selected.
- // The amazonOrderReferenceId can be used to retrieve
- // the address details by calling the GetOrderReferenceDetails
- // operation. If rendering the AddressBook and Wallet widgets on the
- // same page, you should wait for this event before you render the
- // Wallet widget for the first time.
- // The Wallet widget will re-render itself on all subsequent
- // onAddressSelect events, without any action from you. It is not
- // recommended that you explicitly refresh it.
-
- new OffAmazonPayments.Widgets.Wallet({
-
- sellerId: '<?php echo $this->get_option('wpsg_mod_amazon_seller_id'); ?>',
-
- onPaymentSelect: function(orderReference) {
-
- // Replace this code with the action that you want to perform
- // after the payment method is selected.
-
- },
-
- design: {
-
- designMode: 'responsive'
-
- },
-
- onError: function(error) {
-
- alert("Wallet: Es ist folgender Fehler aufgetreten: " + error.getErrorCode() + ' - ' + error.getErrorMessage());
-
- }
-
- }).bind("walletWidgetDiv");
-
- },
-
- design: {
-
- designMode: 'responsive'
-
- },
-
- onError: function(error) {
-
- alert("Payment: Es ist folgender Fehler aufgetreten: " + error.getErrorCode() + ' - ' + error.getErrorMessage());
-
- }
-
- } ).bind("addressBookWidgetDiv");
-
- });
-
- <?php } ?>
+?>
-</script>
\ No newline at end of file +<div id="AmazonPayButton_wrap">
+ <div id="AmazonPayButton"></div>
+</div>
diff --git a/views/mods/mod_amazon/gfx/black/logo_black_100x25.png b/views/mods/mod_amazon/gfx/black/logo_black_100x25.png Binary files differdeleted file mode 100644 index 47b9f60..0000000 --- a/views/mods/mod_amazon/gfx/black/logo_black_100x25.png +++ /dev/null diff --git a/views/mods/mod_amazon/gfx/black/logo_black_130x45.png b/views/mods/mod_amazon/gfx/black/logo_black_130x45.png Binary files differdeleted file mode 100644 index ae6a6c8..0000000 --- a/views/mods/mod_amazon/gfx/black/logo_black_130x45.png +++ /dev/null diff --git a/views/mods/mod_amazon/gfx/black/logo_black_296x60.png b/views/mods/mod_amazon/gfx/black/logo_black_296x60.png Binary files differdeleted file mode 100644 index 6e31c55..0000000 --- a/views/mods/mod_amazon/gfx/black/logo_black_296x60.png +++ /dev/null diff --git a/views/mods/mod_amazon/gfx/gold/logo_gold_100x25.png b/views/mods/mod_amazon/gfx/gold/logo_gold_100x25.png Binary files differdeleted file mode 100644 index bb16b5b..0000000 --- a/views/mods/mod_amazon/gfx/gold/logo_gold_100x25.png +++ /dev/null diff --git a/views/mods/mod_amazon/gfx/gold/logo_gold_130x45.png b/views/mods/mod_amazon/gfx/gold/logo_gold_130x45.png Binary files differdeleted file mode 100644 index 3634935..0000000 --- a/views/mods/mod_amazon/gfx/gold/logo_gold_130x45.png +++ /dev/null diff --git a/views/mods/mod_amazon/gfx/gold/logo_gold_296x60.png b/views/mods/mod_amazon/gfx/gold/logo_gold_296x60.png Binary files differdeleted file mode 100644 index b9a2987..0000000 --- a/views/mods/mod_amazon/gfx/gold/logo_gold_296x60.png +++ /dev/null diff --git a/views/mods/mod_amazon/gfx/grey/logo_grey_100x25.png b/views/mods/mod_amazon/gfx/grey/logo_grey_100x25.png Binary files differdeleted file mode 100644 index 8f751d6..0000000 --- a/views/mods/mod_amazon/gfx/grey/logo_grey_100x25.png +++ /dev/null diff --git a/views/mods/mod_amazon/gfx/grey/logo_grey_130x45.png b/views/mods/mod_amazon/gfx/grey/logo_grey_130x45.png Binary files differdeleted file mode 100644 index 8a34705..0000000 --- a/views/mods/mod_amazon/gfx/grey/logo_grey_130x45.png +++ /dev/null diff --git a/views/mods/mod_amazon/gfx/grey/logo_grey_296x60.png b/views/mods/mod_amazon/gfx/grey/logo_grey_296x60.png Binary files differdeleted file mode 100644 index edd225d..0000000 --- a/views/mods/mod_amazon/gfx/grey/logo_grey_296x60.png +++ /dev/null diff --git a/views/mods/mod_amazon/order_done.phtml b/views/mods/mod_amazon/order_done.phtml index 80665c9..69aed24 100644 --- a/views/mods/mod_amazon/order_done.phtml +++ b/views/mods/mod_amazon/order_done.phtml @@ -1,122 +1,73 @@ <?php
/**
- * Integration der Zahlung über Amazon in den Bestellabschluss
+ * Wird nach dem Bestellabschluss mit der Zahlungsart AmazonPay angezeigt
+ *
+ * Zustände (wpsg_mod_amazon::order_done()):
+ * - redirect: Der Kunde hat sich im Warenkorb bei Amazon angemeldet und bestätigt die Zahlung über den Link
+ * - button: Button "Amazon Pay", den checkout.js in #wpsg_mod_amazon_button zeichnet
+ * - pending: Die Zahlung wurde bestätigt, der Betrag wird noch eingezogen
+ * - done: Die Zahlung ist verbucht
+ * - error: Der Button konnte nicht erzeugt werden
+ *
+ * Mit "autostart" startet die Zahlung nach einer Sekunde von selbst (Weiterleitung bzw. amazon.Pay.initCheckout(),
+ * eingebunden von wpsg_mod_amazon::enqueueButton()); Link und Button bleiben als Rückfall stehen.
*/
+ if (!defined('ABSPATH')) exit;
+
+ $arView = $this->view['wpsg_mod_amazon'];
+ $state = (string)($arView['state']??'');
+ $bAutostart = (($arView['autostart']??false) === true);
+
?>
-<?php if ($this->view['wpsg_mod_amazon']['state'] === wpsg_mod_amazon::ORDER_DONE) { ?>
+<?php if ($state === 'redirect') { ?>
-<p><?php echo __('Zahlung wurde erfolgreich mit AmazonPay abgewickelt.', 'wpsg'); ?></p>
+ <p><?php echo esc_html__('Bitte bestätigen Sie die Zahlung bei Amazon Pay.', 'wpsg'); ?></p>
-<?php } else if ($this->view['wpsg_mod_amazon']['state'] === wpsg_mod_amazon::ORDER_DONE_PAST) { ?>
+ <p>
+ <a class="button" href="<?php echo esc_url($arView['payURL']); ?>"><?php echo esc_html__('Jetzt mit AmazonPay bezahlen', 'wpsg'); ?></a>
+ </p>
-<p><?php echo __('Zahlung wurde bereits erfolgreich mit AmazonPay abgewickelt.', 'wpsg'); ?></p>
+ <?php if ($bAutostart) { ?>
-<?php } else if ($this->view['wpsg_mod_amazon']['state'] === wpsg_mod_amazon::ORDER_DONE_START || $this->view['wpsg_mod_amazon']['state'] === wpsg_mod_amazon::ORDER_DONE_GO) { ?>
+ <script>
-<p><?php echo __('Zahlung mittels der folgenden Zahlungsoption abschließen','wpsg'); ?></p>
+ window.setTimeout(function() {
-<div id="PayWithAmazon" style="<?php echo (($this->view['wpsg_mod_amazon']['state'] === wpsg_mod_amazon::ORDER_DONE_GO)?'display:none':''); ?>"></div>
+ location.href = <?php echo wp_json_encode($arView['payURL']); ?>;
-<script type="text/javascript">
-
- var authRequest;
+ }, 1000);
- OffAmazonPayments.Button('PayWithAmazon', '<?php echo $this->get_option('wpsg_mod_amazon_seller_id'); ?>', {
-
- type: "PwA",
- color: "Gold",
- size: "small",
- language: "de-DE",
+ </script>
- authorization: function() {
-
- loginOptions = {
- scope: "profile payments:widget payments:shipping_address payments:billing_address",
- popup: true
- };
-
- authRequest = amazon.Login.authorize(loginOptions, "<?php echo $this->view['wpsg_mod_amazon']['redirectURL']; ?>");
-
- },
+ <?php } ?>
- onError: function(error) {
-
- console.log("Login: Es ist folgender Fehler aufgetreten: " + error.getErrorCode() + ' - ' + error.getErrorMessage());
-
- }
-
- } );
+<?php } else if ($state === 'button') { ?>
- var autoRun = setInterval(function(){
+ <?php if ($bAutostart) { ?>
- if (jQuery('#PayWithAmazon img').length > 0) {
+ <p><?php echo esc_html__('Sie werden gleich zu Amazon Pay weitergeleitet. Falls nicht, klicken Sie bitte auf den Button.', 'wpsg'); ?></p>
- //setTimeout(function(){ jQuery('#PayWithAmazon img').click(); }, 1000);
- clearInterval(autoRun);
-
- }
+ <?php } else { ?>
- }, 100);
+ <p><?php echo esc_html__('Um den Betrag mit AmazonPay zu bezahlen, klicken Sie bitte auf den Button.', 'wpsg'); ?></p>
-</script>
-
-<?php } ?>
+ <?php } ?>
+
+ <div id="wpsg_mod_amazon_button" style="max-width:300px;"></div>
+
+<?php } else if ($state === 'pending') { ?>
+
+ <p><?php echo esc_html__('Die Zahlung wurde bei Amazon Pay bestätigt und wird gerade abgeschlossen. Sie erhalten eine Nachricht, sobald die Zahlung eingegangen ist.', 'wpsg'); ?></p>
-<?php if ($this->view['wpsg_mod_amazon']['state'] === wpsg_mod_amazon::ORDER_DONE_GO) { ?>
-
-<form id="wpsg_mod_amazon_paymentForm" method="POST" action="<?php echo $this->getUrl(wpsg_ShopController::URL_BASKET, 'wpsg_mod_amazon', 'return'); ?>">
-
- <input type="hidden" name="order_id" value="<?php echo $_REQUEST['order_id']; ?>" />
- <input type="hidden" name="wpsg_done" value="<?php echo $_REQUEST['wpsg_done']; ?>" />
- <input type="hidden" name="amazon[OrderReference]" id="wpsg_mod_amazon_OrderReference" value="" />
-
- <div id="walletWidgetDiv"></div><br />
-
- <input type="submit" class="wpsg_button" name="submit" value="<?php echo __('Zahlung durchführen', 'wpsg'); ?>" id="wpsg_mod_amazon_doPayment" style="display:none;" />
- <div class="wpsg_clear"></div>
-
-</form>
-
-<script>
-
- jQuery('#walletWidgetDiv').show();
-
- new OffAmazonPayments.Widgets.Wallet( {
-
- sellerId: '<?php echo $this->get_option('wpsg_mod_amazon_seller_id'); ?>',
-
- onOrderReferenceCreate: function(orderReference) {
-
- jQuery('#wpsg_mod_amazon_OrderReference').val(orderReference.getAmazonOrderReferenceId());
- jQuery('#wpsg_mod_amazon_doPayment').show();
-
- },
-
- onPaymentSelect: function(orderReference) {
-
- // Replace this code with the action that you want to perform
- // after the payment method is selected.
-
- },
-
- design: {
-
- designMode: 'responsive'
-
- },
-
- onError: function(error) {
-
- jQuery('#wpsg_mod_amazon_paymentForm').hide();
- jQuery('#PayWithAmazon').show();
-
-
- }
-
- } ).bind("walletWidgetDiv");
-
-</script>
-<?php } ?>
\ No newline at end of file +<?php } else if ($state === 'done') { ?>
+
+ <p><?php echo esc_html__('Die Zahlung wurde bereits mit AmazonPay abgeschlossen.', 'wpsg'); ?></p>
+
+<?php } else if ($state === 'error') { ?>
+
+ <p><?php echo esc_html__('Die Zahlung mit AmazonPay ist derzeit nicht möglich. Bitte wenden Sie sich an den Shopbetreiber.', 'wpsg'); ?></p>
+
+<?php } ?>
diff --git a/views/mods/mod_amazon/order_view_afterpayment.phtml b/views/mods/mod_amazon/order_view_afterpayment.phtml index 5033df6..617dda0 100644 --- a/views/mods/mod_amazon/order_view_afterpayment.phtml +++ b/views/mods/mod_amazon/order_view_afterpayment.phtml @@ -1,24 +1,92 @@ <?php
/**
- * Template für die Integration der Amazon Zahlungsart in die Bestellverwaltung
+ * Template für die Integration der Zahlungsart AmazonPay in die Bestellverwaltung
*/
- /** @var wpsg_order $oOrder */
- $oOrder = $this->view['oOrder'];
+ if (!defined('ABSPATH')) exit;
- $amazon_capture_id = $oOrder->getMeta('amazon_capture_id');
- $amazon_refund_id = $oOrder->getMeta('amazon_refund_id');
+ $arView = $this->view['wpsg_mod_amazon'];
+ $oOrder = $arView['oOrder'];
+
+ $strState = (string)$oOrder->getMeta(wpsg_mod_amazon::META_STATE);
+ $strChargeId = (string)$oOrder->getMeta(wpsg_mod_amazon::META_CHARGE);
+ $strRefundId = (string)$oOrder->getMeta(wpsg_mod_amazon::META_REFUND);
+ $strRefundState = (string)$oOrder->getMeta(wpsg_mod_amazon::META_REFUND_STATE);
+
+ // Farbe des Status: eingezogen bzw. erstattet grün, offen gelb, abgelehnt rot
+ $arStateClass = [
+ 'Captured' => 'success',
+ 'Completed' => 'success',
+ 'Refunded' => 'success',
+ 'AuthorizationInitiated' => 'warning',
+ 'Authorized' => 'warning',
+ 'CaptureInitiated' => 'warning',
+ 'RefundInitiated' => 'warning',
+ 'Open' => 'warning',
+ 'Declined' => 'danger',
+ 'Canceled' => 'danger'
+ ];
+
+ $strBadge = '<span class="label label-%s" style="font-size:12px;">%s</span>';
+
+ $strRefreshURL = wpsg_admin_url('Order', 'view', ['action' => 'ajax', 'edit_id' => $oOrder->getId(), 'do' => 'refresh', 'mod' => 'wpsg_mod_amazon'], ['noheader' => '1']);
+ $strRefundURL = wpsg_admin_url('Order', 'view', ['action' => 'ajax', 'edit_id' => $oOrder->getId(), 'do' => 'refund', 'mod' => 'wpsg_mod_amazon'], ['noheader' => '1']);
?>
-<?php if (wpsg_isSizedString($amazon_refund_id)) { ?>
+<?php if ($arView['bLegacy']) { ?>
+
+ <?php echo wpsg_drawForm_Text(__('Schnittstelle', 'wpsg'), esc_html__('Frühere Anbindung (Login and Pay / MWS), Erstattungen bitte in der Seller Central', 'wpsg')); ?>
+
+ <?php foreach (['amazon_order_reference_id' => __('Amazon-Referenznummer', 'wpsg'), 'amazon_capture_id' => __('Capture ID', 'wpsg'), 'amazon_refund_id' => __('Refund ID', 'wpsg')] as $meta_key => $meta_label) { ?>
+
+ <?php if ((string)$oOrder->getMeta($meta_key) !== '') { ?>
+
+ <?php echo wpsg_drawForm_Text($meta_label, '<code>'.esc_html($oOrder->getMeta($meta_key)).'</code>'); ?>
+
+ <?php } ?>
+
+ <?php } ?>
+
+<?php } else if ($strChargeId !== '' || (string)$oOrder->getMeta(wpsg_mod_amazon::META_SESSION) !== '') { ?>
+
+ <?php
+
+ $strStateHTML = sprintf($strBadge, esc_attr($arStateClass[$strState]??'default'), (($strState !== '')?esc_html($strState):esc_html__('Unbekannt', 'wpsg')));
+ $strStateHTML .= ' <a class="btn btn-default btn-xs" href="'.esc_url($strRefreshURL).'"><span class="glyphicon glyphicon-refresh" aria-hidden="true"></span> '.esc_html__('Status Aktualisieren', 'wpsg').'</a>';
+
+ if ($arView['bRefundable']) {
+
+ $strStateHTML .= ' <a class="btn btn-default btn-xs" href="'.esc_url($strRefundURL).'" onclick="return confirm('.esc_attr(wp_json_encode(__('Soll der Betrag wirklich über Amazon Pay erstattet werden?', 'wpsg'))).');"><span class="glyphicon glyphicon-share-alt" aria-hidden="true"></span> '.esc_html__('Erstatten', 'wpsg').'</a>';
+
+ }
+
+ ?>
+
+ <?php echo wpsg_drawForm_Text(__('AmazonPay Status', 'wpsg'), $strStateHTML); ?>
+
+ <?php if ((string)$oOrder->getMeta(wpsg_mod_amazon::META_ENV) === wpsg_mod_amazon::ENV_SANDBOX) { ?>
+
+ <?php echo wpsg_drawForm_Text(__('Umgebung', 'wpsg'), sprintf($strBadge, 'warning', esc_html__('Sandbox (Testbetrieb)', 'wpsg'))); ?>
+
+ <?php } ?>
+
+ <?php foreach ([wpsg_mod_amazon::META_CHARGE_PERMISSION => __('Amazon-Referenznummer', 'wpsg'), wpsg_mod_amazon::META_CHARGE => __('Charge ID', 'wpsg'), wpsg_mod_amazon::META_SESSION => __('Checkout Session ID', 'wpsg')] as $meta_key => $meta_label) { ?>
+
+ <?php if ((string)$oOrder->getMeta($meta_key) !== '') { ?>
+
+ <?php echo wpsg_drawForm_Text($meta_label, '<code>'.esc_html($oOrder->getMeta($meta_key)).'</code>'); ?>
+
+ <?php } ?>
- <?php echo wpsg_drawForm_Input(false, __('Refund ID', 'wpsg'), $amazon_refund_id, ['readonly' => true]); ?>
+ <?php } ?>
-<?php } else if (wpsg_isSizedString($amazon_capture_id)) { ?>
+ <?php if ($strRefundId !== '') { ?>
- <?php echo wpsg_drawForm_Input(false, __('Capture ID', 'wpsg'), $amazon_capture_id, ['readonly' => true]); ?>
+ <?php echo wpsg_drawForm_Text(__('Refund ID', 'wpsg'), '<code>'.esc_html($strRefundId).'</code>'); ?>
+ <?php echo wpsg_drawForm_Text(__('Erstattungsstatus', 'wpsg'), sprintf($strBadge, esc_attr($arStateClass[$strRefundState]??'default'), (($strRefundState !== '')?esc_html($strRefundState):esc_html__('Unbekannt', 'wpsg')))); ?>
-<?php }
+ <?php } ?>
+<?php } ?>
diff --git a/views/mods/mod_amazon/settings_edit.phtml b/views/mods/mod_amazon/settings_edit.phtml index 827c68f..35020eb 100644 --- a/views/mods/mod_amazon/settings_edit.phtml +++ b/views/mods/mod_amazon/settings_edit.phtml @@ -1,32 +1,149 @@ <?php
/**
- * Einstellungen des Moduls "AmazonPay"
+ * Templatedatei für die Einstellungen des Moduls AmazonPay (Amazon Pay Checkout v2)
+ *
+ * Live-System und Sandbox haben je eigene Zugangsdaten, der Umschalter "Aktive Umgebung" legt fest, welche der
+ * Shop für neue Zahlungen verwendet.
*/
+ if (!defined('ABSPATH')) exit;
+
+ $arView = $this->view['wpsg_mod_amazon'];
+ $bSandbox = (bool)$arView['bSandbox'];
+
+ $arStornoStatus = (array)$this->get_option('wpsg_mod_amazon_stornostate');
+
+ // Anmeldung für Amazon-Pay-Händler, führt direkt in den Amazon-Pay-Bereich der Seller Central
+ $strSellerCentralURL = 'https://pay.amazon.de/signin';
+
+ $strBadge = '<span class="label label-%s" style="font-size:12px;">%s</span>';
+
+ $arEnvLabel = [
+ wpsg_mod_amazon::ENV_LIVE => __('Zugangsdaten Live-System', 'wpsg'),
+ wpsg_mod_amazon::ENV_SANDBOX => __('Zugangsdaten Sandbox (Testbetrieb)', 'wpsg')
+ ];
+
+ if ($bSandbox) {
+
+ $strMode = sprintf($strBadge, 'warning', esc_html__('Sandbox (Testbetrieb)', 'wpsg'));
+
+ } else {
+
+ $strMode = sprintf($strBadge, 'success', esc_html__('Live', 'wpsg'));
+
+ }
+
?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_amazon_seller_id', __('Seller ID / Verkäufer-ID', 'wpsg'), $this->get_option('wpsg_mod_amazon_seller_id'), array('help' => 'wpsg_mod_amazon_seller_id')); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_amazon_mws_access_key_id', __('Access Key ID', 'wpsg'), $this->get_option('wpsg_mod_amazon_mws_access_key_id'), array('help' => 'wpsg_mod_amazon_mws_access_key_id')); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_amazon_mws_access_key', __('Secret Access Key', 'wpsg'), $this->get_option('wpsg_mod_amazon_mws_access_key'), array('help' => 'wpsg_mod_amazon_mws_access_key')); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_amazon_lwa_client_id', __('Login with Amazon Client ID', 'wpsg'), $this->get_option('wpsg_mod_amazon_lwa_client_id'), array('help' => 'wpsg_mod_amazon_lwa_client_id')); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_amazon_lwa_client_secret', __('Login with Amazon Client Secret', 'wpsg'), $this->get_option('wpsg_mod_amazon_lwa_client_secret'), array('help' => 'wpsg_mod_amazon_lwa_client_secret')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_amazon_sandbox', __('Sandbox Modus', 'wpsg'), $this->get_option('wpsg_mod_amazon_sandbox'), array('help' => 'wpsg_mod_amazon_sandbox')); ?>
+<?php if ($arView['bLegacyCredentials']) { ?>
+
+ <div class="wpsg_hinweis">
+ <?php echo esc_html__('AmazonPay arbeitet jetzt mit Amazon Pay Checkout v2. Die Zugangsdaten der früheren Anbindung (MWS Access Key, Login with Amazon) werden nicht mehr verwendet. Erzeugen Sie in der Seller Central unter "Integration → Integration Central" einen API-Schlüssel und tragen Sie Client-ID/Store-ID, Public Key ID und den privaten Schlüssel unten ein. Bis dahin wird AmazonPay im Shop nicht angeboten.', 'wpsg'); ?>
+ </div>
+
+<?php } ?>
+
+<?php wpsg_drawForm_AdminboxStart(__('Umgebung', 'wpsg'), 'wpsg_mod_amazon_environment'); ?>
+
+ <?php echo wpsg_drawForm_Select('wpsg_mod_amazon_sandbox', __('Aktive Umgebung', 'wpsg'), ['0' => __('Live-System', 'wpsg'), '1' => __('Sandbox (Testbetrieb)', 'wpsg')], (($bSandbox)?'1':'0'), ['help' => 'wpsg_mod_amazon_sandbox', 'hint' => esc_html__('Neue Zahlungen laufen über die Zugangsdaten der aktiven Umgebung. In der Sandbox werden keine echten Zahlungen ausgeführt. Bestehende Zahlungen fragt der Shop weiterhin in der Umgebung ab, in der sie angelegt wurden.', 'wpsg')]); ?>
+ <?php echo wpsg_drawForm_Text(__('Neue Zahlungen über', 'wpsg'), $strMode); ?>
+
+<?php wpsg_drawForm_AdminboxEnd(); ?>
+
+<?php foreach ($arView['arEnv'] as $env => $arEnv) { ?>
+
+ <?php
+
+ $arStatus = (array)$arEnv['arStatus'];
+ $arFields = $arEnv['arFields'];
+ $bActive = ($env === (($bSandbox)?wpsg_mod_amazon::ENV_SANDBOX:wpsg_mod_amazon::ENV_LIVE));
+
+ if (!$arEnv['bConfigured']) {
+
+ $strConnection = sprintf($strBadge, 'default', esc_html__('Keine vollständigen Zugangsdaten hinterlegt', 'wpsg'));
+
+ } else if (!isset($arStatus['time'])) {
+
+ $strConnection = sprintf($strBadge, 'default', esc_html__('Noch nicht geprüft, bitte speichern', 'wpsg'));
+
+ } else if (($arStatus['connected']??false) === true) {
+
+ $strConnection = sprintf($strBadge, 'success', esc_html__('Verbindung erfolgreich', 'wpsg'));
+
+ } else {
+
+ $strConnection = sprintf($strBadge, 'danger', esc_html__('Anmeldung fehlgeschlagen', 'wpsg'));
+
+ if ((string)($arStatus['message']??'') !== '') $strConnection .= '<br /><small class="text-danger">'.esc_html($arStatus['message']).'</small>';
+
+ }
+
+ if ($bActive) $strConnection .= ' '.sprintf($strBadge, 'info', esc_html__('aktiv', 'wpsg'));
+
+ $strKey = sprintf($strBadge, (($arEnv['bKey'])?'success':'danger'), (($arEnv['bKey'])?esc_html__('Hinterlegt', 'wpsg'):esc_html__('Fehlt', 'wpsg')));
+
+ ?>
+
+ <?php wpsg_drawForm_AdminboxStart($arEnvLabel[$env], 'wpsg_mod_amazon_credentials_'.$env); ?>
+
+ <?php echo wpsg_drawForm_Text(__('Verbindung', 'wpsg'), $strConnection); ?>
+ <?php echo wpsg_drawForm_Text(__('Privater Schlüssel', 'wpsg'), $strKey); ?>
+
+ <?php if (isset($arStatus['time'])) { ?>
+
+ <?php echo wpsg_drawForm_Text(__('Zuletzt geprüft', 'wpsg'), esc_html(wpsg_formatTimestamp($arStatus['time']))); ?>
+
+ <?php } ?>
+
+ <?php if ($arEnv['bKeyMismatch']) { ?>
+
+ <div class="wpsg_hinweis"><?php echo esc_html((($env === wpsg_mod_amazon::ENV_SANDBOX)?__('Die Public Key ID beginnt mit "LIVE-" und gehört zum Live-System. Amazon nimmt sie in der Sandbox nicht an.', 'wpsg'):__('Die Public Key ID beginnt mit "SANDBOX-" und gehört zur Sandbox. Amazon nimmt sie im Live-System nicht an.', 'wpsg'))); ?></div>
+
+ <?php } ?>
+
+ <?php echo wpsg_drawForm_Input($arFields['seller_id']['name'], __('Händler-ID (Merchant ID)', 'wpsg'), $arFields['seller_id']['value'], ['help' => 'wpsg_mod_amazon_seller_id']); ?>
+ <?php echo wpsg_drawForm_Input($arFields['store_id']['name'], __('Client-ID/Store-ID', 'wpsg'), $arFields['store_id']['value'], ['help' => 'wpsg_mod_amazon_store_id', 'hint' => esc_html__('Beginnt mit "amzn1.application-oa2-client.". Das "Client Secret" daneben wird nicht benötigt.', 'wpsg')]); ?>
+ <?php echo wpsg_drawForm_Input($arFields['public_key_id']['name'], __('Public Key ID', 'wpsg'), $arFields['public_key_id']['value'], ['help' => 'wpsg_mod_amazon_public_key_id', 'hint' => wpsg_translate(__('Händler-ID, Client-ID/Store-ID und API-Schlüssel finden bzw. erzeugen Sie in der <a target="_blank" href="#1#">Seller Central</a> unter "Integration → Integration Central".', 'wpsg'), esc_url($strSellerCentralURL))]); ?>
+ <?php echo wpsg_drawForm_Upload($arFields['private_key']['name'], __('Privater Schlüssel (.pem Datei)', 'wpsg'), false, '50', '100000', ['accept' => '.pem', 'help' => 'wpsg_mod_amazon_private_key']); ?>
+
+ <?php wpsg_drawForm_AdminboxEnd(); ?>
+
+<?php } ?>
+
+<?php wpsg_drawForm_AdminboxStart(__('Zahlungsart im Shop', 'wpsg'), 'wpsg_mod_amazon_payment'); ?>
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_amazon_aktiv', __('Zahlungsart für neue Bestellungen aktiv', 'wpsg'), $this->get_option('wpsg_mod_amazon_aktiv'), ['help' => 'wpsg_shippay_activ']); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_amazon_name', __('Name der Zahlungsart', 'wpsg'), $this->get_option('wpsg_mod_amazon_name'), ['help' => 'wpsg_mod_amazon_name']); ?>
+ <?php echo wpsg_drawForm_Textarea('wpsg_mod_amazon_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_amazon_hint'), ['help' => 'wpsg_shippay_hint']); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_amazon_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_amazon_gebuehr'), true), ['help' => 'wpsg_shippay_gebuehr', 'unit' => $this->get_option('wpsg_currency').' / %']); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_amazon_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_amazon_mwst'), ['help' => 'wpsg_mod_amazon_mwst']); ?>
+
+<?php wpsg_drawForm_AdminboxEnd(); ?>
+
+<?php wpsg_drawForm_AdminboxStart(__('Zahlungsablauf', 'wpsg'), 'wpsg_mod_amazon_process'); ?>
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_amazon_basket', __('Button im Warenkorb anzeigen', 'wpsg'), $this->get_option('wpsg_mod_amazon_basket'), ['help' => 'wpsg_mod_amazon_basket']); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_amazon_autostart', __('Zahlung nach dem Bestellabschluss direkt starten', 'wpsg'), $this->get_option('wpsg_mod_amazon_autostart'), ['help' => 'wpsg_mod_amazon_autostart']); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_amazon_buttoncolor', __('Farbe des Buttons', 'wpsg'), $arView['arButtonColors'], $this->get_option('wpsg_mod_amazon_buttoncolor'), ['help' => 'wpsg_mod_amazon_buttoncolor']); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_amazon_subject', __('Betreff (Auf Abrechnungen für Verkäufer sichtbar)', 'wpsg'), $this->get_option('wpsg_mod_amazon_subject'), ['help' => 'wpsg_mod_amazon_subject']); ?>
+
+<?php wpsg_drawForm_AdminboxEnd(); ?>
+
+<?php wpsg_drawForm_AdminboxStart(__('Zahlungsbenachrichtigungen (IPN)', 'wpsg'), 'wpsg_mod_amazon_ipn'); ?>
+
+ <?php echo wpsg_drawForm_Input('', __('IPN URL', 'wpsg'), $arView['ipnURL'], ['readonly' => true, 'help' => 'wpsg_mod_amazon_ipn_url', 'hint' => esc_html__('Tragen Sie diese URL in der Seller Central unter "Integration → Integration Central → IPN-Einstellungen" ein. Amazon meldet darüber Zahlungen, die erst später eingezogen werden, und den Stand von Erstattungen. Die URL muss per HTTPS von außen erreichbar sein.', 'wpsg')]); ?>
+
+<?php wpsg_drawForm_AdminboxEnd(); ?>
-<br />
+<?php wpsg_drawForm_AdminboxStart(__('Erstattung bei Statuswechsel', 'wpsg'), 'wpsg_mod_amazon_storno'); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_amazon_aktiv', __('Zahlungsart für neue Bestellungen aktiv', 'wpsg'), $this->get_option('wpsg_mod_amazon_aktiv')); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_amazon_name', __('Name der Zahlungsart', 'wpsg'), $this->get_option('wpsg_mod_amazon_name'), array('help' => 'wpsg_mod_amazon_name')); ?>
-<?php echo wpsg_drawForm_Textarea('wpsg_mod_amazon_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_amazon_hint'), array('help' => 'wpsg_shippay_hint')); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_amazon_subject', __('Betreff (Auf Abrechnungen für Verkäufer sichtbar)', 'wpsg'), $this->get_option('wpsg_mod_amazon_subject'), array('help' => 'wpsg_mod_amazon_subject')); ?>
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_amazon_basket', __('Button in Warenkorb integrieren', 'wpsg'), $this->get_option('wpsg_mod_amazon_basket'), array('help' => 'wpsg_mod_amazon_basket')); ?>
+ <p class="text-muted"><?php echo esc_html__('Wechselt eine mit AmazonPay bezahlte Bestellung in einen der markierten Status, wird der Betrag automatisch über Amazon Pay erstattet.', 'wpsg'); ?></p>
-<br />
+ <?php foreach ($this->arStatus as $status_id => $status_label) { ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_amazon_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_amazon_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_shippay_gebuehr')); ?>
-<?php echo wpsg_drawForm_Select('wpsg_mod_amazon_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_amazon_mwst'), array('help' => 'wpsg_mod_amazon_mwst')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_amazon_stornostate['.$status_id.']', esc_html($status_label), ($arStornoStatus[$status_id]??'0')); ?>
-<br />
+ <?php } ?>
-<?php echo wpsg_drawForm_Input('', __('Händler URL', 'wpsg'), $this->view['ipnURL'], array('readonly' => true)); ?>
-<?php echo wpsg_drawForm_Input('', __('JavaScript Origin', 'wpsg'), $this->view['jsOrigin'], array('readonly' => true)); ?>
\ No newline at end of file +<?php wpsg_drawForm_AdminboxEnd(); ?>
diff --git a/views/mods/mod_amazon_v2/basket_inner_prebutton.phtml b/views/mods/mod_amazon_v2/basket_inner_prebutton.phtml deleted file mode 100644 index e65c569..0000000 --- a/views/mods/mod_amazon_v2/basket_inner_prebutton.phtml +++ /dev/null @@ -1,44 +0,0 @@ -<?php
-
- /**
- * Template für die Integration von "Bezahlen mit Amazon" in den Warenkorb
- */
-
- $view = $this->view['wpsg_mod_amazon'];
-
- // https://amazonpaycheckoutintegrationguide.s3.amazonaws.com/amazon-pay-checkout/introduction.html
-
-?>
-
-<?php if ($this->get_option('wpsg_mod_amazon_v2_login') === '1') { ?>
-
- <?php $this->render(WPSG_PATH_VIEW.'/mods/mod_amazon_v2/basket_inner_prebutton_widget.phtml'); ?>
-
-<?php } else { ?>
-
- <script src="https://static-eu.payments-amazon.com/checkout.js"></script>
-
- <div id="AmazonPayButton_wrap">
- <div id="AmazonPayButton"></div>
- </div>
-
- <script>
-
- amazon.Pay.renderButton('#AmazonPayButton', {
- merchantId: '<?php echo $this->get_option('wpsg_mod_amazon_v2_seller_id'); ?>',
- ledgerCurrency: 'EUR',
- sandbox: <?php echo (($this->get_option('wpsg_mod_amazon_v2_sandbox') === '1')?'true':'false'); ?>,
- checkoutLanguage: 'de_DE',
- productType: 'PayAndShip',
- placement: 'Cart',
- buttonColor: 'Gold',
- createCheckoutSessionConfig: {
- payloadJSON: '<?php echo $view['payload']; ?>',
- signature: '<?php echo $view['signature']; ?>',
- publicKeyId: '<?php echo $this->get_option('wpsg_mod_amazon_v2_public_key_id'); ?>'
- }
- });
-
- </script>
-
-<?php } ?>
diff --git a/views/mods/mod_amazon_v2/basket_inner_prebutton_widget.phtml b/views/mods/mod_amazon_v2/basket_inner_prebutton_widget.phtml deleted file mode 100644 index 85359cf..0000000 --- a/views/mods/mod_amazon_v2/basket_inner_prebutton_widget.phtml +++ /dev/null @@ -1,133 +0,0 @@ -<?php
-
- /**
- *
- */
-
-?>
-
-<script async="async" src="https://static-eu.payments-amazon.com/OffAmazonPayments/de/sandbox/lpa/js/Widgets.js"></script>
-
-<div id="AmazonLoginButton_wrap">
- <div id="AmazonLoginButton"></div>
-</div>
-
-<div id="addressBookWidgetDiv"></div>
-<div id="walletWidgetDiv"></div>
-
-<input type="text" name="amazon[OrderReference]" id="wpsg_mod_amazon_OrderReference" value="" />
-
-<script>
-
- window.onAmazonLoginReady = function() {
-
- amazon.Login.setClientId('<?php echo $this->get_option('wpsg_mod_amazon_v2_store_id'); ?>');
-
- };
-
- window.onAmazonPaymentsReady = function() {
-
- var authRequest;
-
- OffAmazonPayments.Button('AmazonLoginButton', '<?php echo $this->get_option('wpsg_mod_amazon_v2_seller_id'); ?>', {
-
- type: 'PwA',
- color: 'Gold',
- size: 'small',
- language: 'de-DE',
-
- authorization: function() {
-
- loginOptions = {
- scope: "profile payments:widget payments:shipping_address payments:billing_address",
- popup: true
- };
-
- authRequest = amazon.Login.authorize (loginOptions, '<?php echo $this->getUrl(wpsg_ShopController::URL_BASKET, 'wpsg_mod_amazon_v2', 'login', [], true) ?>');
-
- }
- });
-
- <?php if (isset($_SESSION['wpsg_mod_amazon_v2_access_token'])) { ?>
-
- new OffAmazonPayments.Widgets.AddressBook({
- sellerId: '<?php echo $this->get_option('wpsg_mod_amazon_v2_seller_id'); ?>',
- scope: 'profile payments:widget payments:shipping_address payments:billing_address',
- onOrderReferenceCreate: function(orderReference) {
-
- var oID = orderReference.getAmazonOrderReferenceId();
-
- jQuery('#wpsg_mod_amazon_OrderReference').val(oID);
-
- },
- onAddressSelect: function(orderReference) {
- // Replace the following code with the action that you want
- // to perform after the address is selected. The
- // amazonOrderReferenceId can be used to retrieve the address
- // details by calling the GetOrderReferenceDetails operation.
- },
- design: {
- designMode: 'responsive'
- },
- onReady: function(orderReference) {
- // Enter code here you want to be executed
- // when the AddressBook widget has been rendered.
- },
-
- onError: function(error) {
-
- console.log(error);
-
- // Your error handling code.
- // During development you can use the following
- // code to view error messages:
- // console.log(error.getErrorCode() + ': ' + error.getErrorMessage());
- // See "Handling Errors" for more information.
- }
- }).bind("addressBookWidgetDiv");
-
- new OffAmazonPayments.Widgets.Wallet({
- sellerId: '<?php echo $this->get_option('wpsg_mod_amazon_v2_seller_id'); ?>',
- onPaymentSelect: function(orderReference) {
-
- // Replace this code with the action that you want to perform
- // after the payment method is selected.
-
- },
- design: {
- designMode: 'responsive'
- },
- onError: function(error) {
- alert("Wallet: Es ist folgender Fehler aufgetreten: " + error.getErrorCode() + ' - ' + error.getErrorMessage());
- }
- }).bind("walletWidgetDiv");
-
- <?php } ?>
-
- }
-
-</script>
-
-<style>
-
- #addressBookWidgetDiv {
- min-width: 300px;
- width: 100%;
- max-width: 900px;
- min-height: 228px;
- height: 240px;
- max-height: 400px;
- margin-bottom:2rem;
- }
-
- #walletWidgetDiv {
- min-width: 300px;
- width: 100%;
- max-width: 900px;
- min-height: 228px;
- height: 240px;
- max-height: 400px;
- margin-bottom:2rem;
- }
-
-</style>
\ No newline at end of file diff --git a/views/mods/mod_amazon_v2/gfx/logo_100x25.png b/views/mods/mod_amazon_v2/gfx/logo_100x25.png Binary files differdeleted file mode 100644 index bb16b5b..0000000 --- a/views/mods/mod_amazon_v2/gfx/logo_100x25.png +++ /dev/null diff --git a/views/mods/mod_amazon_v2/order_done.phtml b/views/mods/mod_amazon_v2/order_done.phtml deleted file mode 100644 index ba16642..0000000 --- a/views/mods/mod_amazon_v2/order_done.phtml +++ /dev/null @@ -1,54 +0,0 @@ -<?php
-
- /**
- * Template, welches bei Bestellungen mit Amazon Pay nach der Bestellung angezeigt wird
- */
-
- $view = $this->view['wpsg_mod_amazon_v2'];
-
- // https://pay.amazon.de/help/JE5KSJW4SFH2UM8
- // https://developer.amazon.com/de/docs/eu/amazon-pay-onetime/sca-upgrade.html?ld=NSGoogle
- // https://sellercentral.amazon.com/forums/t/what-is-the-amazonorderreferenceid/286349/2
-
-?>
-
-<?php if ($view['state'] === 'Completed') { ?>
-
- <p><?php echo __('Bestellung wurde mit Amazon Payment bezahlt.', 'wpsg'); ?></p>
-
-<?php } else if ($view['state'] === 'Unpayed') { ?>
-
- <script src="https://static-eu.payments-amazon.com/checkout.js"></script>
-
- <div id="AmazonPayButton"></div>
-
- <script>
-
- amazon.Pay.renderButton('#AmazonPayButton', {
- merchantId: '<?php echo $this->get_option('wpsg_mod_amazon_v2_seller_id'); ?>',
- ledgerCurrency: 'EUR',
- sandbox: <?php echo (($this->get_option('wpsg_mod_amazon_v2_sandbox') === '1')?'true':'false'); ?>,
- checkoutLanguage: 'de_DE',
- productType: 'PayAndShip',
- placement: 'Cart',
- buttonColor: 'Gold',
- createCheckoutSessionConfig: {
- payloadJSON: '<?php echo $view['payload']; ?>',
- signature: '<?php echo $view['signature']; ?>',
- publicKeyId: '<?php echo $this->get_option('wpsg_mod_amazon_v2_public_key_id'); ?>'
- }
- });
-
- </script>
-
-<?php } else if ($view['state'] === 'Open') { ?>
-
- <p><?php echo __('Zahlen Sie Ihre Bestellung jetzt mit AmazonPay, indem sie auf folgenden Button klicken.', 'wpsg'); ?></p>
-
-
- <a href="<?php echo $view['payURL']; ?>" title="<?php echo __('Jetzt mit AmazonPay bezahlen', 'wpsg'); ?>">
- <img src="<?php echo $this->getRessourceURL('mods/mod_amazon_v2/gfx/logo_100x25.png'); ?>" alt="<?php echo __('Jetzt mit AmazonPay bezahlen', 'wpsg'); ?>" />
- </a>
-
-
-<?php } ?>
diff --git a/views/mods/mod_amazon_v2/order_view_afterpayment.phtml b/views/mods/mod_amazon_v2/order_view_afterpayment.phtml deleted file mode 100644 index 940bc5c..0000000 --- a/views/mods/mod_amazon_v2/order_view_afterpayment.phtml +++ /dev/null @@ -1,75 +0,0 @@ -<?php
-
- /**
- * Template für die Integration von AmazonPay in die Bestellverwaltung
- */
-
- $view = $this->view['wpsg_mod_amazon_v2'];
-
-?>
-
- <?php if (wpsg_isSizedString($view['referenceID'])) { ?>
- <?php echo wpsg_drawForm_Input(false, __('Amazon-Referenznummer', 'wpsg'), wpsg_getStr($view['referenceID']), ['readonly' => true]); ?>
- <?php } ?>
-
- <?php if (wpsg_isSizedString($view['sesion_id'])) { ?>
- <?php echo wpsg_drawForm_Input(false, __('Session ID', 'wpsg'), wpsg_getStr($view['sesion_id']), ['readonly' => true]); ?>
- <?php } ?>
-
- <?php if (wpsg_isSizedString($view['chargeId'])) { ?>
- <?php echo wpsg_drawForm_Input(false, __('Charge ID', 'wpsg'), wpsg_getStr($view['chargeId']), ['readonly' => true]); ?>
- <?php } ?>
-
- <?php if (wpsg_isSizedString($view['refundId'])) { ?>
- <?php echo wpsg_drawForm_Input(false, __('Refund ID', 'wpsg'), wpsg_getStr($view['refundId']), ['readonly' => true]); ?>
- <?php } ?>
-
- <div class="form-group form-group-text form-group-sm">
- <label class="col-sm-6 control-label" for=""><?php echo __('Status', 'wpsg'); ?> [<a href="<?php
-
- echo wpsg_admin_url('Order', 'view', ['action' => 'ajax', 'mod' => 'wpsg_mod_amazon_v2', 'do' => 'update', 'edit_id' => $this->view['oOrder']->getId()], ['noheader' => '1']);
-
- ?>"><?php echo __('Status Aktualisieren', 'wpsg'); ?></a>]</label>
- <div class="col-sm-6">
- <div class="wpsg_field_wrap">
- <p class="form-control-static">
-
- <?php echo wpsg_translate(__('#1#', 'wpsg'), $view['state']); ?>
-
- </p>
- </div>
- </div>
- </div>
-
- <?php if (wpsg_isSizedString($view['chargeId']) && !wpsg_isSizedString($view['refundId'])) { ?>
-
- <br />
-
- <?php echo wpsg_drawForm_TextStart(); ?>
-
- <a href="<?php echo wpsg_admin_url('Order', 'view', ['action' => 'ajax', 'mod' => 'wpsg_mod_amazon_v2', 'do' => 'refund', 'edit_id' => $this->view['oOrder']->getId()], ['noheader' => '1']); ?>" class="button">
- <?php echo __('Zurückzahlen', 'wpsg'); ?>
- </a>
-
- <?php echo wpsg_drawForm_TextEnd(); ?>
-
- <?php } else if (wpsg_isSizedString($view['refundId'])) { ?>
-
- <div class="form-group form-group-text form-group-sm">
- <label class="col-sm-6 control-label" for=""><?php echo __('Erstattungsstatus', 'wpsg'); ?> [<a href="<?php
-
- echo wpsg_admin_url('Order', 'view', ['action' => 'ajax', 'mod' => 'wpsg_mod_amazon_v2', 'do' => 'updateRefund', 'edit_id' => $this->view['oOrder']->getId()], ['noheader' => '1']);
-
- ?>"><?php echo __('Status Aktualisieren', 'wpsg'); ?></a>]</label>
- <div class="col-sm-6">
- <div class="wpsg_field_wrap">
- <p class="form-control-static">
-
- <?php echo wpsg_translate(__('#1#', 'wpsg'), $view['refundState']); ?>
-
- </p>
- </div>
- </div>
- </div>
-
- <?php } ?>
diff --git a/views/mods/mod_amazon_v2/overview_button.phtml b/views/mods/mod_amazon_v2/overview_button.phtml deleted file mode 100644 index 8f2c96c..0000000 --- a/views/mods/mod_amazon_v2/overview_button.phtml +++ /dev/null @@ -1,47 +0,0 @@ -<?php
-
- /**
- *
- */
-
-?>
-
-<script async="async" src="https://static-eu.payments-amazon.com/OffAmazonPayments/de/sandbox/lpa/js/Widgets.js"></script>
-
-<div id="buy-now">JETZT kaufen</div>
-
-<script>
-
- var sellerId = '<?php echo $this->get_option('wpsg_mod_amazon_v2_seller_id'); ?>';
- var id = '<?php echo $_SESSION['wpsg_mod_amazon_v2_amazonCheckoutSessionId']; ?>';
- var buyNowBtn = document.getElementById("buy-now");
-
- buyNowBtn.addEventListener('click', function () {
-
- OffAmazonPayments.initConfirmationFlow(sellerId, id, function(confirmationFlow) {
-
- placeOrder(confirmationFlow);
-
- });
-
- });
-
- function placeOrder(confirmationFlow) {
-
- jQuery.ajax({
- url: '<?php echo $this->getUrl(wpsg_ShopController::URL_BASKET, 'wpsg_mod_amazon_v2', 'placeOrder', [], true) ?>',
-success: function (data) {
-confirmationFlow.success(); // continue Amazon Pay hosted site
-},
-error: function (data) { // called on ajax error and timeout
-confirmationFlow.error(); // abort Amazon Pay initConfirmationFlow
-// you might want to add additional error handling
-},
-timeout: "your timeout value" //specify your timeout value (for example, 3000)
-//If the ajax request takes longer than this timeout (in ms), the error callback
-//will be called
-});
-
- }
-
-</script>
\ No newline at end of file diff --git a/views/mods/mod_amazon_v2/settings_edit.phtml b/views/mods/mod_amazon_v2/settings_edit.phtml deleted file mode 100644 index da9b3a6..0000000 --- a/views/mods/mod_amazon_v2/settings_edit.phtml +++ /dev/null @@ -1,47 +0,0 @@ -<?php
-
- /**
- * Einstellungen des Moduls "AmazonPay"
- */
-
-?>
-
-<?php echo wpsg_drawForm_Input('wpsg_mod_amazon_v2_seller_id', __('Händler-ID', 'wpsg'), $this->get_option('wpsg_mod_amazon_v2_seller_id'), array('help' => 'wpsg_mod_amazon_v2_seller_id')); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_amazon_v2_store_id', __('Store ID', 'wpsg'), $this->get_option('wpsg_mod_amazon_v2_store_id'), []); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_amazon_v2_public_key_id', __('ID des öffentlichen Schlüssels / Public Key ID', 'wpsg'), $this->get_option('wpsg_mod_amazon_v2_public_key_id'), []); ?>
-<?php echo wpsg_drawForm_Upload('wpsg_mod_amazon_v2_private_key', __('Privater Schlüssel (.pem Datei)', 'wpsg')); ?>
-
-<br />
-
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_amazon_v2_sandbox', __('Sandbox Modus', 'wpsg'), $this->get_option('wpsg_mod_amazon_v2_sandbox'), array('help' => 'wpsg_mod_amazon_v2_sandbox')); ?>
-
-<script>
-
- jQuery('#wpsg_mod_amazon_v2_login').on('click', function() {
-
- if (jQuery(this).prop('checked')) {
-
- jQuery('#wpsg_mod_amazon_v2_login_1').show();
-
- } else {
-
- jQuery('#wpsg_mod_amazon_v2_login_1').hide();
-
- }
-
- });
-
-</script>
-
-<br />
-
-<?php echo wpsg_drawForm_Checkbox('wpsg_mod_amazon_v2_aktiv', __('Zahlungsart für neue Bestellungen aktiv', 'wpsg'), $this->get_option('wpsg_mod_amazon_v2_aktiv')); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_amazon_v2_name', __('Name der Zahlungsart', 'wpsg'), $this->get_option('wpsg_mod_amazon_v2_name'), array('help' => 'wpsg_mod_amazon_v2_name')); ?>
-<?php echo wpsg_drawForm_Textarea('wpsg_mod_amazon_v2_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_amazon_v2_hint'), array('help' => 'wpsg_shippay_hint')); ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_amazon_v2_subject', __('Betreff (Auf Abrechnungen für Verkäufer sichtbar)', 'wpsg'), $this->get_option('wpsg_mod_amazon_v2_subject'), array('help' => 'wpsg_mod_amazon_v2_subject')); ?>
-
-<br />
-
-<?php echo wpsg_drawForm_Input('wpsg_mod_amazon_v2_gebuehr', __('Gebühr/Rabatt', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_amazon_v2_gebuehr'), true), array('unit' => $this->get_option('wpsg_currency').' / %', 'help' => 'wpsg_shippay_gebuehr')); ?>
-<?php echo wpsg_drawForm_Select('wpsg_mod_amazon_v2_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_amazon_v2_mwst'), array('help' => 'wpsg_mod_amazon_v2_mwst')); ?>
-
|
