feat(settings): unify settings and ui-texts with canonical aliases, add PriceInput thousand separators, and synchronize financial endpoints
Deploy Canina / deploy (push) Successful in 1m46s
Deploy Canina / deploy (push) Successful in 1m46s
This commit is contained in:
1 parent
45c9db133c
commit
b3c60a1a7d
17 files changed
+79340
-78724
No files matched your search
@@ -72,13 +72,16 @@ export default function CheckoutPage() {
|
||||
|
||||
const roundStep = Number(useSettingsStore((state) => state.getText('CHARITY_ROUND_STEP', '10000'))) || 10000;
|
||||
const shippingFeeSetting = useSettingsStore((state) => state.getText('shipping_fee', '0'));
|
||||
const shippingFee = Number(shippingFeeSetting) || 0;
|
||||
const baseShippingFee = Number(shippingFeeSetting) || 0;
|
||||
const freeThreshold = Number(useSettingsStore((state) => state.getText('free_shipping_threshold', '2000000'))) || 0;
|
||||
const subtotal = getSubtotal();
|
||||
const shippingFee = (freeThreshold > 0 && subtotal >= freeThreshold) ? 0 : baseShippingFee;
|
||||
|
||||
const isCardToCardEnabled = useSettingsStore((state) =>
|
||||
state.getBoolean('PAY_GATEWAY_CARD_ENABLE', true) &&
|
||||
state.getBoolean('cardToCardEnabled', true) &&
|
||||
state.getBoolean('payment_card_to_card_enabled', true)
|
||||
);
|
||||
const subtotal = getSubtotal();
|
||||
const remainder = subtotal % roundStep;
|
||||
const roundUpDiff = remainder === 0 ? roundStep : roundStep - remainder;
|
||||
|
||||
|
||||
Reference in new issue
Block a user