brotherton-erpnext/erpnext/www/shop-by-category/index.js
marination d7130e31fe feat: Shop by Category
- Added Shop by Category Page
- Tabbed sections for item fields in Shop by Category Page
- Added Shop by Category Section in E commerce Settings
- Nested Navigation & Breadcrumbs in Item group pages
- Added scrollable & clickable Sub categories in Item Group page
- Made breadcrumbs slightly dynamic in Item Page
- Added image to Brand doctype
2021-10-12 17:00:30 +05:30

12 lines
359 B
JavaScript

$(() => {
$('.category-card').on('click', (e) => {
let category_type = e.currentTarget.dataset.type;
let category_name = e.currentTarget.dataset.name;
if (category_type != "item_group") {
let filters = {};
filters[category_type] = [category_name];
window.location.href = "/all-products?field_filters=" + JSON.stringify(filters);
}
});
});