From ec7e5b35cda51c189501c1a1b8e7b0bbbda5b9a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Fri, 16 Jul 2021 13:27:43 +0800 Subject: Remove whitespaces --- catalog.cfg | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/catalog.cfg b/catalog.cfg index 8974467..aab8c08 100644 --- a/catalog.cfg +++ b/catalog.cfg @@ -144,7 +144,7 @@ ImageDir __IMAGE_DIR__/ ## Here we pick up the region variables like LEFTONLY_TOP and LEFTONLY_BOTTOM. ## ## Commenting; new variables TOP and BOTTOM will be defined in variable directory. -## No longer going to need multiple leftright_top, leftonly_top, etc; will be +## No longer going to need multiple leftright_top, leftonly_top, etc; will be ## defined in "display_class" in each page. #DirConfig Variable templates/regions @@ -227,7 +227,7 @@ UserTrack no # during your testing. RobotLimit 100 -# We also count the number of accesses from the same IP address. More than +# We also count the number of accesses from the same IP address. More than # RobotLimit accesses within a one hour period will cause a Forbidden result. # Uncomment the following line to change the 1 hour period to 30 minutes. # Limit ip_session_expire 30 @@ -426,11 +426,11 @@ FormIgnore mv_handling # # -# Along these lines further, for better integrity and less chance of a +# Along these lines further, for better integrity and less chance of a # user screwing up your order routes: # Note that __ORDER_ROUTES__ is empty by default, default Route "default" # is used with cascades -FormIgnore mv_order_route +FormIgnore mv_order_route ## This route places the order entry in the database. If you don't ## have an inventory table (or a userdb table for that matter) make @@ -572,14 +572,14 @@ EOR AutoModifier pricing:price_group -# +# # If the user is not a dealer (or not logged in) then pricing just comes # from "price". Any quantity discounts will be set in the qN fields in the # database, and are separate from dealer quantity discounts. -# +# Profile dealer < < < Date: Fri, 16 Jul 2021 13:28:19 +0800 Subject: Capitalise --- catalog.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalog.cfg b/catalog.cfg index aab8c08..37aa848 100644 --- a/catalog.cfg +++ b/catalog.cfg @@ -538,7 +538,7 @@ Profiles include/profiles/*.* ## Sets the default as to whether items are aggregated or ordered ## on separate lines. Can be overridden with mv_separate_items=0 in ## URL or form. -SeparateItems no +SeparateItems No #==========================================================================# -- cgit v1.2.3 From f97027b6a634e3a89783fbf34e6ddec26884c278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Fri, 16 Jul 2021 13:28:35 +0800 Subject: Strap's default prevents from logging in? --- catalog.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalog.cfg b/catalog.cfg index 37aa848..87aeebe 100644 --- a/catalog.cfg +++ b/catalog.cfg @@ -278,7 +278,7 @@ UserDB default from_plain 1 UserDB default bcrypt_pepper __BCRYPT_PEPPER__ # Set to 1 to make the username and password case-insensitive -UserDB default ignore_case 0 +UserDB default ignore_case 1 # Change a field to something that doesn't conflict in MySQL UserDB default time_field mod_time -- cgit v1.2.3 From eed1ca92362c67ee80f015c17d4e0eb17f240611 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Fri, 16 Jul 2021 15:35:33 +0800 Subject: address2 is the one used for district --- include/checkout/shipping_address | 4 ++-- include/profiles/profiles.order | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/checkout/shipping_address b/include/checkout/shipping_address index 2a6c2d1..1b23086 100644 --- a/include/checkout/shipping_address +++ b/include/checkout/shipping_address @@ -43,12 +43,12 @@ return $options;
- [perl products] my $options = ''; for my $district (@{$Tag->query({sql => "SELECT district FROM anteraja WHERE city='" . $Tag->value({keep => 1, filter => encode_entities, name => 'city'}) . "' GROUP BY district ORDER BY district"})}) { $options .= qq( - "; + "; } return $options; [/perl] diff --git a/include/profiles/profiles.order b/include/profiles/profiles.order index 10c9726..fa02037 100644 --- a/include/profiles/profiles.order +++ b/include/profiles/profiles.order @@ -2,7 +2,7 @@ __NAME__ bank_transfer fname=required address1=required -address3=required +address2=required city=required state=required &fatal=yes -- cgit v1.2.3 From 5638731b0464e5b12f7c04fba3e0010ca1f5fca6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Fri, 16 Jul 2021 15:37:59 +0800 Subject: Default shipping Anteraja Regular --- products/ship/shipping.asc | 2 +- products/variable.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/products/ship/shipping.asc b/products/ship/shipping.asc index fab032e..9af6f2e 100644 --- a/products/ship/shipping.asc +++ b/products/ship/shipping.asc @@ -1,3 +1,3 @@ -anteraja: Anteraja Regular +anteraja_reg: Anteraja Regular crit weight cost f [pikul_cost company=0 origin='@_ANTERAJA_ORIGIN_@' district='[evalue address3]' city='[evalue city]' province='[evalue state]' weight=@@TOTAL@@ service='REG'] diff --git a/products/variable.txt b/products/variable.txt index 1e7e3b0..c5281be 100644 --- a/products/variable.txt +++ b/products/variable.txt @@ -78,7 +78,7 @@ SECURE_SERVER https://__MVC_SERVERNAME__ Directories and Paths SERVER_NAME __MVC_SERVERNAME__ Directories and Paths SETTLE_TRANSACTION Payment SHIP_DEFAULT_COUNTRY ID Shipping -SHIP_DEFAULT_MODE anteraja Shipping +SHIP_DEFAULT_MODE anteraja_reg Shipping SHIP_FLAT_DOM_RATE 5 Shipping SHIP_FLAT_INTL_RATE 10 Shipping SQLDSN __MVC_SQLDSN__ Database -- cgit v1.2.3 From 8e597aa6979cc414c64224ef1f8c452a4ee78ad5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Fri, 16 Jul 2021 15:39:11 +0800 Subject: Origin is set in the template tag --- config/pikul_cost.tag | 19 +++++++++++++------ products/ship/shipping.asc | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/config/pikul_cost.tag b/config/pikul_cost.tag index 75e84b9..eb99dde 100644 --- a/config/pikul_cost.tag +++ b/config/pikul_cost.tag @@ -1,21 +1,28 @@ -UserTag pikul_cost Order company origin district city province weight service +UserTag pikul_cost Order company service district city province weight UserTag pikul_cost Routine <{PIKUL_ANTERAJA}) { @provisions = ( "$Global::Variable->{ANTERAJA_BASE_PATH}", "$Global::Variable->{ANTERAJA_ACCESS_KEY_ID}", "$Global::Variable->{ANTERAJA_SECRET_ACCESS_KEY}" ); + $origin = $::Variable->{ANTERAJA_ORIGIN}; $table = 'anteraja'; } use Pikul; Pikul::init($company, \@provisions); - my $cost = Pikul::cost($origin, $Tag->query({sql => "SELECT code FROM $table WHERE \ - district='$district' AND city='$city' AND province='$province'", - wantarray => 1})->[0]->[0] || '', $weight, $service); + my $cost = Pikul::cost( + $origin, + $Tag->query({ + sql => "SELECT code FROM $table WHERE district='$district' AND \ + city='$city' AND province='$province'", + wantarray => 1 + })->[0]->[0] || '', + $weight, + $service); Pikul::cleanup(); return $cost; } diff --git a/products/ship/shipping.asc b/products/ship/shipping.asc index 9af6f2e..cf98af7 100644 --- a/products/ship/shipping.asc +++ b/products/ship/shipping.asc @@ -1,3 +1,3 @@ anteraja_reg: Anteraja Regular crit weight - cost f [pikul_cost company=0 origin='@_ANTERAJA_ORIGIN_@' district='[evalue address3]' city='[evalue city]' province='[evalue state]' weight=@@TOTAL@@ service='REG'] + cost f [pikul_cost company=__PIKUL_ANTERAJA__ service='REG' district='[evalue address2]' city='[evalue city]' province='[evalue state]' weight=@@TOTAL@@] -- cgit v1.2.3 From ef97980def513ed45831a607b56aa304af637dbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Sat, 17 Jul 2021 10:42:45 +0800 Subject: Use a name scheme that's easy to split lowercasetablename_PreservedCaseServiceName --- pages/ord/checkout.html | 2 +- products/ship/shipping.asc | 2 +- products/variable.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/ord/checkout.html b/pages/ord/checkout.html index 27d3ebf..cfcab31 100644 --- a/pages/ord/checkout.html +++ b/pages/ord/checkout.html @@ -85,7 +85,7 @@
- +