VirtoCommerce have a module that allows adding a basic shopping cart and checkout functionality to the website easily: https://github.com/VirtoCommerce/vc-module-javascript-shoppingcart.
Integration sample could be found here:
https://github.com/VirtoCommerce/vc-samples/tree/master/JsShoppngCartIntergationSample
Below I will guide you on how to localize the module content, e.g. Checkout form. Here is how it looks by default:
To add another language support, e.g. Russian, you need to do the following:
- Find and copy
translations.js
file, name copyru.translations.js
- Change defined constant name to e.g.
'virtoCommerce.cartModule.ruTranslations'
, and use any translations you want:
- Add created localization object to the translations collection in
cart.js
:
- To use Russian translations by default, you could change preferred language to
'ru'
in config section above:
$translateProvider.preferredLanguage('ru');
- To switch between languages in runtime, you can call in your language switching handler:
$translate.use('ru');
After building and installing the module and restarting the platform, checkout form looks like this: