Skip to content

Commit

Permalink
add shipping privacy hint
Browse files Browse the repository at this point in the history
  • Loading branch information
stentrop committed May 29, 2018
1 parent e311a26 commit 01c8bd3
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 29 deletions.
12 changes: 0 additions & 12 deletions dist/plentymarketsCMStools-1.0.20.min.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/plentymarketsCMStools-1.0.20.min.js.map

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ TemplateCache["waitscreen/waitscreen.html"] = "<div id=\"PlentyWaitScreen\" clas
(function( $ )
{
// will be overridden by grunt
var version = "1.0.20";
var version = "1.0.21";

/**
* Collection of uncompiled registered factories & services.
Expand Down Expand Up @@ -5207,6 +5207,18 @@ PlentyFramework.cssClasses = {

var values = form.getFormValues();

var shippingPrivacyHintAccepted = -1;
if(typeof values.shippingPrivacyHintAccepted === 'undefined')
{
shippingPrivacyHintAccepted = -1;
}else if(values.shippingPrivacyHintAccepted.length > 0)
{
shippingPrivacyHintAccepted = 1;
}else
{
shippingPrivacyHintAccepted = 0;
}

// if not shown in layout set default 1 for mandatory fields
var params = {
TermsAndConditionsCheck : values.termsAndConditionsCheck || 0,
Expand All @@ -5216,7 +5228,8 @@ PlentyFramework.cssClasses = {
NewsletterCheck : values.newsletterCheck || 0,
KlarnaTermsAndConditionsCheck: values.klarnaTermsAndConditionsCheck || 0,
PayoneDirectDebitMandateCheck: values.payoneDirectDebitMandateCheck || 0,
PayoneInvoiceCheck : values.payoneInvoiceCheck || 0
PayoneInvoiceCheck : values.payoneInvoiceCheck || 0,
ShippingPrivacyHintAccepted : shippingPrivacyHintAccepted
};

return API.post( "/rest/checkout/placeorder/", params )
Expand Down
10 changes: 10 additions & 0 deletions dist/plentymarketsCMStools-1.0.21.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/plentymarketsCMStools-1.0.21.min.js.map

Large diffs are not rendered by default.

12 changes: 0 additions & 12 deletions dist/plentymarketsCMStools-libs-1.0.20.min.js

This file was deleted.

10 changes: 10 additions & 0 deletions dist/plentymarketsCMStools-libs-1.0.21.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "plentymarketsCMStools",
"license": "AGPL-3.0",
"version": "1.0.20",
"version": "1.0.21",
"repository": "https://github.com/plentymarkets/plenty-cms-library.git",
"devDependencies": {
"grunt": "^0.4.5",
Expand Down
15 changes: 14 additions & 1 deletion src/services/CheckoutService.js
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,18 @@

var values = form.getFormValues();

var shippingPrivacyHintAccepted = -1;
if(typeof values.shippingPrivacyHintAccepted === 'undefined')
{
shippingPrivacyHintAccepted = -1;
}else if(values.shippingPrivacyHintAccepted.length > 0)
{
shippingPrivacyHintAccepted = 1;
}else
{
shippingPrivacyHintAccepted = 0;
}

// if not shown in layout set default 1 for mandatory fields
var params = {
TermsAndConditionsCheck : values.termsAndConditionsCheck || 0,
Expand All @@ -643,7 +655,8 @@
NewsletterCheck : values.newsletterCheck || 0,
KlarnaTermsAndConditionsCheck: values.klarnaTermsAndConditionsCheck || 0,
PayoneDirectDebitMandateCheck: values.payoneDirectDebitMandateCheck || 0,
PayoneInvoiceCheck : values.payoneInvoiceCheck || 0
PayoneInvoiceCheck : values.payoneInvoiceCheck || 0,
ShippingPrivacyHintAccepted : shippingPrivacyHintAccepted
};

return API.post( "/rest/checkout/placeorder/", params )
Expand Down

0 comments on commit 01c8bd3

Please sign in to comment.