Compare commits

..
1 Commits
Author SHA1 Message Date
CAGETTE DEPLOYER 93f3d362a4 fix empty categories 2020-12-09 23:04:20 +04:00
2 changed files with 10 additions and 6 deletions
+1 -3
View File
@@ -7,7 +7,7 @@ ENV?="dev"
install: install:
#copy config file from template #copy config file from template
#cp config.xml.dist config.xml cp config.xml.dist config.xml
@if [ $(ENV) = "dev" ]; then \ @if [ $(ENV) = "dev" ]; then \
make install_dev; \ make install_dev; \
fi fi
@@ -63,8 +63,6 @@ frontend:
else \ else \
haxe cagetteJs.hxml; \ haxe cagetteJs.hxml; \
fi fi
mkdir -p tmp
chown www-data:www-data tmp
#update POT file from source #update POT file from source
i18n: i18n:
+8 -2
View File
@@ -164,7 +164,13 @@ class ShopCart
var groups = new Map<Int,{name:String,products:Array<ProductInfo>}>(); var groups = new Map<Int,{name:String,products:Array<ProductInfo>}>();
var pinned = new Map<Int,{name:String,products:Array<ProductInfo>}>(); var pinned = new Map<Int,{name:String,products:Array<ProductInfo>}>();
var firstCategGroup = this.categories[0].categs;
trace(this.categories);
var firstCategGroup = null;
if (this.categories.length > 0){
firstCategGroup = this.categories[0].categs;
}
//trace(firstCategGroup); //trace(firstCategGroup);
//trace(pinnedCategories); //trace(pinnedCategories);
@@ -181,7 +187,7 @@ class ShopCart
for ( categ in p.categories){ for ( categ in p.categories){
if (Lambda.find(firstCategGroup, function(c) return c.id == categ) != null){ if (firstCategGroup != null && Lambda.find(firstCategGroup, function(c) return c.id == categ) != null){
//is in this category group //is in this category group
var g = groups.get(categ); var g = groups.get(categ);