MINIMAL-currency converter MOBILE= main menu as the last item, DESKTOP=header next to cart aligned

petra739
New Member
2 0 0

Hello.

Trying to figure our how to adapt the code in order to have my currency converter displaying following way - differs between desktop and mobile

DESKTOP:

to have it always next to the cart icon in the header aligned.

MOBILE:

To have it placed as the last item in my main menu 

 

anyone could help please? MOBILE is main I need help with. Thanks a lot!

 

This is code:

{%comment%} Currency converter Code: Don't Delete {%endcomment%}
<script>
window.bucksCC = window.bucksCC || {};
window.bucksCC.config = {}; window.bucksCC.reConvert = function () {};
"function"!=typeof Object.assign&&(Object.assign=function(n){if(null==n)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(n),t=1;t<arguments.length;t++){var e=arguments[t];if(null!=e)for(var o in e)e.hasOwnProperty(o)&&(r[o]=e[o])}return r});
Object.assign(window.bucksCC.config, {"id":null,"active":true,"userCurrency":"","selectedCurrencies":"[{\"CHF\":\"Swiss Franc (CHF)\"},{\"EUR\":\"Euro (EUR)\"},{\"USD\":\"US Dollar (USD)\"},{\"GBP\":\"British Pound (GBP)\"},{\"CAD\":\"Canadian Dollar (CAD)\"},{\"AUD\":\"Australian Dollar (AUD)\"},{\"CNY\":\"Chinese Yuan (CNY)\"},{\"JPY\":\"Japanese Yen (JPY)\"}]","autoSwitchCurrencyLocationBased":true,"moneyWithCurrencyFormat":true,"autoSwitchOnlyToPreferredCurrency":false,"showCurrencyCodesOnly":false,"displayPositionType":"floating","displayPosition":"bottom_right","customPosition":"header a[href*=\"/cart\"]","positionPlacement":"after","mobileDisplayPositionType":"header","mobileDisplayPosition":"bottom_left","mobileCustomPosition":"header a[href*=\"/cart\"]","mobilePositionPlacement":"after","showInDesktop":true,"showInMobileDevice":true,"showOriginalPriceOnMouseHover":true,"customOptionsPlacement":false,"optionsPlacementType":"left_upwards","customOptionsPlacementMobile":false,"optionsPlacementTypeMobile":"left_upwards","cartNotificationStatus":true,"cartNotificationMessage":"We process all orders in {STORE_CURRENCY} and you will be checkout using the most current exchange rates.","cartNotificationBackgroundColor":"rgba(245,245,85,1)","cartNotificationTextColor":"rgba(30,30,30,1)","roundingDecimal":0,"priceRoundingType":"none","defaultCurrencyRounding":false,"integrateWithOtherApps":true,"themeType":"default","backgroundColor":"rgba(231,236,232,1)","textColor":"rgba(30,30,30,1)","hoverColor":"rgba(203,213,204,1)","borderStyle":"boxShadow","instantLoader":false,"darkMode":false,"flagStyle":"traditional","flagTheme":"flat","flagDisplayOption":"showFlagAndCurrency","expertSettings":"{\"css\":\"\"}"}, { money_format: {{ shop.money_format | json }}, money_with_currency_format: {{ shop.money_with_currency_format | json }}, userCurrency: {{ shop.currency | json }} }); window.bucksCC.config.multiCurrencies = []; {% assign cu = shop.enabled_currencies | map: 'iso_code' | join: ',' %} window.bucksCC.config.multiCurrencies = "{{cu}}".split(',') || ''; window.bucksCC.config.cartCurrency = "{{ cart.currency.iso_code }}" || '';
</script>

0 Likes