Update: Thai Baht and a tiny tags fix

by David Colquhoun on February 23, 2012, News RSS Feed

You can either update your whole theme, or just apply the fixes described below.

The tag links on product pages weren't being handleized,  so there were spaces in the links where there should have been dashes "-".   

In Shopify Admin > Themes > Template Editor, find the "product.liquid" file in the left side nav.
Change line 96 from:                        
    <li><a href="/collections/{{ collection.handle }}/{{ tag | handleize }}">{{ tag }}</a></li>
to
    <li><a href="/collections/{{ collection.handle }}/{{ tag }}">{{ tag }}</a></li>

And line 98 from
    <li><a href="/collections/all/{{ tag | handleize }}">{{ tag }}</a></li>
to
    <li><a href="/collections/all/{{ tag }}">{{ tag }}</a></li>


To add Thai Baht to the list of currencies...

In Shopify Admin > Themes > Template Editor
Find the "theme.liquid" file in the left side nav.
Around line 306 look for lines similar to these, and replace all 4 lines of code:

{% for i in (1..41) %}
    {% capture tempCurrencyCode %}{% cycle 'code' : 'USD', 'CAD', 'GBP', 'EUR', 'JPY', 'AUD', 'NZD', 'BRL', 'BND', 'DKK', 'EGP', 'HKD', 'ISK', 'INR', 'IRR', 'IQD', 'ILS', 'JMD', 'MMK', 'LBP', 'MYR', 'MXN', 'ANG', 'TWD', 'NOK', 'PHP', 'RON', 'RUB', 'SAR', 'SGD', 'ZAR', 'KRW', 'SEK', 'CHF', 'TTD', 'AED', 'VEF', 'VND', 'PLN', 'BZD', 'THB' %}{% endcapture %}
    {% capture tempCurrencyName %}{% cycle 'name' : 'United States dollar', 'Canadian dollar', 'United Kingdom Pounds', 'Euro', 'Japanese yen', 'Australian dollar', 'New Zealand dollar', 'Brazilian real', 'Brunei dollar', 'Danish krone', 'Egyptian pound', 'Hong Kong dollar', 'Icelandic króna', 'Indian rupee', 'Iranian rial', 'Iraqi dinar', 'Israeli new sheqel', 'Jamaican dollar', 'Myanmar kyat', 'Lebanese pound', 'Malaysian ringgit', 'Mexican peso', 'Netherlands Antillean guildern', 'New Taiwan dollar', 'Norwegian krone', 'Philippine peso', 'Romanian new leu', 'Russian ruble', 'Saudi riyal', 'Singapore dollar', 'South African rand', 'South Korean won', 'Swedish krona', 'Swiss franc', 'Trinidad and Tobago dollar', 'United Arab Emirates dirham', 'Venezuelan bolívar­ fuerte', 'Vietnamese dong', 'Polish Zlotych', 'Belize dollar', 'Thai Bhat' %}{% endcapture %}
    {% capture tempCurrencySymbol %}{% cycle 'symbol' : 'dollar', 'dollar', 'pound', 'euro', 'yen', 'dollar', 'dollar', 'dollar', 'dollar', '', 'pound', 'dollar', '', '', '', '', '', 'dollar', '', 'pound', '', 'dollar', '', 'dollar', '', '', '', '', '', 'dollar', '', '', '', '', 'dollar', '', '', '', '', 'dollar', '' %}{% endcapture %}

In "shared.js.liquid", around line 201, look for a line that starts with 'THB', and replace with this line:
    'THB': ['', ',', '.', 2, '฿'],

In "settings.html", right at the bottom of the file, look for this line:
    <tr><th><input type="checkbox" name="currency-TTD" id="currency-TTD" value="1" /></th><td><label for="currency-TTD">Trinidad and Tobago dollar (TTD)</label></td></tr>

And add this line just before it,
    <tr><th><input type="checkbox" name="currency-THB" id="currency-THB" value="1" /></th><td><label for="currency-THB">Thai Bhat (THB)</label></td></tr>

If you have any questions or need help updating, let me know :)
David,