Subversion Repositories SmartDukaan

Rev

Rev 5173 | Rev 5263 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5173 Rev 5261
Line 809... Line 809...
809
            exportDir.mkdir();
809
            exportDir.mkdir();
810
        }
810
        }
811
 
811
 
812
        VelocityContext context = new VelocityContext();
812
        VelocityContext context = new VelocityContext();
813
 
813
 
-
 
814
        Category parentCategory = expEntity.getCategory().getParentCategory();
-
 
815
        Boolean isComparable = parentCategory.isComparable();
814
        String mediaPrefix = EntityUtils.getMediaPrefix(expEntity);
816
        String mediaPrefix = EntityUtils.getMediaPrefix(expEntity);
815
        context.put("mediaPrefix", mediaPrefix);
817
        context.put("mediaPrefix", mediaPrefix);
816
        context.put("expentity", expEntity);
818
        context.put("expentity", expEntity);
817
        context.put("contentVersion", this.contentVersion);
819
        context.put("contentVersion", this.contentVersion);
818
        context.put("defs", Catalog.getInstance().getDefinitionsContainer());
820
        context.put("defs", Catalog.getInstance().getDefinitionsContainer());
819
        context.put("helpdocs", CreationUtils.getHelpdocs());
821
        context.put("helpdocs", CreationUtils.getHelpdocs());
820
        context.put("params", getEntityParameters(expEntity));
822
        context.put("params", getEntityParameters(expEntity));
-
 
823
        context.put("isComparable", isComparable);
821
 
824
 
822
        List<String> filenames = new ArrayList<String>();
825
        List<String> filenames = new ArrayList<String>();
823
        filenames.add("ProductDetail");
826
        filenames.add("ProductDetail");
824
        filenames.add("WidgetSnippet");
827
        filenames.add("WidgetSnippet");
825
        filenames.add("HomeSnippet");
828
        filenames.add("HomeSnippet");
Line 827... Line 830...
827
        filenames.add("CategorySnippet");
830
        filenames.add("CategorySnippet");
828
        filenames.add("SlideGuide");
831
        filenames.add("SlideGuide");
829
        filenames.add("MyResearchSnippet");
832
        filenames.add("MyResearchSnippet");
830
        filenames.add("AfterSales");
833
        filenames.add("AfterSales");
831
        
834
        
832
        Category parentCategory = expEntity.getCategory().getParentCategory();
-
 
833
        if(parentCategory.isComparable()){
835
        if(isComparable){
834
        	filenames.add("CompareProductSnippet");
836
        	filenames.add("CompareProductSnippet");
835
        	filenames.add("ComparisonSnippet");
837
        	filenames.add("ComparisonSnippet");
836
        	filenames.add("CompareProductSummarySnippet");
838
        	filenames.add("CompareProductSummarySnippet");
837
        	getMostComparedProducts(expEntity, exportPath);
839
        	getMostComparedProducts(expEntity, exportPath);
838
        	getSlidenamesSnippet(expEntity, exportPath);
840
        	getSlidenamesSnippet(expEntity, exportPath);
Line 861... Line 863...
861
        // This method wont use any velocity file, So calling directly
863
        // This method wont use any velocity file, So calling directly
862
        getProductPropertiesSnippet(expEntity, exportPath);
864
        getProductPropertiesSnippet(expEntity, exportPath);
863
 
865
 
864
        applyVelocityTemplate(filenames, exportPath, context, catalogId);
866
        applyVelocityTemplate(filenames, exportPath, context, catalogId);
865
 
867
 
866
        generateImages(expEntity, mediaPrefix);
868
        /*generateImages(expEntity, mediaPrefix);
867
 
869
 
868
        copyDocuments(expEntity, mediaPrefix);
870
        copyDocuments(expEntity, mediaPrefix);*/
869
    }
871
    }
870
 
872
 
871
    /**
873
    /**
872
     * Get list of files and apply velocity templates on them
874
     * Get list of files and apply velocity templates on them
873
     *
875
     *