Subversion Repositories SmartDukaan

Rev

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

Rev 2829 Rev 3719
Line 1... Line 1...
1
package in.shop2020.util;
1
package in.shop2020.util;
2
 
2
 
-
 
3
import in.shop2020.model.v1.catalog.Category;
3
import in.shop2020.model.v1.catalog.Item;
4
import in.shop2020.model.v1.catalog.Item;
4
import in.shop2020.utils.CategoryManager;
5
import in.shop2020.utils.CategoryManager;
5
 
6
 
6
import java.io.File;
7
import java.io.File;
7
import java.util.ArrayList;
8
import java.util.ArrayList;
Line 70... Line 71...
70
	 * Check whether product is mobile or not
71
	 * Check whether product is mobile or not
71
	 * @param item
72
	 * @param item
72
	 * @return
73
	 * @return
73
	 */
74
	 */
74
	private boolean isMobile(Item item){
75
	private boolean isMobile(Item item){
75
		long parentCategoryId = CategoryManager.getCategoryManager().getCategory(item.getCategory()).getParent_category_id();
76
		Category category = CategoryManager.getCategoryManager().getCategory(item.getCategory());
-
 
77
        long parentCategoryId = category.getParent_category_id();
76
		if(parentCategoryId == Utils.MOBILE_ACCESSORIES_CATEGORY){
78
		if(parentCategoryId == Utils.MOBILE_ACCESSORIES_CATEGORY || category.getId() == Utils.LAPTOPS_CATEGORY){
77
			return false;
79
			return false;
78
		}
80
		}
79
		return true;
81
		return true;
80
	}
82
	}
81
	
83