An attempt to localise the Google and Paypal checkout buttons.
Google always default to English it seems, at least then the sequel is in the locale (https://developers.google.com/checkout/developer/Google_Checkout_Basic_HTML_Google_Checkout_Buttons) For Paypal when the buttons does no exits (work for fr_FR or nl_NL for instance but not fr or nl_BE, etc.), fallbacks to en_US git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1528906 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -36,14 +36,17 @@ under the License.
|
||||
<ul>
|
||||
<li><a href="<@ofbizUrl>view/showcart</@ofbizUrl>">[${uiLabelMap.OrderViewCart}]</a></li>
|
||||
<#if (shoppingCartSize > 0)>
|
||||
<#if !initialLocaleComplete?exists || initialLocaleComplete?length == 2 >
|
||||
<#assign initialLocaleComplete = "en_US">
|
||||
</#if>
|
||||
<li id="quickCheckoutEnabled"><a href="<@ofbizUrl>quickcheckout</@ofbizUrl>">[${uiLabelMap.OrderCheckoutQuick}]</a></li>
|
||||
<li id="quickCheckoutDisabled" style="display:none" class="disabled">[${uiLabelMap.OrderCheckoutQuick}]</li>
|
||||
<li id="onePageCheckoutEnabled"><a href="<@ofbizUrl>onePageCheckout</@ofbizUrl>">[${uiLabelMap.EcommerceOnePageCheckout}]</a></li>
|
||||
<li id="onePageCheckoutDisabled" style="display:none" class="disabled">[${uiLabelMap.EcommerceOnePageCheckout}]</li>
|
||||
<li id="googleCheckoutEnabled"><a href="<@ofbizUrl>googleCheckout</@ofbizUrl>"><img src="https://checkout.google.com/buttons/checkout.gif?merchant_id=634321449957567&w=160&h=43&style=white&variant=text&loc=en_US" alt="[${uiLabelMap.EcommerceCartToGoogleCheckout}]" /></a></li>
|
||||
<li id="googleCheckoutDisabled" style="display:none" class="disabled"><img src="https://checkout.google.com/buttons/checkout.gif?merchant_id=634321449957567&w=160&h=43&style=white&variant=text&loc=en_US" alt="[${uiLabelMap.EcommerceCartToGoogleCheckout}]" /></li>
|
||||
<li id="googleCheckoutEnabled"><a href="<@ofbizUrl>googleCheckout</@ofbizUrl>"><img src="https://checkout.google.com/buttons/checkout.gif?merchant_id=634321449957567&w=160&h=43&style=white&variant=text&loc=${initialLocaleComplete}" alt="[${uiLabelMap.EcommerceCartToGoogleCheckout}]" /></a></li>
|
||||
<li id="googleCheckoutDisabled" style="display:none" class="disabled"><img src="https://checkout.google.com/buttons/checkout.gif?merchant_id=634321449957567&w=160&h=43&style=white&variant=text&loc=${initialLocaleComplete}" alt="[${uiLabelMap.EcommerceCartToGoogleCheckout}]" /></li>
|
||||
<#if shoppingCart?has_content && (shoppingCart.getGrandTotal() > 0)>
|
||||
<li id="microCartPayPalCheckout"><a href="<@ofbizUrl>setPayPalCheckout</@ofbizUrl>"><img src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" alt="[PayPal Express Checkout]" /></a></li>
|
||||
<li id="microCartPayPalCheckout"><a href="<@ofbizUrl>setPayPalCheckout</@ofbizUrl>"><img src="https://www.paypal.com/${initialLocaleComplete}/i/btn/btn_xpressCheckout.gif" alt="[PayPal Express Checkout]" onError="this.onerror=null;this.src='https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif'"/></a></li>
|
||||
</#if>
|
||||
<#else>
|
||||
<li class="disabled">[${uiLabelMap.OrderCheckoutQuick}]</li>
|
||||
|
||||
@@ -24,6 +24,9 @@ under the License.
|
||||
<!-- Column Included Screens -->
|
||||
<screen name="microcart">
|
||||
<section>
|
||||
<actions>
|
||||
<set field="initialLocaleComplete" type="String" value="${groovy:parameters?.userLogin?.lastLocale}" default-value="${groovy:locale.toString()}"/>
|
||||
</actions>
|
||||
<widgets>
|
||||
<platform-specific><html><html-template location="component://ecommerce/webapp/ecommerce/cart/microcart.ftl"/></html></platform-specific>
|
||||
</widgets>
|
||||
|
||||
Reference in New Issue
Block a user