You are here

function dc_ajax_add_cart_currency_load in Commerce Ajax Add to Cart 7.2

Returns the default/user-based currency.

Return value

array Commerce currency info array.

See also

https://www.drupal.org/node/2846386

3 calls to dc_ajax_add_cart_currency_load()
template_preprocess_dc_ajax_add_to_cart_message in ./dc_ajax_add_cart.module
Add more variables to add to cart message popup message.
template_preprocess_dc_ajax_shopping_cart in ./dc_ajax_add_cart.module
Add more variables to shopping cart block.
template_preprocess_dc_ajax_shopping_cart_teaser in ./dc_ajax_add_cart.module
Add more variables to shopping cart teaser.

File

./dc_ajax_add_cart.module, line 875
Ajax add to cart module.

Code

function dc_ajax_add_cart_currency_load() {
  if (module_exists('commerce_multicurrency')) {
    return commerce_currency_load(commerce_multicurrency_get_user_currency_code());
  }
  else {
    return commerce_currency_load(commerce_default_currency());
  }
}