Esempio n. 1
0
SHOW_SITE = config_register(
    BooleanValue(
        SHOP_GROUP,
        'SHOW_SITE',
        description=_('Show Site Field?'),
        help_text=
        _("Should the Site field be displayed in the admin lists? A server restart is required for this to take effect."
          ),
        default=True))

config_register(
    DecimalValue(
        SHOP_GROUP,
        'CART_ROUNDING',
        description=_('Cart Quantity Rounding Factor'),
        help_text=
        _("What to round cart adds/deletes by, a '1' here means to round up to a whole number.  Must be -1 to 1."
          ),
        default=Decimal('1')))

config_register(
    PositiveIntegerValue(
        SHOP_GROUP,
        'CART_PRECISION',
        description=_('Cart Quantity Decimal Places'),
        help_text=
        _("How many places to assume for cart quantities, use 0 unless you are selling products in fractional quantities."
          ),
        default=0))

PERSISTENT_CART = config_register(
Esempio n. 2
0
                                    ordering=101)

config_register_list(
    StringValue(SHIPPING_GROUP,
                'USER_ID',
                description=_("USPS  Username"),
                help_text=_("User ID provided by USPS site."),
                default=""),
    StringValue(SHIPPING_GROUP,
                'USER_PASSWORD',
                description=_("USPS Password"),
                help_text=_("User password provided by USPS site."),
                default=""),
    DecimalValue(
        SHIPPING_GROUP,
        'HANDLING_FEE',
        description=_("Handling Fee"),
        help_text=_("The cost of packaging and taking order to post office"),
        default=Decimal('0.00')),
    MultipleStringValue(
        SHIPPING_GROUP,
        'USPS_SHIPPING_CHOICES',
        description=_("USPS Shipping Choices Available to customers."),
        choices=(
            (('0', 'First Class')),
            (('1', 'Priority Mail')),
            (('16', 'Priority Mail Flat-Rate Envelope')),
            (('17', 'Priority Mail Flat-Rate Box')),
            (('22', 'Priority Mail Large Flat-Rate Box')),
            (('3', 'Express Mail')),
            (('13', 'Express Mail Flat-Rate Envelope')),
            (('4', 'Parcel Post')),
Esempio n. 3
0
from django.utils.translation import ugettext_lazy as _
from livesettings.values import StringValue, DecimalValue
from livesettings.functions import config_register_list, config_get, config_get_group

SHIP_MODULES = config_get('SHIPPING', 'MODULES')

# No need to add the choice, since it is in by default
# SHIP_MODULES.add_choice(('shipping.modules.per', _('Per piece')))

SHIPPING_GROUP = config_get_group('SHIPPING')

config_register_list(
    DecimalValue(SHIPPING_GROUP,
                 'PER_RATE',
                 description=_("Per item price"),
                 requires=SHIP_MODULES,
                 requiresvalue='shipping.modules.per',
                 default="4.00"),
    StringValue(SHIPPING_GROUP,
                'PER_SERVICE',
                description=_("Per Item Shipping Service"),
                help_text=_("Shipping service used with per item shipping"),
                requires=SHIP_MODULES,
                requiresvalue='shipping.modules.per',
                default="U.S. Mail"),
    StringValue(SHIPPING_GROUP,
                'PER_DAYS',
                description=_("Per Item Delivery Days"),
                requires=SHIP_MODULES,
                requiresvalue='shipping.modules.per',
                default="3 - 4 business days"))
Esempio n. 4
0
     description=_("Early AUTH"),
     help_text=
     _("Where possible, Authenticate on the card entry page.  This causes an immediate $.01 AUTH and release, allowing errors with the card to show on the card entry page instead of on the confirmation page.  Note that this is only supported for payment modules that can do Authorizations.  It will be silently ignored for any other processors."
       ),
     default=False),
 BooleanValue(
     PAYMENT_GROUP,
     'COUNTRY_MATCH',
     description=_("Country match required?"),
     help_text=
     _("If True, then customers may not have different countries for shipping and billing."
       ),
     default=True),
 DecimalValue(
     PAYMENT_GROUP,
     'MINIMUM_ORDER',
     description=_("Minimum Order"),
     help_text=_("""The minimum cart total before checkout is allowed."""),
     default="0.00"),
 BooleanValue(
     PAYMENT_GROUP,
     'STORE_CREDIT_NUMBERS',
     description=_("Save Credit Card Numbers"),
     help_text=
     _("If False, then the credit card will never be written to disk.  For PCI compliance, this is required unless you have your database server on a separate server not connected to the internet."
       ),
     default=False),
 PositiveIntegerValue(
     PAYMENT_GROUP,
     'CC_NUM_YEARS',
     description=_("Number of years to display for CC expiration"),
     help_text=
Esempio n. 5
0
        'UPS_SHIPPING_CHOICES',
        description=_("UPS Shipping Choices Available to customers. These are valid domestic codes only."),
        choices = (
            (('01', 'Next Day Air')),
            (('02', 'Second Day Air')),
            (('03', 'Ground')),
            (('12', '3 Day Select')),
            (('13', 'Next Day Air Saver')),
            (('14', 'Next Day Air Early AM')),
            (('59', '2nd Day Air AM')),
        ),
        default = ('03',)),

     DecimalValue(SHIPPING_GROUP,
        'HANDLING_FEE',
        description=_("Handling Fee"),
        help_text=_("The cost of packaging and getting the package off"),
        default=Decimal('0.00')),

    StringValue(SHIPPING_GROUP,
        'SHIPPING_CONTAINER',
        description=_("Type of container used to ship product."),
        choices = (
            (('00', 'Unknown')),
            (('01', 'UPS LETTER')),
            (('02', 'PACKAGE / CUSTOMER SUPPLIED')),
        ),
        default = "00"),

    BooleanValue(SHIPPING_GROUP,
        'SINGLE_BOX',
Esempio n. 6
0
from django.utils.translation import ugettext_lazy as _
from livesettings.values import BooleanValue, DecimalValue
from livesettings.functions import config_register, config_get_group
from tax.config import TAX_MODULE

TAX_MODULE.add_choice(('tax.modules.percent', _('Percent Tax')))
TAX_GROUP = config_get_group('TAX')

config_register(
    DecimalValue(TAX_GROUP,
                 'PERCENT',
                 description=_("Percent tax"),
                 requires=TAX_MODULE,
                 requiresvalue='tax.modules.percent',
                 default="0"))

config_register(
    BooleanValue(TAX_GROUP,
                 'TAX_SHIPPING_PERCENT',
                 description=_("Tax Shipping?"),
                 requires=TAX_MODULE,
                 requiresvalue='tax.modules.percent',
                 default=False))
Esempio n. 7
0
from django.utils.translation import ugettext_lazy as _
from livesettings.values import StringValue, DecimalValue
from livesettings.functions import config_register_list, config_get, config_get_group

SHIP_MODULES = config_get('SHIPPING', 'MODULES')
SHIP_MODULES.add_choice(('shipping.modules.flat', _('Flat rate')))
SHIPPING_GROUP = config_get_group('SHIPPING')

config_register_list(
    DecimalValue(SHIPPING_GROUP,
                 'FLAT_RATE',
                 description=_("Flat shipping"),
                 requires=SHIP_MODULES,
                 requiresvalue='shipping.modules.flat',
                 default="4.00"),
    StringValue(SHIPPING_GROUP,
                'FLAT_SERVICE',
                description=_("Flat Shipping Service"),
                help_text=_("Shipping service used with Flat rate shipping"),
                requires=SHIP_MODULES,
                requiresvalue='shipping.modules.flat',
                default="U.S. Mail"),
    StringValue(SHIPPING_GROUP,
                'FLAT_DAYS',
                description=_("Flat Delivery Days"),
                requires=SHIP_MODULES,
                requiresvalue='shipping.modules.flat',
                default="3 - 4 business days"))