File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,14 @@ class Meta:
27
27
28
28
class OrderLineItemsType (DjangoObjectType ):
29
29
db_id = graphene .Int (source = 'id' )
30
+ humanize_total_price = graphene .String ()
31
+ humanize_price_per_unit = graphene .String ()
32
+
33
+ def resolve_humanize_total_price (self , info ):
34
+ return self .humanize_total_price ()
35
+
36
+ def resolve_humanize_price_per_unit (self , info ):
37
+ return self .humanize_price_per_unit ()
30
38
class Meta :
31
39
model = OrderLineItem
32
40
fields = (
@@ -50,7 +58,10 @@ class OrderType(DjangoObjectType):
50
58
humanize_total_tax = graphene .String ()
51
59
humanize_total_paid_amount = graphene .String ()
52
60
due = graphene .String ()
61
+ total_price_without_symbol = graphene .String ()
53
62
63
+ def resolve_total_price_without_symbol (self , info ):
64
+ return self .humanize_total_price (locale = '' )
54
65
55
66
def resolve_humanize_total_price (self , info ):
56
67
return self .humanize_total_price ()
Original file line number Diff line number Diff line change @@ -108,6 +108,10 @@ class Meta:
108
108
class ProductVariantAdminType (DjangoObjectType ):
109
109
db_id = graphene .Int (source = "id" )
110
110
display_name = graphene .String ()
111
+ humanize_price = graphene .String ()
112
+
113
+ def resolve_humanize_price (self , info ):
114
+ return self .humanize_total_price ()
111
115
class Meta :
112
116
model = ProductVariant
113
117
fields = (
You can’t perform that action at this time.
0 commit comments