You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

28 line
660 B

  1. $(() => {
  2. class ProductListing {
  3. constructor() {
  4. let me = this;
  5. let is_item_group_page = $(".item-group-content").data("item-group");
  6. this.item_group = is_item_group_page || null;
  7. let view_type = localStorage.getItem("product_view") || "List View";
  8. // Render Product Views, Filters & Search
  9. new erpnext.ProductView({
  10. view_type: view_type,
  11. products_section: $('#product-listing'),
  12. item_group: me.item_group
  13. });
  14. this.bind_card_actions();
  15. }
  16. bind_card_actions() {
  17. erpnext.e_commerce.shopping_cart.bind_add_to_cart_action();
  18. erpnext.e_commerce.wishlist.bind_wishlist_action();
  19. }
  20. }
  21. new ProductListing();
  22. });