Procházet zdrojové kódy

Bug AbsoluteDiscountBenefit (#3954)

* fix bug AbsoluteDiscountBenefit. Now discount is applied to all product and not one time on the basket only

* Revert "fix bug AbsoluteDiscountBenefit. Now discount is applied to all product and not one time on the basket only"

This reverts commit afae2c7ded.

* fix :wrench: update description for existing absolute discount

* feat :star: add migration file for absolute benefit description

* Revert "feat :star: add migration file for absolute benefit description"

This reverts commit 896c381f25.

* fix :wrench: edit existing migration file for absolute discount benefit

---------

Co-authored-by: Samar Hassan <samarhassanphone@gmail.com>
master
Elia Luca Bottos před 2 roky
rodič
revize
5bb9df3475
Žádný účet není propojen s e-mailovou adresou tvůrce revize

+ 1
- 1
src/oscar/apps/offer/abstract_models.py Zobrazit soubor

@@ -550,7 +550,7 @@ class AbstractBenefit(BaseOfferMixin, models.Model):
550 550
     )
551 551
     TYPE_CHOICES = (
552 552
         (PERCENTAGE, _("Discount is a percentage off of the product's value")),
553
-        (FIXED, _("Discount is a fixed amount off of the product's value")),
553
+        (FIXED, _("Discount is a fixed amount off of the basket's total")),
554 554
         (MULTIBUY, _("Discount is to give the cheapest product for free")),
555 555
         (FIXED_PRICE, _("Get the products that meet the condition for a fixed price")),
556 556
         (SHIPPING_ABSOLUTE, _("Discount is a fixed amount of the shipping cost")),

+ 1
- 1
src/oscar/apps/offer/migrations/0001_initial.py Zobrazit soubor

@@ -24,7 +24,7 @@ class Migration(migrations.Migration):
24 24
             name='Benefit',
25 25
             fields=[
26 26
                 ('id', models_AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
27
-                ('type', models.CharField(verbose_name='Type', max_length=128, blank=True, choices=[('Percentage', "Discount is a percentage off of the product's value"), ('Absolute', "Discount is a fixed amount off of the product's value"), ('Multibuy', 'Discount is to give the cheapest product for free'), ('Fixed price', 'Get the products that meet the condition for a fixed price'), ('Shipping absolute', 'Discount is a fixed amount of the shipping cost'), ('Shipping fixed price', 'Get shipping for a fixed price'), ('Shipping percentage', 'Discount is a percentage off of the shipping cost')])),
27
+                ('type', models.CharField(verbose_name='Type', max_length=128, blank=True, choices=[('Percentage', "Discount is a percentage off of the product's value"), ('Absolute', "Discount is a fixed amount off of the basket's total"), ('Multibuy', 'Discount is to give the cheapest product for free'), ('Fixed price', 'Get the products that meet the condition for a fixed price'), ('Shipping absolute', 'Discount is a fixed amount of the shipping cost'), ('Shipping fixed price', 'Get shipping for a fixed price'), ('Shipping percentage', 'Discount is a percentage off of the shipping cost')])),
28 28
                 ('value', oscar.models.fields.PositiveDecimalField(max_digits=12, decimal_places=2, blank=True, verbose_name='Value', null=True)),
29 29
                 ('max_affected_items', models.PositiveIntegerField(verbose_name='Max Affected Items', blank=True, help_text='Set this to prevent the discount consuming all items within the range that are in the basket.', null=True)),
30 30
                 ('proxy_class', oscar.models.fields.NullCharField(unique=True, verbose_name='Custom class', default=None, max_length=255)),

Načítá se…
Zrušit
Uložit