emile 1 year ago
parent 1ecdbe48df
commit d3560e1efc

BIN
.DS_Store vendored

Binary file not shown.

BIN
osinaweb/.DS_Store vendored

Binary file not shown.

@ -7,12 +7,12 @@ urlpatterns = [
path('add/', include('billing.add.urls')),
# LISTING
path('items', views.items, name='items'),
path('orders', views.orders, name='orders'),
path('invoices', views.invoices, name='invoices'),
path('items/', views.items, name='items'),
path('orders/', views.orders, name='orders'),
path('invoices/', views.invoices, name='invoices'),
# DETAILS
path('invoice-details/<int:order_id>', views.invoice_details, name='invoicedetails'),
path('invoice-details/<int:order_id>/', views.invoice_details, name='invoicedetails'),
path('fetch-customer-items/<int:customer_id>/', views.fetch_customer_items, name='fetch_customer_items'),

@ -60,10 +60,10 @@
<td class="px-6 py-4">
<div class="w-full flex justify-center items-center">
<button class="flex justify-center items-center gap-2 px-3 py-1 rounded-md bg-osiblue text-white border border-osiblue cursor-pointer hover:bg-white hover:text-osiblue duration-300">
Receipt
<img src="{% static 'images/icons/download.png' %}" class="w-[28px]">
</button>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-[25px] text-blue-500">
<path stroke-linecap="round" stroke-linejoin="round" d="M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3" />
</svg>
</div>
</td>
</tr>

@ -19,10 +19,10 @@
<div class="w-full flex flex-col justify-center items-center">
<p class="text-osiblue font-poppinsLight text-2xl font-semibold">$0</p>
<p class="text-gray-500">monthly/restaurant</p>
<p class="text-gray-500">monthly/individual</p>
</div>
<a href="">
<a href="{% url 'buyfreeosicard' %}">
<button
class="w-fit px-9 py-2 bg-secondosiblue border border-secondosiblue text-white uppercase hover:bg-white hover:text-secondosiblue duration-300">Get
Started

@ -21,7 +21,7 @@
<p class="text-gray-500">monthly/restaurant</p>
</div>
<a href="{% url 'payment' osimenu_basic.id %}">
<a href="{% url 'buyfreeosimenu' %}">
<button
class="w-fit px-9 py-2 bg-secondosiblue border border-secondosiblue text-white uppercase hover:bg-white hover:text-secondosiblue duration-300">Get
Started

@ -4,21 +4,23 @@ from . import views
urlpatterns = [
# LISTING
path("customer-invoices/", views.customer_invoices, name="customerinvoices"),
path("products/", views.all_products, name="products"),
path("orders/", views.customer_orders, name="orders"),
path('my-invoices/', views.customer_invoices, name='customerinvoices'),
path('products/', views.all_products, name='products'),
path('my-orders/', views.customer_orders, name='customerorders'),
# PRODUCTS URL
path("osimenu-plans/", views.osimenu_plans, name="osimenuplans"),
path("osicard-plans/", views.osicard_plans, name="osicardplans"),
path("shared-hosting-plans/", views.shared_hosting_plans, name="sharedhostingplans"),
path("cloud-vps-hosting-plans/", views.cloud_vps_hosting_plans, name="cloudvpshostingplans"),
path("dedicated-servers-plans/", views.dedicated_servers_plans, name="dedicatedserversplans"),
path('osimenu-plans/', views.osimenu_plans, name='osimenuplans'),
path('osicard-plans/', views.osicard_plans, name='osicardplans'),
path('shared-hosting-plans/', views.shared_hosting_plans, name='sharedhostingplans'),
path('cloud-vps-hosting-plans/', views.cloud_vps_hosting_plans, name='cloudvpshostingplans'),
path('dedicated-servers-plans/', views.dedicated_servers_plans, name='dedicatedserversplans'),
# PAYMENT
path("buy-free/osimenu", views.buy_free_osimenu, name="buyfreeosimenu"),
path("payment/<int:item_id>/", views.payment, name="payment"),
path("initiate_checkout/", views.initiate_checkout, name="initiatecheckout"),
path("check-order-status/<str:merchant_id>/<str:order_id>/", views.check_order_status, name="check_order_status",),
path('payment/<int:item_id>/', views.payment, name='payment'),
path('initiate_checkout/', views.initiate_checkout, name='initiatecheckout'),
path('check-order-status/<str:merchant_id>/<str:order_id>/', views.check_order_status, name='check_order_status'),
path('payment/osimenu-basic/', views.buy_free_osimenu, name='buyfreeosimenu'),
path('payment/osicard-basic/', views.buy_free_osicard, name='buyfreeosicard'),
]

@ -230,6 +230,53 @@ def buy_free_osimenu(request):
}
}
order = Order.objects.create(
customer = request.user.customerprofile,
status = 'Completed'
)
order_item = OrderItem.objects.create(
order = order,
item = get_object_or_404(Item, title='OSIMENU BASIC'),
purchased_at = datetime.now(),
)
response = requests.post(api_url, json=api_data)
print(response)
return redirect('customerorders')
def buy_free_osicard(request):
api_url = 'https://mybusinesscardpage.com/api/create-subscription/'
api_data = {
'user': {
'username': request.user.email,
'email': request.user.email,
'password': 'OSITCOM2024',
'first_name': request.user.first_name,
'last_name': request.user.last_name
},
'customer': {
'mobile_number': request.user.customerprofile.mobile_number
},
'subscription': {
'plan': 'OSICARD BASIC'
}
}
order = Order.objects.create(
customer = request.user.customerprofile,
status = 'Completed'
)
order_item = OrderItem.objects.create(
order = order,
item = get_object_or_404(Item, title='OSICARD BASIC'),
purchased_at = datetime.now(),
)
response = requests.post(api_url, json=api_data)
print(response)
return redirect('home')
return redirect('customerorders')

