Browse Source

Merge pull request #2507 from sasha0/feature/docs

Add docs for price currencies.
master
Samir Shah 8 years ago
parent
commit
074030bd2b
No account linked to committer's email address
2 changed files with 18 additions and 0 deletions
  1. 2
    0
      docs/source/ref/settings.rst
  2. 16
    0
      docs/source/topics/prices_and_availability.rst

+ 2
- 0
docs/source/ref/settings.rst View File

@@ -368,6 +368,8 @@ Default: ``GBP``
368 368
 This should be the symbol of the currency you wish Oscar to use by default.
369 369
 This will be used by the currency templatetag.
370 370
 
371
+.. _currency-format-setting:
372
+
371 373
 ``OSCAR_CURRENCY_FORMAT``
372 374
 -------------------------
373 375
 

+ 16
- 0
docs/source/topics/prices_and_availability.rst View File

@@ -161,6 +161,22 @@ For most projects, subclassing and overriding the ``Structured`` base class
161 161
 should be sufficient.  However, Oscar also provides mixins to easily compose the
162 162
 appropriate strategy class for your domain.
163 163
 
164
+Currency
165
+--------
166
+
167
+Oscar allows you to define a currency code for each stock - a text field that
168
+defaults to ``settings.OSCAR_DEFAULT_CURRENCY``.
169
+
170
+By default, Oscar expects all products added to a single basket to have the
171
+same currency. It does not however do any logic to select the appropriate
172
+stock record to achieve this - you must implement this yourself in the
173
+:func:`~oscar.apps.partner.strategy.Structured.select_stockrecord` method.
174
+Oscar does not determine or store user currency and uses it only for
175
+formatting product price. More complex logic, like currency switch or
176
+conversion can be implemented additionally.
177
+
178
+More about currency formatting configuration - :ref:`currency-format-setting`.
179
+
164 180
 Loading a strategy
165 181
 ------------------
166 182
 

Loading…
Cancel
Save