How to use Name in Ecommerce Product URL instead of parametrized ID

Advertisements I am building a small ecommerce website using PHP. Right now, I am displaying data in product.php file using ?id=product_name parameter. So, the current URL structure looks like: mysite.com/product.php?id=boroplus-12312 But I want to change the URL structure to that of Amazon and Flipkart. They use product names in the URL such as: flipkart.com/boroplus-antiseptic-moisturising/someOtheProductParameters amazon.com/boroplus-antiseptic-moisturising/someOtheProductParameters… Read More How to use Name in Ecommerce Product URL instead of parametrized ID

I can't get product vendor id in django

Advertisements I am working on an e-commerce project. But the product vendor id is not registered in the database. I’ve tried many ways. I would be glad if you help. seller_id always comes empty What are your suggestions? models.py class Product(models.Model): name = models.CharField(verbose_name="Məhsulun adı", max_length=150) description = models.TextField( verbose_name="Məhsul haqda məlumat", null=True) price =… Read More I can't get product vendor id in django

What causes the "Argument expression expected" error in this Angular 13 app?

Advertisements I am working on an e-commerce app who’s front-end is made in Angular 13. The below code is intended to sum the prices of the items in the cart: import { Component, OnInit } from ‘@angular/core’; @Component({ selector: ‘.app-top-cart’, templateUrl: ‘./top-cart.component.html’, styleUrls: [‘./top-cart.component.css’] }) export class TopCartComponent implements OnInit { cartItems: any = [… Read More What causes the "Argument expression expected" error in this Angular 13 app?

List products in relation to the vendor clicked in django ecommerce

Advertisements I have listed all the vendors (users which are staff) in my django tempelate using the following code. In tempelates: {% for stf in staff %} <li><a href="{% url ‘vendor_products’ %}">{{stf.username}}</a></li> {% endfor %} In views: def vendor_products(request): vend_prod = Product.objects.filter(user_id=request.user.id) context={ ‘vend_prod’: vend_prod } return render(request, "vendor_products.html", context) The usernames of the suppliers(vendors)… Read More List products in relation to the vendor clicked in django ecommerce