vendrhub / vendr-checkout

A ready made checkout flow for Vendr, the eCommerce solution for Umbraco v8+
https://vendr.net/add-ons/vendr-checkout/
MIT License
14 stars 17 forks source link

List of keys for Dictionary #28

Closed wr-dev closed 2 years ago

wr-dev commented 2 years ago

Hi Matt

Using Vendr Checkout for the first time.

Would you be able to share the Dictionary Keys that can be used, as they don't seem to have been installed with the package, or via install in the dashboard.

Umbraco 8.17.1 Vendr 2.0.5 Vendr Checkout 2.0.1

wr-dev commented 2 years ago

There was also a couple of bugs in ~/App_Plugins/VendrCheckout/views/partials/VendrCheckoutPrevNext.cshtml

    else if (backPage != null)
    {
        <div><a href="@(backPage.Url())" class="text-@(themeColor) hover:text-gray-900 hover:underline"><i class="fa fa-angle-left"></i> @string.Format(Umbraco.GetDictionaryValue("VendrCheckout.Navigation.ReturnTo", "Return to {0}"), backPage.Name)</a></div>
    }

No {0} in fallback, and on this one, it was using prevStep not backPage in the string.Format

mattbrailsford commented 2 years ago

Hey @wr-dev

I don't think we create the dictionary keys ourselves as they are just here to allow them to be replaced, but the fallback text will generally be used.

I don't have a full list of the keys supported, but you can probably do a search in the project for Umbraco.GetDictionaryValue and I'm sure you will find them all.

I've updated the format strings to add the {0} 👍 (will push these out in the next release)

mattbrailsford commented 2 years ago

After a quick review, I think this should be all the keys

VendrCheckout.OrderInfo.ContactInformation
VendrCheckout.OrderInfo.BillingInformation
VendrCheckout.OrderInfo.ShippingInformation

VendrCheckout.OrderSummary.ShowSummary
VendrCheckout.OrderSummary.HideSummary
VendrCheckout.OrderSummary.Subtotal
VendrCheckout.OrderSummary.ShippingVia {0} = Shipping Method Name
VendrCheckout.OrderSummary.PaymentVia {0} = Payment Method Name
VendrCheckout.OrderSummary.Discounts
VendrCheckout.OrderSummary.Tax
VendrCheckout.OrderSummary.GiftCard
VendrCheckout.OrderSummary.Total

VendrCheckout.Information.DiscountGiftCode
VendrCheckout.Information.Apply
VendrCheckout.Information.ContactInformation
VendrCheckout.Information.Email
VendrCheckout.Information.MarketingOptIn
VendrCheckout.Information.BillingAddress
VendrCheckout.Information.ShippingAddress
VendrCheckout.Information.FirstName
VendrCheckout.Information.LastName
VendrCheckout.Information.Address1
VendrCheckout.Information.Address2
VendrCheckout.Information.City
VendrCheckout.Information.Country
VendrCheckout.Information.Region
VendrCheckout.Information.Telephone
VendrCheckout.Information.ZipCode
VendrCheckout.Information.ShippingSameAsBilling
VendrCheckout.Information.Comments
VendrCheckout.Information.EnterComments

VendrCheckout.ShippingMethod

VendrCheckout.PaymentMethod
VendrCheckout.PaymentMethod.NothingToPay

VendrCheckout.ReviewOrder.AcceptTerms

VendrCheckout.Confirmation.ThankYou {0} = Order Number
VendrCheckout.Confirmation.ConfirmationEmailSent {0} = Customer Email
VendrCheckout.Confirmation.ReturnToStore

VendrCheckout.Navigation.ReturnTo {0} = Page name
VendrCheckout.Navigation.ContinueTo {0} = Page name