product URL
This commit is contained in:
@@ -195,10 +195,17 @@ class MyProductsService(BaseService):
|
||||
member_data = Members.get_member_by_uid(uid)
|
||||
member_id = member_data.id
|
||||
|
||||
# getting the url-name part
|
||||
url_name_part = str(random.randint(100000, 999999)) # Starr with random numbers
|
||||
member_profile_data = MembersProfile.get_member_profile_by_profile_uid(uid)
|
||||
if member_profile_data and member_profile_data.url_name != None:
|
||||
url_name_part = member_profile_data.url_name
|
||||
|
||||
|
||||
|
||||
product_id = validated_data.get('product_id')
|
||||
product_data = Products.get_product_by_product_id(product_id)
|
||||
configured_start_url = product_data.start_url
|
||||
|
||||
if not product_data:
|
||||
if not product_data:
|
||||
@@ -221,8 +228,10 @@ class MyProductsService(BaseService):
|
||||
"uid": uid
|
||||
}
|
||||
return ResponseHelper.success(data=response_data)
|
||||
if configured_start_url =='':
|
||||
configured_start_url = MyProductsService.START_URL_PATTERN
|
||||
|
||||
internal_url = str(random.randint(100000, 999999)) + MyProductsService.START_URL_PATTERN # ".devprov.mermsemr.com"
|
||||
internal_url = url_name_part + configured_start_url # ".devprov.mermsemr.com"
|
||||
status = 6
|
||||
subscription = MembersProducts.create_subscription(member_id, product_id, status, internal_url)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user