The repo for Purrform's main BigCommerce store.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: conditionally hide payment buttons for overdue orders or low balance

+13 -11
+1 -1
config.json
··· 1 1 { 2 - "name": "trader credit frontend", 2 + "name": "trader credit frontend v2", 3 3 "version": "6.10.0", 4 4 "template_engine": "handlebars_v4", 5 5 "meta": {
+12 -10
templates/pages/checkout.html
··· 1019 1019 }); 1020 1020 1021 1021 1022 - // Hide the payment button if there is an overdue order or low balance 1023 - ready('#fakeButton', (element) => { 1024 - element.remove() 1025 - }); 1022 + if (hasOverdue || lowBalance) { 1023 + // Hide the payment button if there is an overdue order or low balance 1024 + ready('#fakeButton', (element) => { 1025 + element.remove() 1026 + }); 1026 1027 1027 - ready('#proceedButton', (element) => { 1028 - element.style.display = hasOverdue || lowBalance ? 'none' : 'block'; 1029 - }); 1028 + ready('#proceedButton', (element) => { 1029 + element.style.display = hasOverdue || lowBalance ? 'none' : 'block'; 1030 + }); 1030 1031 1031 - ready('#checkoutPaymentContinue', (element) => { 1032 - element.style.display = hasOverdue || lowBalance ? 'none' : 'block'; 1033 - }); 1032 + ready('#checkoutPaymentContinue', (element) => { 1033 + element.style.display = hasOverdue || lowBalance ? 'none' : 'block'; 1034 + }); 1035 + } 1034 1036 } 1035 1037 } 1036 1038 } catch (error) {