-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from Progi1984/supportPSCashOndelivery
Added data & pages for using in `ps_cashondelivery`
- Loading branch information
Showing
48 changed files
with
3,946 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
help: ## Display this help menu | ||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||
|
||
check: | ||
npm run build | ||
|
||
test: ## Build and copy to the dependencies directory for the project | ||
rm dist -rf | ||
npm run build | ||
rm $(filter-out $@,$(MAKECMDGOALS))/tests/UI/node_modules/@prestashop-core/ui-testing/dist/ -r | ||
cp dist $(filter-out $@,$(MAKECMDGOALS))/tests/UI/node_modules/@prestashop-core/ui-testing/ -r | ||
cp package.json $(filter-out $@,$(MAKECMDGOALS))/tests/UI/node_modules/@prestashop-core/ui-testing/ | ||
|
||
.DEFAULT_GOAL := help |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import CountryData from '@data/faker/country'; | ||
|
||
export default { | ||
france: new CountryData({ | ||
id: 8, | ||
name: 'France', | ||
isoCode: 'FR', | ||
callPrefix: '33', | ||
zone: 'Europe', | ||
active: true, | ||
}), | ||
netherlands: new CountryData({ | ||
id: 13, | ||
name: 'Netherlands', | ||
isoCode: 'NL', | ||
callPrefix: '31', | ||
zone: 'Europe', | ||
active: false, | ||
}), | ||
unitedKingdom: new CountryData({ | ||
id: 17, | ||
name: 'United Kingdom', | ||
isoCode: 'GB', | ||
callPrefix: '44', | ||
zone: 'Europe', | ||
active: false, | ||
}), | ||
germany: new CountryData({ | ||
id: 1, | ||
name: 'Germany', | ||
isoCode: 'DE', | ||
callPrefix: '49', | ||
zone: 'Europe', | ||
active: false, | ||
}), | ||
afghanistan: new CountryData({ | ||
id: 231, | ||
name: 'Afghanistan', | ||
isoCode: 'AF', | ||
callPrefix: '93', | ||
zone: 'Asia', | ||
active: false, | ||
}), | ||
unitedStates: new CountryData({ | ||
id: 21, | ||
name: 'United States', | ||
isoCode: 'US', | ||
callPrefix: '1', | ||
zone: 'North America', | ||
active: false, | ||
}), | ||
canada: new CountryData({ | ||
id: 4, | ||
name: 'Canada', | ||
isoCode: 'CA', | ||
callPrefix: '1', | ||
zone: 'North America', | ||
active: false, | ||
}), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
import CurrencyData from '@data/faker/currency'; | ||
|
||
export default { | ||
euro: new CurrencyData({ | ||
name: 'Euro', | ||
frName: 'euro', | ||
symbol: '€', | ||
isoCode: 'EUR', | ||
exchangeRate: 1, | ||
decimals: 2, | ||
enabled: true, | ||
}), | ||
mad: new CurrencyData({ | ||
name: 'Moroccan Dirham', | ||
frName: 'dirham marocain', | ||
symbol: 'MAD', | ||
isoCode: 'MAD', | ||
exchangeRate: 10.560000, | ||
decimals: 2, | ||
enabled: true, | ||
}), | ||
toman: new CurrencyData({ | ||
name: 'Iranian toman', | ||
frName: 'Toman iranien', | ||
symbol: 'TMN', | ||
isoCode: 'TMN', | ||
exchangeRate: 4666.539, | ||
decimals: 2, | ||
enabled: true, | ||
}), | ||
chileanPeso: new CurrencyData({ | ||
name: 'Chilean Peso', | ||
frName: 'peso chilien', | ||
symbol: '$', | ||
isoCode: 'CLP', | ||
exchangeRate: 862.172868, | ||
decimals: 0, | ||
enabled: true, | ||
}), | ||
dzd: new CurrencyData({ | ||
name: 'Algerian Dinar', | ||
frName: 'dinar algérien', | ||
symbol: 'DZD', | ||
isoCode: 'DZD', | ||
exchangeRate: 162.6, | ||
decimals: 2, | ||
enabled: true, | ||
}), | ||
tnd: new CurrencyData({ | ||
name: 'Tunisian Dinar', | ||
frName: 'dinar tunisien', | ||
symbol: 'TND', | ||
isoCode: 'TND', | ||
exchangeRate: 3.29, | ||
decimals: 3, | ||
enabled: true, | ||
}), | ||
try: new CurrencyData({ | ||
name: 'Turkish Lira', | ||
frName: 'livre turque', | ||
symbol: '₺', | ||
isoCode: 'TRY', | ||
exchangeRate: 9.08, | ||
decimals: 2, | ||
enabled: true, | ||
}), | ||
usd: new CurrencyData({ | ||
name: 'US Dollar', | ||
frName: 'dollar des États-Unis', | ||
symbol: '$', | ||
isoCode: 'USD', | ||
exchangeRate: 1.22, | ||
decimals: 2, | ||
enabled: true, | ||
}), | ||
aed: new CurrencyData({ | ||
name: 'United Arab Emirates Dirham', | ||
frName: 'dirham des Émirats arabes unis', | ||
symbol: 'AED', | ||
isoCode: 'AED', | ||
exchangeRate: 4.51, | ||
decimals: 2, | ||
enabled: true, | ||
}), | ||
lyd: new CurrencyData({ | ||
name: 'Libyan Dinar', | ||
frName: 'dinar libyen', | ||
symbol: 'LYD', | ||
isoCode: 'LYD', | ||
exchangeRate: 5.45, | ||
decimals: 3, | ||
enabled: true, | ||
}), | ||
lsl: new CurrencyData({ | ||
name: 'Lesotho Loti', | ||
frName: 'loti lesothan', | ||
symbol: 'LSL', | ||
isoCode: 'LSL', | ||
exchangeRate: 18.06, | ||
decimals: 2, | ||
enabled: true, | ||
}), | ||
all: new CurrencyData({ | ||
name: 'Albanian Lek', | ||
frName: 'lek albanais', | ||
symbol: 'ALL', | ||
isoCode: 'ALL', | ||
exchangeRate: 123.38, | ||
decimals: 0, | ||
enabled: true, | ||
}), | ||
gbp: new CurrencyData({ | ||
name: 'British Pound', | ||
frName: 'livre sterling', | ||
symbol: 'GBP', | ||
isoCode: 'GBP', | ||
exchangeRate: 0.87, | ||
decimals: 2, | ||
enabled: true, | ||
}), | ||
jpy: new CurrencyData({ | ||
name: 'Japanese Yen', | ||
frName: 'yen japonais', | ||
symbol: 'JPY', | ||
isoCode: 'JPY', | ||
exchangeRate: 140.59, | ||
decimals: 0, | ||
enabled: true, | ||
}), | ||
pyg: new CurrencyData({ | ||
name: 'Paraguayan Guarani', | ||
frName: 'guaraní paraguayen', | ||
symbol: 'PYG', | ||
isoCode: 'PYG', | ||
exchangeRate: 7942.22, | ||
decimals: 0, | ||
enabled: true, | ||
}), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
import OrderStatusData from '@data/faker/orderStatus'; | ||
|
||
export default { | ||
awaitingCheckPayment: new OrderStatusData({ | ||
id: 1, | ||
name: 'Awaiting check payment', | ||
sendEmailOn: true, | ||
deliveryOn: false, | ||
invoiceOn: false, | ||
emailTemplate: 'cheque', | ||
}), | ||
paymentAccepted: new OrderStatusData({ | ||
id: 2, | ||
name: 'Payment accepted', | ||
sendEmailOn: true, | ||
deliveryOn: false, | ||
invoiceOn: true, | ||
emailTemplate: 'payment', | ||
}), | ||
processingInProgress: new OrderStatusData({ | ||
id: 3, | ||
name: 'Processing in progress', | ||
sendEmailOn: true, | ||
deliveryOn: true, | ||
invoiceOn: true, | ||
emailTemplate: 'preparation', | ||
}), | ||
shipped: new OrderStatusData({ | ||
id: 4, | ||
name: 'Shipped', | ||
sendEmailOn: true, | ||
deliveryOn: true, | ||
invoiceOn: true, | ||
emailTemplate: 'shipped', | ||
}), | ||
delivered: new OrderStatusData({ | ||
id: 5, | ||
name: 'Delivered', | ||
sendEmailOn: false, | ||
deliveryOn: true, | ||
invoiceOn: true, | ||
emailTemplate: '', | ||
}), | ||
canceled: new OrderStatusData({ | ||
id: 6, | ||
name: 'Canceled', | ||
sendEmailOn: true, | ||
deliveryOn: false, | ||
invoiceOn: false, | ||
emailTemplate: 'order_canceled', | ||
}), | ||
refunded: new OrderStatusData({ | ||
id: 7, | ||
name: 'Refunded', | ||
sendEmailOn: true, | ||
deliveryOn: false, | ||
invoiceOn: true, | ||
emailTemplate: 'refund', | ||
}), | ||
paymentError: new OrderStatusData({ | ||
id: 8, | ||
name: 'Payment error', | ||
sendEmailOn: true, | ||
deliveryOn: false, | ||
invoiceOn: false, | ||
emailTemplate: 'payment_error', | ||
}), | ||
awaitingBankWire: new OrderStatusData({ | ||
id: 10, | ||
name: 'Awaiting bank wire payment', | ||
sendEmailOn: true, | ||
deliveryOn: false, | ||
invoiceOn: false, | ||
emailTemplate: 'bankwire', | ||
}), | ||
awaitingCashOnDelivery: new OrderStatusData({ | ||
id: 13, | ||
name: 'Awaiting Cash On Delivery validation', | ||
sendEmailOn: false, | ||
deliveryOn: false, | ||
invoiceOn: false, | ||
emailTemplate: 'cashondelivery', | ||
}), | ||
onBackorderNotPaid: new OrderStatusData({ | ||
id: 12, | ||
name: 'On backorder (not paid)', | ||
sendEmailOn: true, | ||
deliveryOn: false, | ||
invoiceOn: false, | ||
emailTemplate: 'outofstock', | ||
}), | ||
onBackorderPaid: new OrderStatusData({ | ||
id: 9, | ||
name: 'On backorder (paid)', | ||
sendEmailOn: true, | ||
deliveryOn: false, | ||
invoiceOn: true, | ||
emailTemplate: 'outofstock', | ||
}), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import PaymentMethodData from '@data/faker/paymentMethod'; | ||
|
||
export default { | ||
cashOnDelivery: new PaymentMethodData({ | ||
moduleName: 'ps_cashondelivery', | ||
name: 'Cash on delivery (COD)', | ||
displayName: 'Cash on delivery (COD)', | ||
}), | ||
checkPayment: new PaymentMethodData({ | ||
moduleName: 'ps_checkpayment', | ||
name: 'Payment by check', | ||
displayName: 'Payments by check', | ||
}), | ||
wirePayment: new PaymentMethodData({ | ||
moduleName: 'ps_wirepayment', | ||
name: 'Bank wire', | ||
displayName: 'Bank transfer', | ||
}), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import StateData from '@data/faker/state'; | ||
|
||
export default { | ||
california: new StateData({ | ||
id: 8, | ||
name: 'California', | ||
isoCode: 'CA', | ||
country: 'United States', | ||
zone: 'North America', | ||
status: true, | ||
}), | ||
bari: new StateData({ | ||
id: 134, | ||
name: 'Bari', | ||
isoCode: 'BA', | ||
country: 'Italy', | ||
zone: 'Europe', | ||
status: true, | ||
}), | ||
bihar: new StateData({ | ||
id: 8, | ||
name: 'Bihar', | ||
isoCode: 'BR', | ||
country: 'India', | ||
zone: 'Asia', | ||
status: true, | ||
}), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import TaxData from '@data/faker/tax'; | ||
|
||
export default { | ||
DefaultFrTax: new TaxData({ | ||
id: 1, | ||
name: 'TVA FR 20%', | ||
rate: '20', | ||
enabled: true, | ||
}), | ||
VatUkTax: new TaxData({ | ||
id: 15, | ||
name: 'VAT UK 20%', | ||
rate: '20', | ||
enabled: true, | ||
}), | ||
}; |
Oops, something went wrong.