Restructure pages for permutations and basket with metadata for is_included_VAT, id_currency, id_region_delivery

This commit is contained in:
2024-04-21 15:13:09 +01:00
parent f1b095ba83
commit bbb7800dc8
40 changed files with 524 additions and 277 deletions

View File

@@ -184,6 +184,14 @@ class Category(db.Model):
if not (len(self.products) == 0):
print(f'getting first permutation from product')
return None if len(self.products) == 0 else self.products[0].get_permutation_selected()
def is_available(self):
if len(self.products) == 0:
return False
for product in self.products:
if product.is_available():
return True
return False
class Product_Category_Filters():