From 3ea4ab8a1abbda414b19c18fd06fa3890a2a905f Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Mon, 28 Jun 2010 11:28:16 -0700 Subject: [PATCH] Fix many missing and wrong Cart template variables. Kudos to Bart Jol for tracking them down. --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Help/Shop.pm | 214 ++++++++++++++++++++++++++++---- lib/WebGUI/i18n/English/Shop.pm | 104 ++++++++++++++-- 3 files changed, 283 insertions(+), 36 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index e34eb34e2..9695044e3 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -3,6 +3,7 @@ - fixed #11656: Thingy: Select list fields are not sorted properly - fixed #11662: yahooapis.com sourced links - fixed #11658: tmpl var message missing in template help for the cart + - fixed: many other template variables for the cart - fixed #11628: Message Board: Last Post doesn't show up in CS Thread List - fixed #11646: Post and Thread Last Post - fixed #11626: Duplicate messages from Collab Systems diff --git a/lib/WebGUI/Help/Shop.pm b/lib/WebGUI/Help/Shop.pm index 5be51fac5..ed52cf3a2 100644 --- a/lib/WebGUI/Help/Shop.pm +++ b/lib/WebGUI/Help/Shop.pm @@ -72,6 +72,10 @@ our $HELP = { name => "quantity", description => "quantity help", }, + { + name => "removeBox", + description => "removeBox help", + }, { name => "dateAdded", description => "dateAdded help", @@ -102,30 +106,13 @@ our $HELP = { description => "price help", }, { - name => "removeButton", - description => "removeButton help", - required => 1, - }, - { - name => "shipToButton", - description => "item shipToButton help", + name => "itemAddressChooser", + description => "itemAddressChooser help", }, { name => "shippingAddress", description => "shippingAddress help", }, - { - name => "isCashier", - }, - { - name => "posLookupForm", - }, - { - name => "posUsername", - }, - { - name => "posUserId", - }, ], }, { @@ -157,10 +144,26 @@ our $HELP = { name => "continueShoppingButton", description => "continueShoppingButton help", }, + { + name => "minimumCartAmount", + description => "minimumCartAmount help", + }, { name => "subtotalPrice", description => "subtotalPrice help", }, + { + name => "shippingAddressChooser", + description => "shippingAddressChooser help", + }, + { + name => "billingAddressChooser", + description => "billingAddressChooser help", + }, + { + name => "sameShippingAsBilling", + description => "sameShippingAsBilling help", + }, { name => "shippingPrice", description => "shippingPrice help", @@ -169,19 +172,27 @@ our $HELP = { name => "tax", description => "tax help", }, + { + name => "userIsVisitor", + description => "userIsVisitor help", + }, + { + name => "shippableItemsInCart", + }, { name => "hasShippingAddress", description => "hasShippingAddress help", }, - { - name => "shippingAddress", - description => "shippingAddress help", - }, { name => "shippingOptions", description => "shippingOptions help", required => 1, }, + { + name => "paymentOptions", + description => "paymentOptions help", + required => 1, + }, { name => "totalPrice", description => "totalPrice help", @@ -195,6 +206,158 @@ our $HELP = { name => "inShopCreditDeduction", description => "inShopCreditDeduction help", }, + { + name => "isCashier", + }, + { + name => "posLookupForm", + }, + { + name => "posUsername", + }, + { + name => "posUserId", + }, + { + name => "loginFormHeader", + description => "loginFormHeader help", + required => 1, + }, + { + name => "loginFormFooter", + description => "loginFormFooter help", + required => 1, + }, + { + name => "loginFormUsername", + description => "loginFormUsername help", + required => 1, + }, + { + name => "loginFormPassword", + description => "loginFormPassword help", + required => 1, + }, + { + name => "loginFormButton", + description => "loginFormButton help", + required => 1, + }, + { + name => "registerLink", + description => "registerLink help", + required => 1, + }, + { + name => "billing_address1Field", + description => "address1Field help", + required => 1, + }, + { + name => "billing_address2Field", + description => "address2Field help", + required => 1, + }, + { + name => "billing_address3Field", + description => "address3Field help", + required => 1, + }, + { + name => "billing_labelField", + description => "address labelField help", + required => 1, + }, + { + name => "billing_nameField", + description => "address nameField help", + required => 1, + }, + { + name => "billing_cityField", + description => "cityField help", + required => 1, + }, + { + name => "billing_stateField", + description => "stateField help", + required => 1, + }, + { + name => "billing_countryField", + description => "countryField help", + required => 1, + }, + { + name => "billing_codeField", + description => "codeField help", + required => 1, + }, + { + name => "billing_phoneNumberField", + description => "phoneNumberField help", + required => 1, + }, + { + name => "billing_emailField", + description => "emailField help", + required => 1, + }, + { + name => "shipping_address1Field", + description => "address1Field help", + required => 1, + }, + { + name => "shipping_address2Field", + description => "address2Field help", + required => 1, + }, + { + name => "shipping_address3Field", + description => "address3Field help", + required => 1, + }, + { + name => "shipping_labelField", + description => "address labelField help", + required => 1, + }, + { + name => "shipping_nameField", + description => "address nameField help", + required => 1, + }, + { + name => "shipping_cityField", + description => "cityField help", + required => 1, + }, + { + name => "shipping_stateField", + description => "stateField help", + required => 1, + }, + { + name => "shipping_countryField", + description => "countryField help", + required => 1, + }, + { + name => "shipping_codeField", + description => "codeField help", + required => 1, + }, + { + name => "shipping_phoneNumberField", + description => "phoneNumberField help", + required => 1, + }, + { + name => "shipping_emailField", + description => "emailField help", + required => 1, + }, ], related => [ { @@ -384,6 +547,11 @@ our $HELP = { description => "phoneNumberField help", required => 1, }, + { + name => "emailField", + description => "emailField help", + required => 1, + }, ], related => [ { diff --git a/lib/WebGUI/i18n/English/Shop.pm b/lib/WebGUI/i18n/English/Shop.pm index 11ffd81ba..b0ec35b96 100644 --- a/lib/WebGUI/i18n/English/Shop.pm +++ b/lib/WebGUI/i18n/English/Shop.pm @@ -165,18 +165,6 @@ our $I18N = { context => q|a help description|, }, - 'removeButton help' => { - message => q|Clicking this button will remove the item from the cart.|, - lastUpdated => 0, - context => q|a help description|, - }, - - 'item shipToButton help' => { - message => q|Clicking this button will set an alternate address as the destination of this item.|, - lastUpdated => 0, - context => q|a help description|, - }, - 'shippingAddress help' => { message => q|The HTML formatted address to ship to.|, lastUpdated => 0, @@ -249,6 +237,12 @@ our $I18N = { context => q|a help description|, }, + 'paymentOptions help' => { + message => q|A select list containing all the configured payment options for this order.|, + lastUpdated => 0, + context => q|a help description|, + }, + 'inShopCreditAvailable help' => { message => q|The amount of in-shop credit the user has.|, lastUpdated => 0, @@ -453,6 +447,12 @@ our $I18N = { context => q|a help description|, }, + 'emailField help' => { + message => q|A field to contain the email address for this address.|, + lastUpdated => 0, + context => q|a help description|, + }, + 'phoneNumber help' => { message => q|A phone number for this address.|, lastUpdated => 0, @@ -1788,7 +1788,7 @@ our $I18N = { 'shippableItemsInCart' => { message => q|A boolean which will be true if any item in the cart requires shipping.|, lastUpdated => 0, - context => q|form label for the cart. Allows user to choose a payment method. Bart Jol for Minister in 2012!| + context => q|Template variable help.| }, 'no billing address' => { @@ -1911,6 +1911,84 @@ our $I18N = { context => q|Cart error message| }, + 'minimumCartAmount help' => { + message => q|The minimum cart amount, from the settings, formatted to two decimal places.|, + lastUpdated => 0, + context => q|Template variable help| + }, + + 'userIsVisitor help' => { + message => q|A boolean which will be true if the currrent user is Visitor|, + lastUpdated => 0, + context => q|Template variable help| + }, + + 'removeBox help' => { + message => q|A checkbox that will allow this item to be removed from the cart.|, + lastUpdated => 0, + context => q|Template variable help| + }, + + 'itemAddressChooser help' => { + message => q|A dropdown for choosing an address to ship an individual item in the cart to, enabling per-item shipping.|, + lastUpdated => 0, + context => q|Template variable help| + }, + + 'shippingAddressChooser help' => { + message => q|A dropdown for choosing a default shipping address for all items in the cart. Also contains actions for editing and adding new addresses.|, + lastUpdated => 0, + context => q|Template variable help| + }, + + 'billingAddressChooser help' => { + message => q|A dropdown for choosing a default billing address.|, + lastUpdated => 0, + context => q|Template variable help| + }, + + 'sameShippingAsBilling help' => { + message => q|A checkbox to tell the cart that the user wants to use the same shipping address, as their billing address.|, + lastUpdated => 0, + context => q|Template variable help| + }, + + 'loginFormHeader help' => { + message => q|The start of the form to help a user log in. This variable will only be populated if the current user is Visitor.|, + lastUpdated => 0, + context => q|Template variable help| + }, + + 'loginFormFooter help' => { + message => q|The end of the form to help a user log in. This variable will only be populated if the current user is Visitor.|, + lastUpdated => 0, + context => q|Template variable help| + }, + + 'loginFormUsername help' => { + message => q|A text box for the user to enter in their name. This variable will only be populated if the current user is Visitor.|, + lastUpdated => 0, + context => q|Template variable help| + }, + + 'loginFormPassword help' => { + message => q|A text box for the user to enter in their password, obscured. This variable will only be populated if the current user is Visitor.|, + lastUpdated => 0, + context => q|Template variable help| + }, + + 'loginFormButton help' => { + message => q|The end of the form to help a user log in. This variable will only be populated if the current user is Visitor.|, + lastUpdated => 0, + context => q|Template variable help| + }, + + 'registerLink help' => { + message => q|A link for a user to register an account on this site, if they do not already have one. This variable will only be populated if the current user is Visitor.|, + lastUpdated => 0, + context => q|Template variable help| + }, + }; 1;