Binary file not shown.

Binary file not shown.

@ -47,7 +47,7 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-[25px] text-white">
<path stroke-linecap="round" stroke-linejoin="round" d="M6 6.878V6a2.25 2.25 0 0 1 2.25-2.25h7.5A2.25 2.25 0 0 1 18 6v.878m-12 0c.235-.083.487-.128.75-.128h10.5c.263 0 .515.045.75.128m-12 0A2.25 2.25 0 0 0 4.5 9v.878m13.5-3A2.25 2.25 0 0 1 19.5 9v.878m0 0a2.246 2.246 0 0 0-.75-.128H5.25c-.263 0-.515.045-.75.128m15 0A2.25 2.25 0 0 1 21 12v6a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 18v-6c0-.98.626-1.813 1.5-2.122" />
</svg>
<p class="">My Projects</p>
<p class="">Projects</p>
</div>
<div class="w-full flex justify-start items-center gap-3 border-b border-slate-600 py-3 text-white">
@ -57,6 +57,15 @@
<p>Tickets</p>
</div>
<a href="{% url 'customerorders' %}" class="w-full">
<div class="w-full flex justify-start items-center gap-3 border-b border-slate-600 py-3 text-white">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-[25px] text-white">
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 10.5V6a3.75 3.75 0 1 0-7.5 0v4.5m11.356-1.993 1.263 12c.07.665-.45 1.243-1.119 1.243H4.25a1.125 1.125 0 0 1-1.12-1.243l1.264-12A1.125 1.125 0 0 1 5.513 7.5h12.974c.576 0 1.059.435 1.119 1.007ZM8.625 10.5a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm7.5 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z" />
</svg>
<p>Orders</p>
</div>
</a>
<a href="{% url 'customerinvoices' %}" class="w-full">
<div class="w-full flex justify-start items-center gap-3 border-b border-slate-600 py-3 text-white">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-[25px] text-white">
@ -128,7 +137,7 @@
<p>Knowledgebase</p>
</div>
<div class="w-full flex justify-start items-center gap-3 py-3 text-white">
<div class="w-full flex justify-start items-center gap-3 border-b border-slate-600 py-3 text-white">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-[25px] text-white">
<path stroke-linecap="round" stroke-linejoin="round" d="M20.25 8.511c.884.284 1.5 1.128 1.5 2.097v4.286c0 1.136-.847 2.1-1.98 2.193-.34.027-.68.052-1.02.072v3.091l-3-3c-1.354 0-2.694-.055-4.02-.163a2.115 2.115 0 0 1-.825-.242m9.345-8.334a2.126 2.126 0 0 0-.476-.095 48.64 48.64 0 0 0-8.048 0c-1.131.094-1.976 1.057-1.976 2.192v4.286c0 .837.46 1.58 1.155 1.951m9.345-8.334V6.637c0-1.621-1.152-3.026-2.76-3.235A48.455 48.455 0 0 0 11.25 3c-2.115 0-4.198.137-6.24.402-1.608.209-2.76 1.614-2.76 3.235v6.226c0 1.621 1.152 3.026 2.76 3.235.577.075 1.157.14 1.74.194V21l4.155-4.155" />
</svg>
@ -193,7 +202,7 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-[25px] text-white">
<path stroke-linecap="round" stroke-linejoin="round" d="M6 6.878V6a2.25 2.25 0 0 1 2.25-2.25h7.5A2.25 2.25 0 0 1 18 6v.878m-12 0c.235-.083.487-.128.75-.128h10.5c.263 0 .515.045.75.128m-12 0A2.25 2.25 0 0 0 4.5 9v.878m13.5-3A2.25 2.25 0 0 1 19.5 9v.878m0 0a2.246 2.246 0 0 0-.75-.128H5.25c-.263 0-.515.045-.75.128m15 0A2.25 2.25 0 0 1 21 12v6a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 18v-6c0-.98.626-1.813 1.5-2.122" />
</svg>
<p class="text-white">My Projects</p>
<p class="text-white">Projects</p>
</div>
</div>
</div>
@ -211,6 +220,19 @@
</div>
<div class="w-full">
<div class="w-full flex justify-between items-center border-b border-slate-600 py-3">
<div class="w-full flex justify-start items-center gap-3">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-[25px] text-white">
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 10.5V6a3.75 3.75 0 1 0-7.5 0v4.5m11.356-1.993 1.263 12c.07.665-.45 1.243-1.119 1.243H4.25a1.125 1.125 0 0 1-1.12-1.243l1.264-12A1.125 1.125 0 0 1 5.513 7.5h12.974c.576 0 1.059.435 1.119 1.007ZM8.625 10.5a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm7.5 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z" />
</svg>
<p class="text-white">Orders</p>
</div>
</div>
</div>
<a href="{% url 'customerinvoices' %}" class="w-full">
<div class="w-full flex justify-between items-center border-b border-slate-600 py-3">
<div class="w-full flex justify-start items-center gap-3">

Loading…
Cancel
Save