feat: add profit and special discount fields to ProductVariant model
- Updated ProductVariant model to include 'profit' and 'special_discount_percent' fields. - Added corresponding fields in the admin interface for ProductVariant. - Created migration to add new fields to the database. feat: implement special discount code functionality in cart - Added composables for submitting and deleting special discount codes. - Updated CartSummary and CartItem components to handle special discount codes. - Enhanced API endpoints to support special discount operations. - Updated global types to include special discount code details in the cart.
This commit is contained in:
@@ -7,7 +7,7 @@ from azbankgateways import (
|
||||
from .models import OrderModel
|
||||
from account.models import PushSubscription
|
||||
import ghasedak_sms
|
||||
|
||||
from product.models import ProductImageModel
|
||||
from celery import shared_task
|
||||
|
||||
@shared_task
|
||||
@@ -24,6 +24,8 @@ def udpate_bank_status():
|
||||
bank_record = bank_models.Bank.objects.get(tracking_code=item.tracking_code)
|
||||
if bank_record.is_success:
|
||||
bank_record.order.cart.clear_cart()
|
||||
bank_record.order.is_paid = True
|
||||
bank_record.order.save()
|
||||
logging.debug("This record is verify now.", extra={"pk": bank_record.pk})
|
||||
else:
|
||||
order = bank_record.order
|
||||
|
||||
Reference in New Issue
Block a